latexdraw-3.3.8/000077500000000000000000000000001321075051700135215ustar00rootroot00000000000000latexdraw-3.3.8/README.md000066400000000000000000000006451321075051700150050ustar00rootroot00000000000000latexdraw ========= A vector drawing editor for LaTeX. Its manual: https://github.com/arnobl/latexdraw/wiki/Manual Distributed by Ubuntu and Debian. Binaries downloadable on the sourceforge page: http://sourceforge.net/projects/latexdraw/ Bugs and roadmaps are on launchpad: https://launchpad.net/latexdraw You can support this software by making a donation: http://sourceforge.net/donate/index.php?group_id=156523 latexdraw-3.3.8/latexdraw-core/000077500000000000000000000000001321075051700164425ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/000077500000000000000000000000001321075051700231015ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/.gitignore000066400000000000000000000001341321075051700250670ustar00rootroot00000000000000/target /latexdraw.bundle.iml /.idea/ Supprimerait .idea/ Supprimerait latexdraw.bundle.iml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/pom.xml000066400000000000000000000064571321075051700244320ustar00rootroot00000000000000 4.0.0 net.sf.latexdraw latexdraw.bundle LaTeXDraw bundle 3.3.8 pom 2.0 2.11.8 UTF-8 UTF-8 ../net.sf.latexdraw.installer ../net.sf.latexdraw mavenInriaSnapshot http://maven.inria.fr-snapshots http://maven.inria.fr/artifactory/malai-public-snapshot mavenInriaRelease http://maven.inria.fr-releases http://maven.inria.fr/artifactory/malai-public-release maven-assembly-plugin 2.6 src/assembly/assemblySrc.xml src/assembly/assemblyBin.xml LaTeXDraw-${project.version} make-assembly package single org.scala-lang scala-library ${scala.version} org.scala-lang.modules scala-parser-combinators_2.11 1.0.5 org.swinglabs pdf-renderer 1.0.5 org.malai malai.core ${malai.version} org.malai malai.swing ${malai.version} net.sf.jlibeps jlibeps 0.1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/000077500000000000000000000000001321075051700236705ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/assembly/000077500000000000000000000000001321075051700255075ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/assembly/assemblyBin.xml000066400000000000000000000051451321075051700305060ustar00rootroot00000000000000 bin zip org.malai:malai.core org.malai:malai.swing org.scala-lang:scala-library net.sf.jlibeps:jlibeps org.swinglabs:pdf-renderer org.scala-lang.modules:scala-parser-combinators_2.11 false data/lib/ ${project.basedir}/../net.sf.latexdraw.installer/target/latexdraw.installer-${project.version}.jar . installer.jar ${project.basedir}/../net.sf.latexdraw/src/resources/main/res/LaTeXDrawIcon.png data/gnome/ latexdraw.png ${project.basedir}/src/gnome/latexdraw.desktop data/gnome/ ${project.basedir}/../net.sf.latexdraw/target/latexdraw.core-${project.version}.jar data/ LaTeXDraw.jar ${project.basedir}/../net.sf.latexdraw/templates/ data/ .cache/ templates/ true ${project.basedir}/../net.sf.latexdraw/ . *.txt true ${project.basedir}/src/scripts/ . install_* true latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/assembly/assemblySrc.xml000066400000000000000000000014041321075051700305170ustar00rootroot00000000000000 src zip ${project.basedir}/../net.sf.latexdraw/ src/ *.txt pom.xml .gitignore design/ templates/ true latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/gnome/000077500000000000000000000000001321075051700247755ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/gnome/latexdraw.desktop000066400000000000000000000007051321075051700303650ustar00rootroot00000000000000[Desktop Entry] Version=1.0 Name=Latexdraw GenericName=Vector Graphics Editor for LaTeX X-GNOME-FullName=Latexdraw Vector Graphics Editor for LaTeX Comment=Create and edit Scalable Vector Graphics images for LaTeX Type=Application Categories=Graphics;VectorGraphics;LaTeX; MimeType=image/svg+xml; Exec=latexdraw %F TryExec=latexdraw Icon=/usr/share/latexdraw/images/app/latexdraw.png Terminal=false StartupNotify=true X-Desktop-File-Install-Version=3.2 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/000077500000000000000000000000001321075051700253575ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/install_debian_ubuntu000077500000000000000000000000521321075051700316540ustar00rootroot00000000000000#!/bin/sh gksu 'java -jar installer.jar' latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/install_fedora000077500000000000000000000000501321075051700302660ustar00rootroot00000000000000#!/bin/sh sudo java -jar installer.jar latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/install_linux000077500000000000000000000037251321075051700302010ustar00rootroot00000000000000#!/bin/sh # Checking Java. Does not consider $HOME_JAVA if type -p java; then version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}') if [[ "$version" < "1.8" ]]; then echo "Java $version found but at least Java 8 is required." exit 1; fi else echo "No java found. LaTeXDraw requires Java 8." exit 1; fi # Getting the installation directory path="/opt" read -e -i "$path" -p "Enter the folder where LaTeXDraw will be installed (default: /opt): " input path="${input:-$path}" # If empty, getting the default value path=$(echo "$path"|sed 's/\/$//g') #Removing the trailing / # The installation dir must be a dir if [ ! -d $path ] ; then echo "$path is not a directory." exit 1; fi installFolder="latexdraw" launcher="/usr/bin/latexdraw" dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" datadir="data" home=`eval echo "~$USER"` if [ ! -w $launcher ] ; then echo "Cannot write in '/usr/bin'. Make sure to run the script with super user rights." exit 1; fi # Copying files if [ ! -e $path/$installFolder/"lib" ] ; then mkdir -p $path/$installFolder/"lib" fi if [ ! -e "/usr/share/latexdraw/images/app/" ] ; then mkdir -p "/usr/share/latexdraw/images/app/" fi if [ ! -e $HOME/".latexdraw" ] ; then mkdir $HOME/".latexdraw" fi cp $dir/$datadir/"templates"/* "/usr/share/latexdraw/" cp $dir/$datadir/".cache"/* $HOME/".latexdraw/.cacheShared" cp $dir/$datadir/"gnome/latexdraw.png" "/usr/share/latexdraw/images/app/" cp $dir/$datadir/"gnome/latexdraw.desktop" "/usr/share/applications/" cp --remove-destination $dir/$datadir/"LaTeXDraw.jar" $path/$installFolder/ cp --remove-destination $dir/"license.txt" $path/$installFolder/ cp --remove-destination $dir/"release_note.txt" $path/$installFolder/ cp --remove-destination $dir/$datadir/"lib"/* $path/$installFolder/"lib/" ## Creation of the launcher if [ ! -e $launcher ] ; then printf "#! /bin/sh\njava -jar $path/$installFolder/LaTeXDraw.jar $@\n" > $launcher chmod +x $launcher fi latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/install_opensuse000077500000000000000000000000561321075051700306750ustar00rootroot00000000000000#!/bin/sh su - java -jar installer.jar exit latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/install_windows.vbs000077500000000000000000000004601321075051700313160ustar00rootroot00000000000000 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" latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.bundle/src/scripts/latexdraw000066400000000000000000000003011321075051700272670ustar00rootroot00000000000000#!/bin/sh set -e #SYSCONFIG_FILE=/etc/sysconfig/latexdraw # #if [ -r $SYSCONFIG_FILE ] ; then #. $SYSCONFIG_FILE #fi java $JAVA_OPTS -cp '/usr/lib/latexdraw/*' net.sf.latexdraw.LaTeXDraw $* latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/000077500000000000000000000000001321075051700236255ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.gitignore000066400000000000000000000001171321075051700256140ustar00rootroot00000000000000/bin /target /.settings/ /.classpath /.project latexdraw.installer.iml /.idea/ latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/000077500000000000000000000000001321075051700246055ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/.name000066400000000000000000000000231321075051700255210ustar00rootroot00000000000000latexdraw.installerlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/compiler.xml000066400000000000000000000022761321075051700271500ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/copyright/000077500000000000000000000000001321075051700266155ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/copyright/profiles_settings.xml000066400000000000000000000001121321075051700330740ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/inspectionProfiles/000077500000000000000000000000001321075051700304645ustar00rootroot00000000000000Project_Default.xml000066400000000000000000000027371321075051700342120ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/inspectionProfiles profiles_settings.xml000066400000000000000000000003531321075051700346730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/inspectionProfiles latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/misc.xml000066400000000000000000000010411321075051700262560ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/modules.xml000066400000000000000000000004261321075051700270010ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/vcs.xml000066400000000000000000000002721321075051700261230ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/.idea/workspace.xml000066400000000000000000001025471321075051700273360ustar00rootroot00000000000000 true DEFINITION_ORDER project project true DIRECTORY false 1474106668475 No facets are configured scala-sdk-2.12.0-M4 1.8 latexdraw.installer latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/META-INF/000077500000000000000000000000001321075051700247655ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/META-INF/MANIFEST.MF000066400000000000000000000002521321075051700264160ustar00rootroot00000000000000Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.) Main-Class: net.sf.latexdraw.installer.Installer Class-Path: ./ latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/build_installer.xml000066400000000000000000000015001321075051700275170ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/pom.xml000066400000000000000000000043741321075051700251520ustar00rootroot00000000000000 4.0.0 net.sf.latexdraw latexdraw.installer LaTeXDraw installer 3.3.8 src/main/ src/resources/ maven-assembly-plugin 2.4 src/assembly/assemblySrc.xml make-assembly package single org.apache.maven.plugins maven-jar-plugin 2.6 META-INF/MANIFEST.MF false res/ net/ maven-compiler-plugin 3.5.1 1.6 1.6 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/000077500000000000000000000000001321075051700244145ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/assembly/000077500000000000000000000000001321075051700262335ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/assembly/assemblySrc.xml000066400000000000000000000014101321075051700312400ustar00rootroot00000000000000 src zip ${project.basedir} src/ pom.xml .classpath .gitignore .project .settings/ META-INF/ true latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/000077500000000000000000000000001321075051700253405ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/000077500000000000000000000000001321075051700261265ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/000077500000000000000000000000001321075051700265365ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/000077500000000000000000000000001321075051700305315ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installer/000077500000000000000000000000001321075051700325265ustar00rootroot00000000000000ChooseDirSlide.java000066400000000000000000000055011321075051700361530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installerpackage net.sf.latexdraw.installer; import net.sf.latexdraw.util.InstallerLog; import net.sf.latexdraw.util.LSystem; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.util.logging.Level; public class ChooseDirSlide extends Slide { private static final long serialVersionUID = 1L; /** The field that defines the path where we have to install LaTeXDraw. */ protected JTextField pathInstall; /** The file chooser used to locate files. */ protected JFileChooser fileChooser; protected ChooseDirSlide(final Slide prev, final Slide next, final Installer installer) { super(prev, next, installer); } @Override protected void init() { super.init(); final JPanel p1 = new JPanel(); final JPanel p2 = new JPanel(); fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setMultiSelectionEnabled(false); setLayout(new BoxLayout(this, 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)); final JButton chooseB = new JButton("Choose folder"); chooseB.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { if(fileChooser.showDialog(installer, "Select") == JFileChooser.APPROVE_OPTION) { pathInstall.setText(fileChooser.getSelectedFile().getPath()); InstallerLog.getLogger().log(Level.INFO, "Install path selected: " + fileChooser.getSelectedFile().getPath()); } } }); 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); add(p1); setPanelDimension(); if(LSystem.INSTANCE.isLinux() || LSystem.INSTANCE.IsMac()) pathInstall.setText("/opt");//$NON-NLS-1$ else { if(LSystem.INSTANCE.isWindows()) { File dir = new File("C:\\Program Files\\");//$NON-NLS-1$ int cpt = 0; final int 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$ } } InstallerLog.getLogger().log(Level.INFO, "Predefined install path: " + pathInstall.getText() + " exists? " + (new File(pathInstall.getText())).exists()); } } InstallSlide.java000066400000000000000000000360211321075051700357030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installerpackage net.sf.latexdraw.installer; import net.sf.latexdraw.util.InstallerLog; import net.sf.latexdraw.util.LPath; import net.sf.latexdraw.util.LSystem; import javax.swing.*; import java.awt.*; import java.io.*; import java.util.logging.Level; public class InstallSlide extends Slide implements Runnable { private static final long serialVersionUID = 1L; private static final String NAME_TEMPLATES_DIR = "templates";//$NON-NLS-1$ private static final String NAME_CACHE_TEMPLATES_DIR = ".cache";//$NON-NLS-1$ private static final String DATA_DIR = "data";//$NON-NLS-1$ public static final String EOL = System.getProperty("line.separator"); //$NON-NLS-1$ /** The path where the jar file is placed. */ private static String PATH_JAR = LPath.INSTANCE.getPathJar(); /** The progress bar of the installation. */ private JProgressBar progressBar; /** The label that can appear during the installation. */ private JLabel labelProgress; /** The thread that installs LaTeXDraw. */ private Thread installThread; /** Used to stop the thread of the installation. */ private boolean continueInstall; protected InstallSlide(final Slide prev, final Slide next, final Installer installer) { super(prev, next, installer); } @Override protected void install() { super.install(); installThread = new Thread(this); installThread.start(); } @Override protected void init() { super.init(); final JPanel p1 = new JPanel(); final JPanel p2 = new JPanel(); setLayout(new BoxLayout(this, 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); add(p1); installer.nextB.setEnabled(false); installer.previousB.setEnabled(false); setPanelDimension(); } /** * Creates the program launcher for the OS. * @return true if the creation succeeded. * @since 1.9.2 */ private boolean createProgramLauncher(final String path) { boolean ok; try { if(LSystem.INSTANCE.isLinux()) { final File f = new File("/usr/bin/latexdraw");//$NON-NLS-1$ InstallerLog.getLogger().log(Level.SEVERE, f + " exists? " + f.exists()); if(!f.exists()) { final FileOutputStream fos = new FileOutputStream(f); final Writer osw = new OutputStreamWriter(fos); try { osw.write("#! /bin/sh\n");//$NON-NLS-1$ osw.write("java -jar "+installer.chooseSlide.pathInstall.getText()+File.separator+"latexdraw"+File.separator+"LaTeXDraw.jar $@\n");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ ok = true; }catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { osw.flush(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { fos.flush(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { osw.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { fos.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } InstallerLog.getLogger().log(Level.INFO, "sh file created? " + ok); if(!f.setReadable(true)) InstallerLog.getLogger().log(Level.SEVERE, "Failed to set sh file readable"); if(!f.setExecutable(true, false)) InstallerLog.getLogger().log(Level.SEVERE, "Failed to set sh file executable"); } else ok = true; } else if(LSystem.INSTANCE.isWindows()) { final File f = new File(PATH_JAR+File.separator+"createShortcut.vbs"); final FileOutputStream fos = new FileOutputStream(f); final Writer osw = new OutputStreamWriter(fos); InstallerLog.getLogger().log(Level.SEVERE, f + " exists? " + f.exists()); try { osw.write("Set shell = WScript.CreateObject(\"WScript.Shell\")"); osw.write(EOL); osw.write("strProg = shell.SpecialFolders(\"Programs\")"); osw.write(EOL); osw.write("Set link= shell.CreateShortcut(strProg+\"\\LaTeXDraw.LNK\")"); osw.write(EOL); osw.write("link.TargetPath = \""); osw.write(path); osw.write("\\LaTeXDraw.jar\""); osw.write(EOL); osw.write("link.Save"); osw.write(EOL); ok = true; }catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { osw.flush(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { fos.flush(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { osw.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { fos.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } if(!f.setReadable(true)) InstallerLog.getLogger().log(Level.SEVERE, "Failed to set vbs file readable"); if(!f.setExecutable(true, false)) InstallerLog.getLogger().log(Level.SEVERE, "Failed to set vbs file executable"); ok = true; try { Runtime.getRuntime().exec(new String[]{"wscript", f.getPath()}); }catch(IOException ex) { ex.printStackTrace(); InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } } else ok = true; } catch(final FileNotFoundException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } catch(final SecurityException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } return ok; } /** * 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. * @since 1.9.2 */ private boolean copyFile(final String from, final String here, final boolean replace) throws FileNotFoundException { final File source = new File(from); if(!source.exists() || !source.canRead()) throw new FileNotFoundException(); final 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 static boolean copy(final File source, final File destination) { if(destination==null || source==null) throw new IllegalArgumentException(); if(!source.canRead()) return false; FileInputStream sourceFile = null; FileOutputStream destinationFile = null; boolean ok; try { ok = destination.createNewFile(); sourceFile = new FileInputStream(source); destinationFile = new FileOutputStream(destination); final byte buffer[] = new byte[512*1024]; int nbLecture = sourceFile.read(buffer); while(nbLecture!=-1) { destinationFile.write(buffer, 0, nbLecture); nbLecture = sourceFile.read(buffer); } }catch(final Exception ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { if(destinationFile!=null) destinationFile.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { if(sourceFile!=null) sourceFile.close(); } catch(final IOException ex) { ok = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } return ok; } /** * 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. * @since 1.9.2 */ private boolean copyFiles(final String from, final String into, final boolean replace) throws FileNotFoundException { final File src = new File(from); final File here = new File(into); boolean ok = true; if(!src.exists() || !src.isDirectory() || !src.canRead()) throw new FileNotFoundException(from + " exists? " + src.exists() + " isDir? " + src.isDirectory() + " canRead? " + src.canRead()); final 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; } /** * 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 static boolean delete(final File f) { boolean status = true; try { File fileCur; final 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(final SecurityException se) { return false; } return status; } protected boolean isContinueInstall() { return continueInstall; } protected void setContinueInstall(final boolean continueInstall) { this.continueInstall = continueInstall; } @Override public void run() { setContinueInstall(true); progressBar.setValue(progressBar.getMinimum()); LPath.INSTANCE.checkInstallDirectories(); LPath.INSTANCE.checkDirectories(); progressBar.setValue(progressBar.getValue()+20); boolean okInstall = false; boolean okCopying = true; if(!isContinueInstall()) return ; try { okCopying = copyFiles(PATH_JAR+File.separator+DATA_DIR+File.separator+NAME_TEMPLATES_DIR, LPath.PATH_TEMPLATES_SHARED, false); InstallerLog.getLogger().log(Level.INFO, "Templates copied? " + okCopying); okCopying = okCopying && copyFiles(PATH_JAR+File.separator+DATA_DIR+File.separator+NAME_CACHE_TEMPLATES_DIR, LPath.PATH_CACHE_SHARE_DIR, false); InstallerLog.getLogger().log(Level.INFO, "Cache copied? " + okCopying); if(LSystem.INSTANCE.isLinux()){ InstallerLog.getLogger().log(Level.INFO, "Installing on Linux"); InstallerLog.getLogger().log(Level.INFO, LPath.PATH_SHARED+"/images/app/ created? " + new File(LPath.PATH_SHARED+"/images/app/").mkdirs()); okCopying = okCopying && copyFile(PATH_JAR+File.separator+DATA_DIR+File.separator+"gnome"+File.separator+"latexdraw.png", LPath.PATH_SHARED+"/images/app/", false); InstallerLog.getLogger().log(Level.INFO, "png file copied? " + okCopying); okCopying = okCopying && copyFile(PATH_JAR+File.separator+DATA_DIR+File.separator+"gnome"+File.separator+"latexdraw.desktop", "/usr/share/applications/", false); InstallerLog.getLogger().log(Level.INFO, "desktop file copied? " + okCopying); } progressBar.setValue(progressBar.getValue()+20); if(!isContinueInstall()) return ; final String path = installer.chooseSlide.pathInstall.getText() + File.separator + "latexdraw";//$NON-NLS-1$ final File mainDir = new File(path); InstallerLog.getLogger().log(Level.INFO, "Installation path: " + path + ". Exists? " + mainDir.exists()); if(mainDir.exists()) { InstallerLog.getLogger().log(Level.INFO, mainDir + " already exists."); okCopying = delete(mainDir); InstallerLog.getLogger().log(Level.INFO, mainDir + " removed? " + okCopying); } okCopying = mainDir.mkdir(); InstallerLog.getLogger().log(Level.INFO, mainDir + " created? " + okCopying); okCopying = okCopying && mainDir.exists(); InstallerLog.getLogger().log(Level.INFO, mainDir + " exists? " + mainDir.exists()); okCopying = okCopying && copyFile(PATH_JAR+File.separator+DATA_DIR+File.separator+"LaTeXDraw.jar", path, true);//$NON-NLS-1$ InstallerLog.getLogger().log(Level.INFO, mainDir + " jar file copied? " + okCopying); okCopying = okCopying && copyFile(PATH_JAR+File.separator+"license.txt", path, true);//$NON-NLS-1$ InstallerLog.getLogger().log(Level.INFO, mainDir + " license file copied? " + okCopying); okCopying = okCopying && copyFile(PATH_JAR+File.separator+"release_note.txt", path, true);//$NON-NLS-1$ InstallerLog.getLogger().log(Level.INFO, mainDir + " release_note file copied? " + okCopying); okCopying = okCopying && copyFiles(PATH_JAR+File.separator+DATA_DIR+File.separator+"lib", path+File.separator+"lib", true);//$NON-NLS-1$//$NON-NLS-2$ InstallerLog.getLogger().log(Level.INFO, PATH_JAR+File.separator+DATA_DIR+File.separator+"lib" + " libs copied? " + okCopying + " in " + path+File.separator+"lib (exists? " + (new File(path+File.separator+"lib")).exists() + ")"); progressBar.setValue(progressBar.getValue()+30); if(!isContinueInstall()) return ; createProgramLauncher(path); progressBar.setValue(progressBar.getValue()+20); if(!isContinueInstall()) return ; okInstall = okCopying; }catch(final FileNotFoundException ex) { okInstall = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } catch(final SecurityException ex) { okInstall = false; InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } if(okInstall) { progressBar.setValue(progressBar.getMaximum()); installer.nextB.setEnabled(true); installer.previousB.setEnabled(true); labelProgress.setText("" + "Installation succeeded!" + "
");//$NON-NLS-1$//$NON-NLS-3$ } else { labelProgress.setText("" + "Installation failed!" + "
" + //$NON-NLS-1$//$NON-NLS-3$ "Launch the installer as administrator." + "
");//$NON-NLS-2$ installer.previousB.setEnabled(true); } setContinueInstall(false); } } Installer.java000066400000000000000000000152771321075051700352630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installer/* * This file is part of LaTeXDraw * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.installer; import net.sf.latexdraw.util.InstallerLog; import net.sf.latexdraw.util.LSystem; import javax.swing.*; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Map; import java.util.logging.Level; /** * This class defines the LaTeXDraw installer. * @author Arnaud BLOUIN * @version 3.0 */ public final class Installer extends JFrame { private static final long serialVersionUID = 1L; private static final String ACTION_NEXT = "next";//$NON-NLS-1$ private static final String ACTION_PREVIOUS = "previous";//$NON-NLS-1$ private static final String ACTION_CANCEL = "cancel";//$NON-NLS-1$ private static final String ACTION_END = "end";//$NON-NLS-1$ /** The listener of the installer. */ private InstallerListener listener; protected Slide startSlide; protected ChooseDirSlide chooseSlide; protected InstallSlide installSlide; protected Slide currentSlide; /** The button "previous". */ protected JButton previousB; /** The button "next". */ protected JButton nextB; protected JButton endB; /** * The main function: it creates an installer and launch it. * @param argc Useless. * @since 1.9.2 */ public static void main(final String argc[]) { final StringBuilder builder = new StringBuilder(); builder.append("LaTeX version:").append(LSystem.INSTANCE.getLaTeXVersion()).append(LSystem.EOL); //$NON-NLS-1$ builder.append("DviPS version:").append(LSystem.INSTANCE.getDVIPSVersion()).append(LSystem.EOL); //$NON-NLS-1$ builder.append("PS2PDF version:").append(LSystem.EOL).append(LSystem.INSTANCE.getPS2PDFVersion()).append(LSystem.EOL); //$NON-NLS-1$ builder.append("PS2EPSI version:").append(LSystem.INSTANCE.getPS2EPSVersion()).append(LSystem.EOL); //$NON-NLS-1$ builder.append("PDFcrop version:").append(LSystem.INSTANCE.getPDFCROPVersion()).append(LSystem.EOL); //$NON-NLS-1$ builder.append("Java properties:").append(LSystem.EOL); //$NON-NLS-1$ for(final Map.Entry entry : System.getProperties().entrySet()) builder.append(entry.getKey()).append(':').append(' ').append(entry.getValue()).append(LSystem.EOL); InstallerLog.getLogger().log(Level.INFO, builder.toString()); new Installer().setVisible(true); } /** * The default constructor. */ private Installer() { super("LaTeXDraw installer"); listener = new InstallerListener(); InstallerLog.getLogger().log(Level.INFO, "Linux? " + LSystem.INSTANCE.isLinux()); if(LSystem.INSTANCE.isLinux()) try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); }//$NON-NLS-1$ catch(final Exception ex) { InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } try { setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("res/LaTeXDrawIcon.png")));//$NON-NLS-1$ }catch(Exception ex) { InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); } setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); final JPanel ctrlPanel = createControlButtonsPanel(); startSlide = new StartSlide(null, this); chooseSlide = new ChooseDirSlide(startSlide, null, this); installSlide = new InstallSlide(chooseSlide, null, this); startSlide.next = chooseSlide; chooseSlide.next= installSlide; currentSlide = startSlide; getContentPane().setLayout(new BorderLayout()); getContentPane().add(createHeaderPanel(), BorderLayout.NORTH); getContentPane().add(ctrlPanel, BorderLayout.SOUTH); currentSlide.install(); final Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); pack(); setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2); setVisible(false); } /** * @return The panel containing the control buttons (next, previous, and so on). * @since 1.9.2 */ private JPanel createControlButtonsPanel() { final JPanel ctrlPanel = new JPanel(); final 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("Next"); nextB.setActionCommand(ACTION_NEXT); nextB.setName(ACTION_NEXT); nextB.addActionListener(listener); ctrlPanel.add(nextB); endB = new JButton("End"); endB.setActionCommand(ACTION_END); endB.setName(ACTION_END); endB.addActionListener(listener); ctrlPanel.add(endB); 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 */ private JPanel createHeaderPanel() { final JPanel header = new JPanel(); header.add(new JLabel("
"+"Assistant of installation"+"
"));//$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; } private class InstallerListener implements ActionListener { InstallerListener() { super(); } public void actionPerformed(final ActionEvent e) { final Object o = e.getSource(); if(o instanceof JButton) { final String actionCmd = ((JButton)o).getActionCommand(); if(Installer.ACTION_CANCEL.equals(actionCmd)) { if(Installer.this.installSlide.isContinueInstall()) Installer.this.installSlide.setContinueInstall(false); else System.exit(0); return ; } if(Installer.ACTION_NEXT.equals(actionCmd)) { Installer.this.currentSlide = Installer.this.currentSlide.next(); return ; } if(Installer.ACTION_PREVIOUS.equals(actionCmd)) { Installer.this.currentSlide = Installer.this.currentSlide.prev(); return ; } if(Installer.ACTION_END.equals(actionCmd)) System.exit(0); } } } } Slide.java000066400000000000000000000027431321075051700343600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installerpackage net.sf.latexdraw.installer; import net.sf.latexdraw.util.InstallerLog; import javax.swing.*; import java.awt.*; import java.util.logging.Level; abstract class Slide extends JPanel { private static final long serialVersionUID = 1L; /** The dimension of a slide. */ protected static final Dimension PANEL_SIZE = new Dimension(650, 350); protected Slide next; protected Slide prev; private boolean init; protected Installer installer; protected Slide(final Slide prev, final Slide next, final Installer installer) { super(); this.installer = installer; this.prev = prev; this.next = next; init = false; } protected Slide next() { if(next!=null) { uninstall(); next.install(); } return next; } protected Slide prev() { if(prev!=null) { uninstall(); prev.install(); } return prev; } protected void install() { InstallerLog.getLogger().log(Level.INFO, "Slide: " + getClass().getSimpleName()); if(!init) init(); installer.getContentPane().add(this, BorderLayout.CENTER); installer.previousB.setEnabled(prev!=null); installer.nextB.setVisible(next!=null); installer.endB.setVisible(next==null); installer.pack(); } protected void uninstall() { installer.getContentPane().remove(this); installer.pack(); } protected void init() { init = true; } protected void setPanelDimension() { setPreferredSize(PANEL_SIZE); setMinimumSize(PANEL_SIZE); setMaximumSize(PANEL_SIZE); } } StartSlide.java000066400000000000000000000057741321075051700354050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/installerpackage net.sf.latexdraw.installer; import net.sf.latexdraw.util.InstallerLog; import net.sf.latexdraw.util.LSystem; import javax.swing.*; import java.awt.*; import java.io.File; import java.util.logging.Level; class StartSlide extends Slide { private static final long serialVersionUID = 1L; protected StartSlide(final Slide next, final Installer installer) { super(null, next, installer); } @Override protected void init() { super.init(); String plus; final String javaVersion = System.getProperty("java.version"); setPanelDimension(); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); InstallerLog.getLogger().log(Level.INFO, "Java lesser than 1.7? " + (javaVersion.compareToIgnoreCase("1.7")<0)); if(javaVersion.compareToIgnoreCase("1.7")<0) { //$NON-NLS-1$ final JTextArea textArea = new JTextArea(); final JLabel label = new JLabel(); final JLabel label2 = new JLabel(); final JLabel label3 = new JLabel(); textArea.setEditable(false); label.setText("You must have Java 7 installed."); label2.setText("Your current version of Java is " + javaVersion + "."); //$NON-NLS-2$ label3.setText("You can download the latest version of java here:"); textArea.setText("http://www.java.com"); //$NON-NLS-1$ textArea.setMaximumSize(new Dimension(300,20)); label.setAlignmentX(Component.CENTER_ALIGNMENT); label2.setAlignmentX(Component.CENTER_ALIGNMENT); label3.setAlignmentX(Component.CENTER_ALIGNMENT); textArea.setAlignmentX(Component.CENTER_ALIGNMENT); add(Box.createVerticalStrut(60)); add(label); add(label2); add(label3); add(Box.createVerticalStrut(10)); add(textArea); installer.nextB.setEnabled(false); } else { if(LSystem.INSTANCE.isLinux()) { InstallerLog.getLogger().log(Level.INFO, "is /opt a dir? " + new File("/opt").isDirectory()); } if(LSystem.INSTANCE.isLinux() && !new File("/opt").isDirectory()) { final JLabel label = new JLabel(); final JLabel label2 = new JLabel(); final JTextField label3 = new JTextField(); label3.setEditable(false); label3.setMaximumSize(new Dimension(550, 40)); label.setText("Cannot proceed without the /opt folder."); label2.setText("You may create it using a command like:"); label3.setText("sudo mkdir --mode=755 /opt"); add(label); add(label2); add(label3); installer.nextB.setEnabled(false); }else { InstallerLog.getLogger().log(Level.INFO, "is Vista? " + LSystem.INSTANCE.isVista()); if(LSystem.INSTANCE.isVista()) plus="
  • Be careful with Vista!
    You must have launched this installer via the script install_vista.vbs."; else plus="";//$NON-NLS-1$ add(new JLabel("


    "));//$NON-NLS-1$//$NON-NLS-3$ } } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/util/000077500000000000000000000000001321075051700315065ustar00rootroot00000000000000InstallerLog.java000066400000000000000000000031531321075051700346730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/util/* * This file is part of LaTeXDraw * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.util; import java.io.IOException; import java.util.logging.*; /** * The logger. * Created by Arnaud Blouin on 27/07/16. */ public final class InstallerLog { private static Logger logger = null; private static final String LOGGER_NAME = "INSTALLERLOGGER"; private static FileHandler fileTxt; private static SimpleFormatter formatterTxt; public static Logger getLogger() { if(logger==null) { setup(); } return logger; } private static void setup() { logger = Logger.getLogger(LOGGER_NAME); logger.setLevel(Level.ALL); try { fileTxt = new FileHandler("logInstall.txt"); formatterTxt = new SimpleFormatter(); fileTxt.setFormatter(formatterTxt); // suppress the logging output to the console Logger rootLogger = Logger.getLogger(""); Handler[] handlers = rootLogger.getHandlers(); if(handlers.length>0 && handlers[0] instanceof ConsoleHandler) { rootLogger.removeHandler(handlers[0]); } logger.addHandler(fileTxt); }catch(final IOException ex) { ex.printStackTrace(); } } private InstallerLog() { super(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/util/LPath.java000066400000000000000000000140001321075051700333540ustar00rootroot00000000000000package net.sf.latexdraw.util; import java.io.File; import java.net.URL; import java.net.URLDecoder; import java.util.logging.Level; /** * This class defines paths used in LaTeXDraw.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2012 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class LPath { /** The singleton. */ public static final LPath INSTANCE = new LPath(); /** 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 = INSTANCE.getPathLocalUser(); public static final String PATH_TEMPLATES_DIR_USER = PATH_LOCAL_USER + File.separator + TEMPLATE_DIR; 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 = INSTANCE.getPathTemplatesShared(); public static final String PATH_SHARED = INSTANCE.getPathShared(); private LPath() { super(); } /** * @return The home directory of the user depending of his operating system. * @since 3.0 */ private String getPathLocalUser() { final String home = System.getProperty("user.home");//$NON-NLS-1$ final String path; if(LSystem.INSTANCE.isVista() || LSystem.INSTANCE.isSeven()) path = home + "\\AppData\\Local\\latexdraw";//$NON-NLS-1$ else if(LSystem.INSTANCE.isXP()) path = home + "\\Application Data\\latexdraw";//$NON-NLS-1$ else if(LSystem.INSTANCE.isMacOSX()) path = home + "/Library/Preferences/latexdraw";//$NON-NLS-1$ else path = home + "/.latexdraw";//$NON-NLS-1$ return path; } /** * @return The path of the directory where the templates shared by the different users are located. * @since 3.0 */ private String getPathTemplatesShared() { return getPathShared()+File.separator+TEMPLATE_DIR; } /** * @return The path where files are shared by users. * @since 3.0 */ private String getPathShared() { final String home = System.getProperty("user.home");//$NON-NLS-1$ if(LSystem.INSTANCE.isMacOSX()) return "/Users/Shared/latexdraw";//$NON-NLS-1$ if(LSystem.INSTANCE.isVista()) { File dir = new File("C:\\ProgramData");//$NON-NLS-1$ int cpt = 0; final int max = 10; while(!dir.exists() && cpt *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/14/10
    * @author Arnaud BLOUIN, Jan-Cornelius MOLNAR * @version 3.0 */ public final class LSystem { public static final String EOL = System.getProperty("line.separator"); //$NON-NLS-1$ /** * The different operating systems managed. */ public enum OperatingSystem { VISTA, XP, SEVEN, EIGHT, TEN, MAC_OS_X_CAPITAN { @Override public String getPS2EPSBinPath() { return "/usr/local/bin/ps2epsi"; //$NON-NLS-1$ } @Override public String getLatexBinPath() { return "/Library/TeX/texbin/latex"; //$NON-NLS-1$ } @Override public String getDvipsBinPath() { return "/Library/TeX/texbin/dvips"; //$NON-NLS-1$ } @Override public String getPs2pdfBinPath() { return "/usr/local/bin/ps2pdf"; //$NON-NLS-1$ } @Override public String getPdfcropBinPath() { return "/Library/TeX/texbin/pdfcrop"; //$NON-NLS-1$ } }, MAC_OS_X { @Override public String getPS2EPSBinPath() { return "/usr/local/bin/ps2epsi"; //$NON-NLS-1$ } @Override public String getLatexBinPath() { return "/usr/texbin/latex"; //$NON-NLS-1$ } @Override public String getDvipsBinPath() { return "/usr/texbin/dvips"; //$NON-NLS-1$ } @Override public String getPs2pdfBinPath() { return "/usr/local/bin/ps2pdf"; //$NON-NLS-1$ } @Override public String getPdfcropBinPath() { return "pdfcrop"; //$NON-NLS-1$ } }, LINUX; /** * @return The path where is the ps2eps binary. * @since 3.1 */ public String getPS2EPSBinPath() { return "ps2epsi"; //$NON-NLS-1$ } /** * @return The path where is the latex binary. * @since 3.0 */ public String getLatexBinPath() { return "latex"; //$NON-NLS-1$ } /** * @return The path where is the dvips binary. * @since 3.0 */ public String getDvipsBinPath() { return "dvips"; //$NON-NLS-1$ } /** * @return The path where is the ps2pdf binary. * @since 3.0 */ public String getPs2pdfBinPath() { return "ps2pdf"; //$NON-NLS-1$ } /** * @return The path where is the pdfcrop binary. * @since 3.0 */ public String getPdfcropBinPath() { return "pdfcrop"; //$NON-NLS-1$ } } /** The singleton. */ public static final LSystem INSTANCE = new LSystem(); /** * Creates the singleton. */ private LSystem() { super(); } /** * @return True: the operating system currently used is Windows. * @since 3.0 */ public boolean isWindows() { return isSeven() || isVista() || isXP() || is8() || is10(); } /** * @return True: the operating system currently used is Windows 10. */ public boolean is10() { return getSystem() == OperatingSystem.TEN; } /** * @return True: the operating system currently used is Windows 8. * @since 3.0 */ public boolean is8() { return getSystem() == OperatingSystem.EIGHT; } /** * @return True: the operating system currently used is Vista. * @since 3.0 */ public boolean isVista() { return getSystem() == OperatingSystem.VISTA; } /** * @return True: the operating system currently used is XP. * @since 3.0 */ public boolean isXP() { return getSystem() == OperatingSystem.XP; } /** * @return True: the operating system currently used is Seven. * @since 3.0 */ public boolean isSeven() { return getSystem() == OperatingSystem.SEVEN; } /** * @return True: the operating system currently used is Linux. * @since 3.0 */ public boolean isLinux() { return getSystem() == OperatingSystem.LINUX; } /** * @return True: the operating system currently used is Mac OS X. * @since 3.0 */ public boolean isMacOSX() { return getSystem() == OperatingSystem.MAC_OS_X; } /** * @return True: the operating system currently used is Mac OS X El Capitan. * @since 3.3 */ public boolean isMacOSXElCapitan() { return getSystem() == OperatingSystem.MAC_OS_X_CAPITAN; } /** * @return True: the operating system currently used is Mac OS. * @since 3.3 */ public boolean IsMac() { return isMacOSX() || isMacOSXElCapitan(); } /** * @return The name of the operating system currently used. * @since 3.0 */ public OperatingSystem getSystem() { final String os = System.getProperty("os.name"); //$NON-NLS-1$ if("linux".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.LINUX; if("windows 7".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.SEVEN; if("windows vista".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.VISTA; if("windows xp".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.XP; if("mac os x".equalsIgnoreCase(os)) { //$NON-NLS-1$ final String[] v = System.getProperty("os.version").split("\\."); final double[] d = new double[v.length]; for(int i=0; i=1 && d[0]>10) || (d.length>=2 && d[0]==10 && d[1]>=11)) // A change since El Capitan return OperatingSystem.MAC_OS_X_CAPITAN; return OperatingSystem.MAC_OS_X; //$NON-NLS-1$ } if(os.toLowerCase().contains("windows 8")) //$NON-NLS-1$ return OperatingSystem.EIGHT; if(os.toLowerCase().contains("windows 10")) //$NON-NLS-1$ return OperatingSystem.TEN; InstallerLog.getLogger().log(Level.SEVERE, "This OS is not supported: " + os); //$NON-NLS-1$ return null; } /** * @return The version of the current LaTeX. * @since 3.1 */ public String getLaTeXVersion() { return execute(new String[]{getSystem().getLatexBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current dvips. * @since 3.1 */ public String getDVIPSVersion() { return execute(new String[]{getSystem().getDvipsBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current ps2pdf. * @since 3.1 */ public String getPS2PDFVersion() { return execute(new String[]{getSystem().getPs2pdfBinPath()}, null); } /** * @return The version of the current ps2eps. * @since 3.1 */ public String getPS2EPSVersion() { return execute(new String[]{getSystem().getPS2EPSBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current pdfcrop. * @since 3.1 */ public String getPDFCROPVersion() { return execute(new String[]{getSystem().getPdfcropBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * Executes a command. * @param cmd The execution command * @param tmpdir The working dir * @return The log. * @since 3.1 */ public String execute(final String[] cmd, final File tmpdir) { if(cmd==null || cmd.length==0) return null; try { final Process process = Runtime.getRuntime().exec(cmd, null, tmpdir); // Command launched final StreamExecReader err = new StreamExecReader(process.getErrorStream());// Catch the error log final 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() + EOL + inp.getLog(); }catch(final Exception ex) { InstallerLog.getLogger().log(Level.SEVERE, ex.toString(), ex); return "ERR while execute the command : " + Arrays.toString(cmd) + ": " + ex.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$ } } } StreamExecReader.java000066400000000000000000000037561321075051700354700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/main/net/sf/latexdraw/utilpackage net.sf.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
    * Copyright (c) 2005-2012 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/14/09
    * @author Arnaud BLOUIN * @version 2.0.4
    */ public class StreamExecReader extends Thread { /** The stream to listen. */ private InputStream stream; /** The read log. */ private StringBuilder log; /** * Default constructor. * @param is The stream to listen. */ public StreamExecReader(final InputStream is) { super(); if(is==null) throw new IllegalArgumentException(); stream = is; } @Override public void run() { final InputStreamReader isr = new InputStreamReader(stream); final BufferedReader br = new BufferedReader(isr); final String eol = System.getProperty("line.separator"); log = new StringBuilder(); try { String line = br.readLine(); while(line != null) { log.append(line).append(eol); line = br.readLine(); } }catch(IOException ex) { ex.printStackTrace(); } try { br.close(); } catch(IOException ex) { ex.printStackTrace(); } try { isr.close(); } catch(IOException ex) { ex.printStackTrace(); } } /** * @return The read log. */ public String getLog() { return log==null ? "" : log.toString(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/resources/000077500000000000000000000000001321075051700264265ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/resources/res/000077500000000000000000000000001321075051700272175ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw.installer/src/resources/res/LaTeXDrawIcon.png000066400000000000000000000036261321075051700323400ustar00rootroot00000000000000‰PNG  IHDR;0®¢sBIT|dˆ pHYsaa¨?§itEXtSoftwarewww.inkscape.org›î<IDATH‰mW[ŒVW^ëÛçgŠ\f`˜r/C…cªVilDcŒ±‰!ÁÊ›>@씠Ѥ/úªOEmE“Ö–j1–jaZÚáÎp™†‹t¦Ó¹t˜2ÌÞ{}>ìsþÿÌÔ?ÙÙûœÿä|ë[ë[—£$eòogÇÞVRÚI.#¥Â¹BÑ ©ˆŠŠªPµºPSÕ›€v¸è owìÚÞ3CËÀ;Ÿz¦BããFþF©BQ %LE˜6ja€*¡JUE:  4xÎA÷uìÚî?¼³cï"3î1²ÕŒJ¦e–0H UJRU¦=sÆÉ¨jU#®:àW»ùÓkUàÏTÌìfl5#Œ¦9¸%7BDH-&g̉.ׂi™¹9§pÕ9lßóä>1Úãflf0£šQT{L&ïÑ©ºZJq†¦%—ÓT —˜ñÇ"òGw'6¶ÒØa$̘›&æ¬Rý -…Ì=#é? h¢FQ¦ûÕ•BõùCGNÍhl7Š+â: D“Û«/æb“I>/»(âÍÜí0ªÌ+ŽlÏ(²"½°æb3j,˜3gié~Jå’ÔW¯º¹XTƒÒJª™±-#¹¼æ*s0ÒjÌkb+Ø'´<æ…Âsp*¤&2áhJK¬Õ9®ÌH™—ÇBŒ"FÑ ëÚZV¯ZDçCt!D{1Ë äy*$åî]Ï>ysë–‹W,[0tæÜû£óæÌjذnEÓƒ'ú>‰¤ puϵޱ—þu|(w¹T*N¾³ù™_Ú°jæû×{ÇÞ;uuØ@…æ¨FjyI¥Hž¢§Îô _í¹õñæMís+Yæ¾ûíç|Ð;x÷µ7N ›1b4Š©!ÒŠóøÛ Çúú‡Ç¿ñ•û›Ë¬CˆÎûèPˆ2aRI þÇ?ÿóß)÷Ôg?Û¶ù¾9÷65ìñhŸ¦1šš™Æ˜nÔÍ…h.ƒcã]§{Fg6M­JV¸ÚûdŠ’]KÊ”*‘þâd÷@ËìÆúÎw/ ]éù`,W»ÆHD#DDÒuzaˆÑåÌ]_ÿPTUijœZç½ÕsY*ð2©ç¥ŸsÀŠÏÍŸ&"ÒÒ<ã3E:¥ÜÎS,1brñ>"Ïö,„ÌTÍÑ©Ð*[eµø&âúðCkš§O›Ryáå7o-œ?»aãú•ÓXªáÑŠÚm#5Ä"΢kjœš‰ˆÜ¸ùQL16—ÇÈûiÁºjssóôʃëÛš½u®ÿè[ç†ßíº<¼å‘öYSî©G­FS…T£h.6„Ó «V,l‰#£c(Cˆ.øèPž¤v–Ǿ¹aþÈÈÿêáwúEDþþÒ±~²uËM’”/VeL±\å1gýèÃ_œ²dñ½•_9>|-½7ø`È Ð<ÖTUY³zÉŒ…ógOÝ÷×Ã=1DªˆŽŽŽÅO |ï±ÍGÞ<;z¡ûF(ò¸¥yF¶~íòú¬minÌV¯ZTY¹|Aåí÷.8Ø9N `P’.y*ƒª©*ò BêðÕ/aþ…îëƒ/]¿­ªU9rìÌðúµË§ýèûÍìøÍŸ{cLaY»fiýÚ5KëÇÆÆÙ×?l}Ç=O?ûÄ;—¼¨ª5KíTt×S{ÿä½-ôU©G"(É?Å&DÔÎy<ƒ¹¢˜„h°Ò0QV8 tSsW2U½è‚Ò¸RÞŠ%µóÄNT-·E­/ š‹¢*‚Ǫ̂j”Óp±èŸµyIjC›ÖŒQM#–ŠN2*/{É€TP¬¤òUª\] P€jÎÚB^jäŒH¹±@­U¡j®çÃDb&:…¯¹×¿2ôú’«‹1a0¨5ÿÒ°P›§Œµ‘‰&`ÍͰ˜æ¸˜LSêï®ýË~ˆˆÀáY=j€N™Î Vï—FV-_ç!Òb©V‹‘‘Í4äÅì·""ÙóäÞAwÚ“€`Å—@Ô7é¾+Â’a%Cr¢ñ¼ñ}Wöß­‹ˆüz÷ŽkÎa›ƒ> htN­j€ƒ€Î%o8 úŒK_ –¼5ÁpèÓª²îã/œ¯¦ØÿûhûŮ߷ú7„Û|ˆ+½·E!Ä̇ŸÊŸóÅ(ã­tŽÎ‡¨>Äë!X—±+øxèÆ…çÎNÆøR–/èª|òÇIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/000077500000000000000000000000001321075051700216315ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.classpath000066400000000000000000000026751321075051700236260ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.gitignore000066400000000000000000000002111321075051700236130ustar00rootroot00000000000000/bin /test /target *~ /.cache /.scala_dependencies /.idea/ /latexdraw.core.iml /net.sf.latexdraw.iml /.cache-main /.cache-tests sonar.sh latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.project000066400000000000000000000013031321075051700232750ustar00rootroot00000000000000 net.sf.latexdraw NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. org.scala-ide.sdt.core.scalabuilder org.eclipse.m2e.core.maven2Builder org.scala-ide.sdt.core.scalanature org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.settings/000077500000000000000000000000001321075051700235475ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.settings/org.eclipse.core.resources.prefs000066400000000000000000000002571321075051700317660ustar00rootroot00000000000000eclipse.preferences.version=1 encoding//src/main=UTF-8 encoding//src/resources/main=UTF-8 encoding//src/resources/test=UTF-8 encoding//src/test=UTF-8 encoding/=UTF-8 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.settings/org.eclipse.jdt.core.prefs000066400000000000000000000175051321075051700305410ustar00rootroot00000000000000eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=optimize out org.eclipse.jdt.core.compiler.compliance=1.7 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.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.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=warning org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled 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=ignore org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled 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=disabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled 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.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=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=warning org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled 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.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=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.nonnullParameterAnnotationDropped=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 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.unusedObjectAllocation=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.unusedTypeParameter=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.7 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.settings/org.eclipse.m2e.core.prefs000066400000000000000000000001261321075051700304320ustar00rootroot00000000000000activeProfiles= eclipse.preferences.version=1 resolveWorkspaceProjects=true version=1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/.settings/org.scala-ide.sdt.core.prefs000066400000000000000000000016671321075051700307520ustar00rootroot00000000000000//src/main=main //src/resources/main=main //src/resources/test=main //src/test=tests P= Xcheckinit=false Xdisable-assertions=false Xelide-below=-2147483648 Xexperimental=false Xfatal-warnings=false Xfuture=false Xlog-implicits=false Xno-uescape=false Xplugin= Xplugin-disable= Xplugin-require= Xpluginsdir=misc/scala-devel/plugins Ypresentation-debug=false Ypresentation-delay=0 Ypresentation-log= Ypresentation-replay= Ypresentation-verbose=false apiDiff=false compileorder=Mixed deprecation=false eclipse.preferences.version=1 explaintypes=false feature=false g=vars nameHashing=false no-specialization=false nowarn=false optimise=true recompileOnMacroDef=true relationsDebug=false scala.compiler.additionalParams= scala.compiler.installation=-90922204 scala.compiler.sourceLevel=2.11 scala.compiler.useProjectSettings=true stopBuildOnError=true target=jvm-1.7 unchecked=false useScopesCompiler=true verbose=false withVersionClasspathValidator=true latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/000077500000000000000000000000001321075051700231025ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/InFrontSelect.svg000066400000000000000000000103331321075051700263420ustar00rootroot00000000000000 image/svg+xml ? latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/about.svg000066400000000000000000000070711321075051700247420ustar00rootroot00000000000000 image/svg+xml ! latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignBottom.svg000066400000000000000000000170771321075051700261160ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignLeft.svg000066400000000000000000000130351321075051700255320ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignMiddleHoriz.svg000066400000000000000000000160541321075051700270560ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignMiddleVert.svg000066400000000000000000000130161321075051700266760ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignRight.svg000066400000000000000000000131371321075051700257200ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/alignTop.svg000066400000000000000000000151071321075051700254040ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/arc.svg000066400000000000000000000072271321075051700244000ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/autoBord.svg000066400000000000000000000213661321075051700254120ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/axes.svg000066400000000000000000000143461321075051700245730ustar00rootroot00000000000000 image/svg+xml 1 2 2 1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/background.svg000066400000000000000000000071421321075051700257460ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/banniere.png000066400000000000000000001061411321075051700253760ustar00rootroot00000000000000‰PNG  IHDRq‹ÏnsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î< IDATxœì½Y¯%G’&fæîqâ¬w_2“L’I²XÅê®îêêe‚~ƒé7ÌË=´èA Ѓþ‡ 0µZÓ{u««Š{îw¿÷챸»é!6w?7“Ådq‹C03އ…¹ÙŸ›éq"ÿÇÿéÿø?< ôîjPصÛKßÍhµ[ÕWª6Ðn÷@†Oӈ̆â/¼%O³›vOv»#vn7N>u„ms´±±r57 ,É1°¾bó…Úf6fh5næ’oOÛoÉÓhoóÌoOEŒþ<]¼]û6ÏÚ¸X–èµÎ 9¶Ænò%ŽîÇ‹WㆤÊp[óQ’Z¹x£3Ð3žÚÇPßM¾l|è6Ž•qzò€·s¬îÝ>ß^ÓæúÓÆì–úSnµpt·ðBÔàÁËSG‡“ðädšµ< -ñÖ‹6öøÙå<÷žë 'ðeÄÛ֤̗©TRQ»Ž;5ÈñWï}aýiç‰0è÷‚uš+)•G¸qÁ2y&uåXΤÖ@¤7Á ‚s¦HƒV]/ D’æÒÄ…sÆ •ÔºŠ!"iÛ#•1Î8(];mó¨ø‚ iðèFDDݸ@Æi¢ÊÚ²øÂL÷DPx&Âr û€ÚNêâéL¬Í‰¥*ü¡kDu@T}AÚP<‰È<á%±¨kY<›v‡ØDNBE;Ú´Œ®I£î»ŽÑÈH­Ì )bÔäèF‹å Áª³*S2RcK@X%Iv®•c$¢â§CǾ<ß„DÞ\+¼nííBAPöKöäÖ@UDXçãp¬âEaÅ3ËÌðUZ8Öxn[ܰxÑ´·NRKÀy¹ÑœïºÝöU†l™:Ó67ª|,"Øc¬þRñÂNÜ î»á˜“RÍI¨‹'µùÕàUqÌp¸ÑpÒ˱z\Ú5¨¦‹ƒXÅIcr³†#Õ,ªy挥ÑfP4œ´p¡ºþÔã¦â¤75¶6Ç,^4õ‡ªü±]ÊLɻ‚V®.Ë ^€YƒœiÀÚŒ—6—Ê:Þ "Ǥj(ǫò6=Ë›úã~Œ±ä­?-{¨yá´›\jxFeýñŒ?3Â^°ŸýÁý‘ ù»â àuždðÂæXy@U¯ ž™¸lOú¬áÚáôãÿø½»CB,Ç ¹Øõǘ'ÈádÍ1›ýA$8"#ƒ&7cøî[GC0üÙãÉ:åV>`y²/ZÀ½ã­È+_•Ÿƒ½qtÑ 8gw·†;ÛýÞÝ£É`2ŽC êÒ5g öFƒñ8êíïŒúãa/ªº Á£H‹Z„£AÔ«ú !¶Fq2‰ûQO —ÁÄdã0‡ÃÞ€sÆÉI€ EÇa¿}dÌÒ^\ð ñX…a#Ð6¸‰Šú¼T†c{£újËj7¿˜4ëVÝlëëí+nNCƒ¥7WÓ°[u³6[xu«n_66dâÕ²§ +n¹Ñ­ºmâF·êæý˜ª¿Ýíâ‹].mïsís­q_®2 ˆÐïlµÎu?A/ Øñá$Z¯s}r:Ít‰C„½A0öøéÙ,[®R]a¹=é‹í¸¼ZÊ~²“³i®´¦ù|­ MÂé,Q{{£`>_«ËëEn Ý­I,®¦ yv1Ï+lv¶ûA–*=žÄ‚ÑÙå4—²8b<ŒÄxÜŒ1œÍ×òzº”£~ôãˆsÆðâjže¹ €õ*SÅâRÑa‡|kJiºº^e£Q/ìõ¾¿7ФTtu½Ìvw‡áåå"#`œáxØ77+ŒÅQÈ4ôãPœ_ÎSÒ@qð~?Ëu&×ëL óÙZÆ¡qòYžèêÜôãP(©)ËŽÇq´Zgòêf™" Þ½³=\,S)Ë4€âré`Ei¦ôÍt™užçRéù2Ͷ·â~’ä …PZSå#ͤL3)ûý¨WŠÝšC½^-Vi"¥VAÀD‘”ɪäL]ËÓTf½(ˆIWµŸg®Ò| 8ç”*#"­ p"RU>æxb/³êVk?c5 “f|P=¨[ukЧSôÈÈ¥Y)pêL“V·êfa\b/Zu«ê+>v«nŽ/‹“&fà|jí73‡ݪ›gs”wÕ­Y ñp¬[ukñ«FíÖU7¯pÌÄŒªúƒ¶ €gÏ®³;Ç[a]ƒàí7÷ãét-£^À~öÓ7FˆöGoÀãÕõR½÷ÎÑ`o¼ýæAïîñvxyµ{£àÝ·û"àøæëû1 ⃷ûLJ“ðæf!Æá½ã툌óœIIdÖŸƒ½qøÎƒƒ~’äZi‚Ÿ¼ÿÚ1Šóþ~ÿf¶’—³¼Òfãq¼óæÁ@kÂ$Éè½wŽGQ ÁÁþ( go¼¶ßßß…³ùZ.×¹†ldJk óE"—«Lí{¬‘íí {A(Øññ¤÷B>›¯sÒDw¶âÁ ËU*ÇÃ^¸·3虫nRqÁ,ÑÃ`•dª:yQÈy’×{5å¹Ta 8@='@0^¨SÒi¦•8 ÔºpÇ9cDà<Ït%šJ.”«5'‘!“²°•¹RˆÀÑ©å]¯ˆ ‘!׺¸H  •րᤵV ûëOùœ8kðÚƒ£ÚèVÝÀÊÓÜx5«n6^ØÚÑ ÞÝ­ºY›-¼ºU7/2ñjÙÓ†U·M<‚nÕ­[ukÛ­«n›øÕ4×¹bËÔÁìééMög?}kôÑ'giµçóÇWéùÕBž_-äñá$Œã€ z!×DÀ8c£Q ‹Uªîm…gçóüpþõ?|¶È2©§óµºs4‰ÊdÿVJ|ôùY¢•&¥ Þxm·÷èéU†ˆðÖñx‰ß|t²tOÔéÅ<»¼ZH€íI?ØÞê‹ù*QŒ1˜ŒúÁÍt•Og+Y¥7›%òübžÄqÀv¶ûÁ³ÓiZýD0ŽÃa$>øÕ“¹®À$ÍjM´*VÐÌsÐpƒ*är©õÙù,%‚c‡Ár•¦½Hˆ<“z2é‡ç—‹×Å<É÷÷F1CÆ.®æ)€ŒÍ—*¯N 4~G&•Dlݬ€€ Tõë2BÒ ›Å™\jÍ9c²ü;I3Y[ãK¡j‘ ð«4hªpÒD„š5‹VEô¬=Ίï­¾”ps =N'Þ\³Mųük^p³6[x½œp+û÷°¥øÓ­ÕÞ ‰™ÅËlõQ’ZùÜÊoxë„ÛW-ÜÚû:ñfuíáÙfŽ•µÜ µpÌ3«u¦'ã˜ßÌÖ ˆPiUMšQ†¹T4Ÿ%Š€`:C¥”¢r¢lVèËUÙjt6+²Y®H+ PŠÆVÂêôô:ë÷x¿òÅ*­/j Mõ9R¤0O%ýüƒGóíÉ 8<Ewù6ûõGÏ—@Õ2A±ØTý ¬VœÍó¬À\(aÀ✠QüV°ò•¦õ݈Œˆ(I¤ªz_&ÙÚÄ?ˆ„JÃl±Î+ÿJq†Œ@&•ŽÆ“„4@ 8›Ëµ¶â) Á8¤ÅeI&8SI.뢈Ĵ*΂RŠ@ã§ ËhÑZk@@dÀH1D¦ ¹Á ^¶ç DÜiÈICÚ5ÇJCã ݪ›ibåin|}­Ø×‰7k³…Y·êæñecC›9FUŒÞ±ä;`£p³©fã›—Æ´¹þ´1ûÞˆ7¯N¸™]{8¶™_åŸF-ß4fœL[w˜>9™fwŽ¶Â›ÙjMpÿÞ^”¥Š&ã˜kM°\¦z½ÌôÛoÆq?`W×Kƒò’éóç7Ù»ïÇÏŸßdû{àb˜çRz}i`¾LÕåõ" cqv1—æA{{£`¾HTp "ñÑ'g«~qƧóDI¥áõ»Û½ÂÁx[[©¤¢Ýíaøá''+€æòxžKZ,Suçh»wqµÈC”RS–IRJÓxØIžë4•zµLÕÎö0\-Sµ·3Š Ñ‚@¡ü=Y–I½NrÝï‡b6Or€ äÅMeŽQ(Øj•æY#þ I3†‚Á2E"‚ù<É'“~”dJG!çJ¬S©€ƒ(¹¤4“j¹Êòñ¨e™Tœs˜¤²^dÈ0—RæRkÁKˈˆ‚!dç(¤"Eš Í• æ¤ò ažË¼¹„+¢\ÊœY±Y)Ö5)¦`H@ „"Ê*ÓÕ¯èZ5…ÿ§ÿÙù_AëN“ÔV1iìZ¾5š›åBË_«8ˆ¶WOñt&Vï„cÙm˜ í_N-5°ñW-c¢DÓ× Š'nÈÓ4,ƒ´I 4¹@õ›[‹'YçºiowLÐüK±•‚Wó{3/.uŽußm\,ËÊ—Gèµð²ó!/ò%Ž~^´0hÎ÷¦ ÚΧnõQ²Í­Üh~ƒä9ö56MD6>dbÖ²§†?ö.ÿž;(]ûºà4çÛ;±’Šˬ×-õ§I¤üxéÁ«Y q"ÛP{nç…“K¥§öÔ1z|9x8ÞZÌ| •ë¦ú³‰cEƒÝ¯cè«A/)Þ^PJñÖæ¤ÕqóÍ+ÿ4j¹—–póω@°\eú‡ïõ>¹ÌžŸÜäG‡“PæŠ~ýÑóDëBü?O”ÒÀâÞö0ÜÞê@„Ÿ]§Rib±\¦ŠqÎâ^À=¹JÒ,×%´¸^gJi‚›é:ØÙê‡Q(Ør™)¥5,–©Œû!€­V™Z,G!ïõBqu³Ì¥R´N2M„ 5Q’Êz-k¾Hr$ÀѨDaÀs™S–«zÿ°ß ’Tj³-ÏMÆq´X¦ —JË\鸭 ®oVi5×múQ’fJj")5åRë(`±HS]ªã^$­4e¹*~Û¦4õâ Ê2™0,\(]ŒedÈ”*nzPJ+dœ#WJ«r{RúV¿Má·on‡žY¤®å æÅÓŠ [usÍ6Îò¯ x½2áÖìëÄ[+:{G·êVíòð• 7Ë´Y'Þ<'ÒŠ‘,K¯9¼ð˜T pk¹maöÊÄ[Õ·T Î/ò‹¬ºÕ}ú1¨ó™ÎÖ²Uƒ&f«ÕïF¼yk?N¸‘Q»Ý²@ô‚ÂiEð%…›íïöâé9²oÞO'ÜܯßR¸>J¶ü­ÜøÞ‹·6ìNát|YÜháè:î„[ùµo¶8Y~‡ßaêÔÇŸƒ—cN!/¾”póÓ‰7Òv -Nðo9!Oà–c'p+Ûã‹‹§g(tÂÍûÙ$Ü6Ó‰·nÕÍ{À×"ÜÊ­N¼yN¤#Y–^#rxá1©:áÖrKfþ^áÖòV4tâÍõcÛw«nÖ1Ö9úÒÂÍü»SëËW!ÜZ tâÍút«nV{»púŠ&@+ÿW*ÜʦN¼µ¨Ú©…ev§p:¾,n´ptwÂNl0«:ñÖrKfþݪ›'L{ܯݵÿÒ  …Y'ÞjW^ÌÊw§Út«n®Ù¦âYþµ¯¯I¸´½‹‡¨^û:Ïïxkö[¹Ñ · VAÚÄI;ÉN¼m0"‡“ª¡n-·dæÿ%…[iíÔŸwFŸ|v–*ó>“^Ôýú1øJÄÛÎÖ@g'§Ó `<ŠùÞÎ0Кàô|–­Ö™x "¾·= ./ùr•)À;G“èfºÊËã`<î !^^-r(Ž“Qh"ºº^ä©ñ¨Ǹ'ÄxÜD7³Už&…ÝîÎ0œ/™eå3ãˆ`Gç³E"9cÇB`šåzµÊÌßâ ‰0ä\æZ/–INŽÅ–àŒaÀg,I2)óúý«Ø‹„@ÆPJEYùŒ9Æ 8çI–禯/8ǵ9 °Q¸™c†بyOœå˜Š[{©tÍû»¬€Š£¡ù¿l¯nnO»€6•/'ø&ÃW½Ul4ý–ÿÓmùµÊ§öeŸØæKÙ/6¹šù[˜µß_ZcéN,„ò¬p÷ý¥M{»cú6¾Ã” á†HýnI£ɬæ¾Ì¤Êp+\ ÕørÏs!µ2±­9é$nà P÷]cfž:óÐ2³ö©.qÜüSçïûKmû‚`Lž¡ZaÖz†y6š1cƒa!ÚŒ†“–ã¦þ”í_ë;LÉàY‹u»ÁIÃW;ÿ&—f,ÿ hxQq Íë ÝšcUý±XÖ¦g™Ó×ÿS¯}Í hl\œ±d¼ ÖÍÓÂÌ~~iK /«îYYÚܰê` ÷÷ÆÅò/›“¥/Æìa\ÄÇŒ:^!Òð žQ]ÀË D$¬ßm pïîvty¹Èýˆ?xc/>¿Xä³E¢Þ}p882³þÄQÀ¼¾ßܬätš¨7ïïÅAÈ8ÁÕÕ2?>ØŠê\àpoÝLWŠˆ°× ÄÝ£­ÞÍÍ2_-3õúÝݘ1†.Ç¢Pðãíh¾Här™ª;‡[=Q¾;u>OäÞö ªÞm‹ˆ8™ÄÁb™)(ßcŠ„Xø1kÐx½Pðù<É·&ýâý®MHˆQiÈ82KC Q˜$¹œó0‚@)­Cƪ·ZÔçÐæQ])Àio=S·ÑJÖÇž³KÂ=¸vlS·[u+ÿòÔ.¨G»Ým}Å«nþ7#b³nÕ­bG;ÿnÕ­•@ÕN-Û׈xWÝ,^´plu̺U·¶IÕЭºµÜ’™ÿ—\uk¯¸Y{}Ož_çï¼uœÞäD¯ÝÙ÷wG«Lýæãg©’Do¿y†=®´ŽÿÁãuøÞ;G±Öšo¦KùðÉUÆâþèµþç/Ò«›•ºÿÚn?üô$ Ç×ïíEAÀ!ëÙR>{~“q†ì½wŽc­ ù0]$êéóëlg«/ÖëLçå#ÖvGÁÕõJÎ+ zo{ v¶‡ÁÉù,31ÛÙ³ÅZÝÌW `{«/v·†âùé4[§¹ØC¾Zgj2Žƒu’iY¼Q v¶úb:Oär)¢ Æã8bq}³F0öÄr•ªå²x ñpУa\]/²4Ë  žf¹Žû¡È2©UùÞÔ<—:Ï¥ {ŒsnýÃ,Žƒàúf•æRëÙ|îo ³àFYª€‚0àÜöÈ!gŒÍÖI fyÞ Ã0Ms åRrÁU>ئ`{\¶8 ðR«n RÍXfû×%Üšc<Á›ÑºG¾øê¯ZÖDiøz©âYþµa²ùF‰· xu ^¥p37M xólÒ,í ZãÆ;¤[xuÂÍ1ôœÎN¼Õííúão³x#0­U &„`y.‰1Äþ bñW.H¼ÿÞøpo"žŸÞäw·Ã¿ü›O–Y&kišÑ?~ðh… ! ö{?¼×z2Íe®à—>_ÿäý»ƒÓ‹y¾=îóŸðdp|¼.–kõül–þÁ_ë_œÏåpq¥‰~ýÑóµÉÍA¿Ç—ëâ2(A vuÕ<îd±Êt´q$Îêw´Àjé0ଠ>I¤Ž{_®RÝ‹¶NóúR¤àœ-–+YÍsi’ë@0æòBŒ­×²~äIšåšsV¯je™¢0ä,Is ÁÒ\™ÏÂ3Σ=^CÌs¥Ë•2”RiÎ9*-ØjÞ©çX@ŽX R%5AHUC¥5„<`U‡æ¹6'˾<ŸŠ·ÊNŽ-ËnÕ­üË í·M¸YÍæ×:ÏN¼ÝÎnÕmÆU6ñ¢…£ëØ;š:ñÖ6©ºU·–[2óÿ 7g>?É;G“àáãâ•\W7KE¥œ¹ºZÊÝ¡xzr#ýÑIúãÞ‰2<;Ÿåž^fA ðý܉³\R–)â¬xxïÅÕB&iFÏN¦Ùƒ7ö{óŸ-tétw{¬“LG}@æ’â~È®§+9ôøïÿèî I¥~v:Ífóµbœa–çu¢R*à¯ó ŽIšk·)¥)¼®5`¨tqñ”ˆ@*œ— 2& J‚aÅ5.³Ì}‘€Ôš/~ÀC­›:®”&†ÅõgÆu®É;/RuL±C+ DdT¾¾¡.õ_Kÿiû§,DT¼­ô‹ ±z/YI‡Â“;xÈÃÉÒŸçóÒÂÍÜ+ÈÄ75¾DáôN6_\¸y¢uji'Þšnú[·ê¿Cáfõ߉7‹-,]Çݪ9œð˜T ¯L¸@'Þ¼á}qñf 7ÓâéóëüÞ=þüÑED°5îó*Æñ¸/.¯‹×aœÝä'g79ç ÿô§o Î/çò`oÌçkýñçç)2„£ƒ·Ãêw[£aŒÃ_t²~÷ÁQü¿|¼RŠàæf)Wi¦Ÿ=¿±.å|þø2€t2ŽÅ›÷wãüÅãår™èA?âT¼fóDnOúâ"öãPœ]ÌÎ"äRÓ|ž¨½½Qˆ„÷Cqr:Í*AÒ ^,нušé^°ŠcËUªƒAŽˆÐë…üzºJŠU.$¥4¬W¹b9Büêz‘Uù‚³e²Î “Lê àÌåGó›Á‚“ižë0äL®”Æ´FȵÖœ!*íÌ Õ(¥42ÆHkâœs%µ®)È€U—u«c[œx¥â­" €JyÚ]™´4Ç{'›nÕÍ窈ëë²ä IDATnÅf'ÞnçF·ê¶aÃ*H›xÑÂÑuü„[Ëe'Þ\C_ êVݼx}å­$×ZkÄ!È2Iü‡o¥T”KEgç3Ù‹öþ{wâõ:Óˆ³E¢VëŒÎ.æòGïÝßWëT„‘`ï½sÿò7OWËeFÈøÎqüÁož­?»ÎÞxm/úÑúBæšÂ³>=K¶Æ}¾³Ý²LRp<9™f×Ó¥<<‡ˆ¤ÎÎçùh‹ýðxÀ‘ãÍt)ç‹DLB€'ϮӫéRŽÆ½àŽ€Ëe¢Š·C0D BÎåoÙfóµÚžôÄB]]/ó~ð·îïÅ Îç‰\®2D°¿= ‰Î/æÙ|‘È8ù½;;1 Àzëåªð‰È dÉ:Ó@ëu®†»‘¨N gˆ»Ûƒˆq†ˆ{‚±›Ù:Ï3¥gÓu¾µ5£PpΛÎW”7áŒGýÞ|‘d¹V:8ïEBpÎX…!‹Eš¬“<{a¨”&DÀ$ɲŠkŒq¦¤V¾úóU7ËÑ¿ýóÿíß™^\8½“Í«nÍ—N¼5Ýõ·nÕ ¾!­}x'Þœ ZãÆ;¤[xuÂÍ1ôÕŸ/*Üì}n7xóE°I¼ù¸p|´rÆ€1À( ðÃONR!æ²YîACÁ²L’®€,}‰€£õ>Õ—x® ‚ ó\Õ¾GäŒC–KÓÜ»»%I¦Ï/çõå¥KÒF²ï¼u?||™¦Y^7²â’)i­k\÷Ga.]]/eÒáþ8LS©o¦«ºdˆ¤‰ªË¥÷îîôžŸNSiäËX¹6ì¶&q s¢Å2©ûØ÷Ã<—z¹J%x¯êÙ˜1DÔæuRDœŒ¢ðfVܰP%të<‡„æI`€(¦™Ì,ó¯X¼U1â¿ýóÿõßYz‚ïVݬϷ\¸µ¬;ñæ9öݪ[k“<8ºŽ_p¸…xó~ºU7ïûÊ…›¯Žß9šQà§Ï3ǽç-Üx ñfòµ»öXHÎêgµùSBDó*aíÊ£H°4•µ­.Ee9%Úµª2eˆFN 2úgy®´""2D¥Ük¡-¼¼õ§Z4¬_vŽkbDÀb¨ý®„›…ËF¢n©_‡p³‚wü½Tñ,ÿòÂû½o–e'Ü#áübÂÍž¹»o®±=ƺU7ÇÐW¾jáV÷ëáÙfŽ•õÜÍ÷E¼5UæéÉMîòÌÁËé½É¥îÓ¦=nn©?ŽvŽi"=òÌ~›‚‰‘+ÜÌ.’¤ypoõÑDPÞyÛ®?dÚÕ:²5/™_óÌê£|Î (òÞaZÙmÆÆºyá‹‹7£C¢VúuŒ›¸á¯?à´uŒŽ/‚ê7qfó†‘Ú­ºùÁ·Z¸Ù_[˜uâÍãËÆ†nãX«pÖ»ütÂm/¼Â­ì×SŒ°Zþ6Ïö‰´â$ËÒkD/<&UÃ7N¼yðê„[Õ§?¯p;<œˆ“Ó©OÿfNPç3Çìøp$i®?{t‘›†öØ!_;8öíäO©oLJ“àâr.s©i0Y¿1"€ù2ÑI’Ù,)¿1Æ î ‚Í‰*Çœ3ÜÞê‹‹ËEnÚïn ‚›ùJ*¥)ŽC!ÃêÙåë4Sõê@}rÁY€hdZ•,a 1ºÌ /nFûo/Ü~g—K]_nYÍñÞÉæ#ÜZ¦›Šgù—ÞN¼9›-¼:áæñecC·ñ«ÍEs·ÿ N¼mâF·êæý|5­þÒ‰·ªOþ·¾ëµã!3EW mí}aýiòüý÷ïÅ÷O×É:wÃøÊ„[õéÇ!ÛÞðg'Ó`4ˆy.%0dðÖý½ÞåÕRžœMs×ÑþÞ0ÎFا/R)‹ËžRiŠãˆõ¢”­“\ô¢€ †!¿¸YH À½í¡HRIY^ÞîYÄUVמííA¸ZeŠñ`wÝÌ–ùj)¥‰¢Pð,唕—[ÛØXçé;!ÞªðôMo/U<Ë¿¼ÐvÂÍÙôâÕ‰7/{ÀÓmóNØÈN¸mâÅË ·Ú§ÃtoñlŸH+N²,½FäðÂcR5|ÃÅ[óÍ+ÿ4j¹—ï§p39öèé¥|íîNp~5OŽ&b0q<Œ¹8>y~?{~#&âîñ–` 1Ë%ýüƒÇÉOÞ­×ï…øöýƒðÙÉ Bˆ€;Û}®ѯ?|žýàÝã0³\ÒÉéT^^-Àƒ7ö£å*Ñû{c€ðéçgÙxÔã»»#¾\¦úÑ“«<—Š··|og(´&8»˜Éél­^»³>?©UBøüô¦¾‰@J»»#aŠ8*=9J€wß>ì5í…Íå嚈³Ë™z~:•ú‡oõ.¯êÙÉLË÷¸šBäÙÙT®×Yq™4Ü¿»Äýâ Œîl øùå\;½©Ÿ_²5é‹í­ApzV¼·Õo öö†a’æªz&€Öš[wklšçêZî4 „›i"¬`<ÅÓvìqb v+{õ­Ø×‰7k³…Y·êæñecC›9Vv:þ6 7û2úo 1£{jaÙ†½Få{#Þ6Ïö‰´b$ËÒkD/<&UÃwR¸µLý˜uâÍ“ÿ£§×ù{oFOŸÝ(€8õüÔC¶\¥ðÁ¯Ÿ¥Œ!ìmÄÏþàÍø/ÿú£užkpCÉSY…wŽ&"9ûÇ'ÿâgúˆX×]<«I(Mõ£;ʳ!ÀzÓb‘¨“ói-‚*n¤‰ÔQ(0MeM—ãР,7 :ða?;¹–ï<8 {±à«U®ã8dçs¹\¥z6Oôhó$K†o½¾-–™æq{ÜçÏN§yÞ~pòùY’¦’†ƒ#.8Çí­¡èÇ!]Ìs€8Ùb•T¢ —‹DÇqÄòùZ!"íÃušk!öãŸ]Î3(Ïͽ;;Ñó³i¦”¢ãƒI$¥&ÁNF=!•†j5. ¦™l^ƒå—-N|k…ó!ÿWÿÉñ_cÓ¡ÇI3ر°÷W,c’Ä‚ØXÛ…ë"æs…p«úouê)œÅ໵x¶ý½@¼Ý2±Öß°9­0›Fª±ô`cYçÅé×8–­±{©›ÝèÚų8ߘGv.¶ˆò“ÔÀñVn”1R KOñD¨~ÇáñecCžWÍ5öFŸ/Ëê_·ü# žPíóíXÈâ…eæl‰÷&n´°ÇÐ+Þ<+¹cÌŽq7¼ØloNñtXnÏFDùë™ ¶òÜT6q¬h¨êÞâæCè¯à ·&ŸMµªˆ­ÍI«ã†gäù‡fcZcÖØ:¹ÜÆ ËÌögsÒ0Ü Þ¼+ÿêÏËŠ7{aÁSÇäøs0sLš\ê> 8ú@H’œ=½’¹Òô«Ÿå¹T ¤†\*‚ãb™Ò‡ŸœdZÜܬô:É€pµÎa±L´,_Ö¾Ns:¿˜É xz6S'§SµX¥¤”†ù2Ñ«UFÕËß§ÓD'iq¥2—ç‹D繄L*:9J™k‚ã|±VËUñz¯å2Ñ÷ïíFgç3E˜¦’c°^gôôdš/—© ÃB¬=?›J @ ¥‰¦³µZ§¹Î2Eå3âàîÑvôüì&Wå ’DêƒýQ0®Tš’TÒåÕRæ¹€€3ìB>­%AžK½Ns-¥©Šÿ•Ò0žÄÁt¶–Ú@äá$Àmâm³°÷ÖðÚz¾qx¶¡LóbkfwVsbÌ¿ùïþ—o;ö8i¼Š¿x“Ê­txÓ¸ybíVݬÍ^­IŃ|‰£ûñâõr«+¥O×µM›síøÚÀnÕmÙçf7Z8ºŽ¿Ý«n/n…-YÖ^Crx±ÁW}nºU7ç€&ÿ ¢¶]üá}{WÝê>ÝÎÎ_»³#âž`¿üͳÌÀË`§ÇŸç˜ÖãAjs;З¨?õA°½ÕçóEªs©¼ƒ‡0 cP]vµ\7 c ûƒˆÍçkeú"¾J2]¾iÁ[8gˆ eýÌ8ï<Ç@–¤¹ùö ÏïÅë[µêæÔolð81»Š¿Ž}#„À-Űˆ­ont/,ž­ÒmåRµú µr¹•ß?áVltâÍñµ¹x¶O¤#Y–^#rxá1©:áæuK&xó„I@ZƒÖŸ><“fûû¯]¸™íW×+åX¶jyžkÐŽõ–U{”Ò4/_bâ5_&ÕÁžZU´T §ö¹³ˆÖI’ëkw^̾õâ­úˆ ¤þV‰·N¸yyeÂ͹oí킸¹xR Ç6ìNát|YÜháè:þž 7Ç^xLª†N¼µÜ’™'Üyv%Ÿ•ÜÙ©´šÍ \Þ¼¿|ôÉiDp|´%Fƒ˜'Y!€of+}uµTî,rÿÞnÀ —½^€g35­5Àx3)¬ÊDZ mOž]åÅŽ…à@ÀBìÓ‡ç™3ìïƒb1§³•^–>ûý€)­)+/##lMúüâz) qÄâ^À8G˜Î½Nʧ§xÄÛdÐãJ0ެ%¿_$G­5¨òÕ¶í:n£"¼Dõóõ-Þ:áæ~¼x½RáV6uâ­•@ÕN-,۰׈tÂÍs­ɲô‘É fUC'ÞZnÉÌ¿[uó„i /xôôZÞ»»#þ¹ü Üd3.8Ä!öz>zr)“r¥®ßðpo,â~€‹eª>¾TÕ3âöF|2ŽÙó“5_¦ºÂ& n‰,Ïéäl¦´&b¶³5`enðù£Ë|䤔 ¢­xx0æ«uNç—sº »;}¶N$ílÄÓ“k¹=î³Å,ÑY¹ôù“ËBŒAø“÷_ë=9¹iV ËüÏ/æêìb¦Þ~c?¨ñ)÷=yv-ß~ë øà×Ï2€½í!_.ÊK¦W uv1S·Ìsððñ•¬ÎK¯àý»;ÁÍt•œOÕ½;ÛâÓ‡p<ê³õ:ÓRê2¾™ª¼îm xšJ­µ+‚ ÎÏg²vQ(pgg(대¦Ó5mo ùy:•Å#cÒL’.ÞöËUª«”¶&}NšÀ\Õ§…,M­’Œ&ã˜gY¦ŠKÙŽ{![È´:¬%ÜÌ#(ÿ«–ó BÔwkN¨²6ŠJùeKÕ[l‰ªCZƒ„ˆŠÿ‘äØcAHB2|Y® òeO2|9GUwŒ9ƒ¸É§þVæc˜öuâÖÝ|Vñ Ë¡"µ±b™aëbÓ¤x&“cU<‚ˆ&6nRe¸ž»iÈ€¤¶-°©p¬óôr£æ ™&ÐàXò¢òeÁcð  (v57¨âYÅÇj——ÔpÒË1(—Åkž!ûll¨á¤Ã r6 LŒ;¢6qÃXj¯9éœ8 ¯zÌzβ—ųÜpžûTgJÞI­\]–7_NšõÇLËÉÅä˜kdðÂÄË…µæ<3 2XÕôäjr£®Uv{ 14¸açZs©áY9Æ|ãÏÀ¬àYÅ {ì5#‰-^Ø# ÆçÚÆ«öç„nxê}v›“n”G:u¼B¥E»†“¸aåSõé!£Ë‹Ê—éçÙɵ:>˜ð²wv†üO~úFÄ8Àt¶ÒÿâôFÃDø“Ÿ¾Ñ[¬Sýèñ•JÓ¼Îsg{È'ã>»¼^ê÷ß»LÀáÞHüäǯEóÅZ þ‹?~Ð#*î꼞®ôÍÍJ÷z!î9áþö@lOúàøpÂß}û0¼™®µà ö“û=0|÷íãho$./JI‚í!¿ž­uA¡³Ñ äwŽ·‚7^Û>¹’&,– Ö¼­Ì’LR  Áˆ`4Žy¹ZY`®öv‡ü݇áñáD„«ùGÍÏ¥Ôp°;'zªNÏ‹U"ÀBðüæã“€ˆàÁëûÁóÓõÚ½]1[¬t¿1Ò;Û~u½TIšÓñzìoþ°~£B¥Mîë… B€ 8ÃÁ°ÇµÔ¤•¦?=Í+ÑU<8‘å *„!h]XÄQà[Á6ê;f‹oë4£~²i¾ÖqO`’äõ©~~6UŸ]IÆöwÇüµ;;âãÏÏ%8ŸJ`M&}¶³=àŸ?ºÌ«²LB/l¹Ju L2E.ÏF£[¯óú(žÓˆ@ƒ~ĆýˆžÏêÕ? €\*œc¦$±€¡\hë7‹Z¼´æC@­u¿.!¥TŠ€!€ùÃÈêÀ:ÆrKX×_œÁá|±Š§íØíð%ÜŒˆÝJÙ‰7xYñv+7:á¶aƒÌó¼‰ÎyôcÓ‰7rxá1©ºË¥-·dæÿª…[#€‹Á /ê~ý|ãÅ›Yƒ=½’¯ßÛá—W E¨Œ„5 C$"øÿ߇Éîö€îOÄïýè^øÿ¿&¤¨XC­ ‹;œ3\,2Z,‹ß•ýò7ël¹J‰ˆðîñ¿w¼#þîf¹*VŽêe& q±J))£õÏ¿yž¥ëœDÀaæe—EœišS \,Óºö/‰^.89ª?ûã·zŸ\Ê\*?.„å¥D³Ž Á1Í =”¦Š„`X1H–3QŠðür®öïV»±QßÝñɨÇ?}x‘+iþô@pY^\ ÍsE‚3Ìê½EŽ“QŸ]ÜXú¨Ž³Üb÷<9›IMÚJ!‚Ô¥ÔÀA:W6½w˜*©‰1YFÁ¢*XVñ 9¦ÁÒngd]æ+¯œÔ}DmÈZN¾qg\®pÚ]ûê2„÷ò”!¹—K›övÇ·].­/W”—,ª|êËdÚ—ÿž¨.‹— ê‚[]‚(,KÏ è¢TçÙÕ%ŽöåR0O±Ýê½\jÛ¼c2 +5ãr©•§³ÑŒ ëÌ4 6œ´“q9«°«9Im_Æ%æšfž-n<³²4|AÕ¯1fêñd²¼n78iøró7Æ 6cÉøEËæçu". ¡æØK^.-sò_.51ðÿd£eíË¥Æi4¹á¹ôìØ7—-pÆ’qéÙÍÓ¬ý€_òŒÊ/~¹Ô¨?fdpÏᤇå‘ '­ñÔð ž‘Á3/7¬Ë¿/àFu¹Íúãb_Õ«ÀéÙTíl8–w(îmù£-±³Õç÷ïíˆÇO¯dp<:˜ðÅ2£ÇÏ®$)Ίš×‹{óþ¾ cöö›Á“§× àáã‹üÎá„"¬Ö…g€Gcþàþ~ð«ŸçQ$`Ðìú€ž\©£ƒ1¨DGEd a‚ ÇÙb­‡ý«ò<ØñÁ bƒAÈ^»·+f³„ò¼pwŽ·Äh3€â.ÍɨÇõ6õ8–wœ"C q½Î‰€`¹J¨‡u]ÜÙð8ÙpÐc¯ÝÝW×K­Ê‡îy¿_ØLÄîvŸŸ^ÌUlÐXÍP@DÈÊwЮ’ zQPŽ±â„ úÓZA’ÈŠBH¸5Šy ˜lõÙp²Ùl­ƒ€aŠj>(.q€Ê䙬/ƒ/œ1D`œ¡¬þG@…ÈKÛ4Ë) ÆÃ(,×DJ•O]){+59ÏÕ¾ šÿ—ÿê?ÿo*^š#ÈLP‹-¨GëSw´ie©þT¾^°"b?ɼiow\OîêI½ahOªv¨M#™…Æ5²,ìöm lËÖØMÎUßäâXYÚ¦Öíön„뜗[WݜߙläFóÛ4Çȱ¯ùÓ:}dýÕðl3ÇÀèó%VD¾øÛ|¸Mdâhó¢Wc·‰-Ý•:ï¶õ;;˳نqãåÅfãꊃÃr²më ¼cÌÎ¥•«¿þlæXÑP F_‡¾d‹Vã&Ç–öÚ½oS°úöñ¢Ü²ëiÝÞ®=­~+KíñÔqƒ^Ôýú1hý.×òèøs0sLš|ê>=aÚã†ÐÓîÚ[‚Þ =Æ8¢à—ë”&£˜ýê£çr¾H4ÂáÁXnñ^°?;•ËUF€ÓY¢•Òp°7Ÿ\ʳ‹¹"˜/ºž®hgÈ÷F‚ˆàz¶Ö½(d¹T0ˆ#6ôØh±«éŠÖëÒTÒlžèù"Ñ{»C¾½3äJÌgk DLi‚ù"©¡\®2zëþ^ðülªúýíny?ŽØ|‘Гg×õ›Þyó 8=Ÿ)™+B;[}‘g´.^7¶\¤ZÁÑþ˜Ï—©^,‹~’uFwïl‹‹Ë…&ìÇNÆ=onVúòj®*<ïÝÝ®®W$¥†( 0Íà 䆗‹â‘»[¾Ze´Nr Ȳœöv‡|6[ÕËua p±L©¼Ù¡>‡{»C>_$¤Ê›=¤ÔÄCÎ9 Ž,Í% KS Y^„—KE£aÄÖëœ9çL„ ”.Vïc eñœãA²$ˉP) Z¿I$"HŒ‡&‚£R”v¯6Ì‹ø¯ÿÛÿù?¸$mˆj3wÃÄúºdjöú[w¹nn>!â†`MÇhäÚôëñgãC·q¬*œí]þ¾ —L»Ë¥ŒÈá„ǤjxÙɹŒÑ¿ÚVÖÄöÿ@ ïç%Ó ÿ¨6¸ááEݧ?ÿoÕåRsŸ',~tb¸»ÕgQ/ÀþͳÜÁë%jT`v¹p IDAT¶çÄÖ1N Ú4› Ú7HÕ›Gû¾\§4_$´ †û»C~RüžïÖyîõ{»âñÓ+Išêww†l½ÎhµÎhÓy‘!lûìêz©<[¼8ÜóÓ‹¹"Ý\bŒc–¦’ÖÅëǼäE†0ì…¬º ¸t^@P<Æd¶XKfåxíõ”RAy§­—Kˆ€ay9Ù?eÕö†ëßëù9Vç €ÿúß4"Î*ž·9øN7c«oàÎ$›Øé/žp³xÑÂÑuü²Â­ñG¦­¹w7:ñæýtÂÍϱW%Üê~ý|çÄ›û {Œ17Ój5è˽Ma^¯D¸™¹lÆÅ:G/;ǵ9 ß´7)”M^ñæqìý­›ÇþÖǃ\B×׆Ô±º±á{$Þê;áæ‹Î$^³o/3ÜÃ;ñæÑð-—àÁ«nŽ¡¯þ|Qáfïs»éÄ›/‚nÕÍO˜ª¹x¸­ý;ÛÍ<²ë”i/À\Zï*½U¼q†ÀÃ,—>ÈËÍâ ç H6oYð'd×ñÆŸ¹q•ë6'¡ 2eßzù[‹7DäZ91:¾6”IG§æµCùÆ7ó#èå~ëv[ FGeà·Ïo psüYDõæÌ½ ©öï‡x³í„›D{À·\‚¯[Æ ¹íxó|ºU7ïûÊ…[§ÇŸ‡vßjñö§?}+ú‡_<ÌÒL¼ÂU·ãÃ1ïE~øé©ò%ÑàXoáÁÞ˜ooÙ/ý4·q´F€ŸþÞëáßÿâqFZÁÞ9ƒ¸xP[šIúäá¹\­2°>ðÖ›ûb<ê1­‹«¡ÏNnÔÅÅ\¾ÿîÝà¿zšW—6+¼Þ~ë@0Dxv:U‹EȼqwWÄq€i*éãÏN¥'äŒÁÞ9y^=[ àãÏÎ$€àÞ‹üä³sÕ`ð%…[ÓøoÕGltð}oԲ섛cä/œ/+ÜÊ–ÍóNØÈï½xë„›¿þ¼*áVöÛ‰7Oݪ›Ÿ4fóõt©ïÝÙŸ|^Œ(àˆÈ€s„( ðêfY¾K©àÏx³~àb•êù2­ÓŠB“qç‹”VI'gSbȨØÀƒ( ðêz©‚€ãdÔgËUJ«¤¸I¢¾…±Ä¬ß4Á*Éêö{wvøåõJËòy}ü\–0ƒ;G[âÁýƒà¿z’ÛØ„Ç'O®åùÕ\7µ4ÁÙÅLß;ÞâŸ\Öëm ¶'ö7ÿðY^TNΦ*8Þ=Úâ›ê cˆ~R¢tüýoÞÂÑœ5ËÖØ½ádwÂ͵5ŽñNØÈN¼mâF'ܼŸW*ÜÚx«úôçÿ½[uÏåÒÕ:#) FƒΗ d¹¢¿ù‡Ïr€¾{,îÝÙâ~.‡q„Ÿ>¼Ðç3U­‚LD.5þÝÏ?·¯_"a%—«”~þÁ# °»=`‚3üë¿ÿ¬:FQ‰ZU£ïm‰›éšÊ;Iá7ÅÎÖ€]]/ô°âb™j“g»c¶=°0âøôùµtOàÓ“©ÖZQ Þ¿·+¦³•~ôäJd¹¤@0œc®ô{!ŒÙõÍR[Ü0yaž?­ >|©Ò<‡A/Âwò?9‘y®jóEB»“ÓRëÅ2¥:ŸïЪ›ï#ˆnÞÐ÷B¸•›–}«½]<}… …Á÷K¼Ñ†Â ¹Ñ ·M¼xyáVû´±q˜N¶mémÃ8+íȲô‘à IÕðÍožmæXù'mk€“e'Üœ€ýõ祸ñoæçñÓ+õÚ½ñË_?ÍAk\,’zßb™Òîö‘ø‹¿þ8}íîpÿA”d9üíÏ?˶†1Îgkmù(žÞOųÍ®nÊGnÀxcñì9+„ w˜Lú¸N28Üqгé²z¸,*`X½áàñ³+õøÙ•büÑ»ÇÁüÛO3—“ÓÙJ—xÑ*Ié÷~x/(E5ÏK ƒ@p\­²Ök°Ê×T‹5×(Mp3]Àz•Q Øš ØÙù¬ÆJoØb¼|?«‹¡Óð……›×—üŽÅ[õaV‡­Éåw÷6…b£þÖ<µ¾n2íËÆê)Ü®™á«l/m5›µ¯*îïÒÛê§Ü“y‚É4ǯååóðíz›‚•+ƒTXºÔ-|x5kçiæÿE_>ÿ]y›6¼h 8c,Uu íöb¯äåóM¸uÀî­1cŽK0xa™Tß̾ª·)8¸,oÚmN‚Í ãÈ/÷òy—ÔðÌa™Uýù­Þ¦`гƧâEK@X\jxæŒ% "xüìJÝ9šð Ëý½1‹¢cp÷h›?;¹Öœ#d¹Ä_}t¢þŸÿøa6Fÿ{olÉq~YËÝß»oßúõŽ^Ñh4v€ ‚$ÄÅ H¤Hš”,ÑciÆ låq„"fBãp8ÒØòŒ-y4ZLJI‘"Á "$Ab!–èFw£ÑûÛ·{ï»û­:ó£¶Ì¬¬×¯»_oè<U™§NžsêäÉïeÞÌb¹tšžXpFGzÍt&ň–Éàåeî{œÄÿŸpfzÑè2³YÛ™†áåÎÐ3“‹®i8yz¾sìÔ\çÄÄ¢¼»\iP>—6È——Íx¿¹cŒ¡+Ÿ6*ËѬÖÐ@—aY&ˆÿª†Á0fDþ(ÆdEx!ùk àåIýk­ÈŠQÇVQЪòX©×éI0ºï®ÂåR¥2zÖMæªô¬›Ì, BmR\\Ôr©x#ÕéY7¾iEœ%ǘÿ_‚È+2@²RϺ3÷pí*Tû©ÊeþË:ë•G1Ôé8(•Ô×[0ˆ€Ù¹Š»w÷¸mY&&—Üé¹²›²-ã–›6ØD€ãºxûä|g¹Þ$8td¢³{Û°eY–Ñjµé•×O·Í‘âjõµZíÐg­fílÛ4lÙ¶‰ŽëbÿÓíf«CÕZ ÂÔtÉaìÚ1f[&c®K8úÖL§ÝiÑ©‰ygd¨h,•k.cÀÖMÖeŒBy¹î=îïˆaëæ!kqÿ‰6Ú¼aÀ´mß%«ÓÙ‰E'pÒ@_Á˜œ^â?ËÚ†i0Î_€m[‡-Ã`p]Âö†­Ù¹ewa±J™´lÆb•å:¥Ò&ê3ï#÷“3e§Öhy>÷e á×Ä—³vË¥Üÿ®È¬›²ßý½?z†WHƒ7¥"¸É¼QÕš7ñ™(!†wÊäIŠÁ@}! ”I±ó¥,øjoR”Kƒj¨}RŸÔÀMÍ/ÅEŒUí3 ÞΙV× p“ùûzòF&m³LÖbÙŒÍ^s¢£2"òcxµfòruççöíYo:<Ùi´:²4>ËåR¬¿¯Ë8ímVH<×Í0 ìÜ:b<2Ñ!iÜÞµmĪÕ[4;Wvkõ6/â‚Ïu3M½=y£·˜eoŸq\ Ÿ¹¦ë¶Zb¿û{ø3 Ü”Š(€×î9“g,u ö¥ª$A1{rÉSò™‚…oûêo¸]à&´¯ÁdŸéY· Mµý—¸I—×,x“•è2S–ÉÎN.9ñZAëæk ¶m1Q»í¬É¼,Ûò>UEW ¸ù¼—ŸäåTÐà 2ùœçLž±Ô-Ø”ªÅlQhÇuÉ_ ¾í«¸qí¯”<)æË¸˜Ð+×+xÓÀoZôך7©Nƒ·sæŸUÅÆ;¸ñ¹|v¶Û¤pù›âIâôÄ)}¶¦ŸÂjµ;R.¿0ðëzKʱØHÊ?×𬛊¬àB7™|Îx…oA•ú=ë–W¸IZhð¦âìÔ³nrþ‘äIþ’X åñsÆÅÊÀM|æšo7l²ŽŸœí8®Ô_EÁ[!Ÿ26¬ë7ß82Ñî)æÌÁ¾‚qôí™NL½UꙦ­›†ì#Ǧڶi²¡¡.3“M±v³C‹¥:ygÀ‰ÒMÓÀ`—•ͦX»íP¹R§R¹î„|>Í ù¬15Î,2Ó40>Ökž8=ebp Ë4M•JƒË5Š8+2,—I1ÓdlbªÎTf³¶‘˦ØÜür€™i`t¨Û8;¹îÊÀº»2,•21;¿,8DÎ=…\Še³)ÌÌU2ٌ͗j|׸f€OÞŽ”wÚÓ€—“å•Ç‘v—rÚ‰öòôS‚"6ˆÛá%8’¿‚8KÜázíúÞaÊù%c¡-AÛAŒ©ú$E¶è¦‚oŸQ°Ë3ÚéI‘PÎ_œ~áŒb’÷e×òSÙ~!Çìb \þ‰÷1Žÿ î0õb,¾^î—Å–i°Á.“8YâŒ)ÆD˜ÁBŸ1ƒ1Û6 X¹ÒpOœYt"G p1&Lȧ(ŒöY‹KU—Ì´ VotèÔég~©ênÙ0`eÒ– H˜iF«Õ¡3‹ÎÂâ²;>Úcæs)F–—›Ô]ȰTÊ v™bx°Û,•k"0lÙ4hµZš™+»ý}£·;kòhh™«7ÛTìÎ>f°Z­Eù|šY–Z2Л7ÊËÍÀ4FËfmÖÝ•a]…Lˆ ¤×É@Ä2)Ý]Yt2¡­FùlÚûflrŒ!F"®¸JÈÿ‰Bë `I€»ïÞI³nçœqãTÖ³n‰üĵ-‡ ß4Åüw{è=ë¦x‰bò8IŠ KP gÝbb‰·_Ϻ)Ôû ©Êe~eþI0éªX2åéìÔ’³uÓ59íÍ,­íµú ¦ep ¨U[täí©¶ë6o°º Ãq]Œáµ7δ; @±+k t™GŽN¶G‹f__Þ0 Æ Ã@³ÝÁᣓmrLÖfëFzLÓ4c ³seg~¡ê‚168Øe¾øÊ| êõ6Õj-€f³r¥îvwåŒz£äòv6›j6½MÍP®4ÜB!c,W›.Ì/Vi /oœ\rcèíÉS‹mÈf3Œ1°`flna™z{rl¡TãÝX\ª¹0ÀŸWKJåºÛS̳ó—‘wÞÌÜ ‘ÿ.-Ë@_OžÍÌUÜÑáCì¯Q\C_oÍÌWhýhã∕+ut2la©š<&^… M& H ^îðáÝuÞ|u5pKä“ar⤘“Uÿ¿¼)^¤˜ÀN%Iq¡` 4p‹‰%Þþø»ëâùG­¢o¡Ž Y s®:àù‘P®ÔÝtÚ2,Û2Úí1ƒ!ŸK³Ÿÿâ­&°sûˆ=ØßeNÏ–œ±‘ë…—ÞnµÚÑIÄéÅ@0™ß®–IÛÆK¯l€Ý;Çì®BÖ(•kîÆñ>ëìä’S©4\f0¶w÷¸=¿Xmg36k6Ûäº.dê)æŒ\>m?3ßVÅYàƒ®Bšu2ÆácSá‡é&õt H§-ÖlvÈ_=f¶eu×)@¨7[4h …Ï0—èdz4›ä{Ó –J[¬Ùj#xï ÀPјž+»ÂÊÞêïfó‹Ur;—Hˆ³V»ƒž\Ž‘bÅ5Þ²äïðrgï4p“^ªÑà-f@PN1_ÆÝ.%NI–1?Ê‚5pü(ÉSøLƒ·˜Xâí׳n 5Å~Cªr™µÀ ¸ÊÁ[¨#€©™’32Ømœ>»à€¼¯+øÅÂbÕíïË›SÓ%÷ȱ©Î®£6cfç*ΙÉE‡\¹áª¡ð3ŒÅR-ü†iµÚ \Öfå C±+ot:„áÁ¢ "4¤SÞáÂNGØ ¬¯¯`Œ v›‡ŽLvœNx„p,ÿ‹Yct¨h9>ãðß)u\‚ž0LÓ`Žã†ñáº.™¦aqi™&'iLòˆ±ÐoœS™ã¸Œ1o™™1Ào ·'Ï:ŽË4 Ëd "–ÉØT¯‹_*ë.d˜K0Æ2 .¹ÈfmÔk-ÇBàšn<ù4xÓ³nÊ®›b˵»³Æú±³RmÒ ›G,À›%œ™-S&k³­›Í‡ÎvòÙ[7ÚkÖk-Ú´qÀ¥JÙ+èÊgŒ¥’·[µã:¨ÕÛ”NÛ¬ÑhS»í`j¦ìnÙ8`5Ûg&!•¶Ùº‘ãØÉYû F&m3a|´Ç¬5Z4¿X%ÉØ¬²Ü ‚7ó×l9HÛ&k¶:¨Õ›¨Õ=X¶‰\.ÍÊå:€TÊbƒý]ìÌä5-4êžë ƒ¡PÈ \©‡ï/¶Q­6ãAsûíù…g¹Ã+UÔa½~Á›$+¡ckà–p! ’çˆ Ÿ4xK`").,An1±ÄÛÑÀ XMþŸÖàM4×p“üÅF»MÓ4À˜TÊdÇNÌvL3ZÞ$ŒÙ¶É:m—ܸ%(‹I²¿ ƒÁ0kwÜPD6k³ñ±^óè±éNrîû» av¾"L»QÀë_¤Sî6ŽŸž Édl6Øßmœ>;ïz23àºnØdo1o¹´TªSäËx0Z¶‰Þ‚19Sò&!¤R&zŠy6=[Nê¶ t²pÉÅòrS¡Ý¶e ØÃܲšë"öÏÿåž•¢[7\p 4xK¸’RRlÄü( ÖÀ¤˜P°+7Å3¼…åñü£VOϺ…:*d)̹0à¦l<ˆ1WEåqEãù\n#¼ºàCyG‡‹fʶpòôœÃ•¯vœ‹Ç$o‚Ž EƒY²PG¾6Ø,`0»B%Yï7nDþÎÍçg©”ÉZÍè8;Ul Ì‘•TÄ’iŒ\®+z×¶L´;K,&Ë_6•(æCÃNRJHX×YÊ@Uuèm ÞTÚqÉSò—‚…o[7!.b~T –ê4x‹³zÖ-&–xû/pŸÖàM4×â¬[²_“SKÁ9o—¸ñåF;lŸó—@®ËùP’ÇÇX‡Û(ù’¸„Ø`À!’Ëyœàȱ÷©ÝËcàMñþ"{äºJ^“d­Ô¡§5pSiÇ%NÉ_ mà Þb—¤ð¥,X7’bBÁ¬p Á›R==ëꨥ0çR7_O¹.®h<ŸC¼]cðÆ•_1ð†XWE±Ï'ÉJH“œ¥œz]||þj KÔ¡·5xSiÇuÉ_ ¾m Ü„¸ˆùQœ Üâ*Æ|¦Á›Äó¥ÚN7ÒK7®â"€›À¶«öo‰±$æ*5¿”ƒ’úŸnBiBŠ Š4x»JÉ;ìÑ¡”ÚqDò—‚…o;!PÅÇ5x“”ˆwø˜H(ü¥›Äó£ÚNWTFƒ7®BϺ%äµ9W¸Eñ|ñVƒ7¡4!Mr~”r^\¨nW¬èðF¨Êä½¹ó êw$x[!¸IŒ Ü<^ž#)64xS’žuSö°KÜB=òa§Á›’_ÊAIýo€›a0Œñg­ pè/ ‹5×ÿz#xç iÖn9¨Õ›‘éŠ8ËçÓÌi;¨7Û*ó. ¸)ØÂ>KŠ]Ölu¨Ñl'ç Þ.YÊ$ÆEЍÊĽµó ê븼IŒzÖ¤˜P°W ¸ùíjð¦Ð@Ϻ©ƒæJ7¡hgÝÒ)›íÞ1f¿¸ÿD[nP1’p¹\%òm^?h–˧Ðt#uöì\gÍ-Th¾±ìJ>ˆÍºeÓ6k1ƒêÍ6¯…gÛo1ß>9ë´Û•š<ëæº„±ác~©JK¥ZP¡Ûe"KL1§kð&1©“§žuâ"æGYð¥n~o Ò³nÊh¹bÀM¸’dJ>“X ôY Þx?†Wk¾\Z«·æÖ¨·ÃÚ|>ÍûºŒR¹N‹KU—–˦X&m3Ã4PȧØÜü²[Yn„Mt2¬·7o..Õ\—ü~æm ¹¬ÍÎL,vS)‹r)€\.Åæç—©îÒl¶©í¸aœ¥ÓëëÉ3f0,,.“e™ÈeRl°¿`83s·§˜5J•&9ÿ+ }6·è}¸¾¿·Àªõ&z 9¶XªQ½ÙF:e¡Øef•åG’”—d˜ Ù[*ÕdŸÅ^RàK9°Roç ïôäEC ^ „AÄVÈA^Ò#yü«@D¯WÎ(ø7lÚ—É"YŒ8Yàdùêzß”@T$‹OH„—³“Ó.ïñ‚…†Èö{|Þ¿_ ‹3)xÔ÷ 1Ï_Š(ô#Å’'ç¾”©\ÄOð“g8ð~‰š&—<„DKŠ‹Èáuˆo&2Ð÷¥h'Hòg¢z\Œ|ÒÀJ¢’Ayg‚•œÿÁÉ#.Î"Qè/¿(ŠIN–l?E¶°ÈNîŠ(–Â8 ‘c ㌸8ãäÂÓ·'ˆ‹8€ãú’þÀ•Kü‘,å§ø¢XŠâ,9Æ|z G¼"ø~ >ÿÈ~áŒb’÷e/cê©ã‚÷¬"W’„¸àžŒòèÑ—ÄÅd(KÅ™eªØòãû“lV„ÄÅß_ƒ¸œKQœI}I|UäŸx®’bÌ‹I!—‹o&ò¹‡Év†ï)R$!ÿDJD~ŒÞõÔdÉ,Aí¶ÍCÖºÑ^sqiÙí)æŒÛFl(ä3l×öQ+e›¬TªÑîí£V.›b°~]Ÿ56Ök-,ÖÜ¡.#²Be €iš¬Óñ–Vƒ¶37l¶rÙ+—ë´eã ÙÛ“7@±'oäsi v›Ö÷˵&-–ªd0Íf›×Áòr“ÊË ˆ t¶ÉB¿Ž ïŸu£=Æ@o—QZn ít0Ø_`ÃCÝÆrµ Û2±iý€Áç·ã2Ã4ü±_öeèÎ ÆÂ?(1ÆÛ¬Ü*Èòz…7î.r¶žuSÈ}C¼¿bü¤gÝâoX0„Ú¤¸PθùíÆí׳nB¹Ü„žuSi°V³nŠc1ŽsæŸUņžuü(Ô\ô&…©Ù’sÛÍSÇOÍ:†‡ŠæñSsN>Ÿ1›­Ž†@ä¢T©»g'˜ž-½=y£Zk¹CÝÆCg:Íf›–«ugp ËEô÷Ìu£=ÆéÉE—óàÍV‡ÎLøå“‹îð@ÑXX¬ü¯®CýöÖñ·ð ˜ëêõ&Zmïèº`å6`r¼O³úÀ›ØÙÉEÇq½¯?ôõæÙÂB•2iD@Ê6a[&kûßZ­Ô›ÔÛW`ëF{Øôl…:ç8”7!iÐvd!1yF‘~® –Ê5p“y£*%p’V Þμiàv©[¼NV7´Uƒ79Iò$I,ú«n¼ëÕ7¯íDßïéœã\»ã VoQW>cÔ-"–«MrýO xãLø­©V«êé8Ó`\Üù Ê…ÿuÏGåJÝM¥,ô³ÆÄä¢ð,ÿ3VÞìax`­8ãO Ì%Ù——\Á·CðÐ&`0Æ¢ÏØÚm—‚¯2óþSozžNi’ãDŸÔJ™&L“af¦FŽãçg1°RnIFà\ïß –KVCÄðbË¥ˆ¤Rð iM IDAT,!JK¢,òê„e>¯Eq¹Ôçeaòäd lÑM¸\ÞpYƒ°íØÂ ¤G}[8ŸÉý˜¼\*'ÅhÉ üDËb+,YxËü’iø®¥‹p¹‚÷¥ÑÜwÂ’…¿<ù,ZúÜM/ñ~ã"¶”~žË¥¼o„,'û€oñe1έÜ2Ÿb,KéàƒBz=aœ)–ÿäðôuT/—ò>ãâB*—øqaË¥Êe±Ðg,[2Q„÷0·øÇ-=ó1æ?,eqq&ø…“%ø1¶d‹(.„¾ÇEyT.Æ$'K²?ŠINV «[.åì Ip¸“áÒ¼2Æ‚òxÃ3 år) Ç·,ÏÛ)7Ä…ôGIà r¹`¯Àù.—Jù'’å©Õþ,(ÌA“Ó%wd¨ht:.fçËîPÁè8.Úm™ŒÅÜ`Y×l%¸p}™3s%wãx¿™Ë¦ ëû-ö1B«ÕÁÔô’[È¥ùœÍ\K§l6<Ðmä²)6:\4f*^ãòÂÌl…ÆÇúŒlÖ6Ò) Ù´Å@µÖ¢žbÎÈe¼%ÝÒrúúòF*m²‘ána©Z°œÀæ–ÑÓe®ë¢Ýq`Ù @!à}SµVk¡Zo1ÿg¼ÏäÐd\¡é‚É §ÿ¿(1p–Çz©žu“y£ªóZ.M®‹ùLϺù< éY7¡\nb-—Ký+‚ÈcÒ³nBí9óϪbCϺ ~j’gÜ8yb.dJo‘/xçæ—ÝÍl€œ7NuŠ]Y6<Øm˜Œ±¥Jƒˆ@Õj“œ…òJåF¸Ëôäé··˜cÃ]ÆâRÍm4ZäÿÎW“àºÆãgÜKUê8 ôØé‰E·ZõŽY*רÓñ€ãôLÉ­T꬧˜c†ÁØüb•àôĢەϰbW†Õ-ÌÌ•©§;‡þÞ[,ÕÑnuüÏÕ3ÌÎV¼ ß_3óeÊdlt2Ì0 4›mùÑ0€NÛ •‚4h»ÄþÙoÿûÎ3 '@4x ªÔèåÒ¤¸XKà&iðÆ7­ˆ³èÈN Üäü#É“ü%±@诊죊 Þ_ 5—ý@ÞžbÎX®6ÜNǽ$òŽõÙLŠÍ̕ܥrŠÝ6Ô_4޾=ípüár©$CzÉäè‚m[lnn™­¶ê) Þ.!Y±@Mj=ë&óFUk ÜB 4xóyô¬[xu•7¿ÕèFƒ·sæŸUņn‚…š n~…ôùòÁ[@K¥­ÊüÙÑ¢ž\Õ™‰…è3íÔjšvK®{ÅÁ[P>=[Q=¦Ûe"o_sr@¯¸¼EUêô¬[R\\à&i¡Á›Š?²SϺÉùG’'ùKbÐ_ϸÅd‰Ïhð&<#¼§5›uãÛ^Á΄üÙɢޒ¬„4‰V»ÃZíüߪXÂþ³3)÷\ pKH?¸]²(‘€žu[)¨¯póŠ)æË¸Û¥Ä)É#þ*æKYð;¼ :’À©d").,An2›(/>P†åñü£Vñúo+ä+ Ü„g„w´jà&è)ˆSúLÃTc>Ÿ¦+E÷–/¸E¼Âo+ð‹ 19yRÌñÎ.%NI–Ðõc~”_/À-äV2’ – @ƒ·˜Xâí×ÀM¡¦ØoHU+Pæ µI¼§Q¼\7…¬È¤*—I·«„,èY·•‚úªnkÜg¼)^¤ # œJ&’âBÁhàó™o 5Å~Cªr™_7áá] àé™ÊüÙÑ¢ž’¬„4ÉùRÊyq¡¼iÀ;5Òs&ÎXê’_£Jñ¯0®“µçLžï<ðw»”8%YÂûŒùQ¬›«Á›ÈÉJ=ëvÎܳª¸XkàhðÆùFé3=ë¦ù‘Tå2iàvS¸œªgÝ®~àæ_ið¦x‘‚Ž$p*™HŠ KP [L,ñö¯¸y…¼ÉrD~=ë&<#¼£ËÜ¢‚äüÙÑ¢ž’á i’ó¥”óâB5xÓ”H–*®pó‹4x‹”SÌ—q·K‰S’%tý˜eÁ¸‘ ¾Pƒ·˜Xâí׳n 5Å~Cªr™ÿ¢ó™o¡(¥Ïô¬›:Æ|>M×yßNõIϺ)¸J›ó¥,\ƒ7’âBÁhàK¼ý Ü|n±Bƒ7®NaŽžu#N£xù%nQb¬x%y i’ó¥”óâB5xÓt^d]6à&hð–p!$%¥_HáGY°n$Å„‚%(P7Ž9æKµ­o¤›o\…n ùGmÎy·°™ÄXs•š_ÊAI}ðÞ8ÉÍz|’¬„4ÉùQÊyq¡¸iº`²ä×ë¶žuKä“ar⤘ã]Jš’,¡ëÇük Ÿiðg ô¬[L,ñö_2àȾ!U¹o<»¨¤žu E)ýµfÀMÐS’—&9_J9/.Tƒ7MMö¥nÉ—\û¼ ]?æKY°n$Å„‚%(8OàæsŸ;64xã*ô¬[BþQ›³fÀ-ªs•ú)%õÁë¼…:J²Ò$çG)çÅ…jà¦iMÉŠÒzÖíšnœÕM2oP›•®oð¦[L’W°fÀMªÓàg•Ô³n¡(¥¿.pS«ªÁ›¦+JÞ·Sq%€×®BžØé)9Hïè”êÞYàM™bþÒÀMbŒùQmgôX¤›o\…žuKÈ?js®p‹ âùâ­oBiBšäü(弸P Ü4]r²ÖóoÙŒm~ä—î€v»ã>ö½ç&ÔÉóÒ7Û²Œ?ô®éUµÜ¿¿õÝg§ë–+6MÂ@Àé­òWÈ—NÙÆÇÿÑ݃¦i2pä­³Õ_9R‘ý(*¶ˆwnÈíÛ»µ «”kǾÿü|ÀÏ;»¶nÉ)à8.ÕjMw¹ÚpªÕ†3;_j;>ÑìÕàMâóFziàÆU\jàê™4@‹â5xSòK9(©ÿià&”*â+¸7[Øgc¶&å Þ4]$Y±ä.EqBǎͺٖÅöÞ¸¹Z­¶ó­ï=7U7îrMfÝLËd·ìÝÒ§zü|éû?|q6q;ëÖl¶Ý¥r­óKÜ2ûöl.NLΟ˜œo«}ùl ¿ÛþܧÞ7–ͤL"ÂûËÇÏpC$¶lÉÝqëöâùØV®Ô:?ùÙëK?xê•¥(ajàv¾ÀÍoWƒ7…zÖM4W ¸ E¼ ¥Š nõ¬›¦«š ò‚Ï ê°GPt>oXË1©VòÿÊùG™Ÿˆ@ä 2?1 MýË=°fAM #"Ænä·Í_ˆÅ|ɹˆ@ø‡'^š?qjº–e²Ï}êu¦eF 7ðAä3f™¦ñùÏ>8–ͤLøÑO^›?xøT÷×…PwWÎzèCwüëßyd<›M Y ~b må^¸Xîñr>‹å2.y²@–b,q> „˜ô È‹GR4(ñ3€X’Ï¢8"& ¬±ø šðâ ±éàï?^»‹ÊeUŸ‘oïwÞè0.ù‘‰1æ?à7D‘,.ÆÀÅXèX¯]âÚ ¬ã,xÏ¡-$*É÷IE\(bÃk— {!IqÖ&ÅFà› Ý•c#Ì?Š˜áùcùGR!  . “KQœI}Il:ˆ  d°ï)—‹¾¡èå„q!½>QÆÅY`gÔdc\»\œgüK¢(θ>ÆÅïÇ(6„@ .ÎÀÅq²dÐÈB,ÿ—ËC~¿í ."+$—#ꯢE,1øò¯š%?.H.—Iˆ M×/YQçP$/.à·nA £¤éß©ƒ“¯^qÖM*eD@½ÞtþÃüêa5?á—Þwëàí·lë€ç^|sþɧ_7M•+5G2!vÁ'#µoø†Ø¿òÔä¿þG6e3)sd¨7ýñÜ=ðwßzfV‚g>ùñûÇFû3püäTíÛß~>i†~øÔþùŸüü@IÆ #›Iù\ÆX?>¾}ß ]ëÇ3°a|0ó?}þ#£ü'M´;N¤{Ü`©üú›uKšq Û}¦gÝ‚6ÕöëY·¤¸¸4Ë¥žžJ¦˜Ïô¬›š%ì¯1;“òžuÓt‰ÉZa`=ï¦1]“åR©4¶I(•«¸ þf«þÆ­Ù츥rµãq‘0IBBRú…~ôha±ÒùÆc?Ÿþ쯼w î½{wßÁçªo¼yª.»ú®ÛvtÝuûލVÎ_üõS.­ 8Í–»Tª:$ÚÚ|äØ™Æ“?Þ_zÿýûŠèžA`˦‘ìÇþÑÝ}_ûÖÏT.9yÆ_¤p¼3Á›è—(ÎV #;5p“‡|Eû’Ïâl¼Ååˆ hà†Ë Üüö•^ ˆ|Iªò¸ï_ —²äà ¦†é"–KC9ñ^å/YÄ ’–x¸åõ ,™Šƒ—<¸‹È¾Ž¿ä|Æ/W‚ ¿xåHååWß gË>ýèý£…\ÆäDbt¤7õ‰Ý;ìÙDøë¯==µTªF3ƒ¢|Lpžî¼ÿ xâéýåxòå…€ãÞ»w‹Ý9“³5aÉ"¾,ÆÅ·Ì'-ÌpL„(΢õ7)Æ|[ÅFeøƒåRå’i´’,cùKYeŒÇr)‚8Š =)Ì- >W´”Va˜‰|&,ME>Ž-#Kµrƒä¯¨Ï~á¢<*—–ùâË¥þ“ç»\Ê"YŠØˆ–ŘeªØòŸƒb1å H9ˆ‹ Τ0.d@"ÆRgR_âýô%Æ/™Æù…ËòÂ’)q²Îµ\¾§H‘ز¼lPäG1Έ„·È—‹1Ù ‰ÂŸ(cCŠ Þgr‡ u”â,–"~é9’·Àù/—2R-™F±ÄXø…"Æx›5€Ó´"Öì\7Ž¢ UµLa‚WùEé´mlÛ2–߸a(ÛUÈÚ™tÊlµ:n¥Zï?9U;xèÔ²ãº\n ¿]îNÙxØð[7(.HJ\Ë¥ÍÍG2ãë2#C=©R¹Ö™˜œož85ÝœšYjÉv*üžòŸÎn\?œíïëJu²Ö§?qÿÐÿûWO‚˶Øç?ûàh*eðÔO,¼~èdâJ þ’ŒKšY í}ì{Ï/ÞrÓ–ÂðPO*e[Æ÷ííþûï>»È‰g7ݸ)›NÙÆÂb¹sìøTs ¯ÛºóöíùñÑþôÔìRë™ç.Ï/T1q›7§vnÏ í|>cº.Q­Þ¤ÓgçZ¯¼v¬¶¸¸,,U÷óæö­ci˜+;ÇON·T3+ý}Ýæ–Í#>_©süät[eë€Ç—ÇŽOµæJâ.ㄸгnJ%¯ÈriLw=ë—#* gÝxKãj^ÞåR¿"ò%©ÊeÒ MÓy‘EAÒI4ÄpêÌló¾ðå)NÍPíß·¯ûÁ÷îëö|3Óüƒ/|y:æ>ôàmÝïÏÞ.øý÷ÅIî¥nQq˜¡5x»ð¦Î?¸ ·k Ü8yàe*¡ qz ¢”-\?àx?’ª\& Ü4]0YŠx nVÞ€ˆO)Ç/P&N(û(>ó‰÷Žß´{SOp?;_j,-UÛDD==…Ô`w†1†¡bæ7ýÛÿè?ý­¹…r{µÀMÐ“Ë ”Ü€m™ì×?û±]Û×wyzæ*­ÙùR³Ø·‡{Ò¦i°wݹ«÷†-c¹?ý‹ï™_¨t˜< oŸ˜lüàG¯Ìè· À#ß;lx2z Vk:þ¥N¹n4‰¤n’M%7þî¹_^@ÜøØ@:›IµFÓ•}išû?ÿáaÀÀá£gj€Û·gKö7ãƒÃ–éí¸]^®;“Ó‹­åjÃí)æÍ‘áÞT6“2R)Ûxôáwõ¥Ó6ûæwž+ÀÂRÅ9}v¶¹a|0½~Ý@ºÏËËuWNž»w¬Ï7ÆÒÙlʨ×ýc`";ÙÞݳ0=³Ô>31ßQûJϺ©4¸ªǬÁ›Šá<À›n‘Ž— ¸‰u2ið¦é¢Éºhàæh¬ß…]Ñ!Õ½€7ïÙÒ¸jµÑùâW~têÄ©é:¿”8>6ùÔ#ïY74Ø“1 ÆÞûî½ý÷Íg¦Äæ)ÞJmVoÁÕ£¿k(pó åÖ—¿þ“ÉcÇ'c.›2~í`tÇ ë CÅôo|öÁuÿñÿþûS®+û’„Nýý'^Zܱm<¿yãp¶Ï˜Ÿû•FÎ/}õ©©Å¥åŽï³„Y7…+cÉSJd\ò\*UÝŽãešÌ0èï¶N™mI®Àîòc˜œ^l=û¡ÊR©êìÙµ1ûÂKGª ²ÙgåþÀ}ë{Ï/~ÿ‡/–'šËdRÆ'?voÏý÷îé€ûïÝÓýÝøE¥Õö@àk¯Ÿ¨oL3ưg÷ÆÌ³/¼YƒCD@±;oŽô§ ÃÀ®íÒ/í«Î¨c#}Öà@Ñ€W¼]—MšÖŽ ^ò\å¹n“§b“‚ðØ…mR¸ëöáA½_ìggŸœ®{‰"ü1:;=1×üÛ¯ÿälÀ·q|(ç·‰sžë&èDÑ@$Ú‰è‡è„áÁžô·nï¼eÐÿçϾ{úØÛ“ ø?Ö%ªõ¦û'þ݉ÃGÏV`|l sÛ¾m]ÑÀ%lì´JDø«¿yrªÞh9œbxꧯ-¼öƉ:Å6*ˆ›½ÑÇ$XÂÿP:jÛÛË˰í®B–ß`Ê5C¹Rsþð?còñ'_.?÷‹ÃÕ?ûï?˜{íuØ­û¶æ‹Ýy8½z¬úÇ_(uq³QoÑÿö©ÅÓgçZA[£#}vàô—^=V x÷ìÚ˜…t®ÛÞ=›2Œ®ë"~7î\ŸVn½yk6¸ñ•·ê¾×b›‚h~@îû†/—øÃØ@Ä+2xï;êOïàsÝH?F|³Æ›àåI–ô‚à·Xã9ëª=×S@Ü$Åñ¯é& ß"_þN:×Í·…bgr1æûqM7)²Ï5iZ#2 Úa*öªw˜ª°”Ûá%ò;>¹üê·ß31ßìÙ¹}<‡ŽœiZ–‰m[ÆÒ£Ã}v±;g”Ê5ò¹´±eÓH ^}ýxwKú')Ƥ؈/[ MHz¹4Éþµ\.ŸÑK¦Â3Â{ŠÅ™ôùr½\ªù‘Tå2iÀ¦é²’%öy·Õй? †w~]ʶØÈpozd¸7=4Ø“ì/¦GGú²=żð3&')q u‰JÄÀ[ tØß) >pK¿:ðƒ¥wmÛ–Ñ×ÛeÍΕÚ*ð}½Ýög½8¸/•kbwÎ*ä3æ¯}úýCü§ßž ôãT:‡Q«oð“g6“ AÕrÕßL =9½Ø9Gò cÀà@ѰG‡ûìÑá^{l´ÏH™¦û ? —_=Vï}7uÀM»7eNŸëÀÆõCvwW΀O6ò¹´ñÁ÷ÝÆ€=»6fžyþ`ܼgs&ÿâ+G ]~à&þOƒ7…š‚/Wo‚•@D& ܈Ó(^¾Zà陊8ã|&7íñI²’R[äËóO¤£o𮲢@.¼©§’/¼Y–Éîº}Gñ]wîêðw¢ž“¢©n/äe,N‰€/¶ +ø¾)€}7mé>·2e3iC±dÃoÇç?ýÕG²Yï•ç_<\úùó‡*¿ûÏ?6n0†ÛÆó¾w_ÏžÞ_Re7å`ãÿ¶è\À-(MgR¿ãtn¾ÜQŽvÛ¡¥%ïl7Eò ÁÛ¶-cé?x[÷îë³¶m%.±'½Ò7Þ<ݨ7Zn6“2nܵ!û½¾¸ {oÜ”€f«MGß:Û²S\×…aؽc}æ™çÖ`ßÞ-Y¨7Zî7N69'éY· Mµý×&p‹«ÊÔàmMÀ›nIc¢nš®²àïÖ[!¨ÛJ$ׯfÖ ðv0þöÿðЦᡞ 8r—æ+­™Ù¥æÉÓ3µ×^?¾ü¯~û—7§ýóÚÎÞVꉼ"r§7Y4kÔjwÜ·OÕ#Š'wŸÍfx>‘Øéyèž¾ þ7L—JÕÎ×¾õ³ùz½éþø™‹¼{o/<ô¡;û9S?}v6oðæïüSÕ¬¼ôŸýÀxà–«õÎÏŸ?´ðö‰©Ú‰Ó3NÛ »¨m™,•²L`Œ% ¬B/ “ö(ÜøDP­7]×uÉ0 ÆÀØŸüÅ÷&\W‘Ü2E»±øRìݳ9÷žûnê¼ShÿêËON×ëM"€}ãÛÏ.n¿a]nÝhÚ²Löù_}pøßÿŸ_=ÓöÏcÄRvã¹€ÏtëÞ­ù èèÛs£sõoÝî»{w>pDÀÏž?X9pðdãÈ[gšK¥šðµ„÷ßs!R1H øåWÕoßwC.•²ØîëÓ‡ŽœnÞ°y4 o¼yª4}ððéæÖÍ#éþnk ¿hôw›ù|Æ€÷¿ÕHб+Þ4pãe^àhðvñàM·Pž&MW!YáÕ·dÁõúU$N¬¿¯ÛÞ¼q¤ÕZ£óŸþË·Ž—JÕ÷tØÙ‡†zÓÁ R°Ü¹"xSé˜0HËôÜ|¹54Ø“¶m“Žô¥ÏNÌG³bЬ”JY¬ÙT/ë Ð}½]Öç>ùÀpà˜'žÚ¿pø­³!8q‡þâK?œþ_ÿÅ'Ö۶ņ{RŸúø}ý_úêÓó’Ï’èœà …¬y×í;B@õìóo.Çíç•:ç¯ûî¹1”ó¥¯>5ÿ£Ÿ¼VUˆ‡zÂß3Ú)ÿÝqîíí†ã¸dš»éÆ™NÇ ßñ7N6ƒ6¼q¢ñÑÝÑ {v­ÏŒö[€·9ãåýǼ!W7pó¹5x[ð¦Û%nBû¼iÒtu‚¿üâ?>/ó ˆ èÀÁÖ|oû ëÂ] ÇŽOV=G>§x~ÖØH_¸ÙÀ¶L#:΀î¼-!ybÞJ¹=ß“Ûpìødx`ì=·ïì› ¢À_¬§X°¿ðŸßú‡ÿÇç7ÿÞï<²Î4ãÏî2 †ú«çriNœši<öýçÁÉ"g'Ú}ÿùð¸’{ïÞ]Ü·wsNõñyÁÎÎØÖ|?¹ÀÀÀ~óŸ|p0ø>ëÄÔBëUïÌ7Ñ/ÊWÊÁÑ›7 ¥oÙû™gÆ–œŸ™&cCƒÅÄ¥lÛc©ZkºGßžhÀ;7dvíXŸ€ÊrÝ=yf¦¸êȱ³­F£E°kÇútp´È›GÏ4ë~yèQ?.€„sÝxyƒÐe<$pAŸyëv%>>àz8×M¡]º£A®§sÝ„¾¥IÓÕL† Þâ`7å‡ ®IDATÉÀ 纅¼bÅ ç*yÀMu ¯w¼…GëFû3`ÑYI|/·S{ÿýûúÃÆƒmšÉÉ3VÅjþŽlàwäŸ>{°pÜwÏîžõëúS’ÏÂyùè=ý–i°l6eNÏ.µ;áËQì—º§Ó†áðÇ÷ÿß0|VKNžO<ýjåБÓ! úÜ'ì)æÍ7ÐQ> Xa\èGvn[—ùßÿÍgÆvnÏðúë¯==OÐáhÙY±äéÿŽ-8Ö×4 ¶iÃíû%»Aâdßû²ƒüâ•£åR©Ú9qj:;×Úºi$ ä®âÿõ_›k·£%åB>c<úð½Ý¼û&á<¼TÊò ZÆ‹¯­úÑw÷Àèp¯ o:Õ„´üóú¡“½{6e‚cRˆ¿xéHÜqH´Em#øÀ 9¹‡å’âú·nq9"ÿe_.êÂ\%•Ç ß·Úl^‰wÒ’©^.Õ¤é#ÅÆ† ;„Æ2MöÁ÷ß6²Z%ŽŸœª/•–éÙ¥öó/^¼ë¶½ð‰Ý7vÏ»zgæJ-Ódlx°'5<Ô›€É©…ÆrµálÛ:–€Áþ¢}²:ÝTþuµÂÀ’8PJYéoþîdz½={ëæÑ\&“2~õSŒ|âá{©™Å–ilx°'•ö®EÇqéÏ¿øÃ©³“óí Iöóæ¯}úáàw|/¼|¤üü‹G–å¶åºT®:_úÚÓ³¿õë€7¬Ë}ð}·v?þÄKeÕkÚ³kcnÏ®9EUŒêõ–û¥¯>=ÿÂËGÄåÏ$­ûõŸ.þÛñè°iìÆ²ôï~cìØñ©f­Þtûûº¬m[ÆÒ–e²f³MÏC.Ñ·mï5 ƒ­ëÏ®ëg—Ͷû̳o,<þäK ·ìÝZ@Üí·lë>qjzÖgKܤ hW1°ÆUÖjuðÇúíɇ?|Wï»ï¹±'•²Œl6enÞ8œåyOœši|ó»ÏÎyk¢ÈbÌû\Þ?mv®Ôþ›¯þ8ü2…jpæÉ—÷«?û›•{îÜÙýð}Ÿnœ<5ÓÂyR»Ý¡©é¥öOž}½òÌs«­`ÇkRâý£ ìè±³í?ýËÇç?óè{z{{ f±;oÞzóÖÏ·ÿÀñú—¿ñ“ÒÌÌRç]wíÊg3)ã¶}7dÿêË?Zr\Þ^œí?ðv#q³s¥Îì\É8@8sv®³Tª:Á2óK¯¾Õ ¹6À›n—¸©ŸÑà-*_=xÓÀM“¦«‡Ø'>÷û¯«*θ&cÛ6 3@IøNX¶#àäé™F½Þrù®?4Ðco¿a]n ¿;•JYÆÔôbkbj¡yêÌl³Ùh»!•²-›F2P«7Ý“§f‹r‹AÇ(ÚýýÝ6àl»Ò×H¹üKÈdÒÆM»7æ6Œ¥ó¹´Y«7Ýù…JûôÙÙÞÊdRÆæ#Áò/›š^l/øß_] ¼ñÙÒNYlÛ–±tÀ´¸´ìLL-´ `£#}v_OÞL ‰•JÝ]X\v–kuá¸dðæ‘í[ÇR©”m8®K‡Ÿnú~ ޼”m±ÛömÍŒ ÷Ù}½s~¡âœ>;Û>qj¦=7_AØÖÍ#v6›6@Àá·Î¶Z­6twåŒëm(Wêî‰Ó3m.C‡¼›7Û…|ÆÇON·Ã¯NÄüxm·°] Þ‚;=늺J›$Oƒ7Mš.Å@Üù‚7°‰'NÅ…Øáüb/Lü V¼ÃÇD†²Äˆ«MÈJIÀM‘ïÀ!ËJNžñL£’¢¿Xx•PÀŽsξŽJ;=ÞH/ÅÀ’ðŒâ·na»Š8[q€ŽlÕ¿u“‡}Ižä/‰B½.›B^äËðJƒ7èY7Mš®v²€ yÇ7 f+_®Á›‚VšuSòkà¦Rò€[¬qi“dJ>S=~}ƒ·¤þ§›Pš"9?JùN-Xƒ7Mš.ùÄ„˜œIBRR,B/¼Á›”È”É3žiÔ€C·¨(´3þ‚$OíKuløW×5xÓÀ÷cxµÖÀ-¦cä¥Ï4xSÈ u”d%¤ Ü4iº²dp$$$å "ôÂw$pó¥%¼©ù#;õ¬›<äKò$I,m ÛT¨©Š‹dÂé©"2]àM7‰1žÇ• ™#?’ª\E¼iÒtdŧ¿zâ;¼iàÙ_—¸y¼‰¾€ˆo 5Å~Cªr™_7áá­¸Eu¼)dE¾$U¹L¸iÒ´Fd©’§Ðõ¹d£Nïhàæñ&Ñg¼‰ ¬ÔÀ-Éþµnâ3¼ ÏïIϺIŒñ¼§ôHÈù‘Tå2ià¦IÓ% KÑ—¡Á›nJþÈÎ5n‚¼ø@–Ç|¦Á›,Gä×ÀMxFxGÜ image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/behindSelect.svg000066400000000000000000000101231321075051700262110ustar00rootroot00000000000000 image/svg+xml ? latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/bezierCurve.svg000066400000000000000000000041051321075051700261100ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/border.svg000066400000000000000000000057371321075051700251140ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/bubble.svg000066400000000000000000000075151321075051700250660ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/chord.svg000066400000000000000000000070361321075051700247300ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/circle.svg000066400000000000000000000106031321075051700250640ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/closeCurve.svg000066400000000000000000000042171321075051700257410ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/closeLine.svg000066400000000000000000000040551321075051700255440ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/closedBezier.svg000066400000000000000000000054721321075051700262450ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/comment.svg000066400000000000000000000044471321075051700252760ustar00rootroot00000000000000 image/svg+xml %ab latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/curve.svg000066400000000000000000000040041321075051700247450ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/dimPos.svg000066400000000000000000000171201321075051700250570ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distHorizEqual.svg000066400000000000000000000320711321075051700265750ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distHorizLeft.svg000066400000000000000000000275021321075051700264230ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distHorizMiddle.svg000066400000000000000000000275571321075051700267410ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distHorizRight.svg000066400000000000000000000275461321075051700266160ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distVertBottom.svg000066400000000000000000000255511321075051700266240ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distVertEqual.svg000066400000000000000000000300501321075051700264150ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distVertMiddle.svg000066400000000000000000000254751321075051700265630ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/distVertTop.svg000066400000000000000000000254761321075051700261300ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/doubleBorder.svg000066400000000000000000000064101321075051700262340ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/ellipse.svg000066400000000000000000000113531321075051700252630ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/filling.svg000066400000000000000000000057661321075051700252650ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/foreground.svg000066400000000000000000000071161321075051700260020ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/gridGap.svg000066400000000000000000000113021321075051700251750ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/gridLabels.svg000066400000000000000000000051031321075051700256720ustar00rootroot00000000000000 1 0 image/svg+xml 1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/help.svg000066400000000000000000000066021321075051700245570ustar00rootroot00000000000000 image/svg+xml ? latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/join.svg000066400000000000000000000065151321075051700245710ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/joinedLines.svg000066400000000000000000000074361321075051700261000ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/latexdraw.icns000066400000000000000000007716141321075051700257730ustar00rootroot00000000000000icnsóŒis32 rqtrq€pqsvy|}xrsqnljiijlnquz|}tqlhfc€bcfhlpvxrmhfa^^[[^`cegmqpkeW\ZLRQGIIUadiogkœYJfZ¨¥ lO]`njV±Œe¾>t¹_€ÄlLYnh]_³¼h.rŸ*'¨;RohdE­Ã48l¡-4c¬6IqkXu²¯r%kšn¤)Atl_¿pZ½5hV¬7X¼Y'8whƒNAˆdG§˜•P)-yrgXXP><3#$|vle[RKA81(!vxqh_WNE<3*" sptmd[RJA8/'xwzxw€v wy{~„‚}xywtrp rtw{‚ywrolj€ijlorv{~xtomheebbfgjlnswvqk^cbUZZPRQ]hjoumq aR’mbª¨¤rWdgtp^³‘lÀGz¼f†ÅsUatodf¶¾o9x£62‡«E[unkN°Ä?Bs¥8?j¯ARwq`{´±x0sž+$u¨4KyrfÀvb¿?oV¯Aa¾a2B}nˆ VKŽkPªœ™Y&58~xn``XHF>/+)+0{slbZTJC<4-& #){}wog_VNF>6.&yvyskc[SJC:2*"$+ŽŽŽŒ’”•”‘Ž‹‰€ˆ ‰Š‹’””Šˆ†…€„…†ˆŠ‘Ž‹‡‡ƒ‚ƒ…†‡Š‰†|€vzzrts{ƒ…ˆŒ†Š®~t¤‰€·µ²Œwƒ‹‰|½£ˆÇm“Ä„›Ëv‹ˆ€‚¿ÅŠb’²`^¸k{Œ‡†p»Êfj޳chˆ»hu‰}’¾¼’\Ž®YTµ`pŠ‚Ç€Çg‹V»jÆ‚_j‘‡›¯wo¡ˆt·­«|Wac’އ}~ymlg]ZQQY[^”Іzvojfa\WSUY‘ˆ‚}wrmgb]WRPLŽŠ…€zupje`ZTVZs8mk6“¶ºº¹¹¸·±Ž3WÍÎÊÊËËÊÉÈÆÊÇS8ÍÈÆÊÌÌÍÌÌÊÉÄÆÊ5“ÎÇÌÎÏÑÑÑÑÐÎÌÇÏ’¶ÊÊËÐÓÒÔÕÒÒÏÏÎθºÊÏåÓÓæÞÜïîëÜÑÓÀºÌÊìåÛ÷ÚæõãéùßןÌÍÓñõãÚéòÞÜëñÛʺÌÎÎíöÚàêõäåëôáθËËÙòñèÞìöççñõåÓ¸ÊËòÞÝøâìøíñûðëØ³ÆÕæÒØëêéùùúõïòØÌÆÌÓØÛáæêîòõòý±5ÊÈÊÐÕÛßäéîóõûüCTÌÒÑÖÛàåêïõþÿm3“»ÃÇÌÑÕÚÛ³Ail32 àtuvtF}uss„rstuvxyz|}€Z}}vvstutsqpoonoopqrtuwyz|~€|‚Vsstsqonmllƒklmnoprtvxz|}}zasttspnmlkjihghhijklnprtvx{||zttspnlkihfe€dccddefghjlmoqtvyz{rsqnljhgedcaa`KLNqmifb^[WQÉçx?BtpkgcbO™énKÞ²6@>+yéS(1/3¨àB19;=uqlhe\ká­GB†ìp3@*xéN!)$Sê¨#3369vrnjgU»Û]NOAÂÏ:;*wçX/9EäÔ>%./25xtom^•ìKTOBbìž2*|ñÝÝÞåã¦9((+.1yvpme“ZWSNLAr}<1MxrqlW3"!$&*,zwrnk]V]YTPKI:3;8.!"&(|ytplie_ZVQMIGC<853.*'#!$vzwrmie`\XSOJFB=951,($ ||ytokgb^ZUQLHD?;72.*%!xyzwrmie`\WSOJFA=940+'#|wwxuplgc^ZUQLHD?;72.)%  ;€~wvvrnjea]XTOKFB>950,(#y{|wa×plhc_[VRMIE@<73/*&!  z{|yNƒzyyxx€wxxyyz{}~€ƒ„”n‚„ƒ‚}}yyzyxwvvuutt€uvwxyz|~€‚ƒ„„†„Yxxzxwutsrrƒqrstuvxy{}€‚ƒƒ€fxyyxvusrqpoƒnoopqrtvwy{}€‚€zzxvtrqonmlkkjklmnoprsuwy{~€tywtrpomljihh‚ghijklnoqsuwz||yxusqomkihgfe‚deefghjkmoqtvxyxwtqomkigfdcbaa``€abcefgikmprtvxvspnljhecba_`_]]^__`abbdegiknprwuromh`dda`^^VV[ZXTTUVY_bbcegjlowtqojp„k``^]XrpVVaropndUP]`adfhkvtpnimÕÄZ_^Pè‘NKäÞ`ááÞΚZX^_begvspml]Œè’R\YÓÄKUF‹æ‹s|Œ»êÂ\X\^acvsolihY¼ÛeH£ækJTBˆçb…çd?HGJ=‘émHTUWwtplifb_YÊç~FPKL;ƒçb+«àK;CEGzwsolcqá°PL‹ëw=I5èW,40!\é«/>>AC{xtpn\½ÛdWWKÄÐEE5}æ`;CO…ãÔH09:=@}yuse™ë”S]XKjë¢=6‚ðÝÜÞäâªD)4369<~{vsk’—b_[WUJyƒFEB9-*&#"&+*)*,.14~zvrolfb^ZVRPLFB?=:63.+'%%&(*-0z€|wtplgd_[WTOKHC?<840,)%#""$&)#~yvqniea]YUQMIEA=951-)%" "&$~|wspkgc_[WSOKGC?;73/+'#‚}{}zvrniea]YUQMIEA=951,)$!Dƒ|{{xtplhd`\XTPKHD?;73/+'#! ~€|iÏvrnjfb^ZVRNJFB>:62-*:$„‘€„Ž€ ‘’“””•—”•””„Ž€Œ‹‹€ŒŽ’“”••–”––Œ‹‹Š„‰ ŠŠ‹ŒŽ‘“€”“‡‹‹‰€ˆƒ‡€ˆ ‰Š‹ŒŽ‘“”•“€‹Š€ˆ‡†„…††‡ˆˆ‰‹ŒŽ’““‹Šˆˆ‡€…„„ƒ„……†‡ˆ‰ŠŒŽ‘ŽŒŠˆˆ†……ƒ‚€€€‚ƒ„…†‡ˆ‰‹Ž‹‰ˆ‡…„ƒ€‚~€‚ƒ„†‡ˆ‰ŒŽŒŠˆ‡…†ƒ~}~}€|}}~~€ƒ„†‡‰ŠŽŒ‰ˆ†„}€~~||vvzzxuvvwy}€ƒ…†ˆ‹‰ˆ„Š™†}~||xŒŠwwŒŠŠ‰‚vr{~€‚„…‹ˆ‡„‡×Êy}}s˜å¤qo¡âÞààÞѪzx}}‚Šˆ††zŸæ¤t{yÖÊovlŸB㟔 ÃçÈ{x{|~€ŒŠˆ†„ƒxÃÛ‚m±ã‡nvižäeljg è³ozz|}Šˆ†„‚|ˆà·„ä°jtshä†k€rhÆÚytxy{Šˆ†„‚t­ÞÓÔvqrrf›äƒfmmoe¤æŠmvvx‹ˆ†„}yÏä•lspqdšä‚ekkmc•ç’ittuŽ‹ˆ†„w“Üã¤ksooc™å€cihja’ç‘fqqsŽŒ‰‡„‚€zÒ˹à~monb˜å~agfhz^›ç†dnnpŒ‰‡…„w¬åŽvÝ¿hona—å}`fegZ¸ßqeklmŠˆ†‹à»roŸç‘fo`—åz[a]S~æ¸]ggikŽ‹ˆ‡zÄÛwxoÊÓkla–ãeltœáÖo^degh‘ŒŠ€©è¥t|yo†ç±fa™ë€Ýbâá·mYa`bdf’Š…£¨}{xvo’šmey—““hSW]\^_ac“‘Ž‹‰€|~{yvtjfljc[YVUTW[ZYZ[]_`•’‰ˆ†‚|zwtsqljhgdb`]ZX€WXZ\^“Ž‹ˆ†ƒ€}{xuspmkhfc`^\YWUTUVXYT•”’Œ‰‡„|ywtqoligda_\YWUSRSUWW’’“Ž‹ˆ†ƒ€}{xuspmjheb`]ZXUSPPRQS’Ž‘‰‡„|ywtqolifda^\YVTQCNMSk–”‘Ž‹ˆ†ƒ€~{xvspnkhfc`^[XURRTUO’”•‘‚ÎŒ‰‡…‚|zwtroljgdb_\YaVPSRPl8mk1q™ª¬¬¬¬¬¬««ªª©¨¥”m.*”ÇÎËÊÊÊÊÊÊÊÉÉÈÈÇÆÆÇÉÁŽ'TÊÏÄÃÅÆÆÇÇÇÇÇÆÆÆÅÄÄÃÁ¿¿ÊÄOUÓÄÃÆÇÈÈÉÉÊÊÊÊÉÉÉÈÇÇÆÅÄþÀÍP,ÊÄÄÇÈÉÊÊËËÌÌÌÌÌËËÊÊÉÈÇÆÅÄÁÁÅ)•ÏÃÇÈÉÊËÌÌÍÍÎÎÎÎÎÍÍÌËËÊÉÈÆÅÁÍ‘4ÈÄÇÈÉÊËÌÍÎÏÏÐÐÐÐÐÐÏÏÎÍÌËÊÉÇÆÄÆ0rÏÄÇÉÊÌÍÎÏÐÐÑÑÒÒÒÒÒÑÑÐÏÏÎÍËÊÉÅÐn™ÌÅÈÊËÍÎÏÐÑÒÓÔÔÔÔÔÔÔÔÓÒÑÐÏÎÍËÈИ©ÊÆÉËËËÎÐÑÒÓÔÓÔÖÖÖÕÔÔÔÓÓÓÒÐÏÎËЫ¬ÊÇÊËÐÙÒÑÓÔÕÕÝÝרÛßÞÞÝÚÕÒÔÓÑÐÎÒ¯¬ËÇÊËÐúôÐÔÕÔâÿèØØèÿþÿÿÿúé×ÔÔÓÐÕ±¬ËÇÊÍËÝÿãÑÖØû÷ÙÜÙéÿêäæéöÿöÙÖÕÓ׳¬ËÈËÍÏÍðýØÓìÿáÚÞÛëÿâÚÜÛÙêÿîרÕÚµ¬ËÈËÍÏÏ×ÿîÜÿîÙÞßÝëÿæàáààÜ÷ýÝÚØÜ·¬ËÈËÍÏÒÐèÿúûÜÝÞàÞìÿçáâââßîÿäÛÚß¹«ËÈËÍÏÑÓÔøÿåÚÞßáàîÿéãåääáìÿéÝÝἫÊÇÊÍÏÒÑÞþÿëÚßàâáîÿëåçææäíÿëàß侫ÊÇÊÌÏÑÒøöðÿáÞáãâïÿìçèééæñÿëãâæÀªÉÆÊÌÏÍæÿßÙþôÝâäãðÿíéêëëéøÿêæäéÂ©ÉÆÉÌÌÕÿîÕ×éÿèàääðÿîêììëñÿøééæìÄ©ÈÅÈËÉïý×ÖÙÚ÷ûáääðÿðíïñöÿþðììéîÆ¦ÇÄÈÇÞÿâÑ×ÙÙãÿòãåñÿÿÿÿÿÿûòïïîëñÅ•ÉÃÇÈÛàÐÓÕØÚÛèìäåëóóõõõóòóóòðíö³nËÁÆÈÈÊÐÒÕ×ÙÜÝßãæçéëíïñóõõõôóîü„1ÃÁÅÇÊÍÏÑÔÖÙÛÞàâåçêìîðòôö÷÷÷õóô9ÌÁÆÉËÎÐÓÕØÚÝßâäçéëîðòõöøùùôÿ³)ÅÃÃÈÊÌÏÑÔ×ÙÜÞáãæèêíïòô÷ùûùúù2PÏÄÃÉËÎÐÓÕØÚÝßâäçéìîñóöø÷ûÿeNÇÑÇÇËÎÐÓÕØÚÝßâäçéìîðò÷ÿûe&‘ÈÓÓÓÕØÚÝàâåçêìïòôúÿø¶/-oš­±³µ·º¼¾ÀÂÄÆÉɶ…6ih32»€u€ts˜hutsƒrssttuuvwxyz{|}~€s~~~€‚ ux{th‚ttssrrqq„pqqrrstuvwxyz{|}€¦v}„}€€u ttutsrqppoo€n€mn%oopqqrstvwxyz|}€€}~}tiysttsrqponnmmlkkl€m$nopprstuwxyz|}~|„y{spsttsrppnmmllkjj„i€jkllmnopqrsuvxyz|}}{tys€t srponmlkjiihh†g%hhijjklmnoprsuvxy{{|{wtutsrpommljihhgf€eƒd€e#fghhijkmmoprsuwxzz{zoqsrpomlkjihgfed€c…bccdeefgijklmoprtuwyxv€sqonlkihgfedcbaa€`_€`%aabcdeeghiklmoqrtvwxssrpnmkjhgedcba``_€^ƒ](^^__`abcdefhiklnoqsuutsqomljhgedcb`__^]\\…['\\]]^_`abcefhiklnprssrpnlkigedca`_^]\[ZZ€YX€Y&Z[[\]^`abcefhjlmopsqomljhfdca`_]\[ZYYXW…V'WWXYZZ[]^_abceghjlnsqnmkigecb`_]\ZYYWVUU€T€S€T"UUVWXYZ[\^_abdfgjkrpnljhfdbba_\ZYXWUSR€QR€STTUW!XY[\^_acdghqpmligedaXVY\YXVUTTLHJQ€O1IEFFGGFEFLUWVXY[]^`bdeqomkigf]}ÂÀxSZVUTUG°TKOD¾µ,°¤oMIUUVXZ[]_abqomkhfdc]ÂìÂUXUTTLeÙí—AMN=¨ìã€ë]ìíëÞÂGSTUWXZ\^`qoljhfccYpØä”JWRSGµé¾EJIK< çÄ~ƒƒˆ™¸ÜçâŸGRRTUWY[]qnljhecabQŸåÔcOUDƒãÞmAJGI: ì¶2:?d¿áåCRQSTVXZqnljgeca_\ZÈè°IQUÍè¢,?@AAÅé­/–êÊGAEFHJKromjhec`^[YYI‡àß¿AIECA?>@.šíµ187,8;,ŽéÎG=BCEGHrpmkhec`^[ZS^ÓáÞâ‚:GB@>=>,™î´.65€4+58)êÌC:?@BDFsqnkifca^[\Kªê¨çÎNAB?=<=,™î´-4‚26'œëÃ99<=?ACtqnlifda^^QzÞâ{IÏéŸ7D?=;<*˜î³+200//01+¶ì°-99:<>@uroljgdb_\WÅè²HC‚äÝd9@<:;)—î²)1/.--/(FØèŠ$7679;=uspmjhebbQšå×dKPB¶êº;?<9;(—ï²)0-,,.,œåÜM(33569:vtpnkhed[o×å—FSODcÚæ‚1?9:'–ï±#)'%! „Þêœ/.02468wuqnlifeW·çÅTSPMN;˜èÐI8::'–î´6<9=:4(! !#$&(+,{yvspmkf`]^\YVSPNKHF>€: 75/*(%#  !!€- !#%(*|zwtqnlifd`]ZWTQNLIFDA>;8531.+)&$"€, #%'z{yuromjgda^[XUSOMJGDA><9630.+(%#!€ " {{zwtqnkheb_]ZWTQNKHEB?=:741.+)&#!wx{yuromjgda^[XUROLIFCA>;852/,*'$!{||zwtqnkheb_\YVSQMKHEB?<9630-*($"{yzzxuroljfda^[XUROLIFC@=:852/,)&# {|yzywtqnkheb_\YVSQNKHEB?<9630-*'$" {v„xwxvso'mjgda^[XUROLIFC@>;852/,)&#  8€y€w'tqnlieb`]ZWTQNKHEB?<9741.*($"€+y~‚wo`rpmjgdb_\YVSPMJGDA>;9630-*'$! ! ‚)wuuvtSinlifc`]ZWTQNKHFC@=:741/+)&# =€€zyžp{€y‡xyyz{{|}~€‚ƒ…Uƒ„‚ z|}zrƒzyyxx€w„vww€xyz{|}~€ƒƒ„€ƒ‚ƒƒ€ z{{zz{yyxwvvuu†t€u#vwwxyz{|}~€ƒ„„…‚„ƒ‚zoyxzyxwvuutssr€q€rssttuvvwxyz|}~€€ƒ‰€€yuyxzyxvvutsrqq€pƒo€pqrrstuvwxyz{}~€€‚€z€y zywvutsrqppoo€n‚m€nooppqrstuvwyz|}~€‚€|€zywvutsqpponnmll…k&llmmnoppqstuvwyz|}€ssyxvutrqponmmlkj€ihi%jkllmnopqrsuvxyz|~~|yyxwutrqponmlkjihh‡g&hhiijkmnnpqrtuvxy{|}wywvtsqponlkjihggff€ed(eeffgghhiklmnoqrtuwyzzyxwusrponlkihhgfedd€c‚bccddeefghijlmnoqstvxvtrqonmkihgfedccbba„`(aabbcdefghijlmopqsuvxwusrpnmkihgfeccba`__†^'__`abcdefgijlmoprtxwtsqonljhgfecba`_^^]]…\#]]^^_`acdefgijlnpqxvtrpnmkiihfcba_^^€] \ZZYYZ[[\\]]_V`abdeghikmowvsqpnljh`]aca_^]\\UQSYXWXRNOOPPONOU]_^_acdeghjlwusqommd‚ÄÂ~[a^]\]P’ij\UXM‘¿·,³¨”uVR^]^`acdfhiwusqomkidÄìÄ\_^\\TlÙìœKVVG«ëã€ê]ëìêÞÄ…P[\]^`bcegvurpnmjj`vØä˜S_[[P·èÀNSSUF¤çÆ…‰ˆ»Ýæâ£PZ[\]_acdvurpnljhiY£åÕjX]NˆâÝtKSPRC£ë¹¡ì¹BI€H,IIJKÆè°FTSTVXZwurpnligecb[iÖß×å¹JQNMKJL< ì¸@GF-GJ>¬éÃKOPRSUWwuspnligec`aR‘áÝÖiKPMKJIJ:Ÿì¸>ECC€D*H:šéÌPJNOQSTxvspnligec`aRßßÀJRNLJIHI:žì·@B|zwuroml_¹æÇ\[YVWEœçÑSBDD3›í·@FDFTw¸äê¼82668:<>@}{xvsppa’âß‚V^YWUQ RÉë¦:ED2èÙ€Õ,ÙãïïÝž6,324679;=~|yvtrmqÌâ¯Xa\ZWUUF|ÜÚlHOJIGD?4&$-,+,-/02467€~{xvsqmgdfda^\YVTQOHDDEB@:531.€,-.+€),*+,-/135|ywtqomjgdb_\ZWUROMKHEB@><97420-+*)'(*+,/12~€~zxuspnjhec`][XVSPMKHFC@>;9641/-+)'%%$$%&(*,.,|ywtqoligda^\YVTQNLIGDA?<97420-+)&$#""#$%(*++{|€~zxuspmjheb`]ZXURPMJHEGB?=:7520-+)&$"! "#%'!#€|yvtqolifda^\YVTQNKIFCA>;8631.+)&$"  "%##€~{xurpmjheb_]ZWUROLJGEB?=:742/,*'$"  +€~}~|ywtqolifda^\YVTQNKIFC@>;8630.+(%# +%€~‚}|}{xuspnjhec`]ZXURPLJHEB?=:752/,:*'$"I!"€}{|zwtroligda^\YVTQNKIFDA>;9631.+)&#!!€+~…‹|wqxvspnkhfc`^[XVSPMKHEC@=;8520-+(%%!+‚)|zz{ydttromjgeb_\ZWTROLJGDB?<:741/,+F€€‚ˆ‘„Ž„‘’“”•s”•‚‡ŽŽ‚ŒŽŽ‘’“€”••¦‘”–•”€†€Œ‡‹€ŒŽŽ€‘’“””€•”…Ž€Œ€‹ŠŠ„‰ŠŠ€‹ŒŒŽ€‘’“‚”•””ƒŽŒ€‹Š‰Šˆ ‰‰Š‹‹ŒŒŽ‘’”“‘“‚ŽŒŒ‹‹Š‰‚ˆ†‡‚ˆ ‰Š‹‹ŒŽ‘“”ŽŒŒ‹Š‰ˆ‡††‡…††‡‡€ˆ‰Š‹ŒŽ‘“””“Œ‹Š‰€ˆ‡†‚…„„‚…†‡‡ˆˆ‰Š‹ŒŽ’’€Œ‹Š‰ˆˆ‡†…„ƒƒ…‚ƒƒ„„€… †‡ˆˆ‰Š‹ŒŽ ŽŒ‹Š‰ˆˆ‡†€…„ƒ‚Š‚ƒƒ„……†‡ˆˆ‰Š‹Œ‚ Œ‹‰ˆˆ‡†……„ƒ‚€€‚€€€‚‚„„……‡ˆˆ‰Š‹ŽŽŒ‹Šˆˆ‡†……„ƒ€€ˆ~€€‚ƒ„……‡ˆˆ‰ŠŒŒ‹‰ˆˆ†……„‚€€€~}}„|}}~~€‚ƒ„…†‡ˆˆŠ‹‹Šˆˆ‡……„ƒ€~~}}€|…{€|}}~€‚ƒ„…†‡ˆ‰ŽŒ‹Šˆˆ†……„ƒ‚€~~}|{z‚{'||}~}}~~€‚ƒ……‡ˆŽŒ‹‰ˆ‡……„}{~€~~||{{vsuz€xur,srqrv|~}}~€‚„…†Œ‹‰ˆ‡†—ÉÈ”y||{|s¤Ê½{vyq¤ÇÀ½µ¦wt€|#~€ƒ„ŒŠˆˆ†……€ÉèÊ{}|{{vˆÚè¬oxwl·çáç]èæÞÊšs{{|}~€‚ŒŠˆˆ†……}Ùâ©s}z{rÁåÇqutvk²äË›ž¡­ÃÜäá±rzz{|}~€ŒŠˆˆ†…ƒƒx±ã׆x}qœáÝnvtuj±çÂek€j,nˆÈßã¤pzy{{|~ŒŠˆ‡……ƒ‚€Îä½sy}Ñå³kvsrti±çÃots,lsËáÕ}uxyz{|}ŒŠˆ‡……ƒ‚xšßß™hµäÒzrsrrsg°çÂjpo€p*tiÞâ¡lxwxyz{ŒŠˆ‡……‚€€v¼åÊ•Üâœltrqprg°èÂi‚n+oppÌå»luuvwxzŒŠˆ‡……‚€z…ØÞØãÂntrqppqe¯èÁgm€l,mmog¸æÉprstuwxŽŒŠˆˆ……‚€~t£àÜ×…osrppnpd®èÁfl‚k*nc«åÐtorssuvŽŒŠˆˆ†…ƒ€~~t ßÞÇnurqponoc®èÁek€i,jjlb¦åÒtmpqrst‹‰ˆ†…ƒ€z‚ÕàÝàjtppnmnb­èÀdi‚h+k`§æÐqknoprr‹‰ˆ†…ƒ€€t¹æÊ·äÒxpqomlma­èÀchg€f,gi_°çËkklmnpqŽ‹‰ˆ†…ƒ‚x–Ýá—tÓå±hrnmlma­éÀagfe*fbÂç½bkjklnoŽŒŠˆ‡…„‚}Ëå¿spá݈jolkl`¬é¿ae€dce`uÙä£]jhjklmŒ‹ˆ‡…„„x­â؇uypÁæÄlnlkl_¬é¿`fdccecV°âÜz`gghikl‹‰ˆ††Øã«r{xq‡Úãenkl_¬é¾\a_^[W[ Þå°ZedefgijŽŒŠˆ††|ÁäÌ{{ywxk:­äÓvilk_¬éÁinlnx’ÁâæÅd_bbcdfgh‘ŽŒŠˆ‰~¤àÞ˜w|yxvsuÎç´dlk_­åÚ€×,ÙáêêÝ®b[`_`acdef’‹‰‡ŠÏàºx{zxvvk•ÜÛˆel_«à×€Ú5×μŸtT[^]^_`abde“‘ŽŒŠ‡Š’‚~|zxwutp{~vjjgntqpnmiaWRV\€[\]^_`bc“’Œ‹‰†‚€~|{ywvtrnkjljhea`_]\[[\\[€Y+ZZ[\^_`a•“Ž‹‰ˆ‡…ƒ}{zxvtsrpnljhgfdca`_][ZƒX[YZ\]_`“”’ŽŒŠˆ‡…ƒ€~|{xwusrpnljigedb`_^\ZYXWWVVWXYZ[][””“‹‰ˆ†„‚}{ywvtrqomkihfdba_^\ZYWWU,VWXZ[[‘’”’ŽŒŠˆ‡…ƒ~|zxwtsqpmljhfeca_^\ZYWVUTUWXTV€”$“‹‰ˆ†„‚€~}{ywvtrpnlkigfdb`_][YWVTS€RTUWVV”€“#’ŽŒŠˆ‡…ƒ€}|zxwtsqomkjhfdca_^[ZXVUS€QiRSST[”“’‘’‹‰ˆ†„‚€~}{ywutrpnlkigedb`^\ZYWUSRPOPOR[W““”‘‘ŒŠˆ‡…ƒ€~|zxwtsqomljhfeca_][ZXVTSQOPRtTU“••‘€"Ž‹‰ˆ†…‚}{ywvtrqolkigfdb`_][YWVTQQR€+’™Ÿ‘‹€Œ‹‰‡…„€~|{ywusrpnljigeca`^\ZXWZTOWKN‚ ‚Œ‰ˆ†…ƒ}{zxvtrqomkjhfdba_]\\nS€RQ€h8mk Nw‘›žžžžœœœ›››š˜ŒrJ:޽ÌÎÌËËËËËËËËËËÊÊÊÊÉÉÈÈÇÇÇÈÆ·‡6"•ÐÏÆÂÂÃÄÄÄÅÅÅÅÅÅÄÄÄÄÃÃÂÂÁÁÀ¿¾¾ÀÉÉHÃÎÁÂÅÆÆÆÇÇÇÇÇÇÇÇÇÇÇÇÆÆÆÅÅÄÄÃÃÂÁÀ½¼É»BXÐÅÁÅÅÆÇÇÇÈÈÈÈÉÉÉÉÉÉÈÈÈÈÇÇÆÆÅÅÄÃÃÂÁÁ¼ÀÊQJÐÂÃÅÆÆÇÈÈÈÉÉÉÊÊÊÊÊÊÊÊÊÉÉÉÈÈÇÇÆÆÅÄÄÃÂÁ¿¿ÊD$ÂÅÃÅÆÇÇÈÉÉÊÊÊËËËËËÌÌËËËËËÊÊÊÉÉÈÇÇÆÅÅÄÿ¼–ÎÁÆÆÇÈÈÉÊÊËËËÌÌÌÍÍÍÍÍÍÍÌÌÌÌËËÊÊÉÈÈÇÆÅÅÄþÌ>ÏÁÅÆÇÈÈÉÊÊËÌÌÍÍÍÎÎÎÎÎÎÎÎÎÎÍÍÍÌÌËËÊÉÈÈÇÆÅÄÃÀÌ8ŽÏÂÆÇÈÈÉÊËËÌÍÍÎÎÏÏÏÏÐÐÐÐÐÏÏÏÏÎÎÍÍÌÌËÊÉÉÈÇÆÅÁω½ÆÅÆÇÈÉÊËÌÌÍÎÎÏÏÐÐÐÑÑÑÑÑÑÑÑÐÐÐÏÏÎÎÍÍÌËÊÉÉÈÇÅÇ»NÍÃÆÇÈÉÊËÌÌÍÎÏÏÐÐÑÑÑÒÒÒÒÒÒÒÒÒÒÑÑÐÐÏÏÎÍÍÌËÊÉÈÇÄÎIwÎÃÆÇÈÉÊËÌÍÎÏÏÐÑÑÒÒÓÓÓÓÔÔÔÔÔÓÓÓÒÒÒÑÐÐÏÎÎÍÌËÊÉÆÑsÍÄÇÈÉÊËÌÍÎÏÏÐÑÒÒÓÓÔÔÕÕÕÕÕÕÕÕÕÔÔÔÓÓÒÑÑÐÏÎÎÍÌËÈÑŽ›ÌÄÇÈÉÊËÌÎÏÐÐÑÒÒÓÔÔÕÖÖÖÖÖÖ××××ÖÖÖÕÕÔÓÒÒÑÐÏÎÍÌÊÒšœÌÅÇÉÊËÌÍÌÍÏÑÒÓÓÔÕÖÔÔÕ×רØ×ÖÖÖÖÕÕÔÓÔÕÕÓÓÒÑÐÏÎËÔÌÅÈÉÊÌÊ×óóÚÏÓÓÔÕÖÔç÷ñÚØÚ×éöóóóóòîèÞÖÓÕÔÓÒÒÑÐÍÕžÌÅÈÉÊÌÍÍòÿôÑÓÔÕÖÕÜýÿë×ÚÛ×ïÿþÿÿÿÿÿÿÿ÷ãÔÖÕÔÓÒÑÏ× ÌÅÈÉËÌÎÌÕüÿåÐÕÖ×ÕòÿöÙÚÛÜÙðÿùèéééíõþÿÿìÖ×ÖÕÔÓÐÙ¡ÌÅÈÉËÌÍÏÌæÿûØÔ×ÕåÿÿâÙÜÜÝÛðÿöÚÛÛÚÚÚâ÷ÿÿèÖØ×ÖÕÒÚ¢ÌÅÈÊËÌÎÏÐÒöÿïÓ×ÙúÿïÙÝÜÝÞÜñÿ÷ÞßßßßÞÛÝøÿûÜØØ×ÖÔÜ£ÌÅÈÊËÌÎÏÑÏÞÿÿâÒîÿúÝÛÝÝÞßÝñÿ÷ßààààßàÜæÿÿéØÚÙØÕÞ¥ÌÅÈÊËÌÎÏÐÒÐîÿöâþÿçÙÝÞÞßàÞñÿ÷àáááááààßùÿóÚÜÛÚ×à¦ÌÅÈÊËÍÎÏÑÒÒØüÿüÿôÚÝÝÞßàáßòÿ÷âããããâââßôÿøÞÝÜÛØá§œÌÅÈÊËÌÎÏÑÒÔÒåÿÿýàÛÝÞßàáâàóÿøãääääääãáñÿûáßÞÝÚ㩜ÌÅÈÉËÌÎÏÑÒÔÒäÿÿ÷ÙÝÝÞààáãáóÿøäååæååååâñÿüãààÞÜ媜ËÅÈÉËÌÎÏÑÒÓØûÿþÿèÚÞßàáâãâóÿøåççççççæäòÿüäâáàÝæ«œËÄÇÉÊÌÍÏÐÓÑíÿöïÿúßÞààâãäãôÿùæèèèèèèèåõÿûåäãâß講ËÄÇÉÊÌÍÏÑÐÝÿÿãØûÿðÜàáâãåãôÿùçéééêêêéèúÿøåæåãáê®›ÊÄÇÈÊÌÍÏÐÑõÿñÖ×çÿþåÞáâãåäôÿùèêêëëëëêíþÿóæçæåâ믛ÊÃÆÈÊËÍÏÌåÿüÛÖÚÙôÿ÷ßáãäååõÿúéëëììííëøÿÿîééèçäí°šÉÃÆÈÉËÍÍÕüÿçÒØÙÙáþÿìßãäæåõÿùéëììíìíöÿÿøëëêéèåﱚÉÂÅÇÉÊÌËîÿõÓÕרÛÙîÿûãâäæåõÿúìîïðñõûÿÿüïííìëêçð³˜ÈÂÅÇÈÊÈÜÿÿÝÑÖרÚÛÞúÿóáåæåõÿþþþþÿÿÿÿÿúñïïïîíìéò²ÉÁÄÆÈÉÍöÿëÎÔÔÖØÙÛÚèÿþéãæåõÿþÿÿÿþýûøôñòññðïîíêõ¥sÊÀÄÅÇÈÌÒÓÐÐÓÔÖ×ÙÚÜÝâäåäæçéìíîðñññññóóóóòòñðïëù‡KÈ¿ÃÅÆÈÉÊÌÎÐÒÔÕרÚÜÝÞßâäåçèéêìîïðñóôôôõôôôóòñíøW¸ÃÂÄÆÇÉËÍÎÐÑÓÕÖØÙÛÝÞàâãåæèéëìîïñòóôõööööõôóñôä‰Ë¿ÃÅÇÈÊÌÍÏÑÒÔÖ×ÙÛÜÞßáãäæèéëìîïñòóõö÷÷÷÷÷öõðÿ§9ʾÃÄÆÈÉËÍÎÐÒÓÕרÚÜÝßáâäåçéêìíïñòóõö÷øùùøø÷óÿC˾ÄÅÇÈÊÌÍÏÑÒÔÖ×ÙÛÝÞàáãåæèêëíïðòóõöøùúúúúôÿ°¼ÃÁÄÆÈÉËÍÎÐÒÓÕרÚÜÝßáâäæçéëíîðñóõöøùúûûùýí$CËÁÂÅÇÈÊÌÍÏÑÓÔÖØÙÛÝÞàâãåçèêìíïñòôö÷ùúüûûÿSQÌÅÁÆÈÉËÍÎÐÒÓÕרÚÜÝßáâäæèéëíîðòóõ÷øúøüÿfA¾ÏÂÄÈÊÌÍÏÑÒÔÖ×ÙÛÝÞàâãåçèêìíïñòôõô÷ÿñRŽÏÒÊÇÈÊÌÎÐÑÓÕÖØÚÛÝßàâäåçéêìíîñùÿÿ³"4‰½ÐÕÕÕרÚÜÞßáãåæèêìíïñóôöùýûç¨?HsŸ ¡£¤¥¦¨©ª¬­®¯±²³µ´¨ˆVit32–” urtuusttvvxut—sttuvuuvv‚w€xyz{|}~}|{|~}€ƒ‚€©€tutrndvuttŽs€r‰s€t‚u€v€w€x‚yz€{||‚}xy‚€¥ uutuullvutt„s€r‘qrƒs€tu€v€wxƒyz€{||}}~€ƒ€¡ uttuuwvuutƒsrrŒq€p‰qr‚sttu€vwwxxyzz{|}}~€„€uv€uvuvtt‚srr†qppŒoƒp„qrr‚stt€uvv€wxxy zz{{||}}~€€€š€tuwmvut‚sr„qpšopq€rstt€uvvwwxxyzz€{ |}}~€€|€€—‚uvvutsrr‚qp‡o‚n†m„n„o€pq€r€stt€uvvwwxyzz€{|}}~€€€•uwkutsr‚qpp„onn—mn‚o€p€q€r€st€uvvwwxxyz€{ |}}~€{}~}’vwxuwwut€sr‚qpp‚onnˆmŠlˆm€n‚opp€q€r€st€uv€wxyz€{ |}}‚~…ÿ{uvxusrqp‚onn„m‡lk‚lkk‡l„m€nopp€qrr€st€uv€wxy z{{||}}~~{|}Žvwxuuvt€srqponnƒm„lkjk‰j„k‚lƒm€n€opp€qrr€stuuvvwwxyz{{|€}~~ƒŒuu‹ttut€srqpon‚mƒlkkji†jkl‚m€n€oppqqrr€stuuvvwwx€yzz{{|‚}|}|Šuurttut€sr€qpon‚m‚lk„jiŒhƒi‚j€k€l‚m€noopp€qrrsst€uvwwx€yz€{|€}|xzŠ‚ut€sqp€on‚mlkƒj€i˜hij€k€lmnn€oppqqrrsst€uvwwx€yz€{|~~}{{ˆ€uwvt€sqonmlk‚jii…h‚gf‹g…h€i€j€k€lm nnooppqqrrsst€uvwwx€yz{{||}|{{†vv€ut€sqomlkjii„hgg•fgƒh€ijj€k€l€mnn€op€q rsstuuvvwxx€yz{{|}{{…tvqJt€sq€onm€lkji„hg†feƒf€g‚h€ijj€kllmn€op€q rsstuuvwwx€yz€{z~y„ustst€sr€q€onm€lk€jiƒhg„fee”def€gh€ijjkk€l€mnnoop€q rsstuuvwwx€yz€{yz‚sutuu€sr€q€on€m€lkji‚hg‚feˆd‰c‡d€ef€g€h€ijjkkll€mnnoop€q rsstuuvwwx€yzzy{wuuojtssr€q€on€m€lk€ji‚hg‚f…dƒc‹bƒcƒd€e€f€g€hiijjkkll€m nnoopqqrrss€uvwx€yxx}w€‚t€s€qpoon€m€lk€jihgfeƒd‚c€ba‚bc‚d€eff€ghh€ijjkllmnoopqqr€suuvwwxyxvttxw€srqqpoon€m€lk€jhgfe‚dc€b™ab€cd€effgg€hiijjk€lmmnnoopqqrsstuuvwxxÎ…wvƒsrqqp€o€m€lkjjihg€fe‚d€cbb…a‚`ˆ_ƒ`ƒa€b€cdee€fgghhiijjk€lmmnnoopqqrsstuuvwusstt€s€q€onmm€lkjjihfed€cbbƒa€`•_`‚a€bccdeeffgg€hijjkll€m nooppqqrssuuvw€vwt‚srqqpoon€mllkjjih€fed€cbƒa``…_Ž^…_€`a€bcc€dee€f ghhiijjkll€m noopqqrsst€uvu„s€q€o€mllkjjih€fe€d€cbba``ƒ_ƒ^]ƒ^ƒ_€`€a€bcc€de€fg€hijjkkl€mnoopqqrss€utwsstssrqqpoonmm€l€jh€fe€d€cba`ƒ_‚^]]‘\‚]^_€`€abbcc€deeffg€hijjkll€mnoopqrsst‚s€qoon€mll€ji€h€fe€dccb‚a`_^]]…\Œ[„\€]€^_€`€abbcdeffg€hijjkllmmnoopqqr…srqqpoo€mllkjji€h€fe€dccba`_^]ƒ\[Z[‚\€]^^_``€abbcdeffg€hijjkl€mnoopqrs€q oonmmllkjji€hgffedd€cba_^]‚\[[…ZYZ…YZZY„Z€[\€]^^_``aabbcc€d effghhiijkll€mnopqqƒsqqpoo€mllkjj€hgffe€dccb€a`€_^]\[[‚Z•YZYZ€[€\€]^^€_``€abcc€defgghhiijkllmmnoopqq€srqqoonmm€ljji€hffe€dccb€a`€_€^]\[‚Z„Y‚X†W‚X„YZ€[\\]]€^__``€abcc€d effghhijkkl€mn€o€s qqpoonmmll€j€hgff€dccb€a`€_€^\[ZƒYXX•W€X‚Y€Z[[€\]]^^€_`€abccddeffg€h$ijkklmmnonossqqpoommllkjjihhgffeddccb€a`€_^^]\[€Z‚YXƒWVŠUV‚W€XY€Z[[\\]]^^€_`€abc€d effghhiijkl€mlssrqqoonmmllkjj€hffedd€c€a`€_^^]€\[€Z‚YX‚WVV†U„T…U€VWXXY€Z[[\\]^^€_`€abc€deffghhijkllmmssqqpoo€mlljjihhgffeddccbaa`€_^^]€\[€ZY‚WV„U’TU€V€WXX€Y€Z[[\\]^^€_`€abc€defghhijjkllssqqpoommllkjj€hffeddccb€a€_^^]€\€ZYXWƒU…T‰S‡T€UVV€WXX€Y€Z[\\]]^€_$`aabbcddeffghhijkktrqqoonmmlljjihhgff€dcb€a`__^^]€\€ZYW‚UƒTSRSƒT€UVV€WXXYY€Z[\\]]^€_`aabb€d'effhhijjtrqqoonmmlljjihhffeddccbaa`__^^]€\€Z€YX€WVU‚TSS‚RŽQR€S‚T€UVVWWXX€YZZ[\\]^^€_`aabc€d ffghhisrqpoo€m lkjjhhgffeddcb€a€_^^€\[ZZ€YX€WU‚TSR…Q‡P…Q€R€ST€UV€WXYY€Z[\\]^^__`€a,bcddeffhhsqqpoommlljjihhgffddccbaa`__^^]\\[ZZ€YX€WUTR‚QP‹O‚P‚Q€RSSTUUVVWWX€YZZ[\\]^^__`aabc€d€f"rqqoonmmlljjihhffeddcbaccaa``_\\[ZZ€YXWWV€UTSRRTTSQ„ONNONP‰QRR‚SRSS€T€UVWWX€YZZ[\\]^€_`aabcddee€q oonmmlkjjhhgff€dcbaX€UTSU]\€ZYYXWWV€U€TSRIGGFEDEOO…NOHA‚B…C BBDEHMPSTSRSSTUUVWWX€Y ZZ[\\]^__`aabc€d€q$oonmmlkjihhgffddcc_l±²±±°µ“U]ZZYYXWWV€U€TSRRQRK”¯ª««­¥TM€NMNE}ª£ˆ¤¢ž—Žq`QFEIQTSRSS€T8UUVWWXYYZZ[\\]^^__`aabccqqpoommllkjihhffeddcbbZ¶éáããäÞtT\€YWWV€U€T€RQSHwäâì¡EOMM‚LO?£íâ‰äååãâß×É´”oQELTSRSS€T%UUVWWXYYZZ[\\]^__`aabbqqpoommllkjihhff€dcbb^eÑÝÙÚØá¿T[YYXWW€U€T€R€Q OÇàÙÚÙßÅKKM€LKN?ãØŒÚÛÜÝàãäÞÈfFKTRRSS€T;UUVWWXYYZZ[\\^^__`aaqqpoommlljjhhgffddccaacU‘âÛÜÜÚãN\XWWVUU€T€RQQSC˜äÚÜÜÛáuCNLLƒKM>žåÚÜ…ÛƒÜÛÚÚÜàäÚ®fDQRQRRS€TUUVWW€Y0Z[\\]^__``qqpoommlkjjhhgfeddcbaa``X½âÛÜÛßÒcVXWVUU€T€R QQRIeÙÝÜÜÚä«AN‚K€JIL=åÚ€Ü݆ÞÝÜÛÚÚÛ€ÜÛÚÜäÚšLKSQQRRSTT€U(VWXYYZZ[\\^^__qqponmmlkjihhffeddcbaa_`YuÛ€ÜÚã­MYW€UTTSRRQQPQG·ãÚÜÛÞÔYHLKKJJIHK<åÚ€ÜÚ…Ô ÕØÝâääàÜÚÛ€Ü0ÚÝæ¾ZHRPQQRRSTTUUVWWXYYZZ\\]^^qqponmmlkjihhffeddc€a__aR£äÚ€ÜßzOXUUTTSRRQQPRDƒãÚÜÜÚäŠ?NKJIH K<œåÚÜÚã·KU‚S TV\fuŒ©ÆÝåßÚÜ1ÙäÍ`HQOPQQRRSTTUUVWWYYZZ[\]^qqoonmmlkjihhffddcbaa`€_ \^ÌàÛÜÛáÆTUU€TRRQQPPMVÏßÛÜÚâ½FLJIƒH J;œåÚÜÚã´:ECC‚D CA><=IhœÑåÜÛ€Ü ÙâÌXJPOOPQQRS€T3UUWWXYYZZ\]qqoonmmlkjihhffddcbaa`_^^_S…áÛÜÜÚä—IXTTSR€QORC¤åÚ€ÜÝjCK€IH€G FI:›åÚÜÚã´=HƒF GHHIJJHALIIHGG€F EH9›åÚÜÚä´L€H€G‚EDDG7šåÚÜÚä³:DBB‚CƒDEUI>ZÕÞÛÜÜÚä¥@NLLMNNOOPQQRSTTUUVWWqqoonmmlkjhhgfeddcaa`__^]\[ZZVÄáÛÜÛßÌVPRQPPJ^ÖÞÛÜÚã³@K€HGGFED F6šæÚÜÚä³9D‡BCCDEEI9}ãÛ€Ü6ÝÖZGLKLLMNNOOPQRRSTTUVVqqoonmmlkjhhgfeddbaa`__^\\[Z[QyÞ€ÜÚä ETQOQD±äÚÜÛÝØ^CJH€GED CBE5šæÚÜÚä³8C‡ABCC€D G<·ãÚÜÜÚåŽ=L€K0LLMNNOPQQRSTTUUqqoonmmlkjhhgfedcbaa`_^^\\ZZY\LªäÚÜlJQQE|âÛÜÜÚå“€?€@A D5’åÚÜÜÚã};J€H8IJKKLLMNOOPQRRqqponmmlkjhhgfedcbaa__^]\[ZZYXWXN»ãÚÜÛßÓRfÝ€ÜÚå¨=KHGG€E€D€B€A @@C2˜æÚÜÚä±5?„=>>=‚>??@@AC9gßÛÜÜÚåž9HF€HII€K?LMNOOPQQqqponmmlkjhhgfedcbaa__^]\[ZYYXWWOlÛÝÜÜÚ䨶äÚÜÛßÒUEIHGFEE€D€B€A @@?A1—æÚÜÚä±4?‹=>??@>JÏßÛÜÚã·=GEFG€HAIJKKLLMNOPPqqponmmlkjhhgfedcbaa__^]\[ZZYXWUXHžäÚÜÜÛßÞÛÜÜÚä†=KHGFEE€D€BAA€@ >>A1—æÚÜÚä±3>‰<‚=> @:ºãÚÜÛàÈFC€EFG€H1IJKKLMNOOqqponmmlkjihgfedcbaa__^]\[ZYYXWUUSUÊàÛÜÜÛ€ÜÚã»CJHGG€E DDCBBAA@@?€> @0—æÚÜÚä±2=Š;€<‚= @3¥åÚÜÛÞÓO?DD€E1FGHHIJKKLLNNrqqoommlkjihgfedcbaa__^]\[ZYYWWUUVJ~áÛ…ÜfBJHGFEEDDCBBAA@@?€> =@0—æÚÜÚä°1<:€9„:€;€<=@0’æÚÜÜÝÚ[;CCDDEEFG€H,IJKLLMsqqoommlkjihgfedcbaa__^]\[ZYYWWUUTVH±ãÚÜÚæ=LHHG€EDDBBAA@@?€> ==?/–æÚÜÚä°1;Œ9€:;;>€= >€= <==<<;=-•æÚÜÚä¯/9€7‡678;.qäÚÜÜÛãm3@>?@€ABCDEEFG€H%srqponmmljihhffddcaa`_^]\[ZYYWVUTWG§äÚ‚Ü%Úæ¢>==<<;:=,”æÚÜÚä¯.866Š5€6778;-säÚÜÜÛãj3?=>>?@€A+CDDEEFHHssqqonmmlkjhhffddcaa`_^]\[ZYYWVUVLuÞÜÛÜ!Þi@IFEDDCBAA@@>>==<<;::<,•æÚÜÚå¯-7„5454ƒ5 669+xåÚÜÜÛáe2>€=1>>@@AABCDEEFFssqqoommlkjhhgfddcba`_^]\[ZYYWVUUQÃáÛ€Üá€ÜÚâ½CGFEDDBBAA@?>>==<<€: <,”çÚÜÚå®,75458(‚æÚ€ÜÝ\2<;<€=>?@€A.CDDEEssrqpommlkjihgfedcba`_^]\[ZYYWVXI”äÚÜÜÝÚ­Ý€Ü!Úä‡:HEDDBAA@@>>==<<;::9<+”çÚÜÚå®+64‰3‚4j7(çÚÜÜÝÙQ3::;;<==>>?@AABCDEssrqponmlkjihgfedcba`_^]\[ZZYWXQeÖÞÛÜÚä°=»ãÚÜÛßÒSBFDCBAA@?>>==<;::99;+”çÚÜÚå®+63‹2 3346)£æÚÜÛßÑD5€9:;<€=1>?@AABCDtsrqponmlkjihgfedcba`__^\\ZYYWYK³ãÚÜÛÞÖ`BhÜ!Úå¦:GDCBAA@?>==<<::998;*“çÚÜÚå®*53€2‚10ƒ1223/ºãÚÜÛáÃ7688€9[:;<==>>?AABBussqqonmmlkihhfeddbaa__^\\ZYYZMáÛÜÜÚäBS?åÚÜÜÛßl>==<;::988;)“çÚÜÚå®*421Œ02.>ÐßÛÜÚå®,7678899:;;€=>?@AAutsrqoommlkjhhffddcaa__^]\€Z3WYËàÛÜÛáÂLONJPÌàÛÜÚâÁBDCBA@?>>=<<;:9988:)“çÚÜÚå®)3110Š/02'^áÛÜÜÚç'855678€9):;<==>>@@utsrqpommlkjihgfddcaa`_^]\[Z\L äÚ€Ü*ßrGPMOA}ãÛÜÜÚå‹7EAA@?>>=<<::98879(’çÚÜÚå­(3€0…/.‚/ 2"çÙÜÜÚäj(64€578899:;;€= >?uusrqponmlkjihgfedcba`_^]\[[SpÛ€Ü.Úä¨DRNMLMB´äÚÜÛÞÕT>CA@?>==<;:998879(’çÚÜÚå­(200€/‚.„-./ÂâÛÜÛÞÔC.334455678€9T:;<=>?uutsqqonmmljihhfedcba`_^]\[[S½âÚÜÛßÑZNPNMLME_ÙÝÜÜÚåª7DA@?>==<;:998768(’çÚÜÚå­'2€/€.€-‡,0"cäÚÜÜÚå°(2123€4`5567899:;<=>vutsrqoommlkjhhfeddbaa__^\^OŽâÚÜÜÚã‰FSONNLKN=”åÚÜÜÛáo7C@>>=<<::998768'’çÚÜÚå­'1//..--€,‡+-%·äÚÜÜÚæv#3001234455678€9U:<>=<<:9988658'’çÚÜÚå­&1/..-€,„+**++/tæÚÜÜÛßÏ9,0/€0+223445568899:;wvussqponmlkjihgfedcba`_^_Q¬ãÚ€Ü/ÛmLSQONNLKKL?táÛÜÜÚæ4C>>=<;:9988658'’çÚÜÚå¬&0..€,€+†* .IØÞÛÜÜÙè‹0.€/00122€4"5678899wvutsqqoommlkihhfedcba`_`U}߀Ü0Úä HVQQPONMLKJK>¬äÚÜÛÝØV:@==<;:9987658'’çÚÜÚå¬%0.€,++*‚)*-AÌáÚÜÜÛßÏ7(-,-.€/[0012344557899wwutsrqpommlkjhhffddba`__[ÆáÛÜÛàÌXSTRQPONMLKJJDXÖÞÛÜÚä®6@>=<;:9887657'‘çÙÜÚå¬%0€,++€*‚)*,$ZÐâÚ€ÜÙèp-€+,-.€/]01224455688xwvussqponmlkjihgfddcbabS›ãÚÜÜÛáƒKWSRQPONMLKJIK;ŒåÚÜÜÛãs3@=<;:9887557&‘çÙÜÚå¬&0--,,„+*&:•áàÚ€ÜØé¡+€*€+_--.//0012345567xwvutsqqonmmljihgfedcbb[oØÝÛÜÚãµNWTTRQPONMLKJIHHDÁâÚÜÛàÈB<=<;:9887557&‘çÙÜÚåª)'&€% $#!-U–ÕçÛÛ€ÜØè¹*&)q**++,--//001234455yxwutsrqoommlkihhfedcbcW·ãÚÜÛÝØiRWTTSQQOONLKKIHJ>làÛÜÜÚæ“1@<;:9986557&‘çÙÜÚä±;DBBAA@@BITg‚¤ÈâèÞÙ€Ü ÛÙé¹/!('((€)X**++,-.//0012445yxwvussqponmlkjihgfdceXŠàÛÜÜÚäšLZUUTSRQONNLKKIHHJ:¥åÚÜÜÝÛY6>;:9886557&‘çÙ€ÜÚ…ÖØÜâåèæáÛÙ€Ü ÛÙßè ' '%%&&'(€)*€+7--//001234yywvutsqqonmmkjihgfedbeÍßÛÜÛáÇXYXVUTSRQPONMLKJ€HBPÒßÛÜÚä³5>;:9886547&‘çÙ€ÜÝ…ÞÝÜÛÚÙÚÛ€Ü ÚÙßéÐm!&$$%&'(€)$*++,-.//0122yyxwutsrqpommlkihhfegX¨ãÚ€Ü,ß}Q[WVUTTRQPONMLKJIHGI9ƒäÚÜÜÚäw1>:9986547&‘çÙ܆ÛÜ ÛÚÙÚÝäèщ1%$€#€$€%&'())*€+O-.//011yyxwvussqponmlkjihgg]yÚÛÚÚØã¯P\YXWUTTSQQONMLKJIHHFF?»âØÚÙÞÊ@8;9986547&ä×ŠÙ€Ú ÝßäèçÙ³s1%"#$$€% '(()**++,-//00€yExvutsqqonmmljihhfeÊèâãâæÖgY[YXWVUTSRQONNLLKIHHFG=cáçåæäð¥3<9886547%˜ôå†èééèèçæãÚͶ•j<$"‚!"T##$$%%&'())**+,-.//zyyxwuusrqpommlkjhhcvª¥¦¥¤¨„V^ZZYWVUTSRQPONMLKIHHGEF>}˜““’“ŽC9:987€5,c‰ˆ‡‡††……„{rdTA."$! €€ €!€"##$€%&'€)X*+,-..yyxwvussqponmlkjihgcXXWUURX^\[ZYXWUTTRQPONMLKJIHGFDE94420//;;99875544*""!!"$$"‚€ !€"n##$%%&'())*+,-+z{yyxwutsrqoommljihgfggfddc`^\[ZYXWVUTSQQOONLKJIHGFEDEEDCBA@<;:9875543443220/.--,++)(('&%$#!! ‰ !€" #$$%%'())*€+W{{zyxwvusrqponmlkjhhfedcba`_^]\ZYYWVUTSRQPONLKKIHHFEDCBA@?>=<;:9876543210//-,++*)('&%%$#€"! €ˆ€ !€"#$%%&'))€*\|{zyyxvutsqqonmmljihgfddcaa__]\[ZYXWUTTRQPONMLKJHHGEDDBAA?>==;:9876544210//-,++*)('&%$$#""! €†€€o !""#$%%&'()**||{yyxwuusrqpommlkjhhfedcba`_^\\ZZYWVUTSRQOONLKJIHGFEDCAA@>>=<:9886544310//.,+**)('&%$$#""!ƒ€€n !""##$%%'())z{{zyxwvutsqponmlkjihgfddba`_^]\ZZYWVUTSRQPONLKKIHHFEDCBA@?>=<;9987554310//.,++*)('%%$##"! €€ !"##$%%&&%{^yyxwutsrqoommljihgfedcba__^\[ZYXWUTTRRPONMLKJHHGEEDBAA?>=<;:9875543200/.,++*)('%%$##"! € !"##$%{_zyxwvussqponmlkjihfedcba`_^]\ZZYWVUTSRQOONLKJIHGFEDCAA@>==<:9876543210/.-++*)('&%$##"!† ""#$%%$‚{[yyxwutsrqonmmljihgfddcaa_^]\[ZYXWUTTRQPONMKKIHHFEDCBA@>==<:9886544210/.-,+*)('&%$##"!€… !"#""$|{\zyxwvusrqponmlkjhhfedcba`_^\\ZYYWVUTSQQONMLKJIHGEDDBAA?>=<;:987544310//-,+*))'&%$##"!€„  !f%|{z{zyywvutsqqonmlkjihgfddba`_^]\[ZYWVUTSRQPONLKKIHGFEDCAA@>==<:987654320//.,+*))(&%$##"!€€  #}{bzyxwvusrqpommlkjhhfedcba__^\[ZYXWUTTRRPONMLKJHHGEDCBA@?>=<:9886543210/.-+**)(&%$##"!‚ i"{{ƒ{{zyywvutsqqonmlkjihgfddba`_^]\ZYYWVUTSRQOONLKJIHGFEDBAA?>=<;:987544310//-,+*)('%$$#"! € }|{azyxwuusrqpommlkihgfedcba_^^\[ZYXWUTTRQPONMKKIHHFEDCBA@>==<:987654320//.,+*))'&%$#"! „ g{}zz{zyywvutsqqonmlkjihgfddba`_^]\ZYYWVUTSRQOOMLKJIHGEDDBA@?>=<;9986544210/.,++))(&%$#"" ƒ€h}y{||{yyxwuusrqpommlkihgfedcba__^\[ZYXWUUTRQPONMKKIHHFEDCBA@>==;:987554310//-,+*)(&%%#""!‚ ƒ|{czyywvutsqqonmlkjihgfdcba`_^]\ZZYWVUTSRQOOMLKJIHGEEDBA@?>=<:9986543200/.,+*))'&%$#"!€€„|{ezyxwuusrqpommlkihgfedcba__^\[ZYXWUTTRQPONLKKIHHFEDCAA@>==;:987544310/.-++*)(&%$#"! € …w|{}zyywvutsqqonmlkjihgfdcba`_^]\ZZYWVUTSRQOOMLKJIHGEEDBA@?>=<:998654320//.,+*)('%%$""!†€{d||yyxwvusrqpommlkihgfedcba__^\[ZYXWUTTRQPONLKKIHGFEDCAA@>==;:987554310/.-++))(&%$#"!‚ˆ{{zy`wvutsqqonmlkjihgfddba`_^]\ZZYWVUTSRQONMLKJIHGEEDBA@?>=<:998654320//-,+*)('%$$""  Šz‚yaxwvusrqpommlkjhgfedcba_^^\[ZYXWUUTRQPONMKKIHHFEDCAA@>==;:987554310/.-++))'&%$#"! €  ‹nzz{zzyyxwutsrqonmlkjihgfddba`_^]\ZYYWVUTSRQOOMLKJIHGEDDBA@?>=<:988654320//-,+*)('%$#""  €Œoyz{yzzxwvusrqponmlkjhhfedcba__^\[ZYXWUTTRQPONMLKIHHFEDCBA@>==;:987554210/.-++*)(&%$#"! Žmxryyxxwutsrqonmmljihgfddca`_^]\[ZYWVUTSRQOONLKJIHGEDDBAA?>=<;988654320//.,+*)('%$$""  ygxxwvussqponmlkjhhfedcba`_^\[ZYXWUTTRQPONMLKJHHFEDCBA@>>=;:987544310/.-+**)(&%$#"! ’y€x€w_utsrqpomlljihgfedcaa_^]\[ZYWVUTSRQPONLLJIHGFEDBAA?>=<;:986543210/.,+*)('%%##"! € •bxwxwvvutsqponmlkjihfeddba`_^]\ZYYWVUTSQQONMLKJHHFEECBA@?>=<:987654320//-,+*)(&%$$"! € ˜cvwwvrptsrqpommlkihgfedcba__^\[ZYXWUUTRQPONMKKIHHFEDCAA?>=<;:987554210/.-++*)(&%$#"!š‚uWxpsqqonmlkjihgfddba`_^]\ZYYWVUTSQQOOMLKJIHGEEDBAA?>=<;9886543210/.,+*)('%%$#"!1F‚]ujotrnerponmlkjhhfedcba`_^\[ZYXWUTTRQPONMLKJHHFEDCBA@>><<:987654310//-,+*)('%$#""  ¡Ystusqjppommljihgfedca`_^]\[ZYWVUTSRQPNNLKJIHGFEDCAA?>=<;:987554210/.-,+))(&%$#"! %¥Uqppqppmmllkjihffddba`_^]\ZYYWVUTSRQONMLKJHHGEEDBAA?>=<;9986544210/.,++))'&%$#! !©Lpuppnljkjiqjffedba`_^]\[ZYXWUUTRRPNNLKJIHGFEDCAA@>>=<:987554310//-,,+)( %&%&€””‚zyzz}€zy“xyyzyz{|}}||€}~~‚‚ƒ„…€„ƒ„„‹ƒ©‚z{}z{zzy—xyƒz€{€|€}~~€‚‚€ƒ„€ƒ„„€…¥zzyz{wwzyy‰xŠw‰x€y‚z{{|€}~€€‚€ƒ€„†‡ƒ„€ƒ¡zyy…zy…xw’vww‡xy‚z{{€|€}~~€€€€‚ƒ„††„„†……{wyzzyy€zy„x€wvw…xy‚z{{€|€}~€€€€‚ƒ„‚ƒ„ƒšz{{zu}€zyƒxww‡v‚uˆt€u‰vw„xyz{{€|}}~~€€€‚ƒ„ƒ„€ƒ—{‚z{zzy‚x€w„v€u˜tu…vww‚xyyz{€|}}~~€€€‚ƒ€„ƒ…„ƒ„ƒ•z|u€z‚xwwƒv€uˆt‰sŠtu„vw‚xyz{{||}}~~€€€‚ƒ€„Ž…ƒ„„ƒ’{|}‚zƒxw‚v€u„t€s‘rs…tuuƒvw‚xyz{€|}}~€€€‚ƒ„„€ƒ‡ùyuvzy‚xw‚vuuƒtss‰r†q‡rsƒtuuvwwxyy€z{€|}}~€€€‚€ƒ„ƒ~Žz{{zyxw‚vuƒtss„r‚qp‚qƒr€s‚tuuvwwxy€z{€|}~~€€‚€ƒ…ƒ…ˆ„Œzyrz{zzyxwvuu‚tsƒr€qšp€q‚r€stuu€v€w€xy€z{€|}~~€ €‚ƒƒ„ƒƒ‚Š„zyx‚vu‚ts‚rqq‡poˆp€qr€s€t€u€vww€xyy€z€|}~~€€‚ƒ‚Šƒzxwvu‚ts‚rqq„po’n€o…p€q€r€s€tuu€vww€xyy€z€|}}~€€‚€ˆƒzxwvuts‚rqƒp€onoo„pqq€rsstuu€vw€xyy€z€|}~€€€‚€€†{{zy€xwvutsrqƒpoo†nm‰l‚m†n€o‚pqq€rss€tuu€vw€xyyzz{€|}~€€‚„‚€…{z{„zy€xwvtsrqƒpo…nmm—l€m„noo‚pq€r€sttuu€vw€xyyzz{||}}~€€~~„~„zy€zy€xwvtsrƒpoƒnmm…lƒk„jƒk…lmmƒnoopqq€rss€tu€vw€xy€z{||}}~‚~‚{yz{{zxvts€rq‚poƒnmm‚l€k•j€k‚l€m‚noopqqrrss€tu€vw€xy€z{||}~‚}{yz{zxvts€rqpoƒnm‚lkk†jŽi„j€klmm‚no‚pqrrss€tu€vw€xy€z€|}~}}‚|€y|z{zy€xw€vts€rqpo‚nmlkkƒj€i”h€i‚j€k€lmm‚nopq€rs€tu€vw€xyzz{||}~~|~zz~}z€xw€vu€ts€r‚p‚nmlkk‚jii‡hgghƒgŠh€ijkk€lmmnopq€rs€tu€vw€x yzz{||}z}|zy€x€vu€ts€rpo‚nmlkjii„h•g…hiijkk€lmmno€pq€rs€tu€vwxxy€zƒ|{{‚‚z€xw€v€ts€rq€ponmlkjiƒh‡gŒf…gƒh€i€jk€lmmno€pq€rs€tuvvw€xyzz{||z|€z{{yxxw€vu€t€rq€ponm€lkji‚h„g€f’e€fƒg‚h€i€jk€lmm€no€pq€rsttu€vw€x€z€{y{wwz€x€vu€tsrrq€ponm€lkj‚hƒgffedˆe€f‚ghii€jk€lmm€no€pq€rsttu€vwxxyƒz{{yxxw€v€tsrrq€ponm€ljih‚gff…e€dŒcd„e€fghii€jkllmm€no€pqrrs€tuvvw€xz{{z€y€x€vu€t€rpnm€ljh‚gfƒe€d—cd‚effghi€jkllmm€no€pqrrs€tuvvw‚xww€xw€v€tsrrq€po€nm€ljhgf‚edd†cŽb†c€deff€ghi€jkllmm€no€p qrrsttuvvw†x wvvuttsrrq€po€nm€l€jihgfedd„c„bŒa‚bƒc€defg€hiijjkllmm€no€p€r€tuvv€w‚x€v€tsrrqppo€nm€l€ji€hgfedd‚c‚baŽ`ƒab‚cddef€ghijjkllm€n ooppqrrsttuvx wvvuttsrrq€po€n€lkjji€hgfedc‚baa„`Œ_ƒ`a€b‚cdd€ef€ghijjkllm€no€pqrrsttuvvx€v€tsrr€po€nmllk€j€hgedcbaa‚`_^‚_€`€a€bcdd€ef€ghijjkllm€no€prrstx€v€trrq€p€nm€l€j€hgedc€baa`€_™^€_€`aa€bcdd€ef€g€hijjkllm€noppqrrstvwxxwvvuttsrrqppo€n€lkjjihhgec€baa€`€_‡^‹]ˆ^__€`aa€b€cdd€efgg€hi€jllm€no€prrst€x€v€trrq€p€nmllkjji€h€gec€ba€`__…^€]\]…^__€`aabb€cdd€efgg€hijjkllm€n€pqrs€x€vttsrrqppo€nmll€j€h€gf€ec€ba``€_ƒ^€]\[‚\€]ƒ^__``aa€b€cd€efgg€h ijjkllmnno€p qxxwvvuttsrr€p€nmllkjjihh€gf€e€c€ba€`__‚^€]€\‰[Z‰[\\€]ƒ^__``aabb€cd€efgg€hijjllm€n oppxxwvvuttrrq€p€nmlljji€hggf€edcc€ba€`_‚^]]€\…[ZˆY‚Zƒ[€\]]‚^__``aabb€cd€e€g€h jjkllmnnopxx€v€t rrqpponnmllkjj€h€g€ed€cbba€`_^€]\\ƒ[ZZ”YZ‚[\\]]‚^__`aabb€cdeef€ghhijjklm€nxx€vttsrr€p€nmlljji€hggfeed€cbba€`_^]]\\ƒ[Z„YX…YZZ‚[\\]]^__`aabb€cdeefgg€hijjllmnxxvvuttsrq€p€n llkjjihjiihggf€cbba€`_^]€\[\‚[Z€X…WX…YZ„[ZZ[€\]^__`aab€cd€e-fgghhijjkllyxvvuttrrqpponnmllkjjhh_^^]\\]dccba€`_€^]]\\[ZZPONOX€WƒVWPJ„K…LNORUX[\\[\\]‚^_`aab€cd€egg€h)ijkkxwvvuttrrqpponnmlkjjies´µ´³²·—\ebba``_€^]]\\[ ZZS˜²­®®¯¨\U„VWPƒ¬¦ˆ§ ¥¢œ’†whZPNRY\‚[\]‚^_`aab€cdeefgghhijjxwvvttsrrqpp€nllkjjhia¸éàââãÞz]ca``_€^]]\\€[ZY[Q~ãáë¥MXV€UXI§íâ‹ä ãâß×˶™wYNT\‚[\]^__`aab€c€e€g hhjxwvvttsrr€p€nllkjjhidlÑÝÚÛÚáÁ\ca`_^]\\€[Z€Y XÈàÙÚÙßÇTUWU€TVI¡âØŒÚÛÛÝàããÞÉ¡nOS\ZZ€[\]^__`ab€c+deefgghhxwvvttsrqpponnmlljjihhi]•âÛÜÜÛâ”Wc__€^]\\€[ZYY\MœäÚÜÜÛà|MWUUTTSVG¢äÚÜ…ÛƒÜ ÛÚÚÜàäÚ±nMYZYZ€[\]^_`aab€cdee€gxwvvttrrqpponnmlkjj€h gh_¿âÛÜÛÞÓj]`€^]\\€[ZYYZSlÙÝÜÜÚä®KWTT„SVH¡äÚ€Ü݆ÞÝÜÛÚÚÛ€Ü ÛÚÜäÛžUT[YZZ€[\]^ _`aabccdeeffx€v#ttrrqpponnllkjjhhggh`zÛÝÜÜÚã°Ua^^]]\€[Z€Y ZP¹ãÚÜÛÞÔaQU„SRRUF¡äÚ€ÜÚ…Ô ÕØÝáääàÜÚÛ€ÜÚÝåÀbQ[€YZ€[\]€^__`ab€c deewvvuttrrqpp€nllkjihhggfgZ¦ãÚ€Ü ß€V`^]\\[[Z€Y [M‰ãÛÜÜÚäIVSR QQTE åÚÜÛâºT]‚[ \_en|‘¬ÈÝäßÚÜÙãÎgQZX€YZ[[\\]€^_`aabccddwvvuttrrqpp€nllkjihhggeedeÍàÛÜÛáÇ\^^]\€[Y U^ÐßÛÜÚâ¿OT€SRQQPPSD åÚÜÚã¶EO„M LJHFGRo ÒäÜÛ€ÜÚâÍ`SXWXYYZZ[[\\^_`ab€c%wvvuttrrqppnnmlljjihhggeefZŠàÛÜÜÚãœS`\€[ZYYXZL¨äÚ€ÜÝpLUS€RQQ‚P RCŸåÚÜÚã¶GQ‚O€P QRSRPJEZžÜàÚ€Ü Ùã½QWVWWXYYZ€[\]€^ _`aabcwvvuttrr€p$nnmlljjhhggfeedeZ¶ãÚÜÛÝØnX][[ZYYXZPvÞ€ÜÚä¢HVR‚P€O QBŸåÚÜÚã¶FP†N OOPPQSNDpÎáÚ€ÜÚå˜JYVVWX€YZ€[\]€^+_`abwvvuttrrpponnmlkjjhhggfeecd_p×ÞÛÜÚã·T][[€YXXTÃáÛÜÛßÎXQSRRQPOO€N QBŸåÚÜÚã¶EO„MNMNOOPSG\ÊáÚÜÜÛÝØePW€VWX€YZ[[\]€^;_``wvvuttrrpponnmlkjjhhggfeecceW›ãÚÜÜÛáˆR]ZYYXZK•äÚÜÜÛâƒIURRPO‚N MPAžåÚÜÚã¶DNƒL„MN SHcÕÞÛÜÜÚä¨IVUVWXYYZ€[-\]^^__wvvuttrrpponnmlkjjhhggeedccbb]ÆáÛÜÛßÍ^YZ€Y Sf×ÞÛÜÚã¶KTRQPON€M P@žåÚÜÚãµCM…KLMNNQBƒâÛ€ÜÝ×bOTTUVXXYYZ[[\]€^wvvuttrrpponnmlkjihhggeedccbcY~Þ€ÜÚä¤O\YXYM³ãÚÜÜÝÙfMSQ€PO€N‚M LN?åÚÜÚãµBLJKKJƒK€L€MPF¹ãÚÜÜÚä”HVSSTU€VWX€Y€[$\]^xvvuttrrpponnllkjihhgfeedccbabT¬ãÚÜsSZZM‚áÛÜÜÚä—GUQ€PO€NM LKKN?åÚÜÚãµBLŠJ€K€L ODuáÛÜÜÛâ¿M‚STU€V WXYYZ[[\]xwvuttrrpponnllkjihggfee€cbaa]eÒßÛÜÚâ¿TZVZÌàÛÜÛáÆQRR€PO€N€MLK M>åÚÜÚãµAK…I…J€K LMJÄáÛÜÜÝÙcLRR€STT€VWX€Y€[3xwvuttrrpponnllkjihggfeeccbb``aTâÛÜÜÚãPN¡äÚÜÜÛàxJT€PO€N€MK JJM>åÚÜÚãµAJ„HƒIƒJKN?—åÚÜÜÚãƒFRQRR€STU€V0WXYYZ[xwvvttrrpponnllkjihhgfeeccbb``^_W½âÚÜÛßÕ[mÝ€Ü Úä¬HTQPPONN€ML€KJ L=œåÚÜÚã´?I†GHI€JLCnßÛÜÜÚå¡CRPPQQST€VWX€Y"xwvvttrrpponnllkjihhgfeeccba`_^`XsÛ€ÜÚ䫸ãÛÜÛßÓ^ORPPO€NMML€KJ IL=œåÚÜÚä´?I„GFƒG€H€IKHSÐßÛÜÚã¹FONOPPQR€STU€V'WXYywvvttsrqponnllkjihggfeeccba`_^^`Q¡äÚ€Ü ßÞÛÜÜÚãŒGT€P€NMML€K€J€I L;›åÚÜÚä³>H‹FG HHIJD¼âÛÜÛàÉOL€NOPPQR€ST€VWXywvvttsrqppnnmlkjihhgfeeccba`_€^[]ËàÛÜÜÛ€Ü Úâ½MSQPPONNMML€K€J€I HJ;›åÚÜÚä³>HF…E†F€GJ>¨äÚÜÛÞÔXINMMNOPPQR€STU€V%yxvvttrrqppnnmlkjihhgfeeccba`_^^]^RƒáÛ…ÜnLS€PNN€M€K€J€I GGJ;›æÚÜÚä³=F‰D€EƒFJ;—æÚÜÜÝÚbEMLMMNNOPPQR€S)TVVxxvvttsrqppnnmlkjihhgfeeccba`_^^]\]R³ãÚÜÚå¡GUQPPONNMMLKK€JIIH€G I:šæÚÜÚä³;E‹C€DEEFFI:ŠåÚ€ÜÞkCLKKLMMNNOPQQ€S(TTxxvvttsrqppnnmlkjihhgfeeccba`_^^]\\WhØÝ€ÜÛßÉXQSQPPNNMMLKK€JIIH€G FI:šæÚÜÚä²:E€CBBŠCDDEH;€äÚÜÜÛápALJJKLMMNNOPPQR€S&xxvvutsrqppnnmlkjihhgfeeccba`_^^]\]QŠßÛ€Ü Úä˜EVQPPONNMM€KJJIIH€G FFI9šæÚÜÚä²:DŒBƒCBF:{ãÚÜÜÛâs?KIJJKKLMMNNOPQRSSxxwvuttrqpponmlkjihhgfedccba`_^^]\YbÒàÛ€ÜÛßÎ\ORPPONMMLKKJJ€I€GFFEH9™æÚÜÚä²9DB€A„@ABCCE9xãÚÜÜÛât>JII€J0KKLMMNOPPQRxxwvvttrrpponmlkjihhgfedccba`_^^]^P«äÚ‚Ü#Úå¥GTPPNNMMLKKJJIIHGGFFEEG7™æÚÜÚä²8BŽ@€ABD8zãÚÜÜÛâq=IGHII€J,KLMMNNPPQxxwvvttrrpponnlljihhgfeeccba`_^^_T{ÞÜÛÜÞqIRONNMMKKJJIIHGGFF€E F7™æÚÜÚä±7B@@Œ?€@AC6äÚÜÜÛál=HFGGHIIJJKKLMNNOP€x!vvttsrqponnlljjhhgfeeccba`_^^]YÅáÛ€Üá€ÜÚâ¿LQONMMLKKJJIIGG€F EECF7™æÚÜÚä±7A‚?„>†?C4‡åÚ€ÜÞe=G€FGGHI€J/KLMMNNyxxvvutsrqponnlljjhhggeeccba`_^`Q˜ãÚÜÜÝگ݀Ü"ÚäŒEQNMMLKJJIIHGGFFEEDCF6˜æÚÜÚä±6A?Ž>€? B3•æÚÜÜÝÙZ>EDE€FGHIIJJKK€M=„<=€>A4§åÚÜÛÞÒM@DCDD€FGGHI€J,KLMzyxwvvttrqppnnmlkjihggeedcba`_`UµãÚÜÛÞÖgKpÜÚå©CPMLKKJJIIGGFFED€C E6˜æÚÜÚä±5@>==‚<ƒ;‚<==>:¼ãÚÜÛáÄAABBCCDE€FVGHIIJJKKzyxxvvttrrpponmlkjihhgfedcba`aU‡áÛÜÜÚä•K[J¡åÚÜÜÛßsEOLKKJIIHGGFFEDCCBE5—æÚÜÚä±5?<;=9HÑßÛÜÚä±7BAAB€CDEFFGGHI€JPzyxxvvttsrqponnlkjihggfedccaa^`ÌßÛÜÛáÄUWWTXÍàÛÜÛáÃKMLKJJIIGGFFEECCBBD4—æÚÜÚä±4><<‚;†:;=2fáÛÜÜÚæ•3B@@ABBCCDE€F%GHIJKzzxxwvutsrqponnmljjhhgfedccbcT¤äÚ€Ü*ÞyPXVXJƒâÛÜÜÚäANKJJIIGGFFEDCCBBC4—æÚÜÚä°3>;ƒ:ƒ9:=.’æÚÜÜÚãq4A??@@AB€C DEFFGHIJzzyxwvuttrqppnnmljjhhgfed€c[wÛ€ÜÚã«NZVVUVK¶ãÚÜÛÞÖ\GLJJIHGGFFE€CBAC4—æÚÜÚä°3=;;:99‡8€9 :ÄáÛÜÛÞÕM9€>'??@@ABCCDEFFGGHzzyxwvvttrrppnnmlkjihggee€c [¿âÛÜÛßÒbVYV$NgÙÝÜÜÚä­AMJJIHGGFEDCCBB@C3—æÚÜÚä¯2=;€:98‡7;-kãÚÜÜÚä³4=<==>€?@AB€CD€FRG{zzxxvvttsrpponmlkjihggeeceX“âÛÜÜÚãŽO[XWVVTVG™åÚÜÜÛáuALIIHGFFEDCCBB@C3—æÚÜÚä¯2<::9€8Š7n81¹ãÚÜÜÚå|/>;;<=>>??@@ABCCDEFF|zzxxwvutsrqponnlljihggfeeajÓßÛÜÚâ¾U[YXWVVTTRSÈàÛÜÛáÆKJJIHGFFEDCBBA@B3—æÚÜÚä¯2<:9€87†6:({åÚÜÜÛßÐC7;:;;<<=>>??@AB€CEE}{zyxwvuttrqppnnmljjhhgfegY°ãÚ€Ü0ÛsU[YXWVVUSUI{áÛÜÜÚå”>LIHGFFECCBB@@B2–æÚÜÚä¯1<988€7‚6ƒ5;:*SØÞÛÜÜÙç+;89::;;<<=>??@@ABCCD}{zyxxvvttrrppnnmlkjhhgfg]‚Þ€Ü1Úä¤Q^ZYXWVVUSSTG¯äÚÜÛÝØ^DJHGFFECCBB@@B2–æÚÜÚä¯1:88€7€6ƒ5468(LÍáÚÜÜÛßÐB487889:€;<=>€?T@ABCC}|zzxxvvutsrqponnlkjihggecÇáÛÜÛßÍ`[\ZYYWVVUTSTM`ÖÞÛÜÚä±AKHGFFDCCBA@@B2–æÚÜÚä¯0:8€7€6€5€456/%bÑâÚ€ÜÙçw*96€7^89::;;<<=>??@ABB||{zyxwvutsrqppnnmljihgj[ŸãÛÜÜÛáˆT_[[YYXVVUTSRTD‘äÚÜÜÛây?JGFFDCCBA@?B2–æÚÜÚä¯0;€877ƒ651)&D™áàÚ€ÜØè¥+65€6€789:€;i<=>??@@A}|{zyxxvvttrrppnnmljjhicuØÝÜÜÚã·U`][[YYXVVUTSSRQMÃâÛÜÛàÊLFGFFDCCBA@?B2–æÚÜÚå­*4221100/,*'%)8^›ÕçÛÛ€ÜØç»51€45€6€7]89:;;<<>>?@@}}|zzxxvvutsrpponmlkjij_ºâÛÜÜÝØpZ_]\[ZYXWVVTSSRSHsßÛÜÜÚå˜;JFFDCCBA@?B2–æÚÜÚä´ENLKK€J LR]nˆ¨ÉáçÞÙ€Ü ÛÙè»:-4233445€6A7789::;;<=>??~}|{zyxwvutsrqponnlkjk_àÛÜÜÚãžUa^]\[ZYXWVVTSSRPSC¨åÚ€ÜÛaAHFDCCBA@?B1–æÚ€ÜÚ…×ØÜáåçæáÛÙ€ÜÛÙßç¤3,312334566€7Q89:;;<=>?}|{zyxxvvttrrppnnmlkikÏßÛÜÛàÈ``_^^\[[YYWVVUSSRQQLYÒßÛÜÚäµ?HFDCCBA@?A1–æÚ܆ÝÜÛÚÙÚÛ€Ü ÚÙßèÑu'.200€1€2(3445667789:;;<==~}|zzxxvvutsrpponmlm_ªãÚ€Ü,ß„Zb_^^][[YYXVVUTSRQPRB‰äÚÜÜÚä};HDCCBA@?A1–æÚ…ÜÛ‚Ü ÛÚÙÚÝäçÒ<#10/‚011€234566€79:€;I<~}|{zyxwvutsrqponmnd~ÚÛÚÚØâ²Yd`_^^]\[ZYXWVUTSSQPPOH½âØÚÙÝËJCECCBA@?A1”ã×‰Ù€Ú ÛÝàãçæÙµzFDCBA@?B0œòäƒçƒèçæåâÚι™pF(!)/.,,-..//€01122345€6789:;~}|zzxxwvutsrqpooj|­€¨§¬‰^eba`_^^\[[YYWVVUSSRQPNOG‚œ— “LCDCBA@?@8j•€Ž€€ŒŠŠ‰‡yl]L:*!!'./-†,--../00€1@2244567789:–~}|{zyxwvuttrqponnj`_^]][_fccba_^^][[YYXVVUTSRQPONNC€=<::EEDCBA@?>?5..-,+**(''%%$ %&),-0/.,,…+‚,-.//00112234566776€}}|zzxxvvttrrppnnmnml€j@gedcba`^^]\[ZYXWVUTSSQPONMONMMLKIFEDCBA@??>>?>=<;::988655443210.-€,+**++*+,-..€0 1223456677€\~}|{zyxwvutsrqponmlkjihgfedcca`_^^\[[YYWVVTSSRQPNMMKJJIHGFFDCCB@??>=<;:9877654332110//.--,,++‰*€+€,j-./00112244566}}|zyxxvvttrrppnnmljihggeeccba_^^][[YYXVVUTSRQPONMLKJIIGFFDCCB@??>=<;::877654322110//--,,€+**‡)€*++,,--.€01223€5[ƒƒ€~}|zzxxwvutsrpponmlkjhhgfedcba`^^]\[ZYXWVUTSSQPONMLKJIIGFFECCBA@?>=<;;:877654322100/.-,,€+**‚)€(‚)€*+€, -./00122376€€Y~}|{zyxwvuttrqponnlkjihggedcca`_^^\[[YYWVVTSSRQPNNMKJJIHGFEDCBA@??=<;;:887654322100/.-,,+€*))€(ƒ'((€) **++,,-./0012€`€~}|zzxxvvttrrppnnmljjhggeeccba_^^]\[ZYXVVUTSRQPNNMKKJIHGFFDCCA@?>><;;:97765432210//--,++**))(('†&''())**++,,-.001b‚‚~}|{zyxwvutsrqponmlkjhhgfedcba`_^]\[ZYXWVUTSSQPONMLKJJIGFFDCCB@@?>=;;:987665322100/-,,++*))(('€&ƒ%& '())**++,-./0c€‚€~||zzxxvvttrrppnnmljihggeeccb`_^^][[YYWVVUSSRPPNNMKJJIGGFEDCBA@?>=<;:98766533210//-,,+**))('&&ˆ%€&'€)*+,,-.€/0€€^€~}|{zyxwvutsrqponmlkjhhgfedcba`^^]\[ZYXWVUTSRQPONMKKJIHGFFDCBA@?>=<;;:8776532210//--,+**))(&&€%†$w%%&&'())**,,-..-0€ˆ€~}|zzxxvvttrqppnnlljihggeecca`_^^\[[YXWVVTSSRPONMLKJJIGFFECCB@??><;;:87765432100/--,+**)('&&%%$$…#v$$%%&&'))**+,**-/€‚‚~}|{zyxwvutsrpponmljjhhgfedcba`^^]\[ZYXVVUSSRQPNMMKKJIHGFEDCBA@?>=<;:97765432100/-,,+*))('&%%$$€#‚"€# $$%%&'))**€+f/€€tz}}|zyxxvvttrqponnlkjihggedcba`_^^\[ZYXWVUTSSQPONMLKJIHGFFDCBA@??=<;:98766532210/.-,+*))('&%$$€#€"!!€"##$$%%&'()*')).‚_€~}|{zyxwvutsrpponmljjhggfeccba_^^][[YYXVVTSSRPPNNMKJJIGFFECCB@??><;::8766532210/.-,++*)(&&%$$#€"„!€"#$$%&&(,g€}}{zyxwvvttrqponnlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLJJIHGFEDCBA@?>=<;:98765432100.-,+**)('&%$$#""!!‚ €! ""#$$%&&%%&*iƒ‚€~}|{zyxwvutsrpponmljjhggeeccba_^^][[YXWVVTSSRPONMLKJJIGGFDCCB@??><;:98766532100/-,,+*)('&%$$#"!! €  !!""$$%&&%(ƒ‚f}}{zyxwvvttrqponnlkjihgfedcba`_^]\[ZYXVVUTSRQPOMMKJJIHGFEDCB@??><;;:8866533110/.,,+*))'&%$$#"! € !!"##$#$)(„g€}€~}|{zyxwvutsrpponmljjhggeeccba_^^][[YYWVVTSSRPONMLKJJIGFFDCCA@??=<;:98765432100.-,+*))'&%$$#"!!ƒ !€"#&…h€}}{zyxwvvttrqponnlkjihgfedcba`_^]\[ZYXVVUTSRQPNNMKJJIHGFEDCB@??><;;:8766532210/-,,**)(&%%$#"!!€ !#!%%†f€€~~}|{zyxwvutsrpponmljjhggeeccba_^^\[[YYWVVTSSRPONMLKJJHGFFDCBA@?>=<;:9876543210/.-,+*)('&%$#"!!€   ##ˆ€€m~||zyxxvvttrqponnlkjihgfedcba`_^]\[ZYXVVUTSRQPNNMKJJIHGFECCB@??><;;:8766532100/-,+**)'&%$$""! ""Š‚b~}|{zyxwvutsrpponmljjhggfeccba_^^][[YYWVVTSSRPONMLKJJIGFFDCBA@?>=<;:9876543210/.,,+*)(&%%$#"!  ‹h~~}|zzxxvvttrqponnlkjihgfedcba`_^]\[ZYXWVUTSRQPONMKJJIHGFEDCB@??><;;:8766532100/-,++))'&%$#""!€Œ‚€f}|{zyxwvutsrqponmlkjhhgfedcba_^^][[YYWVVUSSRPONMLKJJIGFFDCBA@?>=<;:9876543210/.-,+*)(&%%$#"! €Žm}r~}}||zzxxvvttrrppnnlljihggedcca`_^^\[ZYXWVVTSRQPONMLKJIHGFEDCBA@?><;;:8776532200/-,++))'&%$#"!!~c}||{zyxwvutsrqponmlkjhhgfedcba`^^]\[ZYXVVUSSRPPNMLKJIIGFFECCB@??><;:9876543210/.-,+*)('&%$#"! ’e{}}||{|zzxxvvutsrppnnmljihggeecbb`_^^\[ZYXWVVTSSQPONMLKJIHGFFDCBA@?>=<;:9776542210/.,,**)(&%$$#"! •€|_{yzzyxwvutsrqponmlkjihgfedcba`^^]\[ZYXVVUSSRQPNMMKKJIGGFECCB@@>><;;:8776432100.-,+**)'&%$##"! €˜_{}}{xyzxxwvutsrpponmljjhggfeccba_^^][[YYWVVTSSRPONMLKJJIGFFDCBA@?>=<;:9876543210/.-,+*))'&%$#"" ša|yyzzxsyxvvttrqponnlkjihgfedcba`_^]\[ZYXWVUTSSQPONMKKJIHGFEDCBA@?>=;;:8766542210/.,,+*)('&%0J  ]zwxzxŒwvutsrqponmlkjhhgfedcba`^^][[ZYXVVUSSRPPNMLKJIIGFFECCB@?>><;;98766432210/-,,+*)'?#"##"¡Yxyyxxrvvttrrppnnmljihggeeccb`_^^\[ZYXWVVTSSRPONMLKJIHGFFDCBA@?>=<;:98765432100.-,+**1%%"#$¥Lxz{wvtrsqrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLJJIHGFEDCBA@?>=<;:9776542210/€.')'#$'©@uyxutshiojgnnmlkjhhgedcca`_^^\[[YYWVVUSSQPPNMLKJIHGFFDCCB@??><;;:€7 543,1.&%,+*3>+””Ž•“‚ €‘€‘’’‚“ƒ”€“••”••𔩀Žˆª‚€‘’’‚“†”–”“€•€–¥€ƒŽ†‚Ž‚‘‘’’‚“„”€•–—”•€–¡‚’’ˆŽ”‚ŽŠƒ‘‘’’“ƒ”€•–—˜‚•Ž‘‘†€Žƒ•ŒŽˆ‚‘‘’’“ƒ”•––‚•šŒ’…€ŽŒŒ‹ŒŒ€Ž‡‚‘€’€“„”€•™‚•—ˆŽŽ†Œ•‹†Œ€ŽŽ‡‚‘’’€“ƒ”€•––••Ž„ŽŽ€„Œ‹‹„ŠŠ‹„Œ€€Ž†‘’’“‚”€•”•’ƒŽŽ€ƒŒ†‹•І‹ƒŒŽŽ†‘’’“‚”•”–ñ’‘“ބހ‚Œ„‹‡ŠŒ‰‡Šƒ‹ƒŒŽŽ…‘’’€“ƒ”•––•—–•Ž‘“‘…Ž€‚Œƒ‹„Љ‘ˆ‰„Šƒ‹‚ŒŽŽ…€‘’’€“„”–”˜›–ŒŽ·‚Ž€Œ‚‹„Љ‰œˆ€‰‚Šƒ‹Œ€Ž…€‘’’€“†”•”ŠŽŽƒŽŒ‚‹ƒŠ‰¤ˆ€‰Šƒ‹ŒŽ…€‘’’€“ƒ”“’“ІހŒ‹‚Љˆˆ‡Žˆ€‰€Š‚‹ŒŽŽ„€‘’’€“ƒ”••ˆ‚Ž€€Œ‹‚Š‰Šˆ—‡‰ˆ€‰€Š‹‚ŒŽ„€‘’“€”••”•†„Ž€€Œ‹Š‰ˆˆˆ‡Š†ˆ‡ˆˆ‰‰€Š‹ŒŽ„€‘’€“””•—•““…‘ŒoŽ€€Œ‹Š‡ˆ…‡€†‘…€†…‡†ˆ‰‰Š‹€ŒŽ„€‘’““€”“—’„…Ž€€Œ€‹Š‰†ˆƒ‡€†›…††„‡…ˆ‰‰€Š‹€ŒŽƒ€‘’’‚“’’‚€€Ž€€Œ€‹Š†ˆ‚‡††£…††ƒ‡…ˆ‰€Š‹€ŒŽƒ€‘’ƒ“‘ŽŒŽ€Œ€‹Š…ˆ‚‡†…‹„Œ…††‚‡„ˆ‰Š€‹€ŒŽŽƒ€‘’’“’“‘€…Ž€Œ€‹€Š‰„ˆ‚‡†‰…˜„ˆ…††‡„ˆ‰‰€Š€‹€ŒŽ‚€‘’‘„Ž€Œ€‹€Š‰„ˆ‡†‡…ˆ„Œƒ‡„†…††‡„ˆ‰€Š€‹€ŒŽƒ€‘’Ž‘„Ž€Œ€‹€Š‰„ˆ‡††…„„€ƒ’‚€ƒ„„†…†‡„ˆ‰€Š€‹€ŒŽƒ‚Ž’‘€Ž€Œ‹‹€Š‰ƒˆ‡†……„„ƒˆ‚‡‚„‚€ƒƒ„……†‡ƒˆ‰€Š€‹€ŒŽ‚‘€„Ž€Œ€‹€Šƒˆ‡†„…ƒ„ƒ„‚—‚‚€ƒ‚„„…†€‡„ˆ‰ŠŠ€‹€ŒŽŽ†ŽŽ€Ž€Œ€‹€Šƒˆ‡†„…‚„ƒ‚‚ ‚ƒƒ„……‡ƒˆ‰ŠŠ€‹€ŒŽ„ƒ€Œ‹‹€Š‰‚ˆ‡†ƒ…‚„ƒ‚‚¦€‚ƒƒ„„…†€‡ƒˆ‰ŠŠ€‹€ŒŽˆŽ€Œ€‹ŠŠ‰‚ˆ‡†ƒ…„ƒ‚Š€‰‚€Š€‚ƒ„„…†€‡‚ˆ‰€Š€‹ŒŒŽ‚€Ž€Œ‹‹€Šƒˆ€‡†ƒ…„‚ˆ€€–€€ˆ€‚ƒ„ƒ…†€‡‚ˆ‰ŠŠ€‹€ŒŽ„Ž€Œ€‹ŠŠ‰‚ˆ€‡†ƒ…„‚†€€‡Š~‡€€‡‚‚ƒ„ƒ…†€‡‚ˆ‰ŠŠ€‹ŒŒ€ŽŽ€Œ‹‹€Š‚ˆ€‡†ƒ…€„ƒ€‚†€„—~ƒ€€†€‚ƒ€„ƒ…†€‡‚ˆ€Š‹‹Œ€ŽŽŒŒ€‹ŠŠ‰‚ˆ€‡ƒ…€„ƒ€‚…€ƒž~ƒ€€„€‚ƒ€„ƒ…€‡‚ˆ‰ŠŠ€‹€Œ€Ž€Œ‹‹€Š‚ˆ€‡ƒ…€„ƒ‚‚…€‚‡~‚}‡|ƒ}†~‚€„€‚ƒ€„ƒ…€‡‚ˆ ‰ŠŠ‹‹ŒŒŽŒŒ€‹ŠŠ‰ˆ€‡†‚…€„ƒ‚‚…‚…~€}”|}„~‚€„‚‚ƒ€„‚…†€‡ˆ‰ŠŠ‹‹ŒŽŒŒ‹‹€Š‚ˆ€‡‚…€„ƒ€‚ƒ€„~}}|€}ƒ~€„‚‚ƒ€„‚…†‡‡‚ˆ‰ŠŠŽŽ€Œ‹‹ŠŠ‰ˆ€‡†…€„ƒ€‚ƒ€€„~}ˆ|{†|€}ƒ~€€„‚‚ƒ€„‚…€‡‚ˆŠ‹ŽŒŒ€‹ŠŠ‚ˆ€‡‚…€„€‚ƒ€€ƒ~}†|˜{„|€}‚~€ƒ‚‚ƒ€„…†‡‡‚ˆ ‰ŒŒ‹‹ŠŠ‰ˆ€‡†…€„ƒ‚‚ƒ€€ƒ~}ƒ|†{z„{ƒ|€}‚~€€ƒ‚‚ƒ„„‚…†‡‡€ˆ ‰ŒŒ‹‹ŠŠ‰ˆ€‡‚…„„ƒ‚‚ƒ€€‚~}ƒ|„{™z‚{ƒ|}}‚~€€‚€‚€„‚…€‡ˆˆŽ€Œ‹‹ŠŠ‚ˆ‡‡†…€„€‚‚€€‚~}‚|ƒ{„z‘y…z{ƒ|}‚~€€‚‚‚ƒ€„…†€‡ŽŽŒŒ‹‹€Šˆ€‡‚…„„ƒ‚‚‚€€‚~ƒ|‚{ƒz™yƒz{‚|}‚~€€‚‚‚ƒ„„‚… ‡‡ŽŽŒŒ‹‹ŠŠ‰ˆ‡‡†…„„…„„€ƒ‚€‚~‚|‚{zz||{zyx€wx„yz†{z{|}}~€ƒ‚‚€„… †ŽŽŒŒ‹‹ŠŠ‰ˆ‡‡†…„„|{{€z|‚€‚~‚|{zsƒryx…wxsn‰o popqrsvy{|{zz{‚|}~€‚‚‚ƒ„„…ŽŽŒŒ‹‹ŠŠˆ€‡‚…‚Œ½¼À©{€~‚|€{z {u©½¹º¹ºµ{v„wxr™¸³ˆ´³°«¤›‘…zrqtz|{zz€{‚|}€~€€‚‚‚€„……Ž€Œ‹‹ŠŠˆ‡‡†… „…~ÀæàááâÝ‘{€~}|€{z{s•áàç²px„wynµèá‹âááÞØÏ¿ªyqv{{zz€{‚|~€€ ‚‚ƒ„„…ŒŒ‹‹€Šˆ‡‡†… „…€†ÔÝÚÛÚàÇ{€~}|€{z€yÍßÚÛÚÞÌuv‚w€vxn°áÚÛ ÜÝßáâÝΰ‰rv|€z€{|}~€‚ ‚‚„„ŒŒ‹‹ŠŠ‰ˆ‡‡…„ {¦àÛÜÜÛá¦w€~~|€{z y{p¬âÛÜÜÛß”pywƒvuwl°âÛÜ€ÛÜßâÛ¼‰qy{€z€{|}~€‚ ‚‚ŒŒ‹‹ŠŠ‰€ˆ€‡…„„ƒ‚ƒ|ÆàÛÜÛÞÕ…|}€|€{z yzuˆÚÝÜÜÚâºoy€v€u€tvk°âÛ€Ü݄ހÝÜÛ€Ü ÛÛÜâÛ®wv{y€z€{|}€~€‚ ‚ŒŒ‹‹ŠŠ‰€ˆ‡‡†…„„ƒ‚ƒ}’Û€ÜÛâºv|{{zyyzsÂáÛÜÛÞÖ€twvuuƒtvk°âÛ€ÜÚ…Ö×ÙÝàââßÜÛÜÛÝãÇ€t{yy€z€{|~€ŒŒ‹‹ŠŠˆ‡‡†… „„‚‚ƒy³áÛ€ÜÞ—v}||€{€zyy{páÛÜÜÛâ¢nxuu…t vk¯âÛÜÛáÂv}ƒ| ~ƒ‰”¤¸ÍÝâÞÛÜÚáÑ„sz€y€z€{€|}€~€€ŒŒ‹‹ŠŠˆ‡‡†€…€„‚‚€‚ÐßÛÜÛßÌ{€|{{€zyyzw|ÓÞÛÜÛáÇrvu‡t vk¯âÛÜÛáÀkr…q onlltНÔâÜÛ€ÜÚàÑ~tyx€y€z{{|}€~ €ŒŒ‹‹ŠŠˆ‡‡†€…„„ƒ‚‚ƒzßÛÜÜÛâ«t~€{zz€y{o´âÚ€ÜÝ‹pu†t ssti®ãÚÜÛáÀlsrs ttuvtokz­ÜßÛ€ÜÚâÅtwwxx€y€z{{|~ €ŒŒ‹‹ŠŠˆ‡‡…„„ƒ‚‚€ ‚x¿áÛÜÜÝÙ‰x|{€zyyzrÞ€ÜÚã±lv„tsr ti®ãÚÜÛáÀls‰rsturk‹ÒàÛ€ÜÚã©oywwx€y€z€{€|}€~€ŒŒ‹‹Š‰ˆ‡‡…„„‚‚‚ |ŠØÝÜÜÛáÀu|{zz€y xuÉàÛÜÛßÑxsu‚tsƒr ti®ãÚÜÛáÀlsŒrsvm}ÏàÛ€ÜÝÙƒtx€wx€y€z{{| ~~ŒŒ‹‹Š‰ˆ‡‡…„„‚‚vªâÛÜÜÛàœt|zzyy{n¦âÛÜÜÛá™lv‚t…r ti®ãÚÜÛá¿jqppƒq†r tl€×ÞÛÜÜÚãµmx‚wx€yzz€{€| }ŒŒ‹‹Š‰ˆ‡‡…„„‚‚€|ËàÛÜÛßÑ}yzyyztƒØÝÜÜÛâ¿nuts†r sh­ãÚÜÛá¿jq‡p€q‚rui™áÛ€ÜÝØ€rvv‚wxyy€z{{|ŒŒ‹‹Š‰ˆ‡†€…€„‚‚€y•Þ€ÜÛâ²q|yyzp½âÛÜÜÝÙƒpu€t…r qqprg­ãÚÜÛá¿jq‹pqq€r slÂáÛÜÜÛâ¥kvuv‚wx€yzz€{ ||ŒŒ‹‹Š‰ˆ‡†€…„„ƒ‚‚€€~€v¸âÛÜuz{p˜àÛÜÜÛâ¨kv€t…rq€p rg­ãÚÜÛá¿jqpoo‹pqqslßÛÜÜÛàÆputtuv‚wx€y zz{{|ŒŒ‹‹Š‰€ˆ‡‡†€…„„ƒ‚‚€€~|‚ÔÞÛÜÛàÆuzxzÐßÛÜÛàËst„rq‚p rg­ãÚÜÛâ¿ho†n€o…p qoÊàÛÜÜÝÚ‚qu€tuv‚w€y zz{|ŒŒ‹‹Š‰€ˆ‡‡†€…„„ƒ‚‚€€~~t¢áÛÜÜÛá¢sq°âÚÜÜÛßmvtt„r„p rg­ãÚÜÛâ¿hoŠn€op rg¨ãÚÜÜÛáškutuvvwxyy€zŒŒ‹‹ŠŠˆ‡†€…„„ƒ‚€ ~~}}wÄáÛÜÛÞÖ{ˆÜÚâ·lvttsƒr…p qe¬ãÚÜÛâ¾go„m‡noopqjŠÞ€ÜÛâ°its‚tuv‚wyŽŒŒ‹‹ŠŠˆ‡†€…„„ƒ‚€~}}xÛ€ÜÛâ·ÁáÛÜÛÞÕ|qutsƒr„p onpe¬ãÚÜÛâ¾gn‹mƒnonvÓÞÛÜÛáÂmsrrs‚tuvw xyyŽŽŒŒ‹‹ŠŠˆ‡†€…„„ƒ‚€~}|~s°âÛ€Ü ÞÞÛÜÜÛâ lvttƒrƒpo€n pe¬ãÚÜÛâ¾fmŠlmn ojÅáÛÜÛßÎsqrstuvwxxŽŽ€Œ‹ŠŠˆ‡†€…„„ƒ‚€~€|{|ÏßÛƒÜÛáÅputts‚rq‚pon od¬ãÚÜÛâ¾fmŽl€m npf¶âÛÜÜÝÖyn‚rs‚tuvwŽŽŒ‹‹ŠŠˆ‡‡€…„„ƒ‚€~€|}t™ßۅ܉outt‚rq‚pon mod¬ãÚÜÛâ¾fml†k‡l mod©ãÚÜÜÝÚ‚lqp‚rstuv€wŽŽŒŒ‹ŠŠ‰€ˆ‡‡€…„„ƒ‚€~€|{}s½áÛÜÛã¯kvttsrq‚po€n€m oc«ãÚÜÛâ½elkk†j‚k‚lncŸâÛ€ÜÞˆkqppq‚r‚t uvwŽŒŒ‹ŠŠ‰€ˆ‡‡€…„„ƒ‚€~€|{|w†ÙÝ€ÜÛßÎxs€t‚rqpo€nm nc«ãÚÜÛâ½dkj€k llnd—âÛÜÜÛà‹hqpqrst uvŒŒ‹‹Š‰€ˆ‡‡€…„„ƒ‚~~}€|{}sžÞÜÛâ©jwttsrq‚p€n€m llnc«ãÚÜÛâ½dk‘j kmd”áÛÜÜÛáŽgoo‚p‚r‚tŒŒ‹‹Š‰€ˆ‡‡€…„„ƒ‚~~}|y€ÔßÛ€ÜÛÞÑ{rutsrqponn€m€l nbªãÚÜÛâ½dk€j‡i…jlb’áÛÜÜÛáŽfonnopqrs€tŽŒŒ‹‹Š‰€ˆ‡‡†€…„ƒ‚~~}€|}r¶âÛ‚ÜÛã³lvtrqpo€nmml mbªãÚÜÛâ½cjiiŠh€i€j lb“âÛÜÜÛáŒenm€nop‚r ttŽŽŒ‹‹ŠŠ€ˆ‡‡†€…„ƒ‚‚€ ~~}||}u’ÞÜÛÜÞ‹ourqp€n€m€l kmbªãÚÜÛâ½bihiilb—âÛÜÜÛ߉fmlmmnnopqr sŽŽŒ‹‹ŠŠ€ˆ‡‡†€…„„‚~~}€|yÊàÛ€Üà€ÜÛáÆqtrpo€nmm€l kkmaªãÚÜÛâ¼bi’hj_ãÚ€Ü݃fmllmm€nopr ŽŽŒŒ‹ŠŠ‰€ˆ‡†€…„„‚‚€€~|~s©âÛ€Üۺ݀ÜÛâ jtrrqponnmm€l€k laªãÚÜÛâ¼bih‚gffƒgh j_§äÚÜÜÝÚ{f‚lmm€np qrrŽŒŒ‹‹Š‰€ˆ‡‡€…„„‚‚€€€~}y‡ØÝÜÜÛâ½kÅáÛÜÛÞÕ{osrqp€nmm€lkkjlaªãÚÜÛâ¼bihggŒf€g j`µãÚÜÜÞÕrhkjklm€no€p qqŽŽŒŒ‹‹Š‰€ˆ‡‡€…„„ƒ‚€€~ u¾áÛÜÜÝØ„o‹ÜÚâ¶jtrq€ponnmm€lkkjjlaªãÚÜÛâ¼bh’fgdÅáÛÜÛàʃjklmnnop ŽŽŒŒ‹Š‰€ˆ‡‡€…„„ƒ‚€€~€u›àÛÜÜÛâ¦o{n°âÚ€ÜÞŽltq€ponnmm€lkkjjl`©ãÚÜÛâ¼`g‡feƒf gdoÔÞÛÜÛâ¼biijklm€n oppŽŽŒ‹‹ŠŠ€ˆ‡‡†€…„ƒ‚€€~}~ÐßÛÜÛàÊvwxvyÐßÛÜÛàÉqrp€nmm€lk€j l`©ãÚÜÛâ¼`g‚f€e†d€eg`…àÛÜÜÚã§_jhhijklmnnopŽ€ŒŒ‹ŠŠ‰€ˆ‡†€…„ƒ‚€€€u²âÛ€ÜÞ‘sxwyo™àÛÜÜÛã£ir€p€nm€lkj k_©äÚÜÛâ¼`g€fed f[¦äÚÜÜÛá_jhjklm€nŽ€ŽŒŒ‹‹Š‰€ˆ‡†€…„„‚€zÛ€ÜÛâ·q{€wxo¿áÛÜÜÝØ}mqponnmm€lkj k_©äÚÜÛâ»`gfe‘d ÊàÛÜÜÝ×rcgghijk€lmnnŽŒ‹‹Š‰€ˆ‡‡€…„„‚‚€ €yÆàÛÜÛÞÔ€wywq„ÚÝÜÜÛâ¹hrponnmm€lk€j ij_©äÚÜÛâ»`g‡d†c f\‰áÛÜÜÛâ¾`g€fghi€jk€lmm€ŽŒ‹‹ŠŠ€ˆ‡‡€…„„ƒ‚ w¤áÛÜÜÛá¡r{y€wvxkªãÚÜÜÛàironnm€lkj ij_©äÚÜÛâ»_fƒdccˆb c^ÂáÛÜÜÚã•\g‚f‚hjk€l ŒŒ‹ŠŠ‰ˆˆ‡‡†€…„ƒ‚‚~…ÕÞÛÜÛàÅv{yywvtuÍßÛÜÛàÌpponnm€lk€j ihj_©äÚÜÛâ»^edcŠbeX”ãÛÜÜÛÞÓlbedefghi€jkll€ŽŒŒ‹‹Š‰€ˆ‡†€… „ƒ‚ƒyºáÛ€ÜÛv{yyx€wuvm“àÛÜÜÚã¦gqnnm€lk€j ihj_©äÚÜÛâ»]e€dc†ba dYxÙÝÛÜÜÚä¤Zfdefg€hi€jkl€ŽŒŒ‹Š‰€ˆ‡‡€…„„‚‚{˜Þ€ÜÛâ±r|zyyx€wvtvm»âÛÜÜÝÙkonm€lk€jihj_©äÚÜÛâ»]eddƒb…acWrÑàÛÜÜÛÞÓj`ccdefghjŒŒ‹‹Š€ˆ‡‡†……„„ƒ‚ÌßÛÜÛßÑ~z{zyyx€wvtuqØÝÜÜÛâ½honm€lk€j ihj_©äÚÜÛâ»]edƒb€a€`bb]V‚ÔàÚ€ÜÚä’Yd€bcdefhijjŽŒŒ‹‹Š‰€ˆ‡†€…„ƒ„y­áÛÜÜÛàœu}{zzyx€wvutvk¤âÛÜÜÛá’fom€lk€j hhj_¨äÚÜÛâ»_fdc„b_YVm«ßßÚ€ÜÙå³Zba‚bcde€fg€hij‘€ŽŒ‹‹Š‰€ˆ‡‡€…„„ÙÝÜÜÛáÀv~|{zzyy€wvu€t qÉàÛÜÛßÎpmm€lk€j hhj^¨äÚÜÛã¹Ya_€^]]\[YXVXd¬×äÜÛ€ÜÙäÄa^a`aabcdef€hi‘‘ŒŒ‹ŠŠ€ˆ‡‡€…„…|ÂáÛÜÜÝÙŠy}|{zzyy€wvuttvl߀ÜÚã©do€lkjjihhj^¨äÚÜÛâ¿ms‚q prwŒž¶ÎàäÝÚ€ÜÛÚåÄe[`_€`aabcdf€h’‘!ŒŒ‹‹Š‰ˆˆ‡‡†……†}¡ßÛÜÜÛâ­v||{zzyyx€wu€tujµâÚ€ÜÛimllkjjihhj^¨äÚ€ÜÛ…ØÙÜàãäãàÛÚÜÚÞä³a\`‚_€`abc€de€fgh’‘€ŽŒ‹‹Š‰€ˆ‡†……„†ÒßÛÜÛßÍ}~}||{{zyyx€wvtozÕÞÛÜÛâ¿gmllkjjihhj^¨äÚ܆ÝÜÛÛÚÚÛ€Ü ÛÚÞåÓW\`^ƒ_€`aa€bc€de€fg“’‘ŒŒ‹ŠŠ€ˆ‡‡…‡}¶áÛ€ÜÞ™y~€|{zzyx€wvuttstižâÛÜÜÛâ•dnkkjjihhj]¨äÚŽÜ ÛÛÚÚÜâäÔ¤gT^^€]^^‚_€`abd€f“’‘ŽŒŒ‹‹Š‰ˆˆ€‡”ÛÚá¼x~~}||{zzyy€wvu€trsnÅàÙÚÙÝÏojlkjjihhj]§âØ‹Ú ÛÛÝÞáääÚÀ”gSZ_…]^‚_€`a€bc€def““’€ŽŒŒ‹Š‰€ˆ‡†…Îåàáàã׉~~~}||{zzyyx€wu€tssmˆàäããáêµfmkjjihhj]¬ìâ„ä‚åääãáÛÒ«nXSY^]ƒ\‚]^‚_``a€bcd”“’‘ŒŒ‹‹Šˆ„’¸€µ³·œ|‚€~||{{zzyx€wv€t srsm™­¨©¨©¥qkk€jhhibˆ¨€£¢¢¡  Ÿžš”ŠrdZTSX]^\\€[„\]^_€`b€d¦““‘€ŽŒŒ‹‹Š‰€ˆ‡„|}||zx|‚~~€|{zzyx€wvuttsrrsjfgeedcllk€jha[\€ZY€XWVVUUVX[]^^][Z[\]_€`a€bca€“’€ŽŒ‹‹Š‰€ˆ‚‡†…„‚€~~}||{zzyyxwwvu€t€r srrqppollk€j€hgghh€fe€dcbba__^]\\€[‰Z[[€\€]^_``ab€“’‘ŒŒ‹ŠŠˆ‡€…„„‚€€€~||{{zyyx€wu€tsrrq€pnnmllk€jihhg€f€dcbbaa``€_^€]\\€[Z[€\€]_``a€b””““‘€ŽŒ‹‹Š‰€ˆ‡†……„„ƒ‚€~~€|{zzyx€wv€ts€r€pnnm€lkjjihhg€f€dcbba€`€_^]]€\[[ƒZ„YƒZ[\\€]^€_€`aa••““’‘ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ €~~}||{zzyy€wvutts€r qpponnmllkjji€h€feddcbba€`€_€]\\[[‚ZY†XYYZ[€\€]_`_`€”“’‘€ ŽŒ‹‹Š‰ˆˆ‡‡†€…„‚€~||{{zyyx€wu€t srrqpponnmllk€j€h€feddcbba€`€_€]\\[[€ZY‹XYZ[\\€]ƒ_€”““’‘€ŽŒ‹‹ŠŠ€ˆ‡‡€…„ƒ‚€ ~~}||{zzyy€wv€ts€r€pnnmllk€j€hgffeddc€ba``€_]]€\[€ZY„XWƒXYZ€\]]^_”“’‘ŽŒŒ‹ŠŠˆ‡€…„„‚€€~~}||{{zyyxwwvu€t€r€ponm€l kjjihhgffe€d€ba``€_€]\[[€ZYXˆWXZ[\\]]^``^“”•”““’€ŽŒŒ‹Š‰€ˆ‡†€…„ƒ‚€~~€|{zzyx€wu€tsrrqpponnmllkjjihhg€f€d€ba``€_€]\[ZX‹W€XY€Z[\\‚]“”“’‘Œ‹‹Š€ˆ‡‡€…„„‚€ €~~}||{zzyy€wvutts€r€pnnmllk€j€h€f€dcbba``€_€]\[€ZY€XW€VUVWX€Z[\\€] ^“”’—”““’€ŽŒ‹‹Š‰€ˆ‡†……„„ƒ‚€€~ ||{{zyyxwwvu€t€rqpponm€lkjjihhgffeddcbba``€_€]\[€ZY€X€WV‡UV€W€XYZZ[\€[]‚”“’‘ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ €~~}||{zzyy€wv€tsrrq€pnnmllkjjihhgffe€dbba``€_€]\[€ZYXX€WVŠU€W€XY‚Z ^””•””““’€ ŽŒ‹‹Š‰ˆˆ‡‡†€…„‚€€€~ ||{{zyyxwwvu€t€r€pnnmllk€j€h€f€d€ba`€_^]]\[€ZYXX€WVUƒTUV€W XXYZZYZ[•’”“’‘ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ ~~}||{zzyx€wu€tsrrqpponnmllkjjihhgffeddcbba`€_^]]\\€ZYXX€WU†TU€WXXYXY[ “•”•”““‘‘€ŽŒ‹‹Š‰ˆˆ‡‡†……„„‚€ €~~}||{zzyy€wvutts€r€p nnmllkjjihhg€fddcbba``€_ ]]\\[ZZYXXWWV€U‚TSS‚T€UVWWX€WZ ““”••““’‘ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ ~~}||{zzyx€wu€t€rqpponm€l€j€h€f€d€b``€_ ^]\\[ZZYXXWWV€U€TS‚RS€T€UVWWVWYƒ‚”““‘‘€ŽŒ‹‹Š‰ˆˆ‡‡†……„„‚€ €~~}||{zzyy€wvutts€r€pnnmllkjjihhgffeddcbba`€_ ^]]\[ZZYXXWWV€UTTS…RS€TUU€VYX„””’‘““’‘ŒŒ‹ŠŠ€ˆ‡†€…„ƒ‚€~~€|{zzyx€wu€t€rqpponmllk€j€h€f€dbba``€_]]\\€ZXX€W€UTTS€R€QR€TUSURW… ””•”““’€ŽŒ‹‹Š‰ˆˆ‡‡†……„„‚€ €~~}||{zzyy€wvutts€r€pnnmllkjjihhgffeddcbba`€_ ^]\\[ZZYXXWW€UTTSRRƒQ€RTTRS[V†”‚“’‘ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€~~€|{zzyx€wu€t€rqpponmllk€j€h€f€dbba``__^]]\[ZZYXXWWVUUTTSRR…QRR€SVVˆƒ“’€ŽŒ‹‹Š‰ˆˆ‡‡†……„„‚€ €~~}||{zzyy€w vuttsrrqpponnmllkjjihhgffeddcbba`€_]]\\[ZZXXWWVUUTTSRR€Q€P€QSRSTTŠ€“”“’‘€ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ ~~}||{zzyx€wu€t€rqpponmllk€j€h€fddcbba``__^]]\[ZZYXXWWUU€TRRQQPOPQQRTT‹’”–““’’€ŽŒ‹‹Š‰€ˆ‡†€…„‚‚€~~}||{zzyy€wvutts€r€pnnmllkjjihhgffeddcbba`€_]]\[[ZZXXWWVUUTTRR€QOON€OQSSRŒ““”€“‘Œ‹‹Š€ˆ‡‡€…„ƒ‚€ €~~}||{zzyx€wu€t€rqpponmllk€j€h€f€dbba``__^]]\[ZZYXXWWUUTTSRRQQOO€NOQPQŽ‘‹’’‘€ŽŒŒ‹Š‰€ˆ‡†……„„ƒ‚€€~||{{zyyxwwvutts€r€pnnmllkjjihhgffeddcbba`€_^]\\[ZZXXWWVUUTTSR€QONNPRRPƒ’€ŽŒŒ‹ŠŠ€ˆ‡‡€…„„‚€ €~~}||{zzyy€wv€tsrrqpponmmllkjj€h€f€dbba``__^]]\\ZZYXXWWVUUTTRRQQOWO€N’€‘’–€ŽŒ‹‹Š‰€ˆ‡†€…„ƒ‚€€~||{{zyyx€wu€t€r€pnnmllkjjihhgffeddcbba`€_^]]\[ZZYXXWWUUTTSRRSQ€OL•‘‘‚ŽŒŒ‹‹Š‰ˆˆ‡‡†……„„‚€ €~~}||{zzyy€wv€tsrrqpponnmllkjjihhgffeddcbb``€_]]\\€Z XXWWVUUTTRRQ€P˜ŽŽ€ŒŒ‹ŠŠ€ˆ‡‡€…„ƒ‚€ ~~}||{zzyx€wu€t€rqpponmllk€j€h€f€dbba``__^]]\\ZZYXXWWVUUVTQPPQšƒ‡ŽŒŒ‹Š‰€ˆ‡†€…„‚‚€~~}||{{zyy€wvutts€r€pnnmllkjjihhgffeddcbba`€_^]]\[ZZYXXWW—’T€SR ŽŽ”“ŒŒ‹‹Š€ˆ‡‡€…„ƒ‚€ €~~}||{zzyy€wv€t srrqpponnmll€j ihhgffeddcbb``€_^]]\[ZZYX>ÿUUVWT¡ŽˆŒŒ‹‹Š‰€ˆ‡†……„„ƒ‚€€~||{{zyyx€wu€t€rqppnnm€l€j€h€f€d€b``€_ ]]\\[YX]WWQSU¥ ŽŽŒŠŠ‹Š€ˆ‡‡†€…„‚€€~~}||{{zyyxwwvuttsrrq€pnnmllkjjihhgffeddcbba``__^]€_Å‚X©ŒŽŒ‹‹„……’ˆ‡‡……„„ƒ‚€~~€|{zzyyxxwu€t rrsqpqommllk€j€h€f€dcbbaa[^`ab[ZYYBY”t8mk@$2?FKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMLLLLLLLLLLLLLKKLKID<0!8a„¡´¿ÆÊÊËËËËËËËËËËËËËËËËËËËËËËËËËËËËÊÊÊÊÊÊÊÉÉÉÉÉÈÈÈÈÈÇÇÇÇÆÅÅÁ¹®›~\3 W‘¹ÍÒÏËÇÄÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÁÁÁÁÁÁÁÁÀÀÀÀÀÀÀ¿¿¿¿¿¾¾¾¾¾¾¾¾¿ÂÅÊËű‰O>‹¿ÐÍÆÁÀÀÂÃÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÃÃÃÃÃÃÃÂÂÂÂÂÂÁÁÁÁÁÀÀÀÀ¿¿¿¾¾½»»¼ÀÇÉ·6O¥ÍÍÄÀÁÂÃÄÄÄÄÄÄÄÄÄÄÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÄÄÄÄÄÄÄÄÄÄÃÃÃÃÃÃÂÂÂÂÂÁÁÁÁÁÀÀÀÀ¿¿¿¿¾¾½»º¾ÈÆšFE©ÐÉÁÀÃÃÄÄÄÄÄÄÄÄÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÆÆÆÅÅÅÅÅÅÅÅÅÅÅÅÅÅÄÄÄÄÄÄÄÄÃÃÃÃÃÂÂÂÂÂÁÁÁÁÁÀÀÀÀ¿¿¿¾¾¾½»»ÄÉ<#“ÏÉÀÁÃÃÄÄÄÄÄÄÅÅÅÅÅÅÅÅÅÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÅÅÅÅÅÅÅÅÅÅÄÄÄÄÄÄÄÃÃÃÃÂÂÂÂÂÁÁÁÁÀÀÀÀ¿¿¿¾¾¾¾¼ºÄdž]ÃÍÀÁÃÃÄÄÄÄÄÄÅÅÅÅÅÅÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÇÇÆÆÆÆÆÆÆÆÆÆÆÆÆÅÅÅÅÅÅÅÅÄÄÄÄÄÄÃÃÃÃÂÂÂÂÁÁÁÁÀÀÀÀ¿¿¿¾¾¾½»ºÈºPÑÃÀÃÃÄÄÄÄÄÅÅÅÅÅÅÆÆÆÆÆÆÆÆÆÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÆÆÆÆÆÆÆÆÆÆÅÅÅÅÅÅÄÄÄÄÄÄÃÃÃÃÂÂÂÂÁÁÁÁÀÀÀ¿¿¿¾¾¾½º¿Ê‚ ,²Ï¿ÂÃÄÄÄÄÄÅÅÅÅÅÆÆÆÆÆÆÆÆÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÈÇÇÇÇÇÇÇÇÇÇÇÇÆÆÆÆÆÆÆÆÅÅÅÅÅÄÄÄÄÄÃÃÃÃÂÂÂÂÁÁÁÁÀÀÀ¿¿¿¾¾¾½ºÉ¥"BÄÉ¿ÃÃÄÄÄÄÄÅÅÅÅÆÆÆÆÆÆÆÇÇÇÇÇÇÇÇÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÇÇÇÇÇÇÇÆÆÆÆÆÆÅÅÅÅÅÄÄÄÄÄÃÃÃÃÂÂÂÁÁÁÁÀÀÀ¿¿¿¾¾¾ºÄ¹6LËÅÁÃÃÄÄÄÄÅÅÅÅÅÆÆÆÆÆÇÇÇÇÇÇÇÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÈÉÈÈÈÈÈÈÈÈÈÈÈÈÈÇÇÇÇÇÇÆÆÆÆÆÅÅÅÅÅÄÄÄÄÃÃÃÃÂÂÂÁÁÁÁÀÀÀ¿¿¿¾¾»ÁÁ?KÌÃÁÃÃÄÄÄÅÅÅÅÅÆÆÆÆÆÇÇÇÇÇÇÈÈÈÈÈÈÈÈÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÈÈÈÈÈÈÈÈÈÈÇÇÇÇÇÆÆÆÆÆÅÅÅÅÅÄÄÄÃÃÃÃÂÂÂÂÁÁÁÀÀÀ¿¿¿¾¼¿Ã?@ÊÃÂÃÄÄÄÄÅÅÅÅÆÆÆÆÆÇÇÇÇÇÈÈÈÈÈÈÈÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÊÊÉÉÉÉÉÉÉÉÉÉÉÈÈÈÈÈÈÈÇÇÇÇÇÆÆÆÆÆÅÅÅÅÄÄÄÄÃÃÃÂÂÂÂÁÁÁÀÀÀ¿¿¿¼ÀÁ4-ÃÅÁÃÄÄÄÄÅÅÅÅÆÆÆÆÇÇÇÇÇÈÈÈÈÈÉÉÉÉÉÉÉÉÉÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÉÉÉÉÉÉÉÉÉÈÈÈÈÈÈÈÇÇÇÇÆÆÆÆÅÅÅÅÄÄÄÄÃÃÃÂÂÂÂÁÁÁÀÀÀ¿¿¼Â¸"±ÉÁÃÄÄÄÄÅÅÅÆÆÆÆÇÇÇÇÇÈÈÈÈÈÉÉÉÉÉÉÉÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊËËËÊÊÊËËÊÊÊÊÊÊÊÊÊÊÉÉÉÉÉÉÉÈÈÈÈÈÈÇÇÇÇÆÆÆÆÅÅÅÅÄÄÄÃÃÃÂÂÂÁÁÁÀÀÀ¿¿¼Æ¤ Ï¿ÃÄÄÄÄÅÅÅÆÆÆÆÇÇÇÇÈÈÈÈÈÉÉÉÉÉÉÊÊÊÊÊÊÊÊËËËËËËËËËËËËËËËËËËËËËËËËÊÊÊÊÊÊÊÊÉÉÉÉÉÉÈÈÈÈÈÇÇÇÇÆÆÆÆÆÅÅÅÄÄÄÃÃÃÂÂÂÁÁÁÀÀÀ¿»Ì]Ñ¿ÃÄÄÄÄÅÅÅÆÆÆÆÇÇÇÇÈÈÈÈÉÉÉÉÉÉÊÊÊÊÊÊËËËËËËËËËËËËËËÌÌÌÌÌÌËËÌËËËËËËËËËËÊÊÊÊÊÊÊÉÉÉÉÉÈÈÈÈÈÇÇÇÇÆÆÆÅÅÅÅÄÄÄÃÃÃÂÂÂÁÁÁÀÀÀ¼ËO%ÂÄÂÄÄÄÄÅÅÅÆÆÆÆÇÇÇÈÈÈÈÉÉÉÉÉÊÊÊÊÊÊËËËËËËËËÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌËËËËËËËËÊÊÊÊÊÊÉÉÉÉÉÈÈÈÈÈÇÇÇÆÆÆÆÅÅÅÄÄÄÃÃÃÂÂÂÁÁÁÀ¿Â¸“ÍÀÃÄÄÄÅÅÅÆÆÆÆÇÇÇÈÈÈÈÉÉÉÉÉÊÊÊÊÊËËËËËËÌÌÌÌÌÌÌÌÌÌÌÍÍÍÍÍÍÍÍÍÍÌÍÍÌÌÌÌÌÌÌÌÌËËËËËËËÊÊÊÊÊÉÉÉÉÉÈÈÈÈÇÇÇÇÆÆÆÅÅÅÄÄÄÃÃÃÂÂÂÁÁÁ½Ì…HÎÀÃÄÄÄÅÅÅÆÆÆÆÇÇÇÈÈÈÉÉÉÉÉÊÊÊÊÊËËËËËÌÌÌÌÌÌÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÌÌÌÌÌÌËËËËËËÊÊÊÊÊÉÉÉÉÈÈÈÈÇÇÇÆÆÆÆÅÅÅÄÄÄÃÃÃÂÂÁÁÁ¾È9§ÊÁÄÄÄÅÅÅÆÆÆÆÇÇÇÈÈÈÉÉÉÉÉÊÊÊÊËËËËËÌÌÌÌÌÌÍÍÍÍÍÍÍÍÍÍÍÍÎÎÎÎÎÎÎÎÎÎÍÎÎÍÍÍÍÍÍÍÍÍÌÌÌÌÌÌËËËËËÊÊÊÊÉÉÉÉÈÈÈÈÇÇÇÆÆÆÆÅÅÅÄÄÄÃÃÂÂÂÁ¿ÉšQÏÀÃÄÄÄÅÅÅÆÆÆÇÇÇÈÈÈÉÉÉÉÊÊÊÊËËËËËÌÌÌÌÌÍÍÍÍÍÍÍÍÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÍÍÍÍÍÍÍÍÌÌÌÌÌËËËËËÊÊÊÊÉÉÉÉÈÈÈÇÇÇÆÆÆÅÅÅÄÄÄÃÃÿÌB¤ÊÁÄÄÄÅÅÅÆÆÆÇÇÇÈÈÈÉÉÉÉÊÊÊÊËËËËÌÌÌÌÌÍÍÍÍÍÍÎÎÎÎÎÎÎÎÎÎÏÏÏÏÏÏÏÏÏÏÏÏÎÏÏÎÎÎÎÎÎÎÎÍÍÍÍÍÍÍÍÌÌÌÌËËËËÊÊÊÊÊÉÉÉÈÈÈÇÇÇÆÆÆÅÅÅÄÄÄÃÃÃÂÀʘ@ÍÁÃÄÄÅÅÅÆÆÆÇÇÇÈÈÈÉÉÉÉÊÊÊÊËËËÌÌÌÌÌÍÍÍÍÍÍÎÎÎÎÎÎÎÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÎÎÎÎÎÎÎÍÍÍÍÍÍÌÌÌÌËËËËÊÊÊÉÉÉÉÈÈÈÇÇÇÆÆÆÅÅÅÄÄÄÃÃÂÀÈ4‹ÎÁÄÄÄÅÅÅÆÆÇÇÇÈÈÈÉÉÉÉÊÊÊËËËËÌÌÌÌÍÍÍÍÍÎÎÎÎÎÎÏÏÏÏÏÏÏÏÏÏÏÐÐÐÐÐÐÐÐÐÐÐÐÏÐÏÏÏÏÏÏÏÏÏÏÎÎÎÎÎÍÍÍÍÍÌÌÌÌËËËËÊÊÊÊÉÉÉÈÈÈÇÇÇÆÆÆÅÅÅÄÄÃÃÀÎ}¿ÄÃÄÄÅÅÅÆÆÆÇÇÈÈÈÉÉÉÉÊÊÊËËËËÌÌÌÌÍÍÍÍÎÎÎÎÎÏÏÏÏÏÏÏÏÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÏÏÏÏÏÏÏÏÎÎÎÎÎÍÍÍÍÍÌÌÌÌËËËÊÊÊÊÉÉÉÈÈÈÇÇÇÆÆÆÅÅÄÄÄÂÆ·UÐÀÄÄÄÅÅÆÆÆÇÇÇÈÈÈÉÉÉÊÊÊËËËËÌÌÌÍÍÍÍÍÎÎÎÎÏÏÏÏÏÏÐÐÐÐÐÐÐÐÐÐÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÑÐÐÐÐÐÐÐÐÏÏÏÏÏÏÏÎÎÎÎÍÍÍÍÌÌÌÌËËËÊÊÊÊÉÉÉÈÈÈÇÇÇÆÆÅÅÅÄÄÁÏHÍÁÄÄÅÅÅÆÆÆÇÇÈÈÈÉÉÉÊÊÊËËËËÌÌÌÍÍÍÍÎÎÎÎÏÏÏÏÏÏÐÐÐÐÐÐÐÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÐÐÐÏÏÏÏÏÏÎÎÎÎÍÍÍÍÌÌÌËËËÊÊÊÊÉÉÉÈÈÇÇÇÆÆÆÅÅÄÁЂ¸ÆÃÄÄÅÅÆÆÆÇÇÇÈÈÉÉÉÊÊÊËËËËÌÌÌÍÍÍÍÎÎÎÎÏÏÏÏÏÐÐÐÐÐÐÑÑÑÑÑÑÑÑÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÐÏÏÏÏÏÎÎÎÎÍÍÍÍÌÌÌËËËÊÊÊÉÉÉÈÈÈÇÇÇÆÆÆÅÄɰ7ÍÁÄÄÅÅÅÆÆÇÇÇÈÈÈÉÉÉÊÊÊËËËÌÌÌÍÍÍÍÎÎÎÏÏÏÏÏÐÐÐÐÐÑÑÑÑÑÑÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÑÑÑÑÑÑÑÐÐÐÐÐÏÏÏÏÏÎÎÎÍÍÍÍÌÌÌËËËÊÊÊÉÉÉÈÈÈÇÇÇÆÆÅÄÊ*`ÒÀÄÄÅÅÆÆÆÇÇÈÈÈÉÉÉÊÊÊËËËÌÌÌÍÍÍÎÎÎÎÏÏÏÏÐÐÐÐÐÑÑÑÑÑÑÒÒÒÒÒÒÒÒÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÒÒÒÒÒÒÒÒÑÑÑÑÑÑÐÐÐÐÐÏÏÏÏÎÎÎÎÍÍÍÌÌÌËËËÊÊÊÉÉÉÈÈÈÇÇÆÆÃÓS„ÏÁÄÄÅÅÆÆÇÇÇÈÈÈÉÉÊÊÊËËËÌÌÌÍÍÍÎÎÎÏÏÏÏÏÐÐÐÐÑÑÑÑÑÒÒÒÒÒÒÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÒÒÒÒÒÒÑÑÑÑÑÐÐÐÐÐÏÏÏÎÎÎÎÍÍÍÌÌÌËËËÊÊÊÉÉÉÈÈÇÇÇÃÔy ËÂÄÅÅÆÆÆÇÇÈÈÈÉÉÉÊÊËËËÌÌÌÍÍÍÍÎÎÏÏÏÏÏÐÐÐÐÑÑÑÑÒÒÒÒÒÓÓÓÓÓÓÓÓÓÓÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÓÓÓÓÓÓÓÓÓÓÒÒÒÒÒÑÑÑÑÑÐÐÐÐÏÏÏÎÎÎÎÍÍÍÌÌÌËËËÊÊÉÉÉÈÈÈÇÅЗ³ÈÃÄÅÅÆÆÆÇÇÈÈÉÉÉÊÊÊËËËÌÌÌÍÍÍÎÎÏÏÏÏÐÐÐÐÑÑÑÑÒÒÒÒÒÓÓÓÓÓÓÓÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÔÓÓÓÓÓÓÓÒÒÒÒÒÑÑÑÑÐÐÐÐÏÏÏÎÎÎÎÍÍÍÌÌÌËËÊÊÊÉÉÉÈÈÆÍ­"¾ÅÄÄÅÅÆÆÇÇÇÈÈÉÉÉÊÊËËËÌÌÌÍÍÍÎÎÎÏÏÏÐÐÐÐÑÑÑÑÒÒÒÒÓÓÓÓÓÓÔÔÔÔÔÔÔÔÔÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÔÔÔÔÔÔÔÔÔÓÓÓÓÓÓÒÒÒÒÒÑÑÑÑÐÐÐÏÏÏÏÎÎÎÍÍÍÌÌËËËÊÊÊÉÉÈÇ˼0ÆÄÄÅÅÆÆÆÇÇÈÈÈÉÉÊÊÊËËÌÌÌÍÍÍÎÎÎÏÏÏÐÐÐÐÑÑÑÑÒÒÒÓÓÓÓÓÓÔÔÔÔÔÔÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÔÔÔÔÔÔÔÓÓÓÓÓÒÒÒÒÑÑÑÑÐÐÐÏÏÏÎÎÎÍÍÍÌÌÌËËËÊÊÉÉÈÉÄ%=ÊÃÄÅÅÆÆÆÇÇÈÈÉÉÉÊÊËËËÌÌÌÍÍÎÎÎÏÏÏÐÐÐÐÑÑÑÒÒÒÒÓÓÓÓÓÔÔÔÔÔÕÕÕÕÕÕÕÕÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÕÕÕÕÕÕÕÔÔÔÔÔÔÓÓÓÓÓÒÒÒÑÑÑÑÐÐÐÏÏÏÎÎÎÍÍÍÌÌÌËËÊÊÊÉÉË1CÊÃÄÅÅÆÆÇÇÇÈÈÉÉÊÊÊËËÌÌÌÍÍÍÎÎÏÏÏÏÐÐÐÑÑÑÒÒÒÓÓÓÓÓÔÔÔÔÔÕÕÕÕÕÕÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÕÕÕÕÕÕÔÔÔÔÔÓÓÓÓÒÒÒÒÑÑÑÐÐÐÏÏÏÎÎÎÍÍÍÌÌËËËÊÊÉÎ7HËÂÄÅÅÆÆÇÇÈÈÈÉÉÊÊËËËÌÌÍÍÍÎÎÎÏÏÏÐÐÐÑÑÑÒÒÒÓÓÓÓÓÔÔÔÔÕÕÕÕÕÖÖÖÖÖÖÖÖ×××××××××××××××××ÖÖÖÖÖÖÖÖÖÕÕÕÕÕÔÔÔÔÔÓÓÓÒÒÒÒÑÑÑÐÐÐÏÏÏÎÎÎÍÍÌÌÌËËÊÉÐIÌÃÅÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÍÏËàÿþÿÿþÿâÏÓÒÓÓÓÔÔÔÕÕÖÖÖÖרÔêÿþÿÿÿÿã×ÚÙÚÚÚÚÚÚÚÛ×îÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþÿÿÿþñÝÔ××ÖÖÖÕÕÕÔÔÔÓÓÓÒÒÒÑÑÐÐÐÏÏÍÔ>IÌÃÅÆÆÇÇÈÈÈÉÉÊÊËËÌÌÍÍÎÎÏÍñÿþÿÿÿúÕÑÓÓÓÔÔÔÕÕÕÖÖÖ××ÖÝýÿÿÿþÿð×ÚÚÚÚÚÚÚÚÛÛÜØîÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþÿÿÿÿÿþÿÿþë×ÖØ×ÖÖÖÕÕÕÔÔÔÓÓÓÒÒÑÑÑÐÐÏÎÕ>IÌÃÅÆÆÇÇÈÈÉÉÊÊÊËËÌÌÍÍÎÎÏÍÖýÿÿÿþÿìÐÔÓÔÔÔÕÕÕÖÖÖ×××ÖóÿÿÿÿÿüÜÙÚÚÚÚÚÛÛÛÛÛÜØîÿþÿÿÿþýýýýýýýýýþÿÿÿÿÿÿÿÿÿÿÿþÿÿöÛÖØ××ÖÖÖÕÕÕÔÔÔÓÓÒÒÒÑÑÑÐÏÕ>IÌÃÅÆÆÇÇÈÈÉÉÊÊËËËÌÌÍÍÎÎÏÐÌçÿþÿÿÿÿÝÑÔÔÔÕÕÕÖÖÖ×רÕåÿÿÿÿÿÿèØÛÚÚÛÛÛÛÛÛÜÜÝÚïÿþÿÿÿõÜÞÞÞÞÞÞÞÞàâåêñùÿÿÿÿÿÿÿÿþÿúÜÖØ×××ÖÖÖÕÕÕÔÔÓÓÓÒÒÑÑÑÏÖ>IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÌÍÍÎÎÏÏÏÑ÷ÿÿÿÿÿõÓÔÔÔÕÕÖÖÖ××××ÚúÿÿÿÿÿöÙÚÚÛÛÛÛÛÜÜÜÜÜÝÚïÿþÿÿÿõÚÜÜÜÜÜÜÛÛÛÛÚÙÙÛâîüÿÿÿÿÿÿþÿùÛר××××ÖÖÖÕÕÔÔÔÓÓÒÒÒÑÐ×>IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÍÎÎÏÏÑÍÞÿþÿÿþÿçÑÕÕÕÕÖÖÖ×רÕîÿþÿÿÿþáØÛÛÛÛÛÜÜÜÜÜÜÝÞÛïÿþÿÿÿõÛÝÝÝÝÝÝÝÝÝÝÝÝÝÜÚÙÝîþÿÿÿÿÿþÿôØØØØ×××ÖÖÖÕÕÕÔÔÔÓÓÒÒÐ×?IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎÎÏÏÐÑÎîÿþÿÿÿüÙÓÕÕÖÖÖ×רÖàÿÿÿÿÿÿîØÜÛÛÛÜÜÜÜÜÝÝÝÝÞÛïÿþÿÿÿõÛÝÝÝÞÞÝÝÝÝÝÝÝÝÝÝÝÜÙãúÿÿÿÿÿþÿê×ÚØØØ×××ÖÖÖÕÕÕÔÔÓÓÓÑØ?IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎÏÏÏÐÑÐÕüÿÿÿþÿðÓÕÖÖÖ××ר×öÿÿÿÿÿúÜÚÛÛÛÜÜÜÜÝÝÝÝÝÝÝÛðÿþÿÿÿõÜÞÞÞÞÞÞÞÞÞÞÞÝÝÝÝÝÝÝÚßùÿÿÿÿÿÿýÞØÙÙØØØ×××ÖÖÖÕÕÔÔÔÓÒÙ?IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎÏÏÐÐÐÒÎåÿþÿÿÿÿáÒ×ÖÖ×רÕèÿþÿÿÿÿæÙÜÛÜÜÜÜÝÝÝÝÝÝÞÞßÜðÿþÿÿÿöÝßßßÞÞßÞÞÞÞÞÞÞÞÞÝÝÝÝÛàüÿÿÿÿþÿïØÚÙÙÙØØØ×××ÖÖÕÕÕÔÔÒÙ@IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎÏÏÐÐÑÑÒÑõÿÿÿÿÿøÖÖÖ××××ÜüÿÿÿÿÿóÙÛÛÜÜÜÜÝÝÝÝÝÞÞÞÞÞÜðÿþÿÿÿöÝßßßßßßßßßßßßÞÞÞÞÞÞÝÞÛèÿÿÿÿÿÿýÞÙÚÚÙÙÙØØØ××ÖÖÖÕÕÔÓÚ@IÌÃÅÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎÏÏÐÐÑÑÒÐÜÿÿÿÿþÿëÓ××רÖñÿþÿÿÿýßÚÛÜÜÜÝÝÝÝÝÞÞÞÞÞßßÝðÿþÿÿÿöÞàààààßààßßßßßßßßÞÞÞÞÞÜõÿÿÿÿþÿëÙÛÚÚÚÙÙÙØØ×××ÖÖÕÕÓÚ@IÌÃÅÆÆÇÇÈÈÉÉÊËËËÌÍÍÍÎÎÏÏÐÐÑÑÒÓÐìÿþÿÿÿþÝÕרÖãÿÿÿÿÿÿëØÜÜÜÜÝÝÝÝÝÞÞÞÞßßßàÝðÿþÿÿÿöÞàààààààààààààßßßßßßÞÞÜæÿÿÿÿÿÿöÛÛÛÛÚÚÚÙÙØØØ××ÖÖÖÔÜ@IÌÃÅÆÆÇÇÈÈÉÊÊÊËËÌÍÍÍÎÏÏÏÐÐÑÑÒÒÒÕúÿÿÿÿÿôÕרÙùÿÿÿÿÿ÷ÛÛÜÜÜÝÝÝÝÞÞÞÞßßßßßàÞðÿþÿÿÿößáááááááàáààààààààßßßßßÞøÿÿÿÿÿþàÛÜÛÛÚÚÚÙÙÙØØ×××ÖÕÜ@IÌÃÅÆÆÇÇÈÈÉÊÊÊËËÌÍÍÍÎÏÏÏÐÐÑÑÒÒÔÑãÿÿÿÿÿÿæÕÖìÿþÿÿÿÿäÙÜÜÜÝÝÝÝÞÞÞÞßßßßàààÞðÿþÿÿÿößáááááááááááááàààààààßßÝîÿÿÿÿÿÿèÚÜÜÛÛÛÚÚÚÙÙØØØ××ÕÝ@IÌÃÅÆÆÇÇÈÈÉÉÊËËËÌÌÍÎÎÏÏÐÐÑÑÒÒÓÓÔÒòÿþÿÿÿûÙÞþÿÿÿÿÿðÙÜÜÜÜÝÝÝÞÞÞÞßßßßààààßñÿÿÿÿÿöàââââââââááâááááááàààààÞæÿÿÿÿþÿðÛÝÜÜÜÛÛÛÚÚÙÙÙØØ×ÖÝ@IÌÃÅÆÆÇÇÈÈÉÉÊËËËÌÍÍÎÎÏÏÐÐÑÑÒÒÓÓÔÓÛþÿÿÿÿÿïóÿÿÿÿÿüÞÚÜÜÜÝÝÝÞÞÞÞßßßààààáâßñÿÿÿÿÿ÷áââââââââââââââáááááááààâüÿÿÿÿÿöÜÝÝÝÜÜÜÛÛÚÚÚÙÙÙØ×ÞAIÌÃÅÆÆÇÇÈÈÉÉÊËËËÌÍÍÎÎÏÏÐÐÑÑÒÒÓÓÔÕÒêÿþÿÿÿÿÿÿÿÿÿÿèÙÜÜÜÝÝÝÞÞÞÞßßßààààáááßñÿÿÿÿÿ÷àããããããããããããââââââáááááàøÿÿÿÿÿúßÞÞÝÝÝÜÜÜÛÛÚÚÚÙÙ×ßAIÌÃÅÅÆÇÇÈÈÉÉÊËËËÌÌÍÎÎÏÏÐÐÑÑÒÒÓÓÔÔÕÖøÿÿÿÿÿÿÿÿÿÿõÚÛÜÜÜÝÝÝÞÞÞßßßààààáááâàñÿÿÿÿÿ÷âãããããããããããããããããââââââßóÿÿÿÿÿýâÞÞÞÞÝÝÝÜÜÛÛÛÚÚÙØßAIËÃÅÅÆÇÇÈÈÉÉÊÊËÌÌÌÍÎÎÏÏÐÐÑÑÒÒÓÓÔÔÖÓáÿÿÿÿÿÿÿÿÿþáÚÜÜÜÝÝÝÞÞÞßßßàààááááââàñÿÿÿÿÿ÷âãääääääääääãããããããããâââàðÿÿÿÿÿþäÞßßÞÞÝÝÝÜÜÜÛÛÚÚØàAIËÃÅÅÆÆÇÈÈÉÉÊÊËÌÌÌÍÎÎÏÏÐÐÑÑÒÒÓÓÔÔÕÖÔðÿþÿÿÿÿÿÿíØÛÜÜÜÝÝÝÞÞßßßàààááááâââàòÿÿÿÿÿ÷ãäääääääääääääääääããããããàîÿÿÿÿÿÿæßàßßÞÞÞÝÝÝÜÜÛÛÛÙáAIËÃÅÅÆÇÇÇÈÉÉÊÊËËÌÍÍÎÎÏÏÐÐÑÑÒÒÓÓÔÔÕÕÕÚþÿÿÿÿÿÿùÛÛÛÜÜÝÝÝÞÞÞßßàààááááâââãáòÿÿÿÿÿ÷ãäääååååååååååäääääääãããáíÿÿÿÿÿÿèßààßßßÞÞÞÝÝÜÜÜÛÚáAIËÂÅÅÆÆÇÈÈÉÉÊÊËËÌÍÍÍÎÏÏÐÐÑÑÒÒÓÓÔÔÕÖÔãÿÿÿÿÿþÿëØÜÛÜÜÝÝÝÞÞßßßàààáááâââãäáòÿÿÿÿÿ÷äååååååååååååååååååäääääâìÿÿÿÿÿÿéßáàààßßßÞÞÝÝÝÜÜÚâBIËÂÅÅÆÆÇÇÈÈÉÊÊËËÌÌÍÍÎÏÏÐÐÑÑÒÒÓÓÔÔÕÕØúÿÿÿÿÿÿÿûÝÚÜÜÜÝÝÞÞßßßàààáááâââãããâóÿÿÿÿÿ÷äåååæææææææææææåååååååääâíÿÿÿÿÿÿêàáááàààßßÞÞÞÝÝÜÛâBIËÂÄÅÆÆÇÇÈÈÉÊÊËËÌÌÍÎÎÎÏÐÐÑÑÒÒÓÓÔÔÖÓíÿþÿÿÿÿÿÿÿïÙÜÜÝÝÝÞÞßßßààáááâââãããäâòÿÿÿÿÿ÷äæææææææææææææææææææååååãíÿÿÿÿÿÿêáââáááààßßßÞÞÝÝÛãBIËÂÄÅÅÆÇÇÈÈÉÉÊËËÌÌÍÍÎÏÏÐÐÑÑÒÒÓÓÔÕÓÞÿÿÿÿÿÿÿÿÿÿÿâÚÜÝÝÞÞÞßßàààáááââãããääâòÿÿÿÿÿøåææææçççççççççççææææææææãïÿÿÿÿÿÿêâãâââááàààßßÞÞÞÜäBIËÂÄÅÆÆÇÇÈÈÉÊÊÊËÌÌÍÍÎÏÏÐÐÑÑÒÒÓÓÔÔÔöÿÿÿÿÿÿÿÿÿÿÿöÛÜÝÝÞÞßßßààáááâââããäääâóÿÿÿÿÿøåççççççççççççççççççççæææäñÿÿÿÿÿÿéããããââáááàààßßÞÝäCIËÂÄÅÅÆÆÇÈÈÉÉÊÊËÌÌÍÍÎÎÏÏÐÑÑÒÒÓÓÕÑæÿþÿÿÿþñÿÿÿÿÿÿêÚÞÝÞÞßßàààááâââãããäääãóÿÿÿÿÿøæççççççèèèèèèèèèèçççççççåóÿÿÿÿÿþèãäãããâââááàààßßÝåCIÊÂÄÅÅÆÆÇÈÈÉÉÊÊËËÌÍÍÎÎÏÐÐÐÑÒÒÓÔÓØüÿÿÿþÿñÕõÿÿÿÿÿüßÜÝÞÞßßààáááââãããäääåãóÿÿÿÿÿøæççèèèèèèèèèèèèèèèèèèèççåöÿÿÿÿÿýçååääãããâââááààßÞæCIÊÂÄÄÅÆÆÇÇÈÈÉÊÊËÌÌÌÍÎÎÏÏÐÐÑÒÒÓÔÒïÿþÿÿÿüÜÖàþÿÿÿÿÿñÛÞÞÞßßààáááââããäääååãóÿÿÿÿÿøæèèèèèèééééééééééééèèèèèçúÿÿÿÿÿûæåååäääãããââááààÞæCHÊÂÄÄÅÅÆÇÇÈÈÉÊÊËËÌÍÍÎÎÏÏÐÑÑÑÒÓÑàÿÿÿÿþÿèÕÚÖíÿþÿÿÿÿåÜÞÞßßààááââãããäääååäôÿÿÿÿÿøçèèèéééééééééééééééééééèêýÿÿÿÿÿøåææåååäääããââáááßçCHÊÁÄÄÅÅÆÇÇÈÈÉÉÊËËÌÌÍÍÎÏÏÐÐÑÒÒÒÔøÿÿÿÿÿöרÙÙÛúÿÿÿÿÿøÝÞßßàààááââãããääååæäóÿÿÿÿÿøçèééééééêêêêêêêêêêêêéééèîÿÿÿÿÿÿóåçæææåååääãããââáàçCHÊÁÃÄÅÅÆÇÇÈÈÉÉÊÊËÌÌÍÍÎÎÏÐÐÑÑÓÐéÿþÿÿÿÿàÖØØÚ׿ÿÿÿÿÿÿìÜßßààáááââããäääååæäóÿÿÿÿÿøçéééééêêêêêêêêêêêêêêêêêèôÿÿÿÿÿÿïæçççæææååäääããââàèDHÊÁÃÄÄÅÆÆÇÈÈÉÉÊÊËÌÌÍÍÎÏÏÐÐÑÒÐÙýÿÿÿþÿîÔØØØÙÚØóÿÿÿÿÿýáÞßààááâââããääåååæäóÿÿÿÿÿùèéééêêêêêëëëëëëëëëëëëëëêüÿÿÿÿÿþëçèèççæææåååääããâáèDHÉÁÃÄÄÅÅÆÇÇÈÈÉÊÊËÌÌÍÍÎÎÏÏÐÑÒÐòÿþÿÿÿúØÖØØÙÙÚÙßýÿÿÿÿÿóÝßààááââãããääååææåôÿÿÿÿÿùèéêêêêêëëëëëëëëëëëëëëëêñÿÿÿÿÿÿùèééèèçççæææååäääãáéDHÉÁÃÄÄÅÅÆÇÇÈÈÉÊÊËËÌÍÍÎÎÏÏÐÑÎâÿþÿÿÿÿäÔØ×ØÙÙÙÛØìÿÿÿÿÿÿçÝààááââããäääååææåôÿÿÿÿÿùèêêêêëëëëëììììììììììììëúÿÿÿÿÿÿòèêééèèèçççææåååääâêDHÉÁÃÄÄÅÅÆÇÇÈÈÉÊÊËËÌÌÍÍÎÏÏÐÐÔúÿÿÿÿÿóÔÖ×רØÙÚÚÛÛøÿÿÿÿÿùßààááââããääååææçåôÿÿÿÿÿùéêêêëëëëììììììììííìììëôÿÿÿÿÿÿýìêêêéééèèèççæææååäãêDHÉÀÃÃÄÅÅÆÆÇÈÈÉÉÊÊËÌÌÍÍÎÎÏÑÍëÿþÿÿÿþÜÔÖ×רØÙÚÚÛÙåÿÿÿÿÿÿîÝáááââããääååææçåôÿÿÿÿÿùéêëëëëììììììííííííííìðþÿÿÿÿÿÿõêëëêêêéééèèçççææååãëDHÉÀÂÃÄÄÅÅÆÇÇÈÈÉÊÊËËÌÍÍÎÏÐÍÚÿÿÿÿþÿêÒÖÖ×רØÙÙÚÚÛÚòÿÿÿÿÿýäßááââããääååææçåôÿÿÿÿÿùéëëëìììììííííííííîîìïýÿÿÿÿÿÿýíììëëëêêêééèèèçççæåäëDHÈÀÂÃÄÄÅÅÆÆÇÈÈÉÉÊËËÌÍÍÎÎÏÏõÿÿÿÿÿøÕÔÕÖÖרØÙÙÚÚÛÚàýÿÿÿÿÿõßáââãããääååææçåôÿÿÿÿÿùéëëëììììííííîîîîîîíóþÿÿÿÿÿÿÿôìíìììëëëêêêééèèççææäìEHÈÀÂÃÃÄÄÅÆÆÇÇÈÉÉÊÊËÌÌÍÍÏËäÿþÿÿÿÿàÑÕÕÖÖרØÙÙÚÚÛÜÚëÿÿÿÿÿÿêßââãããääååææçæôÿÿÿÿÿùêëëìììííííîîîîîííðøÿÿÿÿÿÿÿÿùíííííìììëëêêêééèèèççåíEHÈÀÂÂÃÄÄÅÅÆÇÇÈÈÉÊÊËÌÌÍÎÍÔüÿÿÿþÿðÑÔÕÕÖÖ×רØÙÚÚÛÛÜÜøÿÿÿÿÿúááââããääååæççæôÿÿÿÿÿùéêìëëìíìíííííîðóùþÿÿÿÿÿÿÿÿûîîîîíííìììëëëêêêééèèçæíEHÈÀÂÂÃÃÄÅÅÆÆÇÈÈÉÊÊËËÌÍÎËîÿþÿÿÿüØÒÔÔÕÕÖ×רÙÙÚÚÛÛÜÛåÿÿÿÿÿÿðßââããäååææççæôÿÿÿÿÿúìîîîïïïððñòô÷úýÿÿÿÿÿÿÿÿÿÿüðîïîîîîíííìììëëëêêééèèæîEGÇ¿ÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÍÊÜÿþÿÿþÿæÏÔÔÔÕÕÖ×רØÙÙÚÛÛÜÝÛñÿÿÿÿÿþæáãããäååææççæôÿÿÿÿÿÿþþþþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúðïðïïïïîîîíííìììëëêêéééçîDBÇ¿ÁÂÃÃÄÄÅÅÆÇÇÈÉÉÊÊËÌÌÎ÷ÿÿÿÿÿõÑÒÓÔÔÕÕÖ×רØÙÙÚÛÛÜÜÜàüÿÿÿÿÿöàãããäååææççæôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþöïððððððïïïîîîíííììëëëêêéèî?:Æ¿ÁÂÂÃÄÄÅÅÆÆÇÈÈÉÊÊËÌÈæÿþÿÿÿÿÜÏÓÓÓÔÔÕÖÖרØÙÙÚÚÛÛÜÝÛëÿÿÿÿÿÿìàããäååææççæôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþøòðññññðððððïïïîîîííìììëëêêéë8.ÁÀÁÂÂÃÃÄÄÅÆÆÇÇÈÉÊÊËÉÓýþþþýÿìÎÒÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÝÝ÷ÿþþþÿûãâãääåææççæôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿü÷òñòòòòñññññððððïïïîîíííììëëêìä*ºÂÀÁÂÃÃÄÄÅÅÆÇÇÈÉÉÊÊËóÿþÿÿÿûÓÐÑÒÒÓÔÔÕÕÖ×רØÙÙÚÛÛÜÜÝÜäÿÿÿÿÿÿóâäääåææççæôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþüù÷ôññòòòòòòòòòòññññðððïïîîîííììëêîܮĿÁÁÂÃÄÄÅÅÆÆÇÈÈÉÊÉÑçåæææéÜÎÑÑÑÒÓÓÔÔÕÖÖרØÙÙÚÚÛÜÜÝÞÝêðïïðððäãääååæçççîõôõõõõõõöööö÷÷ööõôóòñññòòòòóóóóóóòòòòòñññðððïïïîîííììêó˛ȾÁÁÂÂÃÄÅÅÆÆÇÇÈÉÉÊÊÇÈÉÉÊÊÍÐÐÑÑÒÒÓÔÔÕÖÖ×רÙÙÚÚÛÜÜÝÝÞÝÝÞÞßßàããääååæççèçççèèéêëëììííîîîïïðññòòòòóóóóóóóóóóóóóòòòñññðððïïîîîííêø±̽ÁÁÂÂÃÃÄÅÆÆÇÇÈÈÉÊËÌÍÍÎÏÏÏÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÝÞßààáââââãääååææçèèééêêëëììííîîïïðððññòòòòóóóóóóôôôôóóóóóóòòòñññðððïïîîíéýZͽÀÁÂÂÃÃÄÄÅÆÆÇÈÈÉÉÊËËÌÍÍÎÎÏÐÐÑÑÒÓÓÔÕÕÖ×רØÙÚÚÛÛÜÝÝÞÞßààááââããäååææçèèééêêëëììííîîïïððñññòòòóóóóôôôôôôôôôôôóóóóòòòñññððïïîîêý`1ǾÀÀÁÂÃÃÄÄÅÅÆÇÇÈÉÉÊÊËÌÌÍÎÎÏÐÐÑÑÒÒÓÔÔÕÖÖרØÙÙÚÛÛÜÜÝÝÞßßààáââãääååææççèééêêëëììíîîîïïððññòòòóóóôôôôôôõõõõôôôôôôóóóòòñññððïïîíò/±Ã¿ÀÁÁÂÃÄÄÅÅÆÆÇÈÈÉÊÊËËÌÍÍÎÏÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÛÜÝÝÞßßààááâããääåææççèèéêêëëììíîîîïïððññòòóóóôôôôõõõõõõõõõõõôôôôóóóòòññððïíõчʽÀÁÁÂÂÃÄÄÅÆÆÇÇÈÉÊÊËËÌÍÍÎÎÏÐÐÑÒÒÓÓÔÔÕÖ×רØÙÚÚÛÛÜÜÝÞÞßßàááââãääååæççèèéêêëëììíîîîïïððññòòóóôôôôõõõõõööööõõõõõõôôôóóòòññððìþ™L˼ÀÀÁÂÂÃÃÄÅÅÆÇÇÈÈÉÊÊËÌÌÍÍÎÏÏÐÑÑÒÓÓÔÔÕÕÖ×רÙÙÚÛÛÜÜÝÞÞßßààáââããäååææçèèééêëëììííîïïïðññòòòóóôôôõõõöööööööööööõõõõôôóóóòòññíüQ·Á¿ÀÁÁÂÃÃÄÄÅÆÆÇÈÈÉÉÊËËÌÍÍÎÎÏÐÐÑÒÒÓÔÔÕÕÖ×רØÙÚÚÛÜÜÝÝÞßßààáââããäååææçèèééêëëììííîïïïðññòòóóóôôõõõööööö÷÷÷÷÷ööööõõõôôôóóòòðö܀ʼÀÁÁÂÂÃÄÄÅÆÆÇÇÈÉÉÊÊËÌÌÍÎÎÏÐÐÑÑÒÓÓÔÔÕÖÖ×רÙÚÚÛÛÜÜÝÞÞßßàááâããäååææçèèééêêëëìííîîïððññòòóóôôôõõöööö÷÷÷÷÷÷÷÷÷÷öööõõõôôóóòîÿ‘8ǽ¿ÀÁÂÂÃÃÄÄÅÆÇÇÈÈÉÊÊËÌÌÍÍÎÏÏÐÐÑÒÒÓÔÔÕÕÖ×רØÙÚÚÛÜÜÝÝÞßßààáââãääååæççèèéêêëëìííîîïðððñòòóóôôõõõööö÷÷÷÷øøøøø÷÷÷÷öööõõôôóóñ÷8™Ç½ÀÀÁÂÂÃÄÄÅÅÆÇÈÈÉÉÊÊËÌÍÍÎÎÏÐÐÑÒÒÓÓÔÔÕÖ×רØÙÚÚÛÛÜÝÝÞßßààááâããäååæççèèééêëëììíîîïïððñòòóóôôõõööö÷÷÷øøøøøøøøøø÷÷÷ööõõõôñÿ¶FɼÀÀÁÁÂÃÃÄÅÅÆÆÇÈÈÉÊÊËËÌÍÍÎÏÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÝÝÞÞßààááâããäååææçèèééêëëììííîïïððñòòóóôôõõöö÷÷÷øøøøùùùùùøøøø÷÷ööõõõòþIœÆ½ÀÀÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÍÍÎÎÏÐÐÑÑÒÓÔÔÕÕÖ×רØÙÚÚÛÜÜÝÞÞßßàááââãääåææççèèéêêëëìííîîïððñòòóóôôõõöö÷÷øøøùùùùùùùùùùøøø÷÷ööòÿ¹<ȽÀÀÁÁÂÃÃÄÅÅÆÆÇÈÈÉÊÊËËÌÍÎÎÏÏÐÑÑÒÓÓÔÔÕÖÖ×רÙÚÚÛÛÜÜÝÞßßààáââããäååæççèèééêëëìííîîïïðññòóóôôõõöö÷÷øøùùùùúúúúúùùùøøø÷÷öõû=†Ê¼ÀÀÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÌÍÎÎÏÐÐÑÑÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÝÞßßàááâããääååæçèèééêêëììíîîïïðññòòóóôõõöö÷÷øøùùùúúúúúúúúùùùøøøóÿœ¸Á¿ÀÁÁÂÃÃÄÅÅÆÆÇÈÈÉÊÊËÌÌÍÍÎÏÐÐÑÑÒÓÓÔÔÕÖÖ×רÙÚÚÛÛÜÝÝÞßßààááâããäååææçèééêêëëìííîïïððñòòóôôõõöö÷÷øøùùúúúûûûûûúúúùùøöüâN˼ÀÀÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÌÍÎÎÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÞÞßßàááââãäååææçèèéêêëëìííîïïððñòòóóôôõöö÷÷øøùùúúûûûûûûûûúúùùöÿV̼ÀÁÁÂÃÃÄÅÅÆÆÇÈÈÉÊÊËÌÌÍÍÎÏÐÐÑÑÒÒÓÔÕÕÖÖ×רÙÚÚÛÛÜÝÝÞÞßààáââããäååæççèèéêêëììííîïïðññòóóôôõõö÷÷øøùúúúûûûüüüüûûûúõÿ– ¤È½ÁÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÌÍÎÎÏÐÐÑÒÒÓÓÔÕÕÖ×רÙÙÚÚÛÜÜÝÞÞßààááâããäååææçèèééêëëìííîîïððñòòóôôõõö÷÷øøùúúúûûüüüüüüüû÷ÿÅ ·Ä¾ÁÁÂÃÃÄÅÅÆÆÇÈÈÉÊÊËÌÌÍÍÎÏÐÐÑÑÒÒÓÔÔÕÖÖ×רÙÚÚÛÛÜÝÝÞßßààáââããäåææççèééêëëìííîîïððññòóóôôõöö÷÷øùùúûûûüüýýýýüùÿâ 2Á¾ÁÂÃÃÄÄÅÆÆÇÈÈÉÊÊËËÌÍÍÎÎÏÐÐÑÑÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÞÞßààááâããääåææçèèéêêëëìííîïïðññòòóôôõõö÷÷øøùúúûûüýýýýýúÿð6;ÄÿÂÂÃÃÄÅÅÆÆÇÈÈÉÊÊËËÌÍÎÎÏÏÐÑÑÒÓÓÔÔÕÖÖ×רÙÚÚÛÛÜÝÝÞÞßààáââããäåææççèééêêëìííîîïïðññòóóôõõö÷÷øøùúúûûüýýþþûÿõA:žÂÂÃÄÄÅÅÆÇÈÈÉÉÊËËÌÍÍÎÎÏÐÐÑÑÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÝÞßßàááââãäååææçèèééêëëìííîïïðññòòóôôõõö÷÷øùùúúûüüýþúÿòA1¸Ê¾ÂÃÃÄÄÅÆÇÇÈÈÉÊÊËËÌÍÍÎÏÏÐÐÑÒÓÓÔÔÕÖÖרØÙÙÚÛÛÜÜÝÞßßààáââããäååæççèèéêëëììíîîïïðññòóóôôõö÷÷øøùúúûûüýùÿå6¢Ï¿ÁÃÄÄÅÅÆÇÇÈÉÉÊÊËÌÌÍÎÎÏÐÐÑÒÒÓÓÔÕÕÖÖרØÙÚÚÛÛÜÝÞÞßßàááâããääåææçèèéêêëëìííîîïððñòòóóôõöö÷÷øùùúúûúùÿÉ }ÎÅÀÃÄÄÅÆÆÇÈÈÉÉÊËÌÌÍÍÎÎÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÛÛÜÝÝÞÞßààááâããäååææçèééêêëììííîïïðññòòóôõõöö÷÷øùúú÷üÿ—J¹ÏÁÁÄÅÅÆÇÇÈÈÉÊËËÌÌÍÎÎÏÏÐÑÑÒÓÓÔÔÕÖ×רØÙÚÚÛÜÜÝÝÞßßààáââãääåææçèèééêëëìííîîïððñòòóóôõõöö÷øøöøÿçT€ÊÌÁÂÅÆÆÇÇÈÉÉÊËËÌÍÍÎÎÏÐÐÑÒÒÓÓÔÕÖÖ×רÙÙÚÛÛÜÜÝÞÞßààááâããääåæççèèéêêëëìííîïïðññòòóôôõöö÷ôöÿü›3šÍÎÃÃÅÆÇÈÉÉÊÊËÌÌÍÍÎÏÏÐÑÑÒÒÓÔÕÕÖÖרØÙÙÚÛÛÜÝÝÞÞßààáââããäååæççèèéêëëììíîîïððññòóóôôôòöÿþ¼8<•ËÒÉÄÄÆÈÉÉÊËËÌÍÍÎÎÏÐÐÑÑÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÜÝÝÞßßàááâããäååææççèéêêëëììíîîïððñòòñðñúÿùµD-z¸ÑÓÍÇÅÆÇÉÊËÌÍÍÎÏÏÐÐÑÒÒÓÔÔÕÕÖ×רÙÙÚÚÛÜÝÝÞÞßààáââããäååæççèèéêêëììíííîîíííñúÿþà2D‚°ÌÖ×ÔÐÍÌÌËÌÍÍÎÏÏÐÐÑÒÒÓÓÔÕÕÖ×רØÙÚÚÛÜÜÝÝÞßààááâããääååæçèèééêêëíïòöüÿÿöÒ›M )Ru˜°¿ÇÎÑÓÓÔÔÕÖ×רØÙÚÚÛÛÜÝÞÞßßàááâããäååæççèééêëëìííîïïððññòòïèàβŠ_.&28<<<<<<======>>>>>?????@@@@@@AAAAABBBBBBCCCCCCDDDDE@9+ic08â– jP ‡ ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cÿOÿQ2ÿd#Creator: JasPer Version 1.900.1ÿR ÿ\@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ áUÿ“ß‚áK®%ª°nÓ=t gì›r›9òÞ<UíÙ£W¡›gõèÖšùˆSžÌzƒ—ýxIh0圓‰ -é¦ÒX«ßøáK®%¼°ù”çÆÉ>¡˜`¯Lý-ô×#PMØÌ ñÇ|’­•^“7ŽãuÉeâyœõ6 !ñ`RÖëI‰÷ßøáK®%d¿ˆi¤]K—Iâ)¬\¤o…GJe×¥Pášl/Œù4lz;{‚ÌBÕ²Ýü*âeŒ#?ßø ;Ý96ÜœÍ~QßP–nÐ:ˆhnX$„c?Þ¹pwÇÏÀö~ø€½ÁåÐĉz®i=c¼b'ç÷¡µZZµèû‚þ \ßè°êQ‹SÅÌðð`òY‘Y5Fö÷éC-ÎÁúT#†Ð› 8iµîñ!2¼¹V阭m¥È"G´»_3jYfWÉ™åË8ö÷Š€\<”«.ó4– RÄ+Uü«Ùø¯>ï:ñ÷QbBÒâÒE¶ ÞmUºzSÑVŒ#CBc£G†P}üjJоM㨄£ ÏÀò~1ø E¹>àý@k¦¾7ö¡—Ƶœœu#»;¥–¡íê©~¼aÄÆfQµŠ!ìí_]ØççÇ÷gYT)Ô¸Eœ‡ñ(=PÇú«"pôW*‹’Ÿ+ ÐH—sÒP–(7…ϨOS—[{EyüFY9=óV¨ÒöËGP6P$!îÃyICÄ)³d lXš$ýÒå5ªwMeè‘Àj$eù]Hë/åÀKuÎKa‰gá"hÏÀî>Óxü@OˆÏÕ[왆!=ÁÌ"Í•ŠTCÅH±8Ô&cÝ뺛wqA<:±ÖÇV$G-c¡¸Ì#•²¼‡CŒîËášä€óÀµ²?:ñ¹BÁþÖ]³²jÙc‰2ê ~^J%7Skïª \Û³†k*þWHG=ä hAˆ\½úkF@Ö y­|ØôYQ…Zæ,™„÷#œlúk©ReeÊÞ.I ¯0‰‡Êã&˵€ÏÀÞ~Ñø4Å[z7”[Q †iŠÒ9uvbIà Nßœw•çw1‹ýË †²SßÇУéLÈïïcªÂé_C4ƒF>‡¿b%Ì [Pž‰¤c:­eYë>ަ„ªHÐgdÏLZ/QwÉ£UÎç‚ì \½íPæÆ°ÈíÂ_¦ ñ£B8·MþÞ¸åáfD‡Ðc]*i¯§š†ŠV?¯:Ï@aÍ23q8È!ËßϪŸ…W…L`xjùùëB«¬Ï©µâèsÖ,n'*TÜ÷“z<@§<ý¸ÚUÍ×ñ}N¢{B—Š!`¨Í©“nßnÙÓ–j'¾ö81?HÒs0õ5Ô+K¢'O­C ñFÚÚTï0]O:ÓaÛ—G‚…÷H1|§YGº‹ƒÀ«íLÿ4à{¦È·aø0ÁJºîäê¼k‡½ÇÀ’ýꓦ[«9˜Ø`aVu”`帰ßPùŒÈØÊÏXlÖEܨ ÛIÖ9mS¯FòtžÕyb¹¨­ôÁaƒÞXš¹­Õ¦1w£”_ýOJâ‘¶’kË|m†°êÑÃG(éâäÛðü8¶Úv¢x"B¢¤A–z ;ôÃ+[$‘+ÈLïY[­ˆÔ¥^ãÿP{¹U\œ†'z’9Š®IE¢-áPœîµY_?Ÿá`M‚jø~{k!•5ÐLŽ¥Dn âÆâŒÅ³zcÊºÛØÚ¥Jïªs¦á\99F€#ÿi8Úd¦ÊRŠÐª”ð(uñHã wÐSºmó±Ù¦îhÕUɶá*–ûO<^Ãc¬KË~–¾//„⨨'Ï«Ÿ…U…V`xjùùëB«¬Ï©µâèsÖ,n=¹éŒPÒ”¹ c™#K&äLÁ¸f¸Yž-A®>;äIR´={M "ºo+Ô<û«7’!ÌsJ •(6ެ-… UÜÀ 1FõWÝÇ#ê¸÷+@çñ•WôEÁä´¹ŸY®'ógNä¤wf“o^Ë,«äiÞ@ÙñÒlêR·‹ö¬ä§BÈÝpê—j]5/Ÿ»åøp2Í'ÇBԈ¸ Ö©„o5¿‘ç¤Z13¯’öÏ™©¾Î8¾oPœÌaÖ»ËÈ…;‹ŠëTHá*À3¡,ÖqÒ„‡¬µ¡ZD±S•œÇþé;𠵨B¯} aúH«PŽ„úagIM8ÈUCõ-ö‚_yÉ®®šç®& ÓÉK€ï\XÄ"EÝk™Hñ.ÃЉqje ߎg!H2xÖlãµEY[­ˆÔ¥^ãÿP{¹U\œ†'zYÁÁžˆÂ ¦n‘:gè°ŠêHmÅâʈÐrE5e<Ñ h(6ÒC[¦ÎïÀ„ƒÎ‡µoŠõ!“üPwHI?BGà‡A6~k±)n¥Ÿúʯ’TÑbÅÓFf­ÿS[¯ü³©ÏQ5¤(eÆØ%mV‹Ý¦R„ª˜Û4,?²U*FN·€¡Í>ÞD2ÕÑ[¨øϨŸ…O…N`«¢œ(æï+¶uÿD D:£©)‹. \áëe'™¡íÀüÃÉ%ðüu„9ãÒÚ0µ,‹RÎona­¦ñ VÚ~æ‡,¹E-øV!\ª¦è³Ayü%dÄ“*¨]»¥¸RìÙ0–ç¯áü,[ѹY¾…lËTù[ñI|p;˜¯`³ÐksKÛp –ÃŒÖVJ#ºŒj4þs ø3ÎéÝã•Lv¤ÖŸ»åøp2Îë)*ºÆA,SY‹¸VoŸ^BÈ ³‚Å—óÚSŸYŒs[<êžZúGZguöòªTdÉ["7ö°‰ê ö…©°hkMoXQivM¿¡m¦«KQ'œ‰¼ÓWþYÞoDS´×{Š.ŽÖ›5ë³U>Û®æöQVS=¤·ç»LîL¬ÁçQ:Tn°ê9,3¬"7µBÙÝã°÷z'çbÔf¨mxTK6$+{ðµíƒ62•R›X4™|§ÃIMs" ‹ÁÁM7âD’vˆ²=eì³V°± ¬–ØL{J&D–\P^±ŸŽ¨GEÌ+rûáÚ|lR᪸Z9—ÄéÛ‘.Þôä_‰Eÿ¨`ëkQ¥Q.ÈjË^P8ÓFt•7®hÿ@úå½gñè‡}qøš!ô}Ű»è àx)K¯Ðƒ×ž®»È©ÏÂ¥Ÿ…?…:bW^ì¤fwмñè*ܯ1°ãŠN``B8ÌZa¦°f_ŒGŽ÷A?}&ÜÔ…)˜«ªJ“ŸžeÖÁœÌ;9¶%øWÄ_%ΰAÁuhç­i#µ±špªi¦Á‘ƒ 0ÞJòµ÷yáõ1/uDyŽÍãXŸO‰rœk-¿þòQ¾UVxaáê©J!—]Öâ\ú¦+ÒLبªÔÜ£HàÓ? É˜ýdª†è4'­ˆš§–˜jSqÏ~'ar¦¤pÒÛ²”BõŽÑo†çѲ$Ç9Œ>Cêlz7û/˜WâØ_üëûyð•}ðTçÓ•ºÿq§ëÞåyæ‹Ìz(ìšoKiôúå~ÚÆ§8±¢Ú¹åeIWï"%J àKQô¼;·/œÄ-Mu—òtŸzHÊ_2WúýÞç³å»üúLDÓ»²‚Íž+“ÚußtÉ èUKêJ¾× =‰"Hû ©öti_Ùï&<Š^U)ҟЧ¶yò-Á€Œè±“.â:ÁªÊ-„“VwuN<<­yŸfEí·wŽÀwJR\± vî„Qsý@HÀ&¦½ó#†ü|â.´§lµÈh5Ö,üçnè~Ô?VÜàŠ8™ÏÃtçá¸Qøn¨Ü*½:óÿ[æ¶9éŒ;ü2LS„Þ!Rµâ£±¡ÅɺL–º!^hÿ°ÑÝ(ÛÀĈWºdé! 5§Vè4Ðk}ùûN9h›Ÿ…`TA¶ÇÛŽëÿc({ lX–}e»vàÄGV– ôJ8ÈŸ’“\ÞŠìö–Ák8I±J]OænýĬ¼IÒ£4ØŠ(yRS!ü: =„†Ø®Ãø¹«.kï…ýø¡ª@]´Éª Ä[Ža(Ý¥¯iü¡­”^D…ëµEdƒ*ÔWЭ À ñº a°;×ÁV™ìtÂSäç;ܶi¾ï"§"†4œ †!󟇽ÂáA›w»´¯—8Xô¡á{àD•Ý{Ò‹R`:{ÊhøÄV<ïßþƮۃOŸõ›öxáÊÓa=7rø]pt7Û·ÈšI¹&º“RM0“ÆÞù{äŸnPß•‘,*“±Æ;A¥0aÿ/·À¯òãµ,§[ùÛ’”ꪻ€Ì5ea8=[,Ò|6‘m »æœíñ“›¬÷y+AGˆõô¡5ZÜ·ó<,ª³ÀÖ®9u¬EÒɘA"휼C6uCñžÜ|Õ°×NŒ ¤u¢¾ø¯}؄ൊOD–ð]þJ†µ^ÛoV¨Í|“u6—:ÄÒ•Ù<®ÅÉ"d÷<ã9˸±+ëÓxUÿëhï—T»ÀW_bgÂ}i;oJçŸ?ÏõhN’;½  NЉ'øDø#ˆgp¹“màÙ{´5òôš¢ Hµw¼&3Òì§ýüÅr¯íŒ<È4‰!ˆ‹nîb oûÈÔsÙ³kÿƒâ.ŽŠYV†7+¾9éÝñ*áèýðA…4Ì—EbÞc MGÜå$Ç ùÖ(¢ÎþŒŸy?7±ß5q·ŽÀJy»dë +ŒœÉL^{Ã~=bD“R+7­àmwE/M¿DOh§l¼c݃„p$PçŸ=Ç&lé- UOuT£¹hÚ‡1ÇÓCþ¢C)Ó¿ÊØˆ±É Õ™·wt‹v’Iñ'Ó¾ñç÷aަR×Q꿾+‰1ÀjBvæ€lÃ*i5¾»Ÿ"ü¢À‘ÿ@öTç“ÇmÜJMuwÈvñ›ÏÖ2Æv1aß¹&¡*—êŽ!ùƈµªf<º ê ¢*m`ùè¡/¿õí]´ F¿ Û¹Ô ‡ìÅ6ó?¤L3+—Tá`+ƒÿQ™˜]?b¨tJØÞˆ’½ƒeåy:ìôƒyb¨³v®_¥Ÿ¹Úðî Áë„}rœ è1úàÚ/íÊ_M«2_s3¢»ÌpL€Ý-KCç÷|D,œkÁ»V …Šß`CñŸóаŸ ¹b¦gôÚ ¼v¬P!¹…Ý€Ñð8¸ÀPà´Í†Õ¥Ù_jËhÿ%å@y»Œ°~ÝÀ¥¡NfûjXq Ðβ›’ÄŠõ5§Â/9þ1#Õ“òW~Иê¡öHw Öé‹g-PJû=Yÿ]kð ×op¤ Ž1Ž6¹¤çKg­¿¹-ÀßXkuÚ¶³ Ñ1òk¹jàø¨ëÓöLæçÉ%êíÁêu¹Ë§–Úó²ŠúÆN ˜¦“ÔeÇ‘Ø<&…Íò,ô>’¾\€ÇZÿ@ÓÇÛº3ðÜxü7p‹ñ¨©VÙ5Ç¢ã5O3'b#˜ö·pâ!®CÉ÷ôyûÔQ ï™EµdØó@z/X• À§ñŸBý´”0[tÄt§C; [¬è¨Çuÿ׬N2#”‡¤ k"@èýSv«uÓ= þå ¤޾yç¼MÉç韇p¨½×G!üÐÒtêú ã™¼Æ XÕììA_Bà£Ã—S¢|_ß8‘ô¥lêëÝ.Ôm5õÌLÍž’Øcƒù%‰Lƒ@ÀK¾“ÌÒ »í3†&n¥v·`’þÙ€·Ãf Àä’"{³]~ÿJšÀäÃÈ,Hn©#=-ªêK<` #% ³@8ì½3´+6í‘÷›F¤_³yÜ)ºHW‘…ê€Ç|ATðÖ“èÊ—C£wCï~—ÒüÍ⪠G/—Z(·`,ŠêÕ´Æmå3áÖ ,ÄG¸(ý£ˆÖ܈G ¿fן&•tK«‘¡'Žê³û`ÝG@n ?8»‡|eÿB‚Z÷ît"-,êMY$­×Ô€ÏvJ¨,ca$Sphó QÇr”Xðûçt xX+¢‚žáw|8¨nXM¾Èu½ÐR  ë×Û·¨àÚ½ùÊ'~£MdBªI‹JÚŠ`Mô‘ M. tÎ0bs –†íÄÃ\úuP‰U¸ùÿ °/9‚{«¦¨Õ"£Hcª¸Ü˜¢¡®t4p¬[“ãdÞÌ'¸Ð È»6p_:4Ù)àUÅÐ(T"oc¯dc^ÅUSö8%µêÌ‚þøçŽùÖs¡´;a?7ç0»O·ïɰ¾¿HµB†ÕwQq#•ûü÷Ž›¯t=‚㕞¥èÍU6—$+(A÷°fßãªü:’‡Üg‚0qþ )È펦ÜiɈ ÿ&±Z¥·ê“F D²Ø´<°Økk­êd5äˆè´TN™ÕZ†9ÙVÍæj¸}sY[¥üfø’¢õíØ+ié$tæn ±>D^Rm, µrÃwP|9mtVþ)á¡£À¶æä#I0©- za],2p¢Oû/‡PkæÅ˽úØàê™<éò.%²Å¹t’ÑviS]VÈ#•Žû²4uO°ßCÈÊT§‹†Ãáÿ@qŒÅÛÄ}2æ*!tžwQmYÚÚŽˆ¢Ø¬Äô)Ùíÿ\‰—Ö9 xøCáÿ¨d8¨±aÒ×]âe%²˜ÃáÄ\ÀVÀâ¨`Ý—„¤>±Íß“Ñbšö¦"‡˜­Bí±h´ln^ó—hÌ'6C40¦\ÈnAÔN®Æ5eOŒyti-7ÆôÿH-u ž*n=¯l¾Ý½Ãiuá~žé^¤Òίñ²yz·Ÿ2B¾¤,uÌnPCôÛ%€œž<¹TèÛE.×Xr <°Êšgvš'ĸ·Š\ŒÖ64Áåé@S¢+ð„3­É0Ë’«@Êφ‡æú'Ð85È«ßïmÅÊRåç«£e'¼²$òѼ4òá)C ËµgÛ¢í$6ëé~qÏ1ƒ\¸Ä–}ôŒ¦ƒfŨ¾UïLb±gL=Þ C.õâ–fj&Ò™ ¨YÌÇÌuÜGÒ¢¶Ã½p©B×ÈôÈ©Â=‰RÑ”ðï råàò5æõ ¤¨‡ôB—¦ˆ… 'Ò•aÄ¡~ím1éyüïOX¼óÊP ŒÊÙö¼›õ½q5i=5ó ¼÷Oéf]þñ2„¥¶¹žÁ(ª N§…OuýíÑ"Nº-Ž|Ù½Ê^ÕÀ˜:1Z+¸"ÂûK°Ü§ñ¥"u:Æ6¡ªÉd¬Uv¿ÇÛºÓðÜHü7`‹ñ¨©]ÀIiík1ý¨èxáz'NzClrMæ=Ï¢²e:-RàÄZ“[;%FÝ®§Ô#ÌT°*û0ÙOÇîG{ MC¢¦’‚WÊ«-úµOø ü¦5'4ë:¦àq”#íü½¢F‘/ú#VŽtÉÒ®ª]ÛPqÞÃé»[Ðú઄Ï!ÌÅÔa…Z1n²4š4agdåÆnËwý„ïŸß;ôWýÑÓ­÷åú…) {4Jråh蜗ð›5ù›öëR ›Û~/Ðíè!$.v:úÕ45¿ð˜ÍàâôÔü«gº&N ½¸JX°Q볌2U¸Ãgƒ.²×`ÜÆž÷Ä«}µU^ˆ]êÈQbêý¸Æ!k x0¬]Îø¾`Á,–Å39¸D >\ÔâÔÞã82yÔšð:ž…´&”0LÖ{Ÿ„z»„‘²Á µëû%q¡ý" îÈl™=.,Ñ8ÃjÐbÂK¶©^¸iÑÌš[áïÛÛµ Áž¶ëCù¢ÁBO%K0M‰8EpT_»S–ò—= ¾ªIp·x”Pž Åw`ü_'ÃùÑî&|­ò˜ˆ Íqƒ“H»RÐ ÞN#¹xLx´´üüŸŽÐT 6!ݸ ÍS™ÀÙ IVÏÈN£]Å&‹8la‰ÙbÖIèç¡UYzËT½ Ý3¼Ìw¾ð1¹ÞƒtÈÃô-b“ìý>B·•µµÌ°l¼1g¯ïMB›†¡å²ðË6Ý~£~òl/CþáSÎüÐʸY‡HÉ’Ô’N˺T!Âk¥F6p°Ÿp¡ùóF¨ÔÎPú[Ñ´Âáëõ«`‰*"1çÈBö˜µ m†¼à«â,ùÜÁåQ;²k$ƒ\¿ˆ1/I ™-R[¥+Ň/‡C¤UF*|$NM×A6£|“t9'øç^k¹ðy‰R=‘“@2äò °½üY4_ PsdÛk_ÇI¹žpûÊ<‚BK¾®Tÿ$9ýQ9šÓé)WßW“åwîœä1 n0ÎŽvçbú¬0 (žÒü¤ëe¾É}>s­ Ó.œð÷[ÿ)Ëý£ÈW\‚an0 ”÷×Î#ض ÂÌ£ì­9„Êœ™õ+£¦b‚õ‡“ï•lå•ÓW½ÍÂõhð²06 Kþ} `õ\øÏ<ˆø'Ø9?Ô¤]æÍCÍmºj4¼;S8L§ÛÆþwcæhGu79ú­¼Ê-X"cNÝýú8å£^ëÞæÖ„ßÖŒYKÍñǵ˜±åôdäÍ´AŸxØÉïFlMc6JÿXôj«bCÚe¾Œ(BO…æÿjÍÿ!À7v‰$E k~å¿sµ¢è«¿x#q?/–¼¨úý#GAóR÷å·0Àn^C”{óãÐb|7–0…"MïÁ ‡‘÷*œ‹h›Ú%QÆ:!'ö,JyáLp J NÔ¶MÿgöGC‹ ÏÜI$ Ÿ6܇ °ÛãMy—I/Èq?!õŠaúzö?Œ›Œgiü¨˜™é“lò^(ÝÍÁ`yZ+r÷?»»ßžÛ_žÍGá´`árR/!Qtzˆ,CO’Äã*d|kòª;íe|3Šò*l“e ¸Z‰üíT}¥[TR–Bš¡›Ë`‹â¿r%Ë…¥Š\<ñE6ƒjX«Íeô;'½TMö[yÒ Šuš~œ&W„Ï” Þ¸9uûŸÜÐŽ.KÜÆ²‰™d t“ˆÃùP¯ü©fœÓ¿¸²±™l²9*#ì–¥kÃQóšql_GöÒç˜4úŸçO²4þ¶¶!¼%%-<}¤/²±á‹õx&½YÁð´‹OH'ë\-ÀÆÙ˪=P ÃSîVÙ£ÁfvÞEÇnQÌXîI ±ÕÆ·cøABpK…‰ßø,xnÉ¡®:Í™^Pmlp22¦:=”ê+ ^dñ |+luîãz£=¦À«©åî +Öý'üRÀ‰[¶8:¡Y ž¨‹ÐÀ¾e30/¤ÚVıx¢÷ã1eý” ÖÕ;3bßùG#Áº÷ãøDsÈÒ!åwÔ„ú7¢°&‰z¯d‚̤ÈçN&d'§ª»¼SRód}. ‡Éá eì0|@žcÐ\äÃݹݷã+êñÑþDÉÁçŠýW1yœ—kâ:d–cØ#Ý Å‚På„ÿ%dŠaåܸûöŠþ3Éz–š•¬Ð4JA“Tw{}м*Tä6Áéñ}ѯðËÒ qÔ5vÕ¡ {ôÔ-eCñË4îÏ…,Åæ”ä͹ìnV21¾Â¿·íý²*‘–—4œXڮȸÓ`Fz}“aÚŽè^ü”Ë«UjÅÞas•k‹Û%…\¸ãÉ'þævAޛϙl-NóNÆTRz¶ºVvÛ¿P´ÿ%c#dŒµ ‹¥H8袸\c[@ù‘æNÀåNvxˆ´ò|xm?Ò—”^š»^!¼n3(G'›™æŽ ´ÏïS»ù^/\·!$gY/>«ÑÿF¼®ø“e™¦'ñdÛùÛÑ‘€F­_Ò6ý¿÷~ÏŠNRÅtc+¤%¡å“ÏšjVÍn´+Çk˜+¡ÔE\ƒD)wÎVÝÌž‡¨¿E ™=#Khè'-/±‹`îHFª= à}SÿC©_°’1-x…“[Ä×geðdAé Ò¨§_>~ÀöJfZÕB¡nÙ] ¸nZ½¡+ÃIÃÖ¼EQ ›<óÇô_m°5`&j‡.´†¢0`ìâ\0ºœYFDb'%§´ã9‹ÒžÀ Z¢F"PæG‘¯ÆîŽyJŽü`ˆ{É“5øl—äÐvÞ)ǛӉg€ë“²Ô^»û0ÓS¼óJÜ¥$þôú„#ÁÂɲͬ“îâÝ|z3>±æÊ(ƒœq+±Mªï`ù:’¸b3p`°¯Ÿ„üóH“׊–’1O‘_ÇÛê'?Qøü=R˧ú<à °ÑÚ¥WŒd'ÑÃ9rã߉3ÅdA 0åòªû.CÑH%q" Ñb5ÏOžŒ8|qâ]ìÚ_'[ü îÌHýã•@ÒÖQßÔµ¼ž «ê¬C”– ÁÓ„¾}Ãò»û?D—|bJwæ¶—gD¸¡¹`&¹Täjç;_”Ã[ó°K 2 Œ&Oí†õšÔ}¢ô›©užÿ%/?d4ì|ÑêúêήÊÑÁà vEo b=ÇX‹<*]5óŽ7ê{ ¯o×cޝ(Å7Ri æp* ¨€^â“UhuNÛ?mWÕJSÎËú]û4’ñPî±G¼fÆg*hßÞ„P*ëE*‚½…”g{×EnTÉ£ãoŽœ 8¼ÎtOš¢Í÷3SSr”xO?ÆFi j\Ò† Xò8æïZ‡úB? y³Ÿ¼)Û9¿¤ûj¥¢\Zé:¡<FºÑn¶É»(n¯?ÚV> w+—?ÁJ×€ÇþÂ) %†¸§O¹Ú…™xÎAû·}G‰.Ÿ/®¦±È”…"É;MhÔíôÄÌÄŠ-eS89ÂÓaõÜýËrÈE¥ fßPÖ² °tË®fnžÙ±ÿb!9ìfQu a›| qÞ­ô”‚9ì DŒª·(N9½WG/­mhT‹/„ñˆ£»qßÎPþÒUè?²ÌªNéf¦zÑèË£,š×|´¯˜áø§4(­4Xsó" OzÛüˆŒºE"Øæ‰#Ö\ kHÞgñ/6¡|²jœ—ˆ6†òZ†ºÐ¦KÚF06Ã-Âë@íùá‹¢_ÿHË8 ŒyÓÂ`b™‚(È.•â³Îõ9J&‚ˆ/ S‚¨9Ú{9µ¸7›R5/<ë¶ÐÞÐ(kîá1¢ ?9#ÿ ã‰|§¼=Ãß›ƒØ•@ýÐ3ü£|ë: °ZMÿJ®7Áãaž{ïONµ/d ›Ô]x »>üß91D(6ƒèRõ…)Ð;K T”9Jƒ¾Š>ß1)ô :óÛwk4²¹jš*´õ;E•É;:»%$Aà²QQ 4%SÕ@ñêÍŸí[©Ž–S¿î´’X*5ŠÚÄûH–l·Åý³«¨mÞ^fÎqߤ ò‹ÃÖ~««ap›Šè)Š@t¾ ÛPØ]kwž×ÅÅz>_9²?î¾LÁ!ƒQkÓÀïæ6¶KÏQvÔÎ+Ÿæ®è"†“W´²±ë×TEˆ]|úùÚA›Ïhh7d˜È]3×$ íMn:±íÊTƒªèù|…1(Šìå]Õ·We,ì}Y„ƒ¹pŸÂÜ‘õêÁ º•<Zø·æIƒøŒ7ÈÛ¾ßM–˜Ø•³sÃï/Ôf¿‚aŽb€tZϲá8©ñHõ¨á `@Ç:ª­q«2j¶£qÇ~ù¥‰ ŠÏÌÀØ×ÇgËû0Ô¬FÃPß9ŸÙéÃìÅ[ñ*n›Zqö‘Õ$ºÂ½l"I-anoD i1‹sŽ2µÚUVQaºƒ!÷‚s_GM¶3áíå±EÚð>Û½,Á‚‹n®Ü+_ »Gü½ÂÞÃr¯ïø_3×ÖxóåýDŠðÅ™² Ž;œÈ¾²Ï×ëF,ôö8Iã™á†ð’ÖÔ¼¾Å;q•Úu;Í~˜Dôri[öã‚y”9¡i“Æ üï8¹/ÆñKŒëòév„pRžÂ*Àª_ÃŽÿ/<äðÙà°]q¾/pÑDœzÐ_„ `“´@ç'U"~ükz@.ŽKpÕ!캩"9qùfe¼÷LlßÒ¡V­Ü‰µ{‘8f'×; ­šã<)!£5V›0žL\Ê…ãP¤(±Ñ´gÜ;2Ì +žŽ§.Vãô]Ÿ—6ª"{'½nM ßÊÊ—Y…îäd;άŠàZ“^9@¨²§÷?Ÿ]—5&õŽ4§¤‰Zc¬\þ>Qi`NÛ0nœA4޵²³žkVæªáHÙ­y?p®ñ™Õâ ï¢å†;>tŸûä‹Ð®+¼=ÖêY§3/nÈÃÛn =›ˆskW”7C*·¿Û«^Ûh3õ[HhUùµS”•˦µ:ÙLǹ›§ÿi1}eOK1Z¨¡ç¬-fФ„JüerVþjñ!ý¼“ Óÿaâó°¥R±[mýEêd>JÛCiA$¤ ªmܾ°Ú›~Ïké{_1±y|Æœ˜òêØÖ¾Êĉ0,îyû\)§ÑÔüè¦ÇÀ¢sÕ£Fl(Å^¬8ÓrÀÜá*Òx‚UŽ6£ BcÑúj!æ]j¹ܹã5lý¶¿8ÀüßQ.N­öHÄñ9à£9 ƒ€Ç4-E7„¤cyv:HQ[ Ûsé3zkçjwaSI™ý–èÈ)¼®À«:õè÷ÝóÜ‘ÔN~¤ê´aÀ µuÊ&‘®õGŠW+Ÿó±‡ '@Üô†’:©*‹¸óÑ{Á¨|±í@#¼Òÿ8 Æ!À†s˜þ°‰YSÏŸâ¹õE¥ö– cË`µ¨R –/òƒQë’þF¸‡þx À¬~Ö´¿«²F_Ú!s$_KæÚµfÑ Ø+›Žª)Ù@lcæi×þ~˜S4戡UM³›Hn.‡ß«;1[ ÞW‡LYK’]~¦h[ ³é»À°Í<µëEMמ«8òX ðb!@íÍ3…;ô»¾+ŸŽ†5ú#…_^*ÃV‡ÿ0Ö6+ £pŽÅ"i˜~ \4E/?ÑEÎYÎ4Ö7%0¡e ZÈQ‰¯ýò ÞM23JÀyÿ{¸B®Z'þß¡.÷ïÜœ«¿Ïþ¬×ÆÖmY\w‰sÂPmDŸ™’9_QcÐ쇇^Rà¥JÙ×J´.'Ç)hˆé©ûãŽ& ¦:ªƒAT~2…¤VéwÕ§F.v.m Sô€1ñäB¾3¥N?Ní¤ìšMË„ ÿw/-®Õƒ>ÃX÷Ú™èˆ Z×?¾P¬–¯l ¾Õ=•.šÍM’ÕŽ¢ùn}o„Ä:8ÑɹS{|0b 7§c$þmå’eô{A¾ï>–ž¼ÍÕ¥Ù˜h扶›ˆ¶˜Å–Ä”V÷OI§$]?üm˜Ið9 X©‡åjÀdVÛXê©“ß͸æ³lGTÇðôî†Ê_ð[f›¡Ú&ó îëØk^-…5/B«pA°3‘ˆ‚ÁðCÒ>²’ÇÝV14 ÆeO•ë<¨ß‘é^¯vÕ ÚkéËh¿P»-{¼òHhæÏÛ…ZƒiµT+ðJ8É?ôjEÔ)m±fj4íïLÉ×H‡´(>·Ì|?{7ëm¸²x çŠݼ÷ëNœ6°N`á6 l ç&h KLÞx±Ð9åZ:ò5Â"+š±Uó‚f‚ H82Z†ÒåÒv£¬e@ýöüû;Œ*Â(ùè×efÁoG³f×j›iGÕKë‘à^lör¤,§\ò.{U-ù÷V cÚ-ü[ŶgpiáP9<+Ïìù«5£Žº[Q&ûõýÎ݃¼P‹DcB5ݹ[“÷:ÇŠ”þ\áXÎjöD_Zú@Ëáïfù¯2fz:M°“ B)hbK8CûùÇ‘íuVÖûwðËqæ@yhJÛº_Ó‹zþ+³rCkz\ÇpÓ( Ç{q¦Ú½ä4îŒQ²éoÛ¹orF%;Y¸ÅØ“ |ŽÀk»‘íàËÙ> ™š{>‹Ê~n–â’…øœÿ›§ØÔøÙoÝ-¸¸±DáaìÒ² ‹ìŠ›eTÁÉÁ @¸)ò…ž“/ÓÇŒ™Ÿâ ó«ÏÀî± šÂ\üî7 oÛåº\–gvèIy܃Lw{-ºv Yçÿ<í²6…ìÚ žæf6 ¿zÕèäD^¥‰tãWúãÑÖ<ºíië–YT·Pgõ Hin‰~œ*q¹µsä× \.wuó3îïÏeÓ±5U[ëPÝ–ïÒKNú$iebh\±!UøµÀðÌUçæ@6–™ãUy‰"ÉÓ;Дâ->#Õ¦þ~8®ÍqÅÌwåp·‘î;e¿É–˜aeæ¦â“~”ý@è&:#ì?líWÔ ÿØÚ #?ºtT8¡Ï=cº_'K&tœ"Ìòxî¤s‘g6ÿðü"ÌB,ÛhžÁe½Æ1ðàš=û8êÉ6¸Øv²Á¬6lœ0]È ÑÝŸ²á[w².ï=™ ›±W¨ÕV«iÄû¦ßˆré†Yþlåþ›e”A9NAõ½$,/ýóx’N-Û,wväYݱâÜæïÈ X3¤`IŠ%ÁêSÔŒƒûæ•´ÞCI¬ûÙOܶžÕ°“Fw¾;ýaJÊÜñÌxŽ@O‡3ÍOË¥³rÆ,“@Eâeµ£/`²sWWÿ#s¯ä¥è{´,ÎúæñÝjÌ‹¡ßäÅ5?êgè`c{0Ó)ƒ˜ç~w Rö/‰èÊ&Ùû ð„ÿ%ȼõ÷h¬(p–Í£ÕÇÉÞA³é?"¾ðd bšš¿’ãä»^ÎÛ+Nß•ºfC©›²KÀð^t¿_xiwŽýÁ)N—’¯ Ú¬x¾;žÍ5ô–ÃlEîÀ@d9ýŒ…"Ž}î¨üD{É¡Á¯j9Ó¿ìò¢‹Ç¤cíWJí ê®ÏÌ‘Î÷ò‡æžÙx°Xt¾íº‚½•ƒ#FŸÒ„Ýpþ§=/‹´ÜMyxHË 9ÑL‚\ísB•3{Oý¡³­V5ܬì8Zщ¥w­Âb1·zk´úÁsšéøŸ“Ü.K*ÇY+mpŒŽ³4–}'C¬yˆ—£”‰ñª8˜ &”ßÊ@Ü-óÒg{4¡ ëÓ:RÚNõ¨¶Q§u$\ßY½Xhí²)ŠÐKŽi¸9ŒkDa&µ÷Ÿ–ê8‡#ïºv“Í`à@ÏŠÄz=XŸ\çýí7ÐÄYNÜfw&åô½GÍœOlSî ³ÇÛê?Pˆ}¾¥ ˧û.þ& sÙ^Ö˜V­ãyìËøZLv屢YFêx±Ý9ÚHŽý>¼õgÀ_å›~we*•¯èŠi×j±ÂEF%ƒ)ZDXuG6wŠÄ6k{¨(5=;PÄ{S/®^²Å%ùÞ5—_TùdüëM˜ŠHþÏô¶™‘‹›'¥L9 í\ % Žu1…ˆúŸÖëKYWŸ‘ î(¼9Ö„¯:÷M¤ë‹1›+Z)¹éõE(°ÃTÊæ¦(m|fÌIŒO¹[6Mg¬ePMs|·þa›7ÀÓCŸêØ‘±S"^9ô²eO È”¿×ÂÔf„~m=HRÄë@éI/ lÓ_Û,›SG?›ól¼&-p+V§ H–Ì]x áWæà&U€øo_”-9ÔIpÌ÷žì²77:Ul$vuî6 /ŠR&o5ä©Ds4âû1Ïà¼Î¸¼m˜t¤%:DUK*¢}IO¾j?úÙY…¡J»<›\uFt©B¤¼;-ZêR¼â5˜b˜­Ž ¹þÃfË2ò2 5¡´Z&Hg—¶Î À]ËiE€òA°Fº 6胭K¾ëlÞ·i8^ÖƒDPL‘íÚº™ÞBÌZóX¥zœòèQ±Qƒ$LT…àKœ­ññÂJ¥{êW~‰¶7BX§NUåM;°a=«y–B}Iøˆq‹™ë•æpßU†­¾ÍÁ°`Út[‚ÿo,& Y¥ìÕg”Ê%Îç@õ1W½[x¿Ã¶F: h:£ÿ1—/Á!U›ãÆ+(ô)|^Ãéš÷²/zÍû_·îAiÁç±|9* w˜ r¿iûÐ “ã W'¡“³ÜùZJëšØy™èVñ'*ÿ¬B~ü)ðû[»Òˆ<„“¨­.U./º“™¤1ãŠgóÛåõ¶möƒ¢Äu§á¦ ›À?©œqòÐÀâPj÷øî÷È8š—îê®Ï¹æX%llD·iÏöE¤@ÚZ ‡…årè¥ C;ë¢W俀 Y¡3oˆ˜Øœxx%b¡WÕ¼³yÇe&úqL–,b,Çã²Ü.b'ýøËऎõP+1}YÒ¼»ºÕN…1+Á^Ô£ƒøzDzÝ'êî˜÷„¤ÃofP®g¥K¶ýÈå·{h:>”¹%÷Çbm¨ƒ˜î…3j)³Ÿ 1—¸ÄÒgáÕ9bäéO“¹gúç»Qin5o;Rs*ªÅC8òÃÄn¥T¿$0µÀçܘ Gº ¹¤®Á~Á˜†£H”¸d«ƒ”g.°²k„Î'8ÅÕ~È_Ý­±ƒ­pZa¢9­w§(4V€xÓEv•ÜÚ|ï¢_€fž ŸaÝBzWX|ê 1Íw¦úƒ *Ã$€·_*¢.½¨•Þ¹OSO(LZë]§ˆh‰*¯• Ÿ ¾/jFf8Q!ø 5§nø_3Öþu¥Ë-oo7UenäœrTŽƒ¿œÏ"«pTz`:)ù-üß0‹t€«¶’†&ø Y®¸Ý,;ìRkjÛê{ awäÃ#•ˆ ß@ æB`„6\B™Âø7Ä"°RP·! #¬¢Nò$¿àl$bëgáòî< €±þxQ > ˆT¼1ö­5ï‘绩Nøƒ#<óÞHÞíTû4Ñü'„h—"c‰[ßçŒßÅ ôÀùõåÔ3{²‘VûOç Dù&á`<§ën+u÷[ùqó×;ïæ(W&y1`±¨_=´°Ãã'»(Ëwp¡<ôºó»h:¶´'v¢6BðÊêâþ€‹ K252œ›ÝÏ>%“ƒþ’pÉ‘À6#+”ZŽOZmî¶<Œ€{k °°u¿ 0Zˆ‰à K"='‚ÁÒ ÃîJ¶/ö4ÊøÚF\_*„,oðÐïÊÆç™òýœ¬ùY½ó•u©W¢ú+†í %áß;‘3ƒÂÓåv©—-µL:u‹ª¶ ,n¡ÔÔý½á{í!Ó[>&ZýÚÐgSÚH`º.EÃ}¯«k0¸Vø³¬ˆ¶Ãÿ_<¿_6ˬī66åÉÕ 8xTm̲š!ƒþ-4|+lžZÿfèÔB…ª ?8‘ ­ÖË ÕfÃTE<­PÛ»wÝÉíéë5'³Ò<ò“a…ÁãwÉ‚§W'¦{+ºàK7Âu_cU°ð7¾FKB¾ÏjæÕ¥à« Î.ÉÊö‹‘}f/Š^=dÁ|6ÝzÕ+¨D _GÌ l ¢w¤¬^qgÙ4˜…’µÒ€k€½/™žMPÐoJT$?Êxè£1Øžü ¹»» Ë«Tßê¸brÚ<›å*‹)’ö3{ã£L…Äe/mZئr DE…"#ŠMVµµ¦°,ˆ…ÆÁ˜#òV‹‰Š ¬WRbW©À@+†É"ÉàÒãc@!¥0Íúÿk°®‡›ª ©3‘dé<îq7†^“;“çåhäÆã<}ð4ÀÞ•Œl ‡‹NÌþ6(*•õ>ÛVpïEû¬SP‚û·Oì>õQ(ln12&Jgç? hТÇn#go•ÿ%äžÖ¾F³MhXÌ`пÌuÝCÏ–KÑo¢ø•µe’1†IijQšrDf¥‹ˆnnB{!üN¨{0,@†…3Лð%¯¶+3~[Y¨"ª$uÙKÈð{AÇ <ßösj%8DršLó’Oqd/zvAwŒ®Ðe²ãG2S´ŒE{îA‘Ùúú`›C@.±¬–zzXe›ìiŒŸŽpß:eú1Ê¢Á­Ç§ófCѼ¾×±ÆZí‚dô´\ùA¤%ËÚx0û;ç&„—#½†Ì G–ð¿t¯YËÚÙiÜ ~fÊòˆ“Çá¢}Éð¥åÇHû êœȃˆz Ž>=lûöå†pæM)óøÖ˜iۭ㸺@þb ߨ„íNÓþÑ¿H3ß­–ú ¤c~xsulÐ%ïÔ•R"1'Ë¢yÝ‚ð䊿S÷^ÒyÄF-ÙkÜGEüñ ¼»Z"J°‚, ­§9-ÍA ‚¤ï¥ °{4ø/yñÂ%£8qØB€J¹ç¡ä–ÔWg_öaÝTÇ[á(zGA×VN«WS)!ˆ_8¬•k‰Ò7«¤ÇU»-åò­o8rŸXªÑÖrÂKüÂc}—C6æŸ~¦Ëk >ó)>¬e‚jJ.;Kïh'ÞÒéèèùj9 ²‡© ñÏÞ¡OÞ‚~æ·Š<Ö "ÊfÉ¥î ÒDBÚ+›@Â_9/¥½Xe{½/$´±¸¥£ ß@cP`^‚¥4±ÐšÊ.‹ ;¹-IðîÓ+ë$DGpË8o¿~Åu†ö2¶’ÔS Ksñ1RQçž.•Ì5~TI ž5l2ßoŽ3^ëÅyÝâk+9éGè¦o=w[kÒh`ì¢0;¸¹6±µíd‹‚YB¾9lgƒúšÕòt|®bé±þ”cãþkCOÊ]ûÆdjxC͵[QÉ$ôo°^»‰´¡úøl«O<¼‰òzÇ}5îÝi;R…#<%|jhŸgÛî‘{”Ä…¹¡<æñϘ3¥!»k¢üs¦¡¯‘Ý5؇ ¾ÍÇ{ž8/áýP¢kÍ4RÊ¬ß ÒÝϨ­£ˆŸ “1la±ððüÓöÉIq¹'G 0"5–)°%Ϙ •7Ï2MŽ~,)D¶Ý,IÞn“3YÀ¬ƒx¥±å¸£`4¯ÆÂÀÆNÀ=¤ž£ ìljbÙkú»ì èéߎSÎ.Æà! éwÒ‰î\4ŸQpcõýVô3£OÏ‚­ûáããæ×Ètøpp¿5[qÔýD1ÀˆÃ´Ôutý‹å”G2:;›S‰ª`Á 4ø¤„#Ós£~íÀ^ÔJØV·Ô4Yÿ9Æ)ÉÅX´”üÑÙ‰Ü6ÃG”ëûAo ôáÕý“Ð_añwN²¤}|?fK"u Áa“€l®°(µïäj2õX 5¤½c¸»›ði±< ÒA¼ E{^2‡½! 3ÆU%Œûý&0'|ƒ ÑÌénÍy†¨(»™€eOOï);«GrÄ(ËŽ©„®9.†óúkhK#^i”Y-aœ2d¿»œ+ÃéÑ7ˆ¬•mõ vN¿CáÌÉ"BMò–ÿ0 ìãMÔî+ø·.&ÂleÛg¼×nŒÿ!{©Ñzr›“LÍK† Õ ³L²Èyj…6*uBóMJÞÕoo­°>fÈCtÓ egEਠÒõC á¾YÄÝp°¼<£¦aÕ y\~óÔÔ(r]T? Ûöi~ørt:T8È•Á{|‰«WœþbMÈåeo…ü$my`ýg; rýžY:ºÿj^"I”xÞ L㱬^Œñ† ð¿ÝZÚëšyñŽþ/\kQƒÞ2ë:Ù|__€ÑÄŽ`þ ¯ØvùŠŸ$á°êÆ/«y:ïòþ©3œ¦çBss~ÓeL9Ä4\›*KTfVº: %ë”™ÀÀØ¿íÒoyL¼¿“6*\3íó¡ñ½Y’,>n/‹–•aââ³1§ÿ7Á"…¢¤¯×ÅŒ*ÜÈÈpIkÞ<ž‹AÍ »–M®ÂÀlñ¹Ñá¾áLˆ(mÈ¢x20+\Üû[8¸d}TCÝ‹¾¤ÁÃ]>ÀXì':CwY `ÉùYñ}僞S“$¶¨‘¡£ê•Ä[·ŒµoIäk… ¦¨(± Øbæ3DBÚÏ–º÷qÀøXÅ6¾ñ+Ç»Í †ÄÿY]ì!lG+fºÄ]/*„1û†Xš›v3BäbRy‘ºI«»Ó+hqØèêTîžVû„2êêñÌt°»ÔõÁ@K˜QÌçDW柰 é$p5ÉŒ§ ç¿ `ºõUNøLÈw(³6¤àðzôr$ÓNª â_“‘“ÄêQHho¹Åw¸Ýïy5Ãä©§g`û¸6x»9ðû‘k¸ÿa°Ý'Š\™¿2zn:®±Î´5*jfZã%Xµ;ûC¯v‡‘KlV1¯™Âx÷­Îð³Œçin9œb©Ó Ýÿ/ñÅX)ƒ‹K Ì·ŒÓºå UäQfô@ghÿi7Ö Ë¡A®Ôm¾ôÜ_ì î•—${1”³Ý ?›CË¥¿–ôŒ”KQCaÖƒ;=ƒm{@œ ZÑGCâÌRË2Cã1}È&i+x †_4=Ön¶tÀÐQ6û£ 8f¡CY:—0}F¦äNhHcÀᚈð¦=±ÿRjÊ阡^4*†Ï.@“f8í—W`{3ò‡/ô!ß ~\/çÉ8ÏüÜ1öYøYBïÌeÛo¡ãÚ;KàF©%·*wãô« Á=u´ë†ç®túDïâ:ú"÷±êL™ìa V€Fà «g+¹h ~K‡‘îôôŸÖZ’)Ätmç®›Ù$DéEÚEPŧ1µdU”B]ž_wxåC7E´K™5ØÁœ^.¨«ùã{SmtñQ T°àãÿ*Ípd8ÿjÀi¿F¯c8`–#Ž0Uo¹öC Ä$—\Ÿ,)óu%Üî|Pž÷¥OFh©(½¨YѾÍpù:o$^}¹)FØ ùÛŸ?RUE!þBâjçN-­‚=Rþ2/ÇJù!/­Ϧä,r@ljÌ›ü?ø_3Бy*zF±|ÀÒO-J$ÂüS÷áoýÆÙ£µ¯Qè›ß—ª‹"PÄId:F's’€Ó3„ ñ+À(-Nå”ûoYR6l©Xb‹™y°ªH2dsËËßaÆ®žïð¾5‘¿9dµYF7ÆLüb÷ŽþaeIúŽŒ’'XíêÞ#B|½Út({M½o‘á6™Kw¡ñ ØxæQ´%øžR5¹’} ü>1éWŠ%@Ö¾SCfIàïEÆþ7¤«r° v<î¿Ê£ÇúYáþ_?ÎÔþÁ"êø¬ZÏž0S×Ç\‹áóÌV¶k7®!o¤£ko‚aÁA*mÅN]h(ž"gê²ø°Wm^t›ˆnÊTŸÞãÜÒÄ 6…bu8O$ҾÛ¸Õ<&÷µn5IG'|¤ŒLƒ]åN”l={ïÙMŽÀßžx­å^S˜”™±ê÷Ôé¾KÁ§T20m¦‡#ëXû’q8ï;G»!V£Z ÓJ£.ÃfdåMÉ¡EŒpoâ‚"óê­$½`ºV†ã•¶•ê’gŸè³Á@W­ÀŒÖ”3 ƒ®†Ü\±hþ"Y1I(ß”:ò5R¤ „º1 }ĉ焮áôrÑûÑÈòpbéÛ4ñNƒûa©=Eß‚ dÆÅËùŠ Ìþ…Rg7 åõ¾¶Þ5Ø*¾Š‹LÛ¤^÷=¿WÇÜTìÆÍ7ØFùEz%…ní^LJzÊDõgGr2ذ´¦ZRÒàÚý škK%TLñËA Yhq/PñÉÛ ˆµP¥Á±¸Ÿú”w+PÀÑŠˆZ;&Àk£=WKÁø‚r U0õìjäzoÊâV›/ѹ,?]Œ`°œ¬~s«éÜ76­³=B¯,™MLªŽ>‚è°'–<–‡xj$üW¸n½ÿÃe!pK…ØV+Ih ðÙÙx]¤æ Þt_Ù¾Žƒ4!%Å{Ð “ ÙJ™÷\}œ:z…†g¬M½;¡° Î?4[5ýjq%K¯g#—¿÷¨'CbqFN;»Ž&û?Ȩ.=§¥¦p·W¶Eƒ4×nˆíãGýã6~19§Ñ6zœ¦‹YF¹p.J2!ì"†"0t¤$S©^‹È™¤ƒžñÉ ÿBKÙî•”9­/ËMd `viÞ7¤`ä¦]@¡'°^y­¿-–×<;®úŒë{R,æ?ñ° ‹õâò+ðæ­åK¤¸¶g䉮%R[Ý7Zë/¢ÏßáÔñ×ôˆyV–5cFq kè>4Šë¤¹£Ç”{¹a ýÇLD[ –»ý jÃt›€—ˆ.¥:ˆ\1HÁúŠVÒ1K¾Yý£éß³¿zOÞ2É?™¶)¥þ‘ŠžzMKGÈUéL¨f@pÍIªä,Ôþ9„M¿´ ¹ÁìÝlÎ>Ü_Gg D­*ÃMt°©¥ñU´âÿ%ç­Oo«½J sá‘€¸Sj Å¢qæÄeë‹ò µLdr¯¦¼¿ AŽ~ü'q_XFº{x8K ìkóp«UŸ'«À0Á"xŒ±fËu“hª¿®Y¹ ¨wž`Lú«ÿ^-SйÄÙ|—±­/¦AJÎqŒ1ú¡Þé‚W¸9RlÀ_+&Îz9*O«…k†«=Eþ§ÆKwƒÅnXs>zÊ´ÍåAdÓ:ȸ4l=DIÛjÛj‹ïšƒ0çHÄŠî°ÊŠšÂÆãpâ‹Bþÿ „ßM ÷$¹•S “ý2¦:DÖ…¬/†1ñóºŸuºê±=bÄÂZðxõT¾¼*oмE<­ÿò'·Õe ea)Ī`ÌJsŠ5“µ“ïGðs™Èß>*–‘®Å4—7Ýk[ÓZ‘Ü_;“¯)™¿ÞÂrä(a¹á“øšð iÊšÈ ®=6)¬q±hO–=“/ ,¶‹’ìi©xÈÿXat_¢N(ËjOMµâ€XúÄ-² WÙ»s²ÙZ/¥̸ šÆR›EwBž~ƒ&ÇÄäãL›d8 Aÿ=V‘ÖI‡'ĘÇ!iKmŽ!êÕívD9ëpsRg¿¦&ætì5Ò?,Ý‚¿`Ú–hcI%²óMÒÌÌÈ89¸¡ÅWûØžÒ4ËOš6M„IXÜoz6Ï_pií|Á³·1÷qÆÓ1¤ 7ªÞ‰Y£é¹Ï ¾V™ñ‹˜™w.‰ßG-îeÇl…Sû¶0սẄö6¤·à¾‰—÷U®²œÔ'V/°”‡}j¢þj>~Í…ê+λÀþ )Ùë]†u?ÂëþugaçFvò]•~VYLÖÀ›Þ"Ö ù/÷N}ù΅öKÏÃÑêüý #ðïüç²¢ÆHŸ©ó‹ ýw7Q·ÖÈ*‡‰L%á]Ãÿp¯õ)‰­ºufõ/—Úü’†¬N•c2ín2èÈßÌ\õ›|¢ƒ©Bvð´Yõ¾Ì@Ÿ_Bî¢%¢ý_ø#Š›øÓ‰[uôŠ]%©<‡ók¿Jƒ¨u²úÿ^²JŠæ{âîÛ»æÉ¡x=ñìî§§å¸*IOƒ*¶¼ä[Îu˜]˜Ö߀’ ýzH`ëh惥‘Àê`ÓX-Ç¡ìZQ ùâT›Gi±œƒDÆ}_!eóTT*DEQ£þ˜• )ðj' r{kcãˆ>¡þyGî›´ °#ùà¾ùñ(<›ü¾=ìªL‹9)Úi/Å*lœ² "Ù:ªŠuªú5Iá$!£ð®8ýÜ‘ç#ë£ØIŒc0¹Qƒ2Ÿ|‰ø+…ÉÅí蘊jäN .ˆ]Ü Èî3‚×-.®èɃ¬ýâØîÍfûÑìÿü-£ñ=ö+CP:&ím£–0Ââá[ ³vŸçXFú)«þ$Ç8½tRšÝ…+@&ÿ ÉÕK=ã/²™ÅŸ¢LYãÿ9(ÀÜϰƒDF,¼9[÷0“";ƒ«*!6|Cä×òýe†vôš6–v Eô&éŠGû­(£I7±À‰fSÙÑÓÏ7Ñ#x¤Q¢Qhè©Ò[ŽÈJ’†Ì»Oº!Gñå.+^RE1t–ožY<r¡×-rõ¨c ×—fGkuˆ¦׋œŽÆ†å®mxY X#픸5Ï ¿ãûòÇ6ÌÞä¨NÓü )gû[]G›á5¢„UH¾â'/|’ŽÀ¾¡®¥A)QÇÝÒF›¯Pð„åˆõt#˜Š,‰«üv¾ºÒ»/'€¢ˆÏÙ "c”¦6eÂuNZ#N(Go|QCÛJ€Ã{ž€vËå´ë¯·‘NGÛYÝimr_¬:6„de¹\É]M G1øØV`uÇ„ Î’™e†/T¡êÕ„É6;¶Â)£=^p†0¼9zæ@ §lïñ¤š<‚M¤}ñ±2ÞMÌ©ÒÛ °öD>îÖ!¥*˜÷(ÙiPõÆTWQ—!p,Ý µ$C⇻¢²åw6N3#×èGñéš·®éëU2È“/!÷ßó¶£sYW-vQ¦ÎCæ¤ÇÓʆ6Ĉ”i‹aâ.Þ¸qÎLz»üþ+cÍ @¼%ëÅ–3À2!¬Ñ4Œ‹¤\I¥uÚDí)Wš7—Úñìªÿ?ø†…GÉÞ•²ŠFÇ\%÷ßÈ"¡2l:)‰ŽÝYj±¿y(Ò‚•y6ö† ÒC†ca‡Ù» Þ£À+”90È·Eª8šŸÁÅÉœ^Ù-…R’Ó»KLì/½~ep œp=‹û5ÝÒZ)ã²'~ÅíÌfZ«ÇxÊï³W$ËuCJRÑ$µ4¦îܾ8±ð•(ñ–³…æÍ&LN®Çl<йz¢¡¢—_…á\t2'«æ)¾ž@$¢zFð^rjž#^Ôxí$có ¨Žð»Àx|Õ÷ Ði2ëp‚E©!ËR éò|Ò²À“±6™éäG uöó`â¶åÒƒ‘)» Ë}ìYʤìE['5ô ¶Yõh”7É»° kŸä§K±D/›ßbÜùõæÅ ½Ùk9ìÈUNr‰8—Ñ '1#$p‘ÎH¹)wùt#üЦSúc¹oç„ă) ­;WÍ9çF©çC6~š‰¸XR[K‰µz«eÒÔ°:Ç ‰@ ªoS”ƒ”èü×<6!ßã‘a¯ JôÍ@6ߤ©ðý´)¡'G— û‘=Mq&I0Bn­”GubUÖ«%?Gªô/Òi*h0aûÏÔ&Bœ4¨æ·£.¸Ï¹PaÁ(á-ÂW Ó¢gIJ­¹ƒœ®›ü`çÜÊä`ÿg˪5¤U_l­GÍÐûïFAÒ7!×–n5Y´¬ârôàåhöCx ÝCí¯K»-ØÀæT™ë*Ç]Ñ8wN·”.µê*ö¿d&eM‚¡Ÿÿ…uø7SéÊv_|6/;W¢vNÌ3® Yøð$Ú~$@‘|÷ÌŠ3ºÚ ’SbYÄžJ… u¯„œÍæ²·¿q®Oíîëê²ôÁ/!¾8é ÉØÔZ¤;hÁ­ ³T¶È~•9"àB¤ƒfwRÕïè-zúTo““o­z:ëc1:£;˜·ÊhXæ>š>Ü \ýÑÈâ¾0 æ7˜€P™`Èöe‰$r÷ÉGƒª›9ôUˆ—¥5 —³¡þfI¥êRÙ?ÞñùÕ-ÀI{UÀšbX9È\iüŠì—~ %ÆE½«Ê.¥»nºFF ‚M‰sìcË\Š&nÉ6'±k?êÎ 2U[`Löˆ¯VÓíÝýjA膮d{Œç["k$ˆ¿o„F‰ éìV&fÏ73Ä’WàñZë­‹A1­å6¤d † fdÑ6J3 =øz4ÉÔ÷Õ†üòGóE687/—òU»¿>‡£:§Q'¬»orÕñÂŽÂoÐ1xcÓ F.ƒh“âgú>A0ótú£ü>”~ù³˜tQ;— 6§œ!YXò½—A³—t™&™æœ«Â’vòö|  z=aR” sî|‘Õ@ËýúBÀð9´biÿo(é¯bHD'L¸Íjƒhxx±DÇDaéÜ€ [¤„‡iÀ6`J®"]î²õæ73ž"Ëî@äJCíïln>‹ML´Ì )­.P«"tQâÝa†üò“w:;f‚SqbàKHAÀ-•ЯŒÐîÅÍwnƒÅPõ…hð£õ¢T×:QO7õã>ÓÇâäô?¡G>:ð»»G"îî3Ĭ]ZÅXͯÿ€ùyUv/Á6ï¡4%4áå<¹«Ærlgu¦¡rLkæ¼åÀC#t,ð)Fs©* Çð‹" "·Xƒuoâ—¿Íó“€¥–RdSC4óÕ¾£:5Ñ)$K +÷|’"uÞ†PQ4F¹îÏ•tqm*°›1”¶m‘¨î¦¿0) 9 ÌaÙØü6 ©rXøÃðgÒw/}ÑØPXôA\9:‹»¬rˆßnHÇ8ÕÉÓõò{¿ãƒï¦Î<@(ј¿:Õç­pŽ?jÞìÅgý¢ÃÐWMÑKøÈL©Ë G© Ë‚ËʨÔ™(¾ÏAúqàt>WvØúZ`†°‡ƒl;ê^ow¥àT ÅìÖT–ê1=T’¸û£I’Ä(%yQ)Š22~Êä|²îˆÎÕib§%Ô mÜ«ûT°sWÜð‡S/FMXkv…,µÏoǾ·ñÝ4jæõÐ_-ÔÊŸ=¨S[WÃt˜3É {úl@æ§ÃÊÒ÷ç!ËäOGDoþŸ°pÓV»‡®'å[U ɽ*3;úpøç%±â&ó  ±ßH†%ˆDºOÀ8¬Ë#°ÁczÂ¥³ïÞRàÖûˆ8Ï/Ý›ñ^Àþ+n”¦#iE#£wnæ:Ò¥$ðédœ´t3Ê”{%õUdoKoSù©<}c×Þ#S2ri‰f¯˜ØZ^v—ä'î >“9üüpÛLª‰®ŒX¾³V=׳.z/…ÇõC‰˜‚“„SË݈±­¡×„LŸÎgnæ¼SÕÊNù‡xîs‰mµ—Þ=#ᯜÔg§;#I_n“L/¬ªÍ„aœí€1 šÍuUÅáCÚŸy#A&r¾ —r€Â—øŒœö5|©m!Í‹G¹ B×J„]TÓš1²»½¢Ý{㬠ž†p/x,QÇt)ˆœãPQÚ„((§gÑãöõ…ûzÀý½ñþÞÝ1û{ ý½ØþÞÇof8~Þ«ÿ7²ÏÛØ×íë¸ßÛW«bd-ƂՇú¦>óg ö¬¯ù|öp»ì¤_F½nx“Ká+b˜DhR3ǯJPÄ@õ øÙÄú!òÎôg&踇dœMàA¾‡‡,m+i¿Ò0é‘:Uà2È›5ð%Òcõ—M«Ýªr#ã¬ðdPëÕäöÉpMçm ²16Ã'y…‡ñ?¸‘Œ•'^…ðÈL¤Œk%Iÿ2ÀaŽÙÀÚèb€[×ù3±bù uÙÙûâ~?ŠyœyúßÕcKÇÞ]fð»Yè€ÎH*Ãx—1$¡Ç†§µÛº³> «û-¼t{BXá¤LµñewVÛJÓÛ;šBU:ðiµÞU§Húä!J©¯;f–ãª2©¾+!ü,ÆÖÿèfÑÀI`{ÄÏ-1ð _ä?wÖä‡dí–à4¦(ÔWw ¥Ôê.5T ÷5² ãå¾§¦çÃ"÷ã)ˆsÖ˜ '}™0~.…Eñĵ1{,«D9'?ò­–jã^‰‡MMÁóêòS÷£‹c#h§î=_²P´í\á’NÙ4‹–²ƒ¹‹OÇÖöéóÂVß5;3Qú˜I]}‹€Pò ë·¬ O’×Ú?à‡Ø@µkÑý$CË‘¬ › ` "àÌ}ßÛšzÜøû—ÈÝ6 XœÑwÐ^aQe¬é“󮵤ÉÏ_‚Œ<†^À½‰½  ¸£ âjäX`ÀêúÕ¢¨\0{ÖQiÿ:ýPð­¸g}À â1°ižf@&ÑD;öãÈ%γ ,[¡}Î3ݷ̲ì•(}LÝeV»Ì9Pùåß„à¯à'ãš1DQ^ß&€x9šSЫ¨ÔM/*ß»<ÛLäù`n¹Ê”îSÆLS‘_ÃÔM#³c޶ª%Z±ÕcÕ€B¨d³-&¿Ê K†l¦ÕG]zA܈#uûZ²¡é¢!³ K“ÀmQ¸&bs¹¯§Q]š5×€y)±_,oLÕ¸ìíù\¯±Ï^îtÄ›¢åÞŸ§kDF *"ê÷Þ?,”Y‹è¼˜diLÌ9Р­ ¹·–n™qºt žÄò-îäí‹M]axúîgóq¿ÁòÔ–„ÅØýÜÀ÷U$GøÁwOàl•KÁ÷šyæ@ߎ)àÿ2c\4_Rº2+œ5?ï6i.(…m‡°šŽµæÄŽÚRÈ4…ÊUZç£Ñ*[yQö¬H©Ù¸}oe; “Šÿ%B÷Qœ}ª×lP㵇¦-:2ôƒ£2®{Ëê¼yëá7ïŒÈòg<~ú4ìØá¹q P;ìXF×kfzÏiZìÔy‰„Sav£qÚÿ4ǼnQ‡ðʻӯ]Û¼ï:ª|öÑîj 6ÔîqmŒŒº›õOÞÛv?;/ÌÅ›äõÐ_ÕÿPé*…–¨c<®!aÄìƒYr¢³`7’›É²9Ù®`È_–Жo¡©ì.!·ˆo)bƒwÿ¨? \|Γ{+Ótæ‡V½ñN¡£¥<íÂ*—DS¥ÜZÓá;VÕû¯p¦:3ÉøWÿ Dw0’f¢Áò“ðiºu7­#Üf Ë´Ëv"<§8=ê¼cò€ï]}§—ª¥SCüËÉfÿt¾ã­5*5˜Å %Ô#ô3K¯%º;ÌôÛŸÂQN_²Ça„ùR%É›¨­J7îÎ|_N1c$Ò¦¼,Cà>?¼lâ6j‘=0=h5|eæ?·\ó²Ý‚ú¹ùŸë/p8üeʆe-ýôÚÿ_£Ζ€z€U¤t|„e¦ÎŒý“sõ‘5š´üŒÉ“"†G„‚¦?Ô,XàIÞ›i™gÞN¥ÌvÂQµLHLLÖ¼K5õ6×ï&¾UTÞyÂâcaIJW‰(†QX4ˆ0пO ©è+>Y@nò‰‘j³óï,IÀÂccã:ImF„HF}Ÿ’¼êjÀâ`~uJwÃÐÔÞ€P–mã=­éK¸†o{ÜÀÙl—Ú¾·<“¼ÚËËY¼n‰ïºøŒ´¶ûØ H”Q|’]äÿKèqßð„„‰¥€ZÓ»v>”wV(K;Ý’kÐ#s{í•^JMD „ðÃm zφŸM]*BøñhG#OhZyí^rnð¿SΞï;]_±a‘-»¹mäÏO~H³ÉÍd9CyZ©óÁ¡ai+ïPš¡bðî4s"±\O¤ög"OoÀ#³#ª,zY9fJ"Ô‡2;ÑýÄ7mZkØŽ–.XôýuphfY‹KQ†Óûj–òx;ðùÈ(ü\B§¼TD~ Z}hÙ¦ KK-œ!ÈN î8?à?§ÿMÑTãd£nW„çì…Úd‰·BˉƒR v6_ë‰Wp`¨å¤¶!åþôMOÂv¦+7ü7Í>¸¦ˆòËR€rx’èl %˜!þD ߨù}½˜ÌKõ6 G öå]w°OãAÈç%°ÌÎàÆ±Óªm\ûÓ»ÖUßÉÉGêæõg~Äx° ¢A7_ž›¸©„¹è_ººpSqÄ¿ƒh˜‡bHR*paFîÙ|ZC@ €!&Í߇ít0³,çhÐÑk_ èâõ8+yù±Å›{¢Ä‚þ”2™Îú´é¸ézd& ‚¯Š¾Ÿj¡°ÿWŽ‘1Ù²!À<ŸÀà>–¬Èf¥´LMôK´ Ãý8AH? kßÁZ1·ùæ§©'Hjî€äé`Û®˜oSÊŒœ1}Uä 0EÎÀÔRÛ¯ú,4b© yʦäêì+”«Z±uÞbÓ{ßHqcw ¿ˆ­ž+u ÿ/_”©³p\äÀ ŠZ%*ÏJ*4._£Y¢ Ñ*!ßhN[žÏñé®°â´AðÑáB³¹(OaZãZ7h½TÙ­þŸö’SX¤ÑýšÒUôy"Ïó Ò÷?«_ò˲¼µÎ© $¡Ð$¯åZÈ¡ ²-É÷F°k;X»ÙßgÜjG˜Ž[V¬öäóýEI=üÏcf;×sR×Ý¿¥×¤ ²œ3^Í/ ²ÉÐBªmKcN`²=>‹‹B\„J€J—9žÐ&Ap »§)0w´:þŸI !Ä9øÉ"µ+yÊ ušË|’…uêB#V’Çb“ˆ °Ôþô Ï|3yëÑC[K6 /ƒŠHfQsQ¶Ÿ\~Á´û6©4Ú-ÆSö¢˜Î„ÛüÖœ¦íÍ›Ã)ƒºHp÷ëÓ#¸*֤ɘ£ÜÐû²§?V žô¹ÍB]‡xï ÊkJ’pu k—GÀ3ü½Ý¸ÝzOSº,LjmÁ›bÅlü/»ü‚5›9Ž&N$‰U++Ñ0ÿ~"Ÿ“~ÚGÿg€iz½Ô­Tãn2Àø—œ C~ßG>Šmͬ,á)vó„:—–oõ­@À¹õØFcÔŽ[h.àXaf@?C}æíÁ¯]ÝÛÕßÒ|òœÞl’w¥ý§Q¶WSªŸûÜúƒ/nPþoT¡jå’†éÍ">éo3ˆ#åúîOâ0Ôj‡ެMô÷²aEX«äâ"¶IÝ).ådd4¡ ×ø¢¾qÊÙ«ì`l`8¶ípRU¾R„ —Ä5Ç$rE‚€ë1!T)À•Bnõšaáê>ášxá÷H¬biÖ¥k=›TWˆLLAËæwÕ³gÂpû° <ÌÄb}µ¢5=1+*èÃÉ\)f>uõ'B8õ~Ý %:ÌÏ#µãÁ–;än9ŽyiJ™$N ÿ&ã¹ÃˆeFÔØª7y|ãG³@šÈ½Ã¿ ‡€gˆ _¢òuE#òbB=t:ö¹ô|2@+<ä8Có¬¼i“y.uš¼-®wªÇZÜ/5Fìö'Z 7‹V=C—µuéQà­*3PÈ9±j¶Ë‚4mS|]kdÛMßÚE§aOìÙ˜©_7ÜÁ•ñúÏJIºæ‡Îêi“ fmµC¯ˆœ³)D$ßÒ§HÄ×W“#…àôH–qì<`®°Õ51?ûðxí>Þïü¿•iŠs0¬¢ÅÛÚ`©ø6—" V~˜<¥¬ˆÿlí¯wôãh‹|»”¥^W•+ýë«Y®e.˜ˆ¹8O¡oˆ³ôÿ‡.<$F×Q^fÉ4Ò o(2’äæý¼Ç¢ ¬4u})‘È+²8ÞIÿ$ž5|åŒ>rkY¯«ÔMÿxdX »•*& 8ÇÛ—`"EdráÑ[WâÁ÷ï8ÿ‘WR„w»ÖR§Ó¸%úÔfp¾9è®N}<ž™ñ#PoðëaEá¡Jp/í#=ûe&EyîGS‹wLþ0cÿweÍ'ÍP)#Ê¥hÖ,Ì ¡Ñ×A«åå•ë®$”H1QdýîQJPE¤Ža´BJðÿJK4wI.º[žcWAŒ Òå¬Py]IeNkfsò-š†öý§9áÃ$Ï·#;÷¬;V³Óõ¯á=»tˆ}ã§èÓZç2_»èéä®H)Ô¹<'Œ—€­\¯¨)ê_ÀcÎÐŒe˜Gfl©†ÝœNR­Ü#ˆ|ÖÛa·øíØ ƒìæl¬ …OÌFß)Õ5>d§ «Ü¥Óì‹Ð •û¢ò•KÇ1(Lï8æHhY3¬ógû¡Ëxï‚0¸yýiH_1]«9‘“öŒÛ{c· /-ö*0=@xz¨psÑ4þÅÑ}£7|Z’bà ‘gqnª&HZ;ɦ ¾×Âv´{÷²,±ÔŒPÓ¼¥Z¼ÈâÜ’rñwJ¦òÛ€Ÿ3osáà§¶¾øÕ-Å|¥Zè—AöEçVˆÀ@®ñj'Ÿ=6ËvØ Iä‰Z•ö 7Ð÷Ím=+ÙíðÞïKM4ºÿ šKo9µ¾õ>ü´[ɦ9öyúi³É Ù©ÌÎöÅ•1•ÀgoLGݹ¹Oc]ê,P¡D<5 Å=f£îXš¢»Òëp â¶b()a3}†W³0ßQU¢Á Y²Mpq°°qc¿c2‚ê %†Á…¼f—åÈŒéz¦€8µ%îa1[)ÉjÈÏ„€oÛ Ká_íŒÛÒÌkâPFLŠB;Ž¹Íœp Jj® @“~+]ýp2É©OÞ0:^Þ¡a<1=u(Ä^‘úÚó¼,Œ^AV%6z‚µ“[£ ¾%i Û]£R-תÂy«wm]kCö Ì@TØä|AœöM¶YwЮï¢nbmP(QÁ ó²® *h”ˆ¡Íï(7·wøÍÖ©;˜ÜÆCPáÇðQ#<~RÓqöÐì E=•Š#=鿥ú Kd% üŸ¶Z9ÛÁvËXFÅÑ}A”¡· ÐÚ呚 K’U€oxø œ_÷yÇ^°åñ´çZˆH`RÁ¯L³þeŸ„r+óŽyð¼×!º¹9“>’†ãüôÄÊÛÓ.–É!ËRþÄxãûÝ”lDây%Çp;ÿ;ñnJð‘Yhºß$±TÍkþV×å}DrDä`½‡iöJ ÷ u ¥ü§8s?À ÇU¸ ²„ ïµ×,fffás¡<~ÔUhêo‚ž¸ÿrÔqȾ8]G¬OUŸ±»x×ó`FXܘ2g?iôúãe*jv«zgñ”aU8sÓ‰ù5&ÂÅÜèïh‡DÎóÃðó2@pMkÞö}r'±‹õÜС¨×Ú{‡Pñä@»ðI¾Œ ÷5û¸Ç¨©%ùÙã·°)éš«å˜ú@uTD9†ÖŠ.`i\0¸éŒ@z1äúþk£Ò¿ƒóoÖ¼P%ÿ¼ ÿÛP²¶Íé?\avœ¿–Þ+(`ßÌ”’€>5X›l¡Ï©!Fr„·RÒЫ­P™VUØ%"NšÛ€z‚+OÇz<¥¨BëeæLiì}Ò„ŒHM.,Ik+{w!4’[C N™ô’ˆMˆjÑŽÆlÌwÁ•.»Âüá~æ §•«éhÜrˆ¡‚Ç »±ô;Ýz•†„,nô´8;®+œË>BÖꇾžSv̤›|÷Ûàõxå³T%É „Íxtg› >¿,C#‹ _ˆ…¦p«l–;ƒ£¹ñ9ÝØO[û4mM4ì. ÑÖ]%gKÙˆ\,U;aÖYW™“c…9‰%0çVó´z`àBèóËÛ …V’¡E¢×“¬I›«Pv9çzÞ;U›ìl§`"z@ÿ0(`;ZÂÊвH»”:'[@åZÆU­»©þ|t@§y™,äÓídL/ÂߨÝÒZ«BÜW!&:úË?"ßr,Gž`Ù«¼#ú[XããÃ(ãdŸÌ-Aª·ü(ÞiDa½Gèx»iáÄ!a¥ßm•®SL+<|6NAØ’åÊ ›oÏ7uÖCRd‹ÿZ_÷\ÙÕ# ªýFWD4ü¤û`ÆëšœL¶ÊJ?ªÑóìjûŸJ zî¢5½ôg¨ÃÕzž„ÚÓBJ°¦°=‡)ÄÑc*A@¿•–šŸ¤-83s‰DLò±Ãáß]sö§¸-j Z9ÌÚ”I†ÇY9ìDì[Vz♹G`)§òœøaÜ=þŒü÷Û$1‰Òøò›—]7q¨ôüåB?1•ä¡~ìÀºˆ®Üïó]›òù¡Ì”Ù ®Ÿä OEú TëF܃,t¡ºö¶ 4\†Rhokµ®Ý¹V)E'´/(GG—‘L 7á•\FEvL˜ø>«ËñÝ+mz¿ô5uÖj´*òÒIž|ZY„ùè„kr¯q©FÎ@Ÿ‡¢—„œãç„zîhõŽÕÊïÀµîÚ6å„*­T˜¬×á„+^ýpؼùÙ¿`=NEà gÇB̘#ZˆÝ\‡@×jï+ÚÕCœÄñ.YwÝÇ7Ó%[†žÊó|ª„ˆ§Í›TTh_œ“¼uB*Â{÷Fù[¹ 5‚z(Ôêj«Û’úûiL®‘‚Ñ»ü7û $QÎ-ÊEëêJ‘žhøåÝ”+y@oS¯5%ò)^ü×£ðR¹-ëCœÏ.y©‹d}‘¤<°°KŠKTR?¾-8J`V’ ýVàÎQàþÝomySÂC[¨a(¯F  qœÝ–Ÿÿ±ÈOH$³<Di7$æ3‰a¯ôõ8{àHª+Çi›ä-œ—Pà¢,`†Z1~“ÜÚÓW—ŽUÒÉŽZêÍyëœùY¶%¶òQibzœxÔªIÂö¢ÞÛÆ¢î×…<ù_‘å»›ñ¡Àîeô³j'=>!g¥¡R±ÿK8ãz€+×o0c{ æplIé ´W¸ Çú†Aê«UO¸Ú@¼1t}q&Æý”Ç_$ƒuRAA“è§ÂwØø“÷LV&¯fסÕÏ{*†WY®ü‹¿ìQ8%Õ¹4eUgͧ5Àóô»GÔÃFåã¯ß\=)Ú%®r%Bp'à®Ët85S,gú}•Œ•i·#4Å{n² ym_hÍëéq‚)^+i6­ƒÛr×¢«"qâù<€ ó]ÜLQ–cÜBa£{¤¢T2vu×Uÿ†Œ œÖ÷Ö¿gç •é–¾œdý©Ô~‘ž¸ßl]gðÃÃB˪›,l-.¾k0 ¸!w˜ý"5ªð©¦%§7h Î4Òëy½òû™nŽÖpè°8}º³]›q~~.özž‘vq!ñÏ=Naa×0yŸ†éõj,ãí$Ê€SׯÂÔ°Ù•>™ìý Ñ¢Âv8°VÊk©¾ÙîvÌ gñÁcœÕ…­62ñ!1JLr!¢ƒ!t‡îüHQÐÜfqZ¹}´Âvk¿²"À¤,* %ã3dp{W2ù§—·þÌÅ\ÿh{Ùi¢»¹›F^Û]øî±Ü èólõäptz¤ ó#Q¸ƒ¢reÑd§¨Ð$%ßOÓi¥äØ uOsS Úì—ÿl6Ëÿ­é‚¢ÿDíƒ_¼%ƒT›ž 1ÁVó››_r®úL|îhݰDâr@Ë#qœ…ò¢‘÷l¦Ö×Âc,…×ÄKZ‰èíô2ÒÃXEóì.^0D>䚯å‡`áàp@5`8#m¢´Në(Z³¡ö•¶“Ǻu˜«X œs,œzx=+-µÿR¿Íè}–@ƒQ³„Ü <žZ4òÊÊ£,õï:­Jˆ9ûÿTjuì ¾Q­ÃT±^?MüT*aÖx'úãÄSÃ5iÙÆù# *Ùæ ³Sý‰ bõ«š„‹|WÏÆ_Ê’{’‘¸öâ!f+04ÿnÎ(åª8»ìWúêÌo˜ˆJý” ¤%¼¸Ø:«•0¹*dQBâ´Î˜ê³/?ö*SQt•^7KÁ÷ÒQ9Žã]Áx–)LÄù`©ÌNàó*Ê”v[0#°0¦ïé~¸%ž}Nx“ùk¤>½…ͺÃöiÞ”?„ËÖ>•îÉ¡.ùÆU‘/–Ð(Ör¥‚£)¡ø]’ë*$ÍóO;´WÆoPò}T,¡ê œú9‰Ø‰±¨ížU¢Êý9ˆbìÛ"õ¨¾ —0—:£É¨W'?l•³ë8eâ+d„òÂ?²ÍŠœÆ=×¥˜ùÍTWªv«íµ˜ÛÊ­!oïD„Ðòßñ3¸›D·_á»ÈV…PÚ8ëŒ_k¬jLƒ›Ïü O:¬ ˆ°°ð*´Ì*ï¡©¼À0¦TiФî. £k¡Ašõ¬¯¡Á¥tl›¦)K'HXŵžsÃc€°Áí»6•Wé-B ¹;Ä9¼Ü ÷"ÖR^ +Þ v‹ôÀ“Í„›xzÓÓKäÞÆZœDȽÊX[qÞ€i†«ÿ'rkëu.MN¨¥‡Ëº4âÍX ‚àÚpfÉ‘nâÿ6üâÖá <ÞÈìs=ˆ·e_B®Æ™fCtöÇ?ÎpEì1¨/ÛU¢6¿î¾æ^þ¬ˆÐPT=ß2ü„U˜½j:­xn¿°Ÿ" -!(\ȆÁ²* 7¦¼d¾7ß/kƒê®òipÑ› ú¨ùZaÅA?›ëȃIýʘøÚ¤ôÄ[£íj">¾“²#t•dÉns ]-W)f1%‰‰JlˆôÎ;d¿ežæ%ƒ'±oä¨ß,€ï‘á1àë¹hÙ&˜û®„rzTÍñ4äEþê!ã+¾ý2áä¤Ë¦ÈßG®%ß¼ù¼K~‡j ܤæìœéíÝWÑ ¦LÊ¡r$k)-¥¡äw"ÿ5Öv%)±‰’äuáJ,$¢[œL=·2w’JI©Y¤i±•©C«&øKþ¦ÞÚ©àÄˊƦ¡Ývâ ‡*ÄQEÑ5Ÿeå]”9WõÅOäãvÒfhà×øÕè'X=T̨µHä`*â\µôTœ²¾ÏmôP„uˆâ=1ÒC%¯=ùª:¯lZŠ>ÐÜlJ!ï%”õÛ ¼Ÿ¦,îÏ˶AÅ•æÆ^²T†_ £jÖ¦?Mu–ð»m™ªk¥<¶YCºæS½ ›y¾ó¸íÿy8MN¿1qéWfåC÷t2K’p× YbWŽ>\éù-‘pýXõL"/©î¤…w(p¿÷m½?âG>ÇÞƒyjKÒéP`o˜âƒE·³/ùN÷ïêW²˜„“½7mY})›¿ƒm’¬Nl˜ë‰û!<‹²0vË8ž’AÙ7}ž’ ×C>ôFyI…<B duàšœ¾¢Xª^Ô™#å‰Mâ 8«džß@±©£ðm\:Ë´V€IÝ0m:ˆž“peífèÿ"àðxß ± |³¥‡BQh{^Ë&49(?0á}AI˜fqÒ¿ ­NÁ©?iŠ]1)%ñ¯6;Õe‰ï½\‡AÙCæ;Ù__y®›ÜŒOÃk·‹‰[Öêd¡DTAÑ<;Ž©"ìš\J ?S‰…N8¤œÜkNJ©X±™F9*¦?½§O @¸Cœ EøÎýYü…tJÉD/ÈlŒ#>šŒ–á·”³Î§V:ú¥dùê5Lv»½_5â:Òqß] ™ŸÞU©p“¼G…øM#¼K|ªÜ·‚ªšùü¼lò?[.בåþÕ›Øãro{Ý5Éòü&÷a€Âš4A¯@k°~i Ò8Sß‚¨´¯háØžU¯BoûqtmÞi‹t…¢*>,C²è}1ÂþÒ˳ü•‡r1=ó+9“Õ /²»Ö¨Î¶A—K ñ¹j7Ä&;ùŠüe£o˜˜OˆM±s$;­LºÏ´c¦hN{›n?VVQ“ošÏ@Cƒo„ øÙp|ƒJÇn˜N½ì ²ÖŒBÀè^mbˆæÌš:iPÑ ßmDÔöë#£ÁýõÇÿ}æ·y±´m<^`%ó%Ž'n9æPGÙË`…€»óq¬A©}vç|¹Øµ30A.|÷ØÁRFqÊþòL›^±…!õÅ‹+OQŸ–ëðá@Óáú›Mö¾Q®Ð^ÀÞQ¼þ ðDR€ªï.»¨œs6ÒNçhÏ$ä SFm­ì× PZoHË™¯(äPyV° >8kã4Ú bö_ð½ ×É„ÎiŽA™h¯á©¤ªæa9é8—ãöõeûz¡ý½åþÞÜñûzäý½ÇþÞÂod8¾Þ§/·¯Ÿá×ÅöõÖßÛWœš%AÚt’ä§ T ýMF@æÚc~æ\ËÌÈ} ð©bËÈçMÔ‹¹Ê%óLôÁoŸR˜p)Ü_3ÜB¢‹ª«#|.ËöMöʹx[‡‘¶Jx+d“ñÚ‘T™k@²'ËŒ.W—^yïR¨Ôt©ÃÙ6_D-¢»AÉ^OÒ Í­gÎ=O€ß‡r”©_÷éé¦ÇE5'¦¥6 „9I9 Ðã)û/Íc%p*minTãDS^ûŽÉÿ€ 8âŽrõØ4æv±µ *ßÎ~Žq¥Œ°é£Òü‚íáÔ0rô,ó-R¨CÜ4w“¿düÄ"¦è9ýÄF^°ŸL1§ÈH£<&hŒK8B¤¥ëóõl* Sã¼{×ÛÅ­TE Þ»Í)ëøÁqâÖy?¯æ»)"›‡-%¨Á Í”ë„õ¾¡O„÷ís±ˆs!È“%¡ã‡H?Q‡"¬Àö jÙØ'ÞÕä}`d¸ ,ä±÷ÙE”Ÿ.–ËÎïû‘J?‰ªýƒƒ¨;J˜£œ1Þ©dÅ[ˆ·#?٠̳`âUùa”nb&AKêÎ(ž9àh_|‚yE¢¢‰~ë.MבÿW'K‰$W†÷Ý´ÄŠÉ @ '½q£ª$-ºg'ç Ír¢;U"þ:V:DÐG[·áÍ)ÕFâ(©"Œ–bW‹¶Ñ¿æ¢¿À¼­*¡C^€+ô¸??YbAq–xRåŵ¹œ­DÀßi¹0µßsT³öòø"á²­ÿ-Éͤ‘`†O‡äªNUïoÌçd*ºâ3¬D8AgäâݬDýgŠíKјb®Òë«BûcêJjË?ë^˜Z¢Á3v¡X 6Ëeó'\‹…=ŒpÏ»õJ»*P¦ ã©Ä͉áq è|ÕU”`êUo…!L¸+¨åaÈ`OÊR,iE˜ÂIgfj¬Ù_¥žfžä°”O*qYì¤]ÌBcì›U Ãô…‘¢#ÏrGÞB›¯pÂÞ‰¦ª×|©¯ÿ$Îçk §x‡ô­µƒð[ó†aƒþBékÀE#;VgÝ\=lÓ· c „ÁÊ`ú8•ˆþÝ`X‰AHôª!T;ЛiÛ>Tøá„'NV˜Ÿ3+u¿å…– éØÖn“Ç,rÅÇkì2®ša¶jĬY>]à¯Îýh •ßs¦93¥cÙSè WÐ$#ë3âtx‹]±% G¢Aýæ}u£#}oÿnò¸a’•¹ÃüiØ`òÍ(#.UhÛù&c‚šRA ¿žâ&qIµ*ÐCd=ŠÔ"åªîåÁ [ÑZBQýÃYÙEœ•l”„™,º…©¯ðü™C¬´‡Ë$êHAˆ“}Åœ„LìŒØóÜÆ:˜:®¨È`ažãt¨WÜŒR —(,ÞëÍ,‹:Ckž?òUY.V‘EF<¸]žïscÿg Î ”T<§Ë™Æzoª=W]iYÿW^åkA'ïyøÍÛ%Y“w{¶‘ŸÆ%§‚$¾ò!Œ9ŠK®,‘E°Db×oOɦ›oŠYðHGT†jt% {–¯ý8AÉ”rÁS;©ïí`Õ!5ŠÒuhüDZç`[“=Å –ö ¤9Œe†ƒi»¬{ú¿"kMÕ=à¶½$]ä~ÿ:'–G*N¹°l¯ý(ú“¶ÑÃ1~— ,ÁEm9Òµç@ñíh\.sãC ËÂJ޲ºÄ)[”tš¹ñi·ž5Q“çÛÁaks‰µŽ‚œ•X4S¼Xœíq¾Þbò‚.&CXósO26!±­â»Sî®éŒQ¹ÂúꆆˆABöåƒxQw³ñRѤ½h ½ù®ÓuÏé]ÌoŽ…=+HP¶Ra¾ÕŒ-ÅÒq+ DVôö=›“z0é7Êq¼ª8¬+Æ,ש‘ÀAi‹ï± MrÕ*ߍj\»Îà¶¶`aì/é`„ªS¼Šj¬íñTÍD-òæò€û¥Õý_kK:Oªq¥Öa®IºÝ‹¾Ñ`<©…Èìvlu>9%VS4gA“ é[öŸ\ÝÖIMG*ÉÍáQ:(”!‡¤MºxÝN´ì`28Æê-f)f3ôS§zÚ%Ë Ÿªë’φ!eèxAwþùPúûÌ€·ÄÙžâhÐzÄÈ¿)RTÑ2¡Þ¥«l¯e%‹f5u¬»þæÍA½ÁqÙ³‹ßúà=>^1´Íõ´Šæç˸ߕ.H ó‚ÜãËÜ}2Ê\–y}ßs"`Ɖî‰ášæF¥$@&ë8åÎ1“™Mn©£‚ùÌN•¦ƒŒŒŽ3ø'=dãÛåeËI?_R‘çS1ê »3&ç{2„lz+ð2ö§mëÜæÿ µ³)#ðúq*''ÈŽ9N¸]÷†o£ü;±ÈªÞ'£{âýQk€³”'åÖè8Ë(:$´a~l=:é)HÃmh€Ý},=âýüÝNÝ&çB ?pàhݸã—å´aü•€|1p–}•Të־ζs±Hù3ÊP>Up^Y Ȧ¦‹o†‡ðr³§³"8þ¡<‚øWcùîd(è>È춤å˜Â‰E Á&zÙgÕê±Ò)qÎhÄ[NªAöËÐ1D  š Š6_ ‰eÿ'â@J`KYºùÖ”ŠXú„£?ø–˜?®·P²}Ô/qèù6{dË帘]¨*RSY„ îþt5áÀË[yÜx¦ü¯ŽP×L±z¡ŒË¢ÁL I§Ä ;ã›jFݯ ö`–΂ :úY Q}õž¾Qbvެ|. {ÿMXN½o8`â–îÝGÏ8îz÷MÂQÜÝ_'Õ{ ?ââH\vÀ/…Ëœ \Ä…Ù“Ðq]mïJP¤Ì‘4Æ óqìø3e§\+›Þ(ûK¤‰€"ÌÏû7‹oÊœº‚ {<ú çìà_ Ñî†B@0n…&Z,Ùa…â©ìãê$B›%‰3¸_Ph“!Óêcu qrI€l¦‚WÀ¶¾àóÞÔá‚+½Ru5VÄqÅt±Ë—ÎÏ÷èzÚΦ&Þ}P˜÷²DÔŸ=Üå´7gNÒ¢èØŒ:²&6ô->†ÇIsÄB?Šnô¡èv(ª©-Vq±Äº9ôvm1¸Î#’®¡\d|#P0®|NfÜav=3¢Ââí0Õþx*”ðˆ÷œñg!¢ɾ¶ÂŠ UdaLÜo#aÚ-Y]Ã51—>Ëèf×qqŠVÓ/ø8ú»U5IÄÕ»¥™Ce•§•ÌÜÓ£¡l[À9Ùª›…}Äcü€ZÕk\áÚ!ðþø)EݬEÞÊ•h>‡l?ËêmÓ>¸ºÁ´ÕI»e}øE:ÇcªyÊ}ÔRŸ‹Ä#ºÿD¾'T&Þeê’ñgHÒ®ý3Æs;4C/UÓ§Ê…[výE³Íj~ÿ1£Ó†ò~Ò‹•Eøœ¶–^»èLÆUW.¡Â¾úÄ~>y\ç7Ÿ8ôð'¦(Tsy;q ^Fùn´Délt´õÎiÊ.¤:¦@¿#éHÚJŠ[•ˆE¬ þoу x5ÉõÚYÞ6û_vÑÕCÓ¿Ûs“‚À76ᾹĦK–ìÿ °±QöÏlËá:h“X›F×¥½¬OÎ ŒÐ<âÐ3aÕ^Ä•‡‹:^“±&xLϳµÎ}ò²P¡jw£,»¬jxGRÔ“! %Æ ÏU‡ÒÈüÚ%‹²Ô˜˜ %o«™ð?«ÂÓê3BjâÎ àL/8¥þjó 0#Š=Ó-;'3+ªÊÝ•a´°:ü5ŽüÿRá¸†ËøU[jz·Óþ5Ô-ÍJv©«ofŸ„`‹vy>)š¥MÝ0üZKÓrèöVO „Œ%ø ûÁ(KEþuùÉI=L iÈ+@x|ò]ùªØ­Æœt×KÇhq‚ŵwŸ0µæt÷E™HM}ˆcÔá!‹¯’ÂZTeElÝV¾ÅbO2ýkiAP« »¡EøRÄâ{A®¶'åš½l²%Ñmøl¤—‹©f–·ø¹?ÕIèïzfõm…Këˆ[OÆð’eT´ôÑ[Wo±ásFœ[z«ãí³;›†Pˆù¯ã©&'· ŸfWÁTÔÂ@jAð]Cž.}9-RDŠÖžI1ÿ{¼mÆ:ÍâMˆ‡ˆƒ Ïá'Õ0ê笠T¦}W^ßõ±:ZÐXÈdú#où…Dà¥ý‘ðè;Å9/ZÃÎñfóß¿Z’ucT)èˆM¨wî„·šs:þ¿NM³÷qBPè±C0Œ|ØÔR0_Ë>ç^7Ž5×¤Ö ,lY£0‡³ aAøqÿpo²´#-ö~ó÷þd ¼øÛ«íÞ÷Ä]ÀãÔþß·æ.ÉJý%OTðÐ#ZÏBC²Bàô¬£ åÏçÆ?ÕÖb`O+íòWçz½{gã[£^*çÉ$ ޼ëàœF—j ´L×í|ÿnlyð޹cµT{) êƒÎ—p_Ì' BmìËó¾~ƶ)h-@aÛÒ¶±ç/’­š®è¼°n=C% Œ‡Œ%üúE ¸°ÙŸt!¶ÇLçT‹‰}k„rªí¬\»Á |ÓY]wõŠŠá‹hÂ)aý!¼“:]µJÐ0ÑLǵš$nR¼æHÀBÛ›;éÊ8b À­#00öA÷𵤠ž8›õ3`âjÎ µ!œl±m2¶Ò¨o_xNˆfì“ ÈXëQvEMŒäiÝÂá_Ï&ö VþÒºj€R=®—Pk.Úø8¹û´M¦÷ƒÌ|¥ì=w{ UxíÚ\0ñóì,]¢¶è¥Á Á9›¡©³¶ù¶1A½“"*ô”¦Å¨næD›¹ôÔ¶¡6¤a÷ly'øpÁ±ˆîì€)BÅîÅ!ÄzÇHA:&ÈÍé•1ûyî[ÎDy6ff†•˱äýXœëöôÈ94#fá‹M² €ÿcF• 7ÅÉÍð}0(XÂíýÕp“L*£g­ÖžÆ\ÎíçN=fðnŠ8£òì²<¢—9n \ÇvWxcÚ…fYÒQfõ‡[¾ CÆÂN³O7jî»òsúŒzs`ÎÕV ÔC èöÃðPi›×°¡™YIТ^ð !ZÏ™ÿ-¿$I"Dzx¼¢¡yÃÓñ 鑽jÛŽZ¸Çö ÀXÜ` BÍV2Î$3¬…ç!µã}NLÎçì†è^¢s§ëMû9õ‰€ä‡æø;=©‚d'"2&ãçÙJTO¾&4¥WêÏ` a3Ž_E'ÔBèøÒ"B²iOž>¥WÌ2, ‘—«[JŸè^›k§°¨¦Ö'²ç+ Šv #BÁºB¢Ë·˜w¨Ìoб`tðsÞqûM– €ÍžŒIŒ?‰6÷A+0` :~½Aµ ^Ô䨻'ûz>.é½­ïÒø@>/Ad*l¯ß3'ªÚÞ‡]²$„³‡Q‹ñ…¤@´^ßíÞõу$¼üÄn‰U…@r •²!WÈË®Áj Dlu|¤;Ÿ%u`±Õ¶¯é&Ûj³íü긛L~È õÌ›!Ø © ]:xhŒöÔÛÃM`w¸qÿpÓf!è´ Êbò~³soGEéˆÐœ @¯™¥S]xž¦·¬bOC©YwÒcnN±lè !*ЬÎ8¸Œ×vXñÛïvœ^âuu6ºØ°õp×R¼.4É8QðäºÂªŒ«qØÂoß0ÑËIÄǘ{Ár2](ßÀÜçss-ÆÃä$¤åÝ‚æÛ,1$¼Ì ê÷†Ÿå÷%:Ãgsd›ˆurka¤—¸¢‚½©³7ar¤s$ЂRŸï¡Âh·«³Ï²…G!=ã;‹h´ÿ€ÈgöJ\[*#H€(ª¯™Ááéþ, ªjÙwOlÙNºg˜. 7îuíÞ»1HaL'¸Þ%·‘‰¼‚€?wÉLjö™³‡Ä"f¢d÷>;aè¢yæJ1_VMRT¿U‹$á GÏ/I˦1[­°D4Hv \ó?.É÷ÈÒ†;£l‡°gìñ™D0Ý'Rð—hNwA9˜nb?f2®‹_þPgÔE.~ÛoI6,ņÂÔIñŠK=ÿ}KêãÐѦ¼3-®·çl~¹¤$•] )?Üc (&𡂘ä”U€{Õë ¡HbP¼~OBýj5>ö¨—ÅþvBÅÄt3ÈøÊèß[T" CÓóítx=þý f )#©õJUXtÈtÜ€”»¼ñµJÃÓ¦„Üá•U×ÁX&®?Óžv2ÇؾSTØ•k·Î_¸ã¥Œ"êÃcñy‘~¿Œ¶óòl * *NßY+ŸÔå ú7ï%ÛAIÀûXk೚³ùX± @iKà˜ÏñL¹ð~ÌtZ¼§&’ÜÇ‚%}ƒsù wî'V$Â$;÷Û3n?¿óö°cKel3ÄÀ;ïéz€h2>ç Ä)ònñìî…e›z«”tƒöŒ Û—t l†A¾/„5³3ÈNeÒ 3p<ÅΔ¯.LT‰cà_ý€wíᮊsÔRžóB½žU®"äaü¿¢O Šb^ù `× ²´DÕAK{sìù×£-‡]SÖA½"$4Â\ÿ'©­è”÷Žõf0Ù‹©$Û0N7 í5:¤àñÕ\œß9¶«eÔÏ*Bw£èÔhú)<õhkÀî‹[ÔPÏÛœ" nm,ð™—gfÜÖÏø»ë½wÎWRåO*8Û·-6žô÷]ÚfµèÝ¿´i›!àÆ‹:¡Ìþ-‡q‘=t)Áöœò¯îC/›¨K•Pàl·Ê`ô!&ÑÙ£ô][­¼Z>裭ŽZrÛ=è£*ø*Á{Ìßa~Ϋzó¹¡J##¿#ÄIjòÿT7ãDØqˆÞp½Ïnn‘å[¦­X1Â×/SŸq^òZÈZmb÷éÍšµ(œÄ;Í}´bl}U=†©â^tèù¹"^B¦O‹XD"s´ýœŠ}‰¿\A+Ú(R råõ%ó⣫Eƒ†%:låÏZ¥Ÿh æ>cª%s–¼È>"­4³ªŠ§<¹¾¯ùé©%øöàÖôµ`@¹…^"µ~Id–˽¶©KäûpÄÚñ“ÃX»U®œ‚o†+Å™A¯²ñù!²`Ä[iÓåv(2ù¹PàÛ-o¸™à–…B,m¸xFÑïDóïή;±¿•ܹó®Á?§'lôâ'ôÜ•g•0'R…Óú¨hóÅ\Ô¥brkyz̯òpÞ²°Í\*âÓË@Ê„%wàíèo‹ÖÜùÓT¾ %Àˆ!®h¹ê³š!×`[è†=ìŸÖ!Más¯Ù×a/ˆŠO+rˆ†îMÂceP:³8é]×CÏ2dË4QU%Ç-§i“ï(î&R°ï:½£¯AÁ°‰̱ʾ*÷o¸¹“+Ta«ì¯º¢ÐX°§XÕ‡dÓhÀÆÐ¨%øJuÆÕØ®t‡¼uB*ÂKù¹½ÜÕ„™¦ÑØ^¦©Âºp¢ŽÄ¡^ÌžÔmûÂ#'ì^Úû>ˆ…ñÛ¯A<Å‚º¢ôj8=HàqüÜ‚ûpè¢KðBOmñäÇcXƒ·Ì½!ß«©¾ÚÖâ>A¨dÙºå£ëÿ ~m%k?®•ÔT,éÈn6¤âÜe9:Âb¨† Ë˹+‚]6l ™ÎÕÃ÷ ³vÔÄÖwÍ7Ú(2xs𭨤}³Ö{Š{ûûÀ#V‚Æ$=â9ë8ñEvâÞ̉&ëªl+7ög:Àª+y>´ADüF5m‰t‰ZÑæŽa¤ ôh^O©þ¨£Ü{»ßR7ÆÔ_,“Vv,¯Üðø†‚Cíw‘B+œkE0 0½ IªyiYø ;€w‰L8Pn㤈þ0‹¼X*5M¦i0Ê%ˆ²¯ØGŽef,™Ö!VÅlÙ76Î÷ ùë•*‰µƇEîE?ª˜æç/ƒ+ƒ`ÂóïBxv+:ƒ=*(MϘÖ¡D„@„Q;Ϩ®D8‰Ž¦ Æ>Œ§L”äý¿çO|¿°IÍóžñý‘ù-ÿäÛ¹'ÙP+š”9å:ãfQ¿ÂÛKMÛðë׈Øa^å:=vœy™4]vó®Äù5Zß*ˆc)ØëÚ¯Ô®9`ÝVévR…жÿqå.ë¼?½{‡òü ÿg‚Ý-nàïíjC2ÿ[êQªíóÂõ󲇦fu¢å{$OI‚õìÝ,¶A¡ÐSSqiéúÏÆèWo¦ßÊÛá ¤5klˆõt–-÷òö>Ñþê„´_·±Ó(rå4Et޼™ÑO²"À¤, ¢òþ²®]d+?Ù,ÿLç“Å‚ÃT×.¯ùÙ€çMÉ¥ï¬N °2Et!<ƒ£0¯?x±,¸JÖèûwŸ’._Qi*v íJÏ=¯Rà@Œ}™ÞY¹Í Ô õhéE]ÕBk÷¤÷_Ý5æç'îËËdà W·GÌ:é”HlblÍA´/F¥×„h\ü1j ö8híÚí“ë1¼¼ùÍ„g‚ÝRðˆo*…¹‚¹5àìéA!ÀšSºUìŽÉûÖt¥üžbÓ°Å¥xé/ƒ”òöœÅsÖ´ø¹ Œ‘‚Læ„”¹¯Ôgªn-nË[(¿HìÚ:¶ù¦=F&Oè÷bY«\Ú_݇ÝÈY…ÂÕOB5=-¼1‹ô¬0ˆµ.ªÃ‘n?üœ‘VX²°ÜÀX:Må;Vò”þr¸ fû€3O\˜¼ô•»úÓiŸzrQSFã2X±‡d´ïc%·Ü¹ª’-"wbÓi}§ð¤äò¬À‹bÈ¡ÅÚ?±Iö?¾©k94ÛPÎy,Ó›Þåðj¿îÂË‚ 'ðË>§¼á±jqµh¨`cňsÌJ3™þ6ø°ñ2œø®Û+D(ö UÖMœ$DTS«ýÙ¨c wC°)ÁXé5„ˆ„ŒTX¤»òs»4:°£­ô¾  ²ÃJÒš£¹à-.:]Tz Õy^þ©4p6WtLÕ¬bª¥VÅÚ›Á%ÜxMa#팥 mMœ`IêvÄû¯ñ3¸©–ÿ_ðÒ°²[kàvD\Í?ô½"¥'¥*У=¼¤â`FÊò4ÄÍ!‹zi#˜ƒ' |vÎöÒ^<;ÖèÚ’­"‚W£twˆÙ ˆ€ ¢Zuñ<މ‘GWn_¹óƒW/©ªë"°Úd´a…YELAˆüoÕ‚V³‡! P;ÿ:¬ùò—q`•[x!îcžØ)J]^µM8~Å|ѹ•CLZ¨æ«¸F®oC•×õÊç…%XpšZhMJðŒ VQ'þ‚A”ä9%â­ ó˜6QU¿ô׆ѡš‘3šoƒ°–¡Ï{ï§:‚Š]ß®r| Uò‘À'SÖòó¦!Ì­§óæ4Ú8%f³--0|HÛìï­ßøsAM„o‚-H3?ËÍÄÆÄ‚³ ›”ç:e"™â{°Ü §sФñܑ՚HjŽS$ŸU`/¶tx§˜,`ÕŽÝw kY×(ˆÙãË¢Œ©Š]’6,!+ÏÌ/‹ü‘•½íhz[*èâÄöÙÆ.UXk±E‡Îˆ^»'¶¬#»çŸ <[‹t^¢¡‹}þ`à˜i4´­T øUøVòš`t¢LŨú%U @.ùÛâ!ÈY0‘ý"eð¤B÷‘=úqT÷—3—ÎÄÍ&|%%_ —›ki±J*h6'½?„ ®AÑ~¡kè¨YbËÏ^ÝïFŒæšZ–€›mS{½‹Ÿ¹peX[+­RC§bÍ»ŽD}Ÿ™™í¸7®Pî¼µ›lsÁšÍ£»|ûÙh¬â±Q2¬m}¶œ’â?wÒ,ôê$—fƒlÒ9?²ýº‰Cˆã’Úž®|g%§ËÀS¦¼»5'ÎŒøwŒû¥$*6ÁøIHD×ã×=[gØé`ðËÂÏîSÌŠÉÚ7Øð¹HWv£NùOLyì?„ì> ±y„ÏVSŸw¬¢ÂÚ{ùâ?t7Z¦”aÀðAß‚äV£‡ú pøåÜÆÌ áÖ`Ré¡òWµ^ꃂ Îß–öq¼•ë«÷Ÿ4Ù?á(~vd+Ú ØBܼñ}«[e‚ÜÌ?.d‰TéxþBÚ“± +…Ò›ØlxM8„ÌÚm’Oµ¼’Ó_ü"ÕSÍj­‹Ì:û9 pg©DVž¾W_ÁVÐŽèÓLu­þUÑ:Y¾¯1àVY«¨fEýGN‚P5¥Šnæ-&|?þïòùÊ2¸©ÍH)¹ÂÁŸŒ·ÞÅŠ¦ U]ƒ²Ì]P” /¤÷ªùD.HXÝtÿCCBAþùKJ ³`ùíȺÀI³}øŽ tVQª4²Nð@ñ ¬2åÉKaznñJ­7i¶-ÛÏàã™e’~‰; ‘œ¨»€¹b%\°d“TaÕiYnC¦ç[æ‹ 2cÍ õN…èû³oÿR•O'WH·.A‘uW±>Ö?ãöôÙûzOý½~Þ¸òûz¾ÞÀ?‡V·ÛÕ®?‡JèáÔýöôÎÏiUbÕJ¢ÊY£pÛiû°ë$鈫YJ-Éùõ°Â Ú½5ê·Ï‰ú½Ž“wɤ˜eÌêòŠ>×ï/ŸÖq(5IµDú9i‰¿ ÙÆ¦"Ð)2žL­gÑ´³WuRÃò:²[·Ž 9nÇW¡}×(Ç\Z5b ¿(?µÎpoÍ0c³" ‘Ä)ƼP#ˆJrR¯û«a…x£|8ôì–£¿ wÇH^}Wì/ݨG—y´wG—zâ(öÑöÏ]ß…Xò‰ X3‘áÊÖ;àŠ³K'æ¿M%ÞÙ©ðâŸ9ÅIôÐ )»æð±Jl*@¼…Ò32ë…§RÏÈðS²øH|¢Œˆ"p`Ô|”ºŸ„ÀÞ¬:>§94ÿ,¤4^ $þANÍü2Ì ·;õ´ÞB6nômúa˜‘wÞC‰#á»ËâtoÁÅWïÇF ^F*@MÒX#½NEÆ-dbsÖ´Ñ+gm´·£ø£o²5‹2Â^@»TóAsTZ¡ŠQSðb—O›b€÷WÐ`Õøž[½Kꦿ¤ó8t>—“è6í‚/íKÜ=áÓãÊdW¦ÐœØ^º„ÒÅ0÷'[ò`&OmE¨@þ33àé ”=­—“¸e¯³‚uŸÕÂ{ö ÝDË5ÃØVÕD¦Àl¦‘µ@$ÎÔT‘t\µØ! À;gyEB#?¯¾°é ÖÁ ATµ1›ž2ˆyE(Y^jiˆŒx)ôOaw•?ÍÕ/ëNý:+àùvâ%Äþ\&<û›ìÌ £È[þ‘jÿçi"™º(á’BÍYûyÓQhâ™DHÀ¤‘{F%õâ·tá´€›HU7´¯3<@­®Ó°›É=ÂV@'äWã˶õ¾°í’&TàbÊ´ÝWz=ù¤•³uÌm«á°XhþõèÁùýìüy” T„©P‚l{vJͲ“.5J¯|Ę¥PÑk9ÙK÷r_cZ?1¦ŠŒÙ^ºÓ‹`üóc»÷ËT5¥m.”‘ZÐ22îSÄoüߨÃ5ç‹ú0hÄiÄ~FƒÄ”Úþ5¦&è‘ȢƠñ|ÈËÕüË!¼'Ù¨ý.3Ü&c?ž:Ð’~¼Rë •%Mðª•}‹ò{SîÞÉÀÆ7Qªÿvê²võÿ^³^ JõøHÅnéæ½®’—qC4Á+¨YêäÆŽæX}âÞ;·¨zw™™Ø(Fmƒ¢DÞñ6GЭ#c´¯ùA»TlªŸs#׳.1Ê© ÕCN¾½Wd[÷ÿÅéÑç«úzˆ éz¦¹‰›º:X€Fʉbãï—üÜC”AÈ;…ú³!G5‹ºëšxi•²˜v|!#œxæäœU ªámÈ#ì~<§©1®]$a¯Ãñ:`n~õv§[ÆâÖ9CNgn ýˆºéè§£ž!0éä£Çâ°j"GÊ =ár â ¦d7ø­AÏ4çábf%¼ØâòÏꎶ¹ÇÓ¬9CoyGN–p‚¢J‹‰«m–,³Єú®…0µ]øÇòUY.VŒáAôv<.Yàš5ð\Ék¿’@‡ÄÂâˆæx°ê[Ðýú©²(}\é±I2 ·‡ø¼8%Åk4lOl͆œÑÒÊÒ¯lŒ-+s4ß?GÆâi ƒ"Ë}qHšã[˜¾D™†ì"¦byê‰Jr¼¡°^ ­‘mæH@6f T8~'ó~*¡äèw¸ Õ_± ànã!7Î;bè˜ÍzêÒ`( 5•Ƙ¸C Å# 0²aR%)ÁŒß#£³]asŸ¹ûçMV(‚™m8¨©+DA ÃAC¼æùs§û0¾‹+–©Ì´äÀ ¾0N`Òb¤Ÿ/pþ&ñNHÅ:Rë'`– ã̬ûÛÐAp´ZJ¹ãBÚN_Uætí¢gú·\^¤%ŒÝÇ&‡à¯kd‘äQ-tªFIBîa¬^^s¹´Öi‹Òi7(!ÉZ}שÌ|ákÁrU.ÅW¨m›“ìjQ…žžW†KÉ]Y6—of”³ç-×Ê­ê~ÐÒAó–õªŠNAòoUØß, û™ŽNÃp%–X*_Öê-ÙTjŒ^Õüáílãã6î>vÁmÜËSsmZ´´_üÓÄç“ß20q5·µŠ‚ `ž¢S>ð(@m<šœ?(L4( áxWÆß¯šü᳜2]J ng¯µP¡ÎâÂ6H»G4'L£Ï© qše¦©.8¿Ïƒ…<ÙÇϤÊÉ.%Ž%UVR ¼œ öXÙ-$FBhâj• çcÜ œ Õè+èA.PÒç¨:j}ßãú+ߌ9)’ïvó¤ÅûÝÁ‚í`‚á—æ;Ípþ^&Ô“¼Øò¤›î‚Û«sr¡Ó5!m{ûÂZºl\НTVäÑô/§ël|"ˆÎÆà¾·_qòƯò[%J„¥nD¾a€·ß&‡­Å1¯XÆ4Uª; ÷òT×`H^Ð_ÿìÓŠÒ1нmИÅî«| ¤aÎÆ_f0ñk"çJÉà”ÑQ¸,+ÿG|¬¢–ø~[ÝÎ: zÎúý°y$›ý¡à5:Ã\!S¤ÌÌ|j…¨x黌\ICŸû.¸N¼ó¸µàÆø%÷˜ŒH{ĘPC ̘»˜„—JS],ð†õBgñe÷ ´­%u4FÒX©J|­R½Oé.C/œwŽÉLHZ¬ÓXâÉÌ ˜;éiø»£ üåWãM±UàꀒG'›\,}Ø&aåƒh$>óp€ •/Ž™?ÖØñð:ÚhQlhé2›×Ìš-®[UWn/!ÖÓPAðô¿SÈ:³—é´ú}2¯¯|XÖ·Žd4.> ƒµ" ânÖÿwN&ÎC]+4r¤NjåTÊÒŸuHdSÖû‹€eŠïùú~VѾÁˆØ¾ë}¦f|IDàM ÅsúQ.ÄÌ}´_Fj]Úó«•ð2T·¢öÙ׃ã¯5cqú»™}£':•õαUË\iŽ Ó|õ’•(B «gz?NôÐ`{øÐýûæTñ‘Ä|àðiØ´rƒ?»ÎFŽÙÚZ°UíHKדãl™¹Ç}Žã¾ÕTô ­Oc?„IyU kdþhý›þ¦ÜÛŒTݸÆáÜÕ%B,þ‚‘-} Ó’Ã ù÷£oŽ-J6ÁßÇ$ØmòNÈ<…ø‘ÖC bâwŠ-›sa½«ë‡á_vÑÕCÓ»±lòmú`™Bñ|ã'1U•cºG=›©nÜúì¦á¶$Lµ­Ÿ$ ÊTÍì펇4Ž2ßÓD©¤+æps*³‹*Ã~ù³ZÒ¸¡¸l‰Ô·m'çÃíمɸ¬œtof,sQé6 •òFß`|ãDbÂA…„»Ðî“§/3 U†Ë2ð_Ю03SðY*ÑÆ¥÷µ³@€N*çU™WÃ¥|NÉ8UùÄ@˜ç~ìo©p½“ùjEƒ$ó«&9ðí‹A‘¨Íé¯å_^'}?’gÎ܉âÅ“6©?ÿ@0Å.âΠèèâ¼ßÌèø`ê«s½?a¶[ûœº³¼5×ÓÀ¸ ­ß=ïÇŽé—˜)fIõÀ P# -ÍÇBQ7n(u)·AhV…mFâýœÀÈlÂXfubI/[(qe¸.GèêÈð8u+” ¤fú˜¹`_m{Æé³!š/y¥Š 瓵|y ‹†ZlÉWQ9GycÛb¾òµ %0Íkæ:}ÀÛ[3+Q"îè¤.a„[ü †ÊAV ’Úí‡2bÕ†ƒ¢KÅò‰Ùem–‘^)¼ηÅæÿDl±õß§éhyÆõœ© Á¯ ÏÕ¾LMû‚XŠ÷i*ÌÉ9¯+ZhÛA.I¿WÑûƒA =•KUÈ¡Ø?-JÅ'‘ÿ!;&'Ï'*³@¯2• ÏM¶t‰|áŒ#\JÔAê'oò`Ûœ®"€Ú- eª‡ó˜*­³uãá¿YPuòËóu[ù´ †£`ÉyµÛ„+;˜YaJ·ˆJ$÷àS le®Pwð'8,ž«gÔk³°gxqzß­íîê|’‹öT?Þï·-žÃÖ¿>·—>+WƒÍú3P»lbÎÞ tT&ŒE³É|Wfí<Á}­á¦§ëX8]”²Û?‡DÂæÇlJLÚSØôEB×P9¦r«iVŒ7–q¡Ðþ<­É¤ñgªH½‚óyÓß«^YáÖ2Î%à«M£dtá"™Ù°Ÿ«¼Px ü|]5Ï$éð>®t”dQõ›óeš>kŸ-´„`”hµªÔó«ÉvôPL „á™GØÇ+ºcW~D\ù©Þà·ein %b £%ÿyç[ÆTmudK#·ŸCêUà`66£4…ªb9‡Rô‘}ïUßú<Ûº<Œ¾ýnL{‹ -‘ <äÓžÞÒšÚ­‚R[¹t·r‰§iF ê ?ÜPs¤2­„#;.¼xå®ïôô]äÍÖx¸GÌûoù¡ñKˆ áhÛéw<,LŸD#“U˜˜JðœúÅ’Z8d;ïJÙk¶3eÌsÖú *dù•XKçpÜ€&ˆI˜ïñhÚ÷æòÙ~_µî” †quÜÔ"Oáè ÀØ_àxeÌ¢cXr;÷R"Yç?§­RXT˜-Ý•7%˜›Œ5r²§i‚†”4/½õØÝU4³¿½dg8î4@0?œÜwe*°1U”èêÒ¸ü¨átðŠ•¨¾QËÈÛhQ+kðŽÉ? ˆ»-¥õÖÌÀ'þ¿hõ;Dí †šWŸõ\. ùUž§ÑTì§>mƪœv—láR…!'xwËça¼;O¢¬ðGªÔ8 n5æ©çB"VAѧ¶åÏ …dë«(ÎËxµÊÿ>ÒÒ\µ³H/œˆ`Êö½6±R©Ù€½îMŒ;õ‹/~Áe‚TÑ VÕþ`Ø»Uêª}úŠÅËÍÚugâHÛ7bÛ(MÓÓþÀiúÌõ+Ñ€ÐQï’%ÒI ÷ ªq9ÉÛ=yñÇòîú^€²“€¢žX–bHù†L?Ó_Sknø!PНXŸßæ!‘[ý¿øq²Â/,m>õNíFö¦3§'ëà©¿ga˜,’Ç`?ƒ$Yüñ;–Ó$ P Ù ~®á¡n´ùtpƒ¢ÐU.ðØùÜÅ«a!?þ¯tF5-‰!žh4ˆöÚÃm|xÇ’üÝ@AÃßÐ[ Ö™Rdy vÐa¥Ôù¥€ñÊÕÀ Ùñ×Êc„û³í&kÇÛ¶9A”Ù]à-ø°’·É>yØÌÅïhí ’UÑ/ü Ö?ÄI|”%ñv}Ñ@ü#üÈ!‚¹'ÑAöÕaÈîà•'šè‰‰ž¿R†ÃX*|‡ƒÙÉ};ˆ°­_ýÀÐE‚þVŸšeFœY´«„áÜ@_{þ6Ý;‡,ñ.Çeð¢&pƒ„ÈvбCµ‡æðþu’_-p‘™›}!×4‰LÂI¯˜/:ç¬ÙóDƒaŠ8:Ò u&tJ8kzÁÝ8úù̬$K!'ö®žêÄ L˹Žàð ÊÁ}ø†Â9êÈïáÝZ®ï`_Íl²#{fÛ´UIZÿ/D'„Ô [ÁdF©zX¥5ïºô÷‡øwÖGö2@Jìž•7f×Ì"DUž9#'`æÜħ|׉)ÂF¥†‚q°±ûŠÏš;ßp@Pxà’³·Åutmˆ)/Çaâ=á¨ÁŸkd3¼‹dÝ"„$4Ìæ’\°ŠÌ˜ rÌÿ9»ÂK,Ïq!´\ãÄ=¦[ïGÁ¹¥Ï«9j<ߨ­ì+]U8Žˆ÷³IªpIZxLÌEìj,<–g`°'bz’çªóAÐxÁËLꥤïHtâÓþ lM™iöÜлfþFK‚ÖïÞœ‘¬ÓŰ 3ú­Ã i6òP%N¼mYYë´òÔéßyq©KD þñ.Êû…hEuhÓuøP*©õ6wažã3”ÒÈSªœŒ›}/oõuQo‰¡ » ÐưëØ¤˜fxäjDøWñ-ýù`Í&ñ^Õ$X·×ù]^„‚iJiî¡8'PwìcɾÆ?ÂÃ6F½×燣]’áx)¢f­:Ф,½:J‹­ð°æhok®‘öÕü9ã*^Ó¼Ìjb¯–ì)A§¦œ¢~f˜7¢¯"MU©#ÃÈ€•¥;|êf3Ö^ïV­e (>ƒ$˜Wƒ†Z–£µ•_;AÉ5Qoy7Éc§V„Ï»¿¦éÏöì|XZ›Ícøe)’ØÁ‡MOa»••Û `ಭB†°~¨9ã<‹ñMŽÌ¬õC¸½12kÞ~rü[jÈnÄ8$޲Óh¸*¬cŽùrÃuvGgì­I7,«Â²aíˆÙ¡§ ±r2á‹‹).Lx8S×ûª óIÕDì듪]Ï8¯4ÿEv/ò‘äüdNlr„b…¯VRH½0ÅgÉd9+eæ²X,ÒaIW—e›žM—Áhá”n`¢ª„î7c%à5 7Ú€Ðq?'XpÈÅÖvYgäO:”MßqMèé–Å3ý ®3¯‘ÀwÌf­Ð@Qeîî¹¾Ë|y`ìÌô£Êö.Âüf¨<ÑDLX}`Ð}4†HÊú·ÎÍÿ6-ŒÀ/K  ðÔQ“) ŸÈÔ»ýÐ[gù WX?ÜÖÞØö{*Ö_·Q ëùžýB|661QP9°ŽtTc šŠ9)øÈîÿö,ëÈóâørš—+wAá A³.Häû¾(¨G4Iì¹¹S/n£@›³³êJfÕñÌ6ç…=“¦1E&ʸC ñ€ÒÄdœJ¢Œ_F#z¬PgÓ³Â)r›ö\‰ëñ¶¼`µËÚ[4F³9Fíu-3´×ÃU 2Ê7Ïe]º·û¼h ~0Ñ€â}.óÅÑS¡ÒÐ_í<",€©4Žü3*,ú“aFb =áúä°gÍÉÒȹœ`5Ðå²U‘*¦·p-óEÒUS€soç˜ÍE†ÀPX£…\Þ§j¸›6¾_³.âûtWšÍ›6PQB5ê×—¼­÷îÆZœŠ›ÔßÇ Päk ÙO.P“…ñb©],ûÓÚX(ÎÇGOVQJ˜;a_ûF±ÕgÄØö]йI{Åþ#±†K›µ¦ŽÝôÕø‚Kú›\ACErl\&ŒC“«:±­¾E†òh$}€cÚ.É*žI€¡¾uŽÕBëÈ›|YÔHZчZ@"%‚Þ 3rj×èa½Ëg"nRÚ± †_‘6æèñ#²96|ˆ»›¯O‚z.ÈM×F¸£OÖ­û°“ø䉨g`Õ*´ô¬ë>õÿSžõlb'kM£w·Nä2™Á ùú}®Ï~ð›Â;LêL¢¹­ÁÃSrò­4œØîè|9áxV„¸ 8ØzD ùG€‘ÄY"eP`¯X‘Ìíè z<¿ñà#tæY„# BÍYhá;M_INÁÒ:?ÊáÈB¿wÏhYÕ¸sw| k™¢¡~ãµÃAF”ìKË‹úŸ`'NÙþ¥þ|¤Üy¶Y–^v"±ðeÁX¨hé7•s«~KÇžÞí¯£ou?8²šÎÁ„,ZlHaÛöíäïùäùcÍÛ§±2ü·ëMS„ L× s~¯O˜©þA}OcS(5ŽÞÂró±%Á›67Ðw¹ìÑf(u³Z¬®ßl,( ¤ xxÇ\°þ¦ðú+¥Ê‡ÿ ±î‰5§T~+²‰Ùrµ+é tÖCñê3ý´Gƒdâ2Œá×[Ÿ £w¡ ›Ñ)“Þ\³»úø$¥t+5r¨SàÏ f‚Ì%©†Ý¾ðޝT %©ˆ"±÷FÃ$ëKÀ0Pb*JKb.Ó¶é¡Q'¹aáx“>7/7*¢qßÀ&8Ÿ¦ ëÞ91ÉcZ¯î89þ k­AßÉ–'Ǩˆèç‰ÐÏâl±Lâ4ÐwΕ_Is=a,WÒ›’>ª~?qÈY=Z¡’:m¶ÊnoAlß(€>u±Íº lÚ)ÈàœÔLôÿo¾ix´× ¾«¹ºÈÚ?M4§{¤D]KQÑ,!§?%MèÎú® ï ¥;]ZdÿlÌiXæ¸ uÂìK¿è#¦J%£.o­*‰CV±åiÐìLš•sËjËŒ¬ò¾ìΩë­U^²‚eïëÚù·Xì Ëà9–ªe >yýü{1ŽÚŒ¯aÔT éµ»•¬ƒ0ö¯’ëKv äìŒs3£AgƒùòJÔq¬ý›ŒYbsQ#°­MÁ T¢àÇÉ/ŸàçÁxs, ~Rà §F-… þ[ åµK¼¦0>kL¼"+øzT€)\éz^ù"Z§ëœ“Õá<@Ã+/  £ ¹þê÷Ë*Úì= X ƒ qÈÅë¤YZ}ad퇨5yUʧYkà =®‡ÿHüÀ°J¸È줊G2²g-l_ºÐ?eülqÛU‹Ã²ùZ|nÃÃ7²v¾³s±pä±HÁ*è•Ù¼£^Qà-I; ?>%Æ­SZ¯Íà ð„™(Ã}OÜŸÌ=´Øw7†<µ]Z)ÈŒ¡iÿ@´Š‹”i7•h­®xø 2F`¬!–†+ÐKó\j‡ß£5q#aËF¼–¥áz¡pµQTXÎ@Çš(»þÈ ”JA {¶˜kiBAE^S{øÐ¨V‡mV~p<¨Ës‰ÄO½Aµ+*]à׉KËÖÅÉO„Öñz H“kQÛô²M‰ì6Ë9  ’B¿Ù*‰À_á3xê1Ò ÏR6öLít5®{VÛë’9L¨·îX½Á†¢IšYFÍ"¿ÃÀd‘µQ_Ò?È›ýíxW¬Š99 ©¾Ò§°ñ-sç[½C‰˜×º¼cX±"woÛ71ÅNuªÖü2<ÆTư5ç‚c)lÜ›ˆžÌIOC2Ç£YÅa?+®7þT(wð½Ë™¹**tNi™ÚBÿ[ÿQ× ùUèô?|mù7,Vžn$‹ &yY“þhÊ‹£ Ô‡1AS ¥C¦@ÂÖê”íRÆÖç;£Xù©ÜÃ`âjò³£:Áj8¥ìa^i'eÐ<Ú=àÐÍ&•.6Ûg6=¼W^ß.‡þìY¨†,ɯƒDTÏv®úY„× –lízñ¦ÍêÔ¿Á9H¢É»Íål©-_óï::íøWåõÓýÏm¬¾4w»PRüqí`Oµ© g¨¹ (Ó'âK0älìèj2j§8õ =@ý XÄñÇ6•սﴕ‚¯ì”@iUI=•nuÌ,ß‚E( O¼”wi[Õ›s>í…‰[±àúBs 0¹›ï/¡Êš°ÑK4hŽÈ.¥*sÖvöµM–ä.ÀkUÓŽ2`õÕ(ü 3¤Ò§yæk Ï,éIðø›ž ·¿jËÿlߨZÎ4fæéÞ2ò”7?tKSèåÇî÷V*?n`r\s‡†lv®Hò¬²§»âfâ=·F„ùOù;â¤Ëó¶“Ö5û[)’VÛ½@˜rû-‰]Oä %ÙM}àåêãS‡XµVR)ÊìfEÑ—ÇgöË£ÄÍìúTAHXÚÕHU’.¦–M+ãe#AJ7ÏA2 à«ÿw>0€ñMÌÂx¢DüMžW"àÒHgeÑç&úV-¡7‡² …pŒi>¥«ïcrãöôwûz+ý½cþÞ¡qûzFý½GþÞ•?oKØ~Þ?oB·£oÛ½`ä.¾f´í[ÒË 1»_€±ðh1Õðõ*–¦EeÏoSÀ.w{DÔ |‡&upŽáj7.å »Z8¯ÁÌäÒz«©è%È¥& ×¶uFG%̤!ÖËyK=a„­Òèí(·£ —ç_[ ž“y:÷~„€¸í]d,¬W~£ìCÉflà'Éÿ1"‰•ÒZ-†ºíŽÛOÓƒ ^à\=Å!—z÷Ÿž·¤huÏ®}œç7ô_(´àVeQÆ´qÖE§ó0R-®4™}¨¦j€”Ç’¬z‡az(H¡9;‚Ï«¼I>A‰¥Bû'‹ê=­:;Pà…fÁëù-{!mÍ!Éßï»—¢ì_>%î"3,Qnk׿gàs]*v· §ké~7÷è-yÓÀàâf`tþúÛù™3Üye€$¨&Muˆf~=S%G;DéÎÈákÀðiX¨“ȰYci rš¨t[vó¿ÔC°˜AÔu’©VÏŸý$Ný`ø½Ù!TóŸEàS%@ÑÂA)àÞ3Ùn±’#wi%Øž”h‹h¡ªÚéé(yÕ¨þg=la*ñZdVIÂ~éfŽ~}ÒäoŽa¦M\[&éµi%9°VqjH$èEgÍîhÔ¸#„‹&·À)‡nÑ]¸8cž0ÊX|Â…nB[ÉA¾ìåÚqÖ5êfÇ>¦y²CJžþGKµ-öì…¾q5ÐÕP;°áH0°àòÊîŒÛýÐ^×VÌd‰¿ç+×ËÈ%]meˆ‡{Ñ%¬þÑß7[ABÿüÂ\¥d [¯›æñ4‚=àP’©|ŠUdÌRšÕcôz=ŠÖˆ(äŸ5!Af„S~ ð”÷Ž“®Ÿ%—« öXÓJöÚ~ÃÐþežù&„Ié¥2¨& Æ2:MåzÚ¼›„ˆr~Â…˜7C)œE›‡G$ƒhV’Ñ.0—svA8¥ÂAá­>ê=äÎW°Ô¿HןœmVe"û1y)}ÐÜVŒù0ËéÝí"…Ö®Oín¤ç¦¬ïñ€Ù<üñdX¼gj²§IŽ¡ÎýÏuU‚w…ĬÄ5QI€ 8ˆÜ9a¶¡rZ¶æ±;m òféK1Ò,«Tµ¥36ø'\OÎLq©Y7·üˆ-êÃS™Iý|g˜|Áø½¨° —2-&1ôúå`Ÿß${-a¯%{eÓãÔ<]™Ú…û¯U³]b Ó ¾#Þzl›šðü(œ AYÔ_ ‚éxÌ8¢PGSä&Ž8FæùiÌ»i:u€ŸŠNyQ MB…7tJQlß^·&uã8Ý;¥‰=p|Üü–'"þ91lÁê½_'‹\ÌâØhÃÛâÜâ–ôl·¾ü©Ý¬¿Q¨îÚqÃ*²«ú/àýžB¥R…¶önd. ’ßœ†,„çÃá ö÷8²cB sù]›‹£{t ~üÈ Ì›vnMñ6Ád?🜇ÂÖéÿ8Ùʉ•SêÃ6/î<¾kç+Ø[µÀ!]¨(à~¾Ñ(TnÖ] êª2S V«wØø£‰ó׌1dÿ@5Ò~Ÿ)9–’9oÒ2rÆ0?¶|åZ1/$•E‰·ð¼³X. ؇֯þ!Þ_o,Q\ÒÈIáeäêNH¡FR2öºïóB¥2_!ÎVš˜c¸HZ¸äô©ÂZCòõN—b Ér‰P&Ш>arý¡\Éöâ£Ð9Þ8IG]±›fáªh oûözŸp*a¬^+Œ?W”ÚBI×P¯˜ji œ¬—2ijˆF¬ø±ðäŸàÂò´^^^^à³o·%25†ëSm!§$3P¤ïÍOxM§‡Ñ¨q‡!ÞŒ ª ôeÝLÍ kª÷<ê9ûÑYUãBÝòrþKÿMž{»œ„NCO1ÞÔ(í-M·B ˜þë½WJï~Ò^Ø?#½¶gÄ!ÚÀ¤æÇS‘Ça<¥ùl³’­WH¬Êå3òT[’ý»ïÎI 1\à_ð2eqed¾w%¾FL÷:ï0óq›ZÁ@*™uÎj¼2:ƒˆ…»ö[ùðr_HËÂFªwT³Í‡ò&ðH6…‡rm-Q®ýÃz]¬3vUúѪûþçíŒ/š%Ó_å?iâ/ ˆ½¨•ƒP8FûŒE#jM"Ê[*Ó¥[Qʥαõ”± ú0Š™ þ;#,G»ÝGh¿Gï2e™,) F”ÝL8‹ñYøW\SR `­2šy#ÁÃô/Ñ–_/±¯‘†“ļ®×Õ¶Û#3’òÑQ§¯<DObGô`Ö€‰€‹+Ö´ŒÞõÒÓŒÿ@¥lÚ'\X40%ÚaÛ–8â€íRxíá¸ÙE™tKû…7˜fj_ž>ʈ–&o©,><¨-­þÄTîQóVQ¾hº±t-Û±`CjÅ7ÄìWð„7ºÏ;)ò0‚ )¢2ûÒ3F§¬—AQ¬Ñ°oùßs½f¸ü¨?XzùE+ö8°Ÿó ž|hÞéÌ|4ŠYÖ@ŸãŠ :.¿Ý+«À—>’q¡Ý^vópcÏiØÄþ„=+¿ùAÆhè|©‡±˜Á•Iç"ÁöíÀ§Ó­Ñ µ3Ø ÄíJÎáßÝ.NªÎ|üó9˜l›W‹3„uP\‘[xÜ×#Ä,„!.;lG!qÄè‚10_ãÀ­ý«3 ×U¹S^áÅwèêø,²½úÜ1Ëä ›=4ÈÚ­BÙ ¼§)6ÊÖê—ßý¡˜FÜÒ²fð-$‹ëç›P±„$—…ór~ûæõaJß÷¬ŒÐ“lrâÊf’›xAМçâ¢ÛžãÜ€^gFÛ€s‹‚SâVîízó`C×f°˜S ·hüP·aª%h¢8Ò„ö(† lîùù«æÚðµd^¢&°yHø\w!TÚZ_à…í°¬ >ªÁ¼,Nqƒ*ìÍó¼3¸\ä,‹J–ò.6Ì4MR'?LN¥r:x´4R Cœ¢¨‡6¿TµG :ž›¿FtH.ù{nÜ`—Oü¬¸·ÎBÓʱa”¸rªkœ-Q*p²¤ÅG9{¿›m´^‹2ö ”|iœåÆ,Öðó‹õ?çHRn>F¹G²C‰#ÜKîGS)ÙßÛCãŰÐn¥\ÙgOö mN6ÒŠãMÌà x7´@Ê.ÊI*eEa구~7øâ°%Ä–M˜.¯ðâ!Æ~ÀS3GÏ']¤þ®âvxèöX¯U‡o>ßR"XÁcR‚û¦ÍçšNÍnÚèÆ:ª8IQe0…TÉÄ£§fŸLíž)ª’€éè÷$¾QÁyPYÕÏ÷çAøÍv1NUz³.Ù»ò C„¾–”éà”µP ½ãÕûK)f+Û1×nuhÑ̰UJÐÿO—Fûø ?ü¸£ ¸Œ"‚£è'Í2Õ­DkÖ8ò°ç©ïœ\T•ïEÄMZËÔ|ò¸+‰#ŽºÁd8{¤ß*z1`«Õ†M§) yd`q’í+Yf-5¢±Ž“±/_>iÒ‡„R>/õÜ[±ï-äüQ›H'Ç6-W§QB%¶›¬(Œ­ˆ•lÒ0¨xõ–)Js2}ýk$¢@¾ªà–¸]qãv9œü3øÒ‹o¤qÙ€ßÕ€D(YO¶¤E Qô2MçÄT&‹iCGɶº¹ñFûò¤R%õ¨g!½‘›? ‰n¼å¦1lÞ…ç°ÆB«¯›ÌMq§MUL‚£b Ú8… @ßm^?uˆÝíq߯–ÔrøíŠŽÓ ü™.ðs,¸H÷HøóaBaÊi~Éq$ØøpSâÀùê·Yrúq™‹£ºžN=§€ÔùÈ5ýBØx¶ADj?…YõËmO;Ú?÷5¢Ð‚ }áûRôŽ~è§òï˜dÐÑérB*€#òÆJ˜¾æŸýEÿ µr»Ô¼†$«ÓÌ¡QxÖΧ¦™`,±h¦OqUnÍ—êV(´:ÖBÙŠFsæ³ÂÔ·©¥äôóÓªò,$—(2i ÃE­ŽZãzbU úìyŠ"Õ€ ’kÓ%Ë7pR½†¸ro£‰½c{Þ ÏáÕ}ìbþî”=NÝ»‰¸ð6„T¸oX/ÅJlãw'ËÄ;¡Rñh™ ù8&@b! ˆõôQå~¯ýú¦NãÛGBAØ}• Š‘¨eÿPf—lÔ¨¬^"C< ´ $ü¢Öš•Z8ß[±aC¦Öÿ Iì·Ji.üð¦R‚`kߘ ­ü²¬­Ï™+RøtV3c­ sb">Ó2#2€œaP]çùÓNÌï2áŒGæSK>5³ÁyŠ3ô±6GŒD¢Š —~ó„-r¿Êé¿' \rc{-­€ K¹T\F¯´ŠÄ y}S·5äß"^£Î7Å%ÍC¢ëmàŸ«©>"Êß~Žâ;˜ÝbÐA´g’FKÏo Ô”.Ìzn«›4–ßWØR•FÆM7ï\Ú:¡r)d0É N£øs°k±ÿm§ã)_@0^ÓÈá™Ã}Tl/wË M I †›±h úºeà+A(ÞÛT%Ö{.â=«6Xô°H}`Rdúß8:_¨+Þûzb¸pÑ‘6 ûzp6½RˬÛÕükÝìÉ ZÈ.D§Êû÷ÃÎA+¯ÈÉëé0Õ'•“ÿ£ö¦²ìª˜Æ…Ýt ‰Õe†´  m4\ç‹Éƒ]ŽO’Ä8x2¹ºTËjð}šµE…8ÓU¬Ãéš÷÷ÊžÎ?’»LßgD N˜Y•â‚8”©H6ïsP |·æžqðÂpâÁ¸¬­–KžÃ-ìýl6ûÑBP‘ù¾A‚[³ðJ4f›:¶äÔ9¨à²Ê8˜—S%‡YJõ2‰,ŠÜ¢ãy™ú묟Gó­«Cë?a_'¨ðƒ/a?0“bÐ8Wê›b¬§VÛP.„îÑ»ô:†~\BÚÛ_ô0ÊA² J7ñýHÄ¥?zSÕM¥¹0uEÏG­tQÛѯ”Žmƒ,]XU¢ñ+SvS¨°¦,üº”Ñ4§_¯ LoáÑÝT^é‹Ê„•F,î$!"O¤´šË†ã‘`Cx”¸òs6ꉺþÕ*íÅùD ¸+Žè›}û ²Ü[3é£ †œæºøÀúµµZc]×uÏÔ¹¹èȶ81õ"QŸPÆÂÄBV™zê p¬ò0>ls/3Áv\hE ùܱ|qpžhÛKíÃB¹„Ž7F(b°¿Þ›$Í˨ãJŽ€í¹E¼¾n—6ÿn`ÝX×Öߨ'‚Í¿ª‚ ¼è£rƒÎ’¤­”m—•»],S=(.Q8Ë›T ùOí(ÏtØxºM{›ê÷‹k×4ïÌöAŒFÿ7<ý eÔ °”UB€Øî®$J–çËñÞ3IyΆâíÐiÒ@ö·Q7¢´³Ó‹3¬‰å-äbgx)-ñ¹’¬‰g_¼Ëš“kºÒÜëÑ› CPØ´t 0Ê6évÏ;–ËÊagᔈô£#8>¦I9Ü.Hó(™'Wfºà$IMŸÖ`PD°>?QaàÑ~½'sP! ®|M½=„DÍvå¡ç±cÿ%OéJÕœ2PŠ{jY… Š7Õ-ŽôE÷ŒcÌãÅXiq§j¯5ob¦íi‰òdªkÆàÕ!ßF•wø ß­?膨ZŒÄËIWVñ½­æ_ x$júcéB†{^›4u>…ÀC;cÎ,S1l}B QlfãÜù`æJtŠl:.Q–œÖ]Òæ %â>ÇyF_•dw–°×¦ ßN¹Jê×㌯ª0º5¼>®¾pu[•ë-È÷Ð`‘/h>QÖfóã‚9‡)@ú…ïϜ߿¦•Ç!üмÕ} ›–&^úH{í8_ıd'²ç¢=™êµ§¯õ¨p£°{þZQ’PìïÊJô¡Ä–=kI^OPó:5øg‡Ù=Ôã?D‹Þëdúçú¹$Oâ"À\Ó·»q+Ê@(s¶.cØ^ÕçQÔ²g>à¶w<œÌÄ+joiRøsVÔRú Rn%!ÿb\Q•¨oUIš5r5È oFkFžŒe÷Wõ›8Û+vŠi?$lÎpÙ†ìé÷ž A”YЏÀ8h|píËa`hMzç©mÄ£z¦d¹ýšý»îü.Í-îf¸Cç¬WÍí;®ß‰+,+.óÊ¿Q/Ó¯òU‡.@Ÿ–ŒT¹€ØQ¬u¤oÿwô1ò‰TNAjd ”lÔœy\è2â‰i¢Ž9³»¿€Ÿ5 M{ñQ¡£áÁĈ¬»Þþáîæ¡‰oºSW¥pÒíöDäa`­Z¹äª¿%¡iE Ëæy6¾âqS{8÷(â‚eøîŸQ€¢w#UûlAÿ CeYÝid®©I÷ÌëEä:’³.ºD»Q²éŽ5 ÃÍ,¢X*:¡½IC$=mýJ#<.iCÔiiHË{©‚À%ïJ#~+^œA™v··Ž–5&ígÄ`&Sc»Š 6ˆUZl…÷〹Y4Iiú?6ßkÜZo#ï‚X„Ó:Ä™xñt—äÚ8Kßàb­_ÏCÌxŠ<€­‚ðT¿™t.š¡›¶ûàb ßLÎÏEV"½zâl6“d@H&_Hp˜ôÄy¬V¸%Cƒ¥:þZœVf“”äfçñ´NŽùMn)ÕªÆ~Ä¢LÊ]ž YÇ9 •‡ ¾vŽJV/ÆÎ ç½~«æÎ¬Ðù|¸¿ŸÝ­§ÄøÒ;³Äp?3E†ç›ÒYœH±tºßH•u¦Þx)4J)ȼó@q­T6‰z7ÛEúN–xQáýb_n”o¬{Æÿe®ÒÓ@îÂRÑžiÒЈñmÀõQ€Ç—C¥…agaà h{5:Úù%ãSÀ{Àçù¸ä¥ãž”ß ilÄdð´löù –Æ C[º¤ŒÃ¿‹å¸õõ’Ër§ú.Z“Xý:ÍM V#öûÙ˳đÌ^Îéãu;°– y‚D•yE±‹wÏŸ]ö´«uBÖ¨'äÄ®‰&>kžG, ¼Í Áùé¼9^±v‡º¸1A6pÄ—>}oÎ4iù¸Çª£DÑ¥Kwå’]À†Ÿ„€é¬õ)C˜äx7QÖÆº°,QÚ:Ŧ„Ò¶›‰-Ü®¼=7z2dØE8Éq[›<ÍS'ÑY%T¬þ„Lë|òÕñT¢-œè·â¨øÓ“¶0£‰Zj¸¢p´³5z\¼n2l›ª‰bÚ€‘t RîÎmô€à]T±ù~‹´ À 9 :T]â^p°˜rÀöÊBUtõë24pÆ‘VØ|Øø«è˜+=¨\Cb ˜„y¶V,çßmµ²€UW5 ãõ&EP‹—Õr³öÖ,ÑHméñSè©çÌl—<£ºôõ“¶Ž-¤$çv!3Dg8³Áqrµn7ͤrÔú“½“Q$G•ž8æ}­@f¦½º†õÈB×éÛqÂ,7[ãÅaC2«% xÅ&Ï/ Hª“m[Zî;)ŸjOúhþ/Tqð½nÅ3ýJ*VéÒX’n ·c {U>u€ÜWÎWùJ=:ðšvb¨”|ŸYÙ”‹à„?ö†Œ‘¡òxÉ7^÷|µ\·EýÞ.Øì³¸øIox8èˆn“ÐFˆ;ß&HA [ÎT'‹²ójªT•¶á4gæ(P’¿#ͯœõ×Fΰô/×+¤š=8Ñ~B àfBÅ>ôcF7ã ñ‡rg4hwhTPŒúxuÐL”Oˆ®Ýû½`¾G·¾þû£·J}­O­îR’ùIÈÒܽ‡¾nàöÙ â$ÿS².CôÞ96æ€Ô"ÝÛ©ý›Œù”¿ª}s«èÖ•o<[yŸÈ4>©œG™ia <[z`õµ÷xÿÙic09 jP ‡ ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cÿOÿQ2ÿd#Creator: JasPer Version 1.900.1ÿR ÿ\@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ]@@HHPHHPHHPHHPHHPÿ Õÿ“ß…ò|îðO!hâ– lпܾ¯-î@§d ,©~»Ì™RDëy“² …ÜF¶D@i'¨ô*:¯±8?*\(Cr21f¾«`HÌ»8ú†^f¦†™ ÄâøµgO<5‡6DÁDÑŒ»ö [<1Û4:…¥çÛÛ 4þ\”.•«M¿9Ï@hˆfq}Sñô+åp# žè, =©kºiû-Å‹/ü Ò?É™§Élêr.@p>}âsD¹ï5Íñ_J©Îz–¬ÇŽ`m•ÛJ sEu 5òr¤éz}Î5Tqœ¶{ͰËc.m#z$ù•Ýĩ߅è|îðO"ÜOžPŠýÒqbòqÒ,ÁÜXÊopµAâ ØOóDZÛ&@ÍUo~y ìP{…À*[/ŸHŒ7QK¦Ðc´¸ÌCaæ*<ÏHò§ÛN ®æ¼Añq]¯9ë›e·Üå;G柞cóˆS`ïç‡Ñø0³I«Q^pEš(|Ç` ]“¯I¤ bM¿GJ¤ •S šï‰I´óæ·…£é(S¤Àé]SÓˆ(ÆÛÇxz‹¾ ‹Xõüí¼Ïz™2‚ìÒcä'!¬¨ó#ò !ºg>l‹ÿN굞KñrÏ>­…y³K߅ȤwÝ MnáìÜÀ¥'¶%²õ‡Ë£Ð0ñü2‰V†­ÿæ™ ¬í”º(s°äÅXV—ètJ „§ ;ó‹·èIåñ…AÝPƒ†Iò<|Ü8(2©î†¾ ÞcÉ®³Cœ"òrãÎá.è‰ý¹K“í^éiòh3a)*«LàcÁ~ÿh&ù߅̤wÝ •tè=û}kN1ì,Ò”Q{#dÿ˜ZîSDx!KbëÓ®ó¼Wáfà 2J›¤²{pü0ávÌK˜èp ’újàk*5ì6þH—¸“èg^ˆ5EÐCÊGz¼”jÊÂ!òqA“pDV¾ç 4+·¦º­LçØõ|™ ߯õ Å™ÔØªÃ,{VÂ<¨Ï˜)¦ *GC€Èع…áqÆÕøñT P¾jŒ2h³¢ùBcý Å| ü˜êÚJygÐïe5N…¿+e×x„Ö²¯ÕhHXZ§«+õ—Óß϶Ÿ…a¶­‚,\w˜ÝÞmד¸ÉÀš’†Å{ „h¡Ã{7+ºàÿAx¿³…tu&X¿^ˆjy~4õPrJƒÏæºï(uN%/E‡æð—&‡ _þÜ-©EЃœ§ #ýÉ]·ÛÑá¤íˆÃ1aË–€î yR€R§1j¬œÃ85Ö nŸ“ãqå>W Àûøc°¾¹£Ô )è5§%ŸpšZ·#8 oAÑê–3lpÏÉË_×?—G˵ÁQÇNï][sËÍ÷b,àÄŤ®RÑÊÎ1ÚgwdìÌPÑzsª¦á®\&þbŸ‚Ê‹Às?ªF%±±c¾`]?é"Wtu×€¯Nì  jÊtZÀùûjÀx½wqÁŽz[G㲪Jɽ Û}¯T¥PÞfÏkhGC(äÎ;Ö 4oYc~’’^ÌÈdìCmZ}h23.<þó|LIÕ‚™ª9ÖitzRçå³­»Û-çó–ˆÜÚ¶iǨµ™«Éˆ·gXö_ô’ﶯݨŒ†§ªzT–«,´©¹%ä%Õß5/=¯#WÖæÉF“Z Ú6Òælh„õرxŠtóÙ‡4€ úéãõ~Å]ow™r-©BHÏéSÜVн~ˆÇ g58Bµºw®÷x‰<†âÖsr*µE ¯Ï·Ÿ…U¶¬‚.¤Ê™WüjÍýûésº—G˵ÁQÇNï]ŒÇ„^Ò’#b*Ú¯ÕIneH¢—Ng:»ÎÍŸú¡Åkëý¯—µ3K-a­šSÛùÂǺK –,ÐåPÔ‰4OæHl˱—&;ÞHh?ŽÉ쀾Uá6æW9äSû€o5ƒ|×I.yÐÜBdj*'ÚÇÛab'fIí§<™þ ßFSz®"˜]íöÖj/ýk¦Ç–hÒ8?7žµöCÇå³­»õ¸èØEΘÛ:L>z!ª1Œ!¦ZvhdçÐTPc—®àb)ƒÙcЋ„ÙÚ¾¨÷ºP¥ˆ¢ÚŽî]RÜ‘«+µÇ]öYþ©ÙÍb´£ùÛP‰¬4p)ßââ§Ö¦©‘mvoÈD6øO%+…,QñyzYW`®£86­B-/=8¡Òøn? ÇSJ‰ó ²MvçÒq>CÓFêFš5ĤIª5”‡ƒäd5_ÇÛWÇÛVÃí«€[ælÒK ¡æõ^ TèõÍ Ú ‰?R1ÁWSóe±av§DĬ{çˆäô9ñl=U]¦òÈh à~æ’ô v(×LfÖ¸Oêyڇإ®ÑƒžµS9¿t gMoêúœ½•Šÿ‰£´˜ÂP޼퀥™á…¡iq¹*Ãëef .Ò$ešsÜ5,á’C ìÁÜþô—ÒLJ½é'âC['bvÝh<»¹E%¸„7?ZS´EIÛ¯ÝgÚ¹Ó²¢?õÈhGŒ¿þ1‘mçäÏt5¢NŸÓÒk”ü„ûP•AgÃx%0:J% þJ«µŠ9Ôq€|#NJôg´ˆ%¸<ƒÑÛMÖŸƒ t¸µH¬ÌQ÷iõ$Xåön¯h=.Ñz©Îgc(4¹³‹òÖÕCŠàÄn¢í}¦dw÷°ˆ–y«*‡Ò¥¢™8嶯.^- Š<Ñ>óÜÈÌudÁQ& •ä`”Ô+ SæÖA‚ ѾQý€KÒ<Í‘™!¶Ó¥Q ´q«§¿×|jÅÄ\°ÓU÷è1Nì!ܘ政8zK¢ÍªoØClªÝpZ°·Ub̸‹ÙC¯21Y´.?Õ†´Îˆ#²h˜Æz?´ø9ГIçG“OÞ”,ö¶‰KÀ*Oõ 1z….‹<ê–Ï¢Ÿ…K…!<ÎfàQœ˜A÷X‰÷X&""ŇFø¯Íõû±°ª¨Œ§ì›¨Rÿež`äs›b×'bŒ2 çË;@?Ü Ð‚Å´`™FÎögÏ/çm[¶3¤_Çý+vÛò³jܽh„Û&FX¢K‰¤B‹_Ú‘Ö:¾€¡[–& ±ôqú°î %cp¿e<Ódü‰Ì'‘ãK+_ä¥F‹( 1(|Dác|7‚A‘Ôâ®Ñ(ÿ:ªƒ¼‹µüvÛ\B•¬Y’b–ÒrŸŽa&ˆ8X‹Ñš…÷U*Ä\|9žƒY sš<3J^„ñ-1ÉÏÃ|gáºøoÜ+«_I1´œ˜„¨…™WP¬4 ë=o—º¾wwãÈAµÊì][ƒSWR¦L¨àvÑ4Mü4„³Çoa†›NL}…œ`È•¥1o@%ìJ!aH5ËC¹†ë}Rvn™-hÒNÝuÓ'm)S?Ñ3…¶2™µ¶6ÿÙ»¨>üµ…4l”8×R$ÃQªh?gt, ÌðŒ×}¡ÐR¯ìifJvbÌ…îxm+F+^ú€üÖ±ïüÚGÛ‰64ã/²ºoNgža1¡¦ù%ÍÜèƒù6£õ¿=°Ä­¼o4ž«´¯Ù_c£“ÿ^ÍR`äW"ˆxÆ‹§Íú übÇyŠ”7AÖŠÑQ[óØ/Iû¬zëWkÁ ¥¯Æ28‡¯o¬´Î"Hñ ví}C‰$ŒóÝŽnÉ ‚=jÕÔÂã#Î×ot¤r¡Â\Ìuǵ–{ï°×ÆvTÇ¿áu¡»”Pýn2)ëï™ÿQôDB©LW®ŠÂ(û¿H¶Ü¶ŸU Ê‚«§ÔÁ,î\¢SoN~b["H­!BZ’)cë¢Ve<…”­ëlñÌ€A*ôŒÝ<Æói=ûù8÷‡|OfÂV®´E€G‰4tüû˺^u=íÇ[$ß‹;ÞõÝ éÛ·Èœ¿â7™‚hì»ç+òý¥Ò·Šô‡ ­x±g_ÛÓ‘Z}¾>Ú ÎG¢uTPK,áñIÔ´ZŸ_S‘OTRêcQÖ»qF³kB÷¢aÇUÝÈI侃‰÷8ƒ…Ô\U•>Ø êœo4¡ô$/½âÚk¹o¹6 Ö*¼skÌh-©û:úÛ‚Hõ|)W$Êrþ’˜Ì×Rh·?‰P'+˜¤J'íTÇÁs´µ›æ†±6£Å‰UÓŨ䕷þØ«5SAYܪœO£¸§–˜#o„§Û±ÍÁ3Ú°ygÓAŠÊó@0”Õ,gÊßjÈÖw…ÔÓ:ÿ,E§ì&E™Zð ’êàºx~Dœ³w _Ô<—HÚ{Q· dUÔÕÌÏ`°e´ŽF1K1áĺº¨ÑñÁâí¤êçSlCÚšV/œU¡'²i‰• ;§Eé’K›àv™›TÂy8ÌùI¦Ó´êqõbJû× 2[ÚóOÒ0,DÜÙ‰.¹Õô[Ÿïdôoý ˜ý³Ê ›¿Ì_ŸÀŒéŒ ð‡jt«å`tÆ•¡ØÕn¡^s”²Îбˆ(ËtYÌk"´[jÛ–nyÊØˆ®›Æ¤ ;·eq¥­•+ìêY¾ŠzÒÄúÂìæ¢wä3È?ÉÔôô‚<¿Ñ—]aÞL «V:‰qÒ½Kn/‰Ñ0‰ Gi'¤5íÏÜ|A—Ù:œ×jF”kß÷‚ÃÞ1F?`«å÷é|Ho¦t‰,ýk,·jLG\¸_°võÒ7¨7®K”Tå|F/GiNCÌ­~ÑÔÖcïhA] !Oê¼@yCJÚþ(آɼ‡ˆRÄbAŠ2:?+IªÒTýÌÊ»tžÖ…YS7‹xLµòž‘s†x¨·iýð.›…-Aýó å™sOùŸ‰Šv ¢q¬¬»ÇÛ½ðܨü7”ŒÂH› l—òžÄh¬ÚŽÑ“wy*VÂÐá(~A¿àUBâ•Ì8—îÂ¥†Äê‡á8)zz<â#ÇeÂ+ë¿Eýè3Ìôz˜õl¬úÏ3b%Ï ÷s ô®,ãZ¶ð¦¥'¤Ka÷'MõLïõÚÒa»‘sÍÀHï¯SQóŠó×ìânòÉ!Ü žDçê>SÁÙð Î ­¨å8Rk‚ìhKuûV&|ÂXï>9ÿ\kƒ@ÒLþopˆDWäÓû8Êï„“„¡3ÈzÛû‹Ì!p 3E_Wf~ð:ožx×™ ·w#çÕì 4˜+‘®C‚—}k æÁ$%5•¦÷ƒN1M:ÍMü=!+÷Ö\møKŽ5è}äË§Š›êï5aŠÐ^<`K!=®à¼£¶p™îÕw¯€1¿„Õ Ê‹º]‚¹ÒØ©BKÆüÆ@ Î!UV„êù¦B,ÑéNötèÈö>òO‰Àw¡ÞmE©¥¡Ã•/·YmÃw¥É`!ò2-‡9¤Ö/Ýúuj¾s‚ŸŸÅ.<ã¦ÿ>Úb[ \¿ÈŠIKã+_ÃܪˆÅóúaŠ.ãùSìNâ[ü Ø…6Ì+€†Àš U ö IùÉ%>søÖ]êÉÛ·Èœ¿â7™‚hì»ç+òý¥ÒÁ¦JwˆÊ¬ù´8Aíhm”©†ZÃV(ÕVDCJ%Gß™Un¢gôx%Õ9£Ï-[üL¥J¹‹gœ,Öh–¨ÂÓXã-?±ÓÓ°±!vɉy+np˜%‘Z`b¬T”JŽ}A_÷È È"ê$D… ÖxÑÐ9‚Ëý6em~ Ò ȵ.þ8ìs™È<µÖÄp®JEþAœØxÊ ¦V–F;Ódìg¾#îkwOd3×õY·/ÚÒzŒTèg‡ ɸî–y ‰F[˸d™sÿ72Ÿþ»âmoô56ÿHŸÈ"Q^L?;Ð$}VžpdGY –£Ð ë:ŠvH*Ùuæ×Rƒ ‰ÉÉ¥œ Š¢Ÿ*½L¦†Z súù•ñ Ðxú@MdT Ÿ#1+%5@ßíQädÑÅÕ;OŒ‡Ë¡B±zAé  Û¹`@å’ìø”ã—B î&.ôãcá^¡™NÖ§ $†tâM_íUH®(ùøwßÇmª¼Ëûž8Ëñn¤8)8» &´ÚÙÒd9r(ól•.ÅëxŸ±Ê؈®›Æ¤ ;·4TW+F­üEÁ† mÀw8- p¤--ŠÅ”Ñ×ã•Ûb ˆØŸƒýøsÓVp|koüÃ$`åg^½ãüæÒGw…È„r5ë’2úSaKÝ#:•ޤ„>‹îãÒ5·1l$g*‚ÕŒƒ•ÍR6»s¡hŒym9!VJJ N y‰ðÄm\=oêh“ö8¼…ö¶0 MXPAß7&zéô†DTEvÍ©ži©×œÏ“ÁÇ({&—S±æëȈ¨€X_?І Ã ¸°˜n{CåKõ}/zàVú¢D0&©ŒÐË{vÉ Q³ï³!+ý{¸ ÁÀu˜Ï¢éé®0ª•J³–žæ¼™2K`Z¹c6Ópg¯Œ‰ûýŸ­= Ó>x«mŸyþ¼8zSAêcçBZÍÝÁ1“ùîöAPå>‹ì5å$ÀmÌüRºòƒB^î;8+» *VìUX —¦Ã@Wñƒ‰÷æ<úKPUÓÕHæ‡Ú™¡[n_ªΠJE‰¾bÚ¤ÐøpUÏb ½…ÿ€áõ9ÝB2ârÏÀt•W³â—/²!që¦bør±O÷ ôŽ0‡èÚc1 aÇž#Ú§ÝtZÆÒiÀ; ZAé$†Y¨¥³Ñ´²ÍÙa;ÏÃ|§áº‘øoP­•É’Œ¦õ;ÙÒsÊ®¦å·“Áô5û’@4>šÁ¿Ü‘Žr õöÿE&¼t\ô[ÃÃÝFZ G€¯TQ‹ïÅpü –Ùîî)‰>D«ó)A?Jsb®îÒz¯m0ÃÆóyIYNº˜elÓWÎdú‹~6Ëòië"q©óä\óæ”qqG‡ñOÃä¯V’292‰æ«>p„°q.É-!ñ—l ‹'„“X½˜RÒžïU’_8O®ü‡ôqúÁŸ¸ t?\¨MÕU©NRçµ6Çm*± $)zî·“å\«<#_¾…1RiÕç9˜PDè¸ÙÝ´“G¢5ÂRY§ÕZ8Îô«Sî:L(½˜ú˜OxÒÙ£gæ+V±¦“†§‹¹ ŠÔ­¡Ž4öõ%IŸmz:Vüƒ1Ï\¥Qf0w;‘ÊÁC¨"—™Õ\^¿… ý‹#Ïl5f4âØÖM³ïË;2 V£IÖƒNÿ-™Œ=ëcC¨<ቯù=r]‰eè[ÝHaÿ~wƒØÕäí†-#¶¼÷Vð ô’õ—vU¤bÉŠø“B êA¯û]=šÛÙÚ¨«Qஂi4´¤™¹ø$ éÌ[æx åý»XÝ…æeKêíbÆÏ«EûX °Ù]†$¸œ³S’ì§)Òͦ`.ß¿âDª¼QHz%¦(.×ÐM¦U,¡±-x?nóªÚû–óqòöVoe%æ}’Ç&9Ó+r(>ŒÆð–púÃø»ì­»ýa±“ú&˜žb³Þ—Èo²†RgRÞGC¯pž+6¹0ÉA·ké-¼ê‡zËa!µ©”Dú¸EæWÔwÍ-ÏâÉXH’÷ré/ĶRÈø¨$ )õ™Ú|¹-OÚ#à’æô™6AU îvî«]ä8E/‚òIÝ!õ„ÐOìA•°o’_€¢Ìb†•ˆÂt²³2 9>e¬Ì’Nâ§D,äV¬«V¢Ñ“Tš±£^P³¨¾˜o*÷Ì}äÏTKE.:”³ëOÆá??²WnÝ0ÀìÒ£‹RD9SˆÔ"ðžª7‹£t¨Ìvr7×úëÈ¢OÛîʆ–ëÜè >Ódu8nÃXƒ0Qá)ãTÎN¿†ª3ˆ‰kh–Ò)Ÿ¿°vr ŸÕ3f}ÔÜjã˜;8L^4µJ?²Wêävô”}.úúóojãNÞEƒ}†wPÚXJoËý‹gìÑ*i¾°|¦Ø2‹qŸ"È8õÁòYT |¬ãSmbÆm¢l¯‡eÈŽ"”mN;΃žÌŽÌS—¡€HÓ’þ"}¡?6°ãxá»áÇ©2…E¢(/oó³P_XŠ)-¯BSÚ˹yq2§Ç<°XìÓOÂ쾸ñðK9@ô¨}gxjé—ý;iv!¹¡ãÓëË圿úGÅ]¡« nöt±ë5å 4Ûåñéá”QV|ðÎ9/[¸Yì¼s$Ä–õ/ŸT"Z±–JÌ[8Ú ›‚4Tu5@=¡m%9Î<÷Q#íçÑJ?WwÔð2Ø’$i¹hyiÇø¦%n ÈÜåÖ]\ÒÆ®Å¯ª>%ÐõLÍ3Š£0QF6Kek…Á„inc–¢Ïk¦ÖOþ‘3$̘Ö7?ΦñÖÀB^’§«[Á&j‡_&%Hs€î{ý÷ʪñÒÎÑø_´*R¸Q¢“Òb\í,·ƒæÜüU\5`F•ß<÷XSÄßÖÖù²úCªMeÍÁþ;óZßžÚ_žÏÇá¶ árR/!Qtzˆ,ž¹-Nˆ˜yuÄtžãå À‚âc¤y®yÕ`JXS)mÌO‰nYÿ+#8D,ÜïÉ8ÇïƒÚdn0ò0ý^¤ó%Å>~oî \!¿ÎžåQM$`B„‡Ðë”ë¥ÊõÚñÍ P˜ØEŸQ¡¥.mðËÒªä5àÀ&Ø÷¸qÑûú°4–^”$0Õ[º$·ŽufcŽ~e®Òm5‰c,®5mðí† ÒÌ#ˆ¾Ÿm`ʲJ:¡,;6ÁgÍeXJÓm÷5˜åÙÊŸ¢éO”üâ¬ËÛŽAk~ëMÄ„ËíɘNÇÊ ²Ådv:¸l$AÐT,ü£@¶Þí74uÎ%Ìž~7uzþMQmXLÏ yH·C'×ËËušÔ¨á-ŒÀJ$ yx¶z)ÛníÚ˜>ôþ/?ê³äßNW+?sjד{Ì>ǽä:Ø:’ys—18|«Ç†/-1¯vFÁ+$dØÛÈá£ËÁpIè=n²°öÂmþåqz¦×b'ÚEË]®}@Ë^dy«iñ=Ì¢•\0õîv]g+ã+êñÑþDÉÁç‹7ý‰~›hRà¢)bôã¯|=?­‘*PÆL˜¬7 —‹O§®ö¯Çß|«ûQôøˆ+M]Y-š´u§DG“‹URÔƒAò3K&Â#íÍ~‰Å<úm«Öa©ò¼4ãò{Z–qJºïÑYyød/1 æ™È6Û£%q‘Œ 8 0£8þtö…-‚~(v½žõŽuƇù8/h iKÊa4ç.+OA‘¢×6¬l:‚+ é_Õ‡äüñ©lУê¨3Ä(Í B‘ -»;¬ÂÞ5–q¾ïl®„"í”0´¦’ÊÒ`e¬ÏŽïþ Måà\Ó¯ 4æ¤pŒ‘bÖ—ö r¯žFaa;Èý¸zµA¥O ¬Ó©·Á?NlªýóB„…2¿aðzIG¬œ·ô¡Ý)㋜ࣉړ—¨…‡–uS'eÎ瘓J(s^+Uu5 †äιeqï/µ6àü¿ËÊÒx¡îÞ¹ x©+— ö|–°¨aßÜÒ¼¿åa•~̪Œ%c#cÕcÉókh¯ ×4ë¤ñ¾žcõOŸºV¬þ(â=lLŒÎcVÂ=»/Õ‰U°¼ÉAÇQOl½^š­7òÞ$Œy´Ã·\ûÆ< ª¤2,ãQO¢lä9©q} ý8­iÛ|.¿Ò}M˜ÏÚ¹(÷édCN {mihÖîxjÕ„®î=ꥉ é`Ùèû]½ùa•—'pL”åÆ:‹´l@OáT„Éà „sÈʪ2g8Ÿû²^häMÍ–ÖÐg‹·¥¦3 ‹Ùd$,pváfm˜”è®ä2š åãM½ ¹Õ"žiWÛ 7a#2ÈsÈõèVô!öï>CÒËA*µ+üMWvn ¼Â<“Rd¦¤Ð›äL'×¥¢ÞÞYÅ{ <pÑÛˆz0[=^[¾aÐÉîøf æ) HØÏž•9„ÖáYoà2Π/Ÿ£ç¦fGüýHL¨/úue]¥’g‘ñë Žá ­=(’€.Î鑎ƒŠ¿æà~m3{0@rt=¿é/5¸‚$Ž0 Ú\šÃ)€^=”‡ÞÇÛêµ?QÈü=[ÀÍKÒÛjp•¥gi+]ÍpÛÕ^êß6 u”©Fð%öÌ’ç‚Ì(RýoLC8s¥°ŒÕzîô*L!MMl,×>ûî0०˭4jXî‘bÅÿ|:eÔ`dQNóŒk¾qó {9÷íQb¸h1øNèwØØLZY–¨æ&Ñe“­‰{œC4aÔð˳ôÕbDèJÈeßg|kFÈÛ5³Àtþ¯#L½où¨ì¾ÉБ ê5¯œ¼Œ w(ÑýÄ©ëJX6Çþ‚Ò¥·Ÿt£p·WÖýŸ-éã±+8£Æ?x´'$JL •©§04š34oª„êP¶ƒatÒTª(m7¶cE¸Øz¢BMÝ‘,߯×bÕEåßõÜ EFÞ…fÞ”J}ŠÇ¸)E…ˆÏñ§dä9ôÝ©A‹àj¿€ù°Ø¦è[òFy“å!`w8eZ¢mnƒÛ–%o)¼Hþ{ÎÆŸî" ¿“~L©yndñˆA?<›œ úð} ì¢îFš¹ŽåÄ p¸ã GöFšµÓEꯔÞSPû½%=´0¦íÓÙåE1™EIƒò$Úæ*¨‰ŸiÂÆøGä|‡Nœó‹oŸkîƒf}<ébõ1Ó‚ "n¯¬9ïÖ^p½^.çUÊvø@ Ê Q xˆ_€?ýÙº@Óõy Õ¼>J”^Ä, Â~Ý•Â6>8£ÝŸŒ›ÃKk Dæv‚›ï€€^¾h›d97u¥„ÿLÓÿG°áJ»€0χ#/݆|tNþKð†Ÿøç}b¡Jw´baÄñCo • ÙJœB˜Ïâ1®b¢»~d´N¥m% Î«Â6µnc`›@ïÇ‹RÊù€Š¨¥xÄãÔ[?{—€¦ÌVõ,¾Îêè¯D‚¼p¿æwh,®‡6ʸ¼H1ÍD”`mxn:Ûæ­å÷E<œÊÇQƒ{î&¼j‰öF797Hÿg}VǤ¯VEç¦!^…LhÞ¾)"S“-â ƒiÕpéç3Ê*8³½ªáåNý™Ã.Î#GØÐçùV—Þ¤á“ĈÔ*•"¯ÎðÉ€wŽÄ7ìIø á³®â:šaÓeÁA–:­fn>j¶^ÄâñnÜ>B?Aa”ƒÐ²Õ †3ñkµýÃQ©Û\»¯µÉÚOv|&ð!AcÂN^0θz±ß:?­% ý%µ,ˆè; æÒ¯ê:P­Héò9¡¿¯íØ:ƒM–Ë‘Â2òÐ+%ƒÌÒ¦\thJE]4Í6zø·þm+^ÚlŸV%ü»R°_ò%¬Øòù7q0§$´VF¦¢ØÌšfW-ß‚V#L’°‡fJ¾éÔÌIýPóyò#²ÏZ˜î™Ÿa‚¿ÃêûŠ‘v @ %c±=Rki¤Ò_ö²U‹ÈÖaeœÛØpàyoP)Cç?²=µýSYÐ2ÙÞ¸SD Nf|ퟔ+Ÿ%þ@馦£D`TK²ÜJΕaÈáÝ”üÐAñÜ*ÌÕÿ ÉO&¥¥´Û¶B³qåÛ8î=•´ª~ñ¾c\HY‘¹ì‡ó3Ô>Þ8¿w¥2à/J`Ì1ˆC<ܼ²©Ÿü,úT×gÞ1òˆ{O‹šªïâaýñZ-R×ÿT_¡Uíµ¦ø¦?ñ‰ G›<7f¸ÞÜèy…®kWj˜ÄpúÏc\M”’k,*ñÝA6ÄQ“刦«ÀE¸ªY…Á^¯±;:œ‚F×¢m?±mJ%ˆª^?!9u Ã–ÒÝ_Œ̧TÀýî­óˆ"wù”£ÀàìÇýùså°†PxÞÙÎ ôÎÅfñsPdå¿—yo~ÈÞ;‚çͲÅg@J_þoÙÌðÌ+z¾%ÙÏ‚`»Æ cÄþ‚š[‹gùÜgëÏ:šl¥ëÆ„·ÛÊs4u˜¸p`ò†ÀÊy×A±Xr4yOX ßa9A¿{NM â¼r™a]~ŠuݵºóG^Ãþ×r;‰)@xVV:–{Ú}]&8v®ú.ŸÐ|Š:Y?4JŒs¹Z?Ø¿íëé®MùBªk»ÎãöÞÔ,s7íÔ B"zRÔ#yf‰5NEe¨ªéZî˜ø['gž©Ää¸Xöˆå¦# êŽÅc(ýb2ƒ¢Óî2€š¡¬Ç)yß­­ö¹Ìigç`à ¬1Ýž³ø¶@#  !\zSÚ`®ì »-ÑÕa*NîúÎG®3÷Í#n±Ð?„…çæ:LI! ‘d”7Xw ߊAër~‹×d•×8Ò‰‡Ÿ™+%eÛúÆ4ò`—¡Q»ëir-UW®ŽÝ(æÜ¹Vã™#·ª—E–õObI<ÝV2ÑYŒæñªÛ¸{Ð7ö#W¼Â§µ{TІzÚlþ{æ šþá·«Ä©ÈË^€½-¥é=8Í„¦ƒ·š^ÈN¢@ºƒí•?Bô‰V…_]4FnHõrœ¹> Äã©™Àá~eœèù%*®g„åûz º hÃ}„f–üiKÉAV‡È“HÏ范ŒìWÛg[—±CîV…"Q…rÞ.¹…"—0™¡³Gíì‰YÐ7YFxc½H$ÍlíÀfh¾i1tG³­œÔTÖÅ,íΑýáO.+b ¶ñ®#ñ7 J·5½åi›¬ …ÄöL¡þE¾•Œ‡ÚF°ªŽHcÀëúèKâ“HdXøRst)Ê>„Z Êd||ŒfŒíë&² ö÷¾ë éì  Ž# ÆÖÛ†5¾Ä¦ÃÓ¨<ç›Óbs­¡ª.N§¼ÃtœŸöåïf\ã5ýÏ·©oÃJ0cÍljzŒ:ûìµ l€RÞ–Ä©üùÊyn€ï¸—íÖN”XËB ß²J!­ºªæN\…fwáÉÒ{ýÉn[b¶¾Wøüï¾D…å9b·“r}Ø$ÿtý½Àjíò¾¾€w™|àBçÕÜ;ÂF†Išøv M…%·¨…º«|QUXªã£ÿГŸ¹Äú8É€òôìD&¢@ AyrÒENfÂ3Ûå$æSä¢{€8GF¯cÔÁ¤C cžÑ~±Š3ÄÜ üƒš#a"×Áq©úCVIxݾ¾øÒa¸°n¨Cl¬Y_xCûŒwõ`±Ü´AâæQæßQØü=T€ç´+~ûÿótåLs‘àèýî÷Fx„¹íÞ½ñ‘ÝcªLÕ +ÿL·è]­Ÿ’ãý á|D{oëHãÖi¢vÙaí º*'ÝÝ»1HªC€äÝ ©CÏóA>)sZÒæIHÍË*¤ œ…[æÙ\E½!›0–amÄ ôåã,B™O¡RpÉëœu¸ëfШG³RU&—?¨÷;"¡É:Cúq-2dØ ö~uIP.¶nh5­Øê)…]^£Oïej ±<¦~’1ûä0*£<3¹¢“(9@Îi½üŸ«Þñ…×#.ÏŠ#£Ú´Gq¯Õº 3rGé)n<”_Ü_Œœ\å Í0œ"Tc1¹q½“úaz¡IŒJ¹%t$ñ!ÂQÞõ¶þйιo˜ÁtD?FÍ´’‹ `Íç-ÃÓfûgä’OõÍyøýâé¶lÆôÍ‚–Ex°‰/<â!šz̯ú¬à™ÕZ<Øè“&(†ÂòV‘PRZrFb8ò8Îýki~‚\Ù.g• ˬ›¨E^ˆº÷5¢©üνjlBÖÝXˆ¤`‰žûMVOóЄ$´ŒÕØYçý…Þ?.<7&ÿ_»ÒÌßózÕã×úÆ”9!ý¯Évi”:LŸñɯ…·u§_g…ÏÔ0½Ð[¯ ¥‰00)g\õÐ%¡OÆ0óºñT‹¹ Ð)j±†nF·(å.2Ð"Þø¢I/‡·Þê„[_ÿVM^ ÂÚ$òÜ^ð<¶ °æÀE£*^~ ÆùëhL†:áÐWµ.áò ¹P)Y-ÏÅÂJ²Ô“l‹¬$ G4Ïÿ¸!\,Û…¼ Ì×y«t½ìÚAèVª3Ïvþ=¨˜Ž MaŒn*¡$üð>ë'J—äèßEºf˜`u#Ãëé‘–ß)Ü–_[SnP7giNà,£µÑž~–.ÿŒ¿'dtÚ7Ëp"]•ظ­>:6Š*ãv]¿Š®µèî¿§Äå¾!'¨iÌiýˆgV^r§&ß{Vã¸7"•ÊÕæª’uKê©ÉÇÙÿ:E»Ú9<ÓÀÃÿÕ;G×¢*$2n¡!qs†p€´úQI?JDKÏ¥nˆnV`@¦wÞÒ™ÄÓ¢ØKüÃhy[õòÀ^„OGÀeìfU7‰)uâ”VËmöጅ;½{;â§žÔ‘¾+º!]!);âmyă ¶ÂsªEÀ¼¹}9#âBQyR;;{ê ¥ TnÉk Gu4ÁÑ,eš%g›NzÁÛ?‡lí4æ_Ó²/3($|"Tš9KæYñœŒ:vF«#»rÇâ#ZG ã=ŽqÂâY¹‘cÌÇW)Ϥß3Þ'÷3ÓT_Ë“ê2l.¨‚Á\e,¢’Tº«I,Øf¤ì¾Hë·¦¹ý:w§s'ÉÙ.[ÇAÔÙî4 8ˆd<‰{ÉÎ9²?¡rËq€‚k¸¯£2‡3ž­ðœÖ· hŒÓ1ÞóÆÎXoɾ“ýwêµxåBÙ"דký%œš¬h…^O_¸§zòÕßÀY¾T÷¦ÛñÿSÁÜ4ÿmÇÍUƒèü‰<ý\7ò¤K}òú±æãQ2Ål¥œýP,‡©oŒ4C°Ì¯’ücNx [{h,‚p¿ï(Áã݈¤çôÅ»w=tv‡…‘«áFT^ëæjÚÇÒœ ¿h…¾sF“×+½HO씹ÍopèM®Ðɬ+Ë—PjúWQ)—,S4_¦}>?Äyמy'Ú+e\äUþ^ÿaÝ'ÓQlð€SKêÜWžh sßóS(íÖ=ýW39Ie,æ@áÕ:agLlHßäGµ€žˆ8K7ÐÚèf\Ö#î9Ÿf@4K¡H÷ETYK®/‰ŽaÞo„l¬Û¬ý ,ú*ÝʼMùE{¶\(ž ½ ð!ˆê?k Ù3®–%8ß÷­) jb!Ÿô½Èäjò7Ý5ìz©‘’J‘TQ_s”{ËûUíÒ«5ûk!Ÿç‚¾ÿ\d=¾ü+ž˜–Ì4½§*ˆc9;ên[a²~JR6 o‰ao}$7ù!ûñKðÈ’”¥›E­´¾8+JZ²Ë˜|SÀ²^C ŠE…,y~›ÿBCxí±¡ÛÝ‹&‚[G»N§e’Ü|’Ê ¨†H«xe;Ý}Šƒ,Œ¾F²B¬Nk2‘Aœa<÷3b#~mí`qˆ¿(aæ‘ M$ÇY¾eðvFáÎ#NÅÍùRIOàÄ7AµÂ;f2 ”Alr$âu/Ðñ*[T´;—J¹Sèêf?ôĸNðŒ^WsíD+{ë4Çy²>A°×Ô(o^’ªÙ™¶ÉÀDi€»:ÌÙ®¬\òãX›`U—‘ûñøB£73T\ÀÎÌ┦!÷z¹‚Cf6ù¨bêh¾jCŒ=æcLФã;ªEô(ï‰%´fÀÇ×80öÈv¼Ó¥›‘¢ƒ@¯ùHܸs„lB¶LK7L,ZIt° ½(ðÏÔ'.@&¿ŠÀaï-É]a å€{e9v¾qJ9u yUEn !½"tÿ(‹œjˆ%ð)½*ݲa™„[Q/Z][åx ] ² í‚BŠXÜæ?&Ž0¥y±«<¡ÓNåî‹í&›±Ê(Á凞޸ÃËj—˜x]Ôa¤Š ØI…gðË í}Ú×.L r…\•¦‘úÓ?<’ZËÜ…3íöÊz™Õ·Kã¾ëŠè$#º ¾·6o¿Ÿ”fwÄ@bÏ[0¨Ý£ÞœI‚¬^Ϭî+pÎÓ:!름Þ9n%€Ãi “ÒFY VÞûmP™» €ÐrG=ÝBtç.!‘ ]÷–àŠE»4éÙ ›|œÏjwÅÒW€ÛÇõ¢i™‚#óéN·x8šºg½—6’Ë8lçÄ8$>u·À¿ÌÜsëe@0z²pÜ¢"!Fw¶Ù[QÄÔÛ[ž¶T°·ÄkÞŸ¼Gõ© %è×t¦®#VÕˆ–¬k®]]#LH,¶.ê8sHÞ jT÷ <“¶ÐßþV"(ó¿çbDåf÷¨.–Þißž1 ÞÁ«â O«+×—aXx®³ ‡·x´|ïš1;TÎÃïdãŸä±؃@ÂÏÃÔ&~›øzhã÷l}½uCC®ç!<¨ i-»áä½—ÿç;7å<Šƒ™Æš×zÝšç£.K½ŸÝV3ú3¥D,EͤKBΏ'ýxÃÉ‹f¸ùq5Uz võËw?ç@’^´´˜SKSQÅæ¸ÄýëçÆ½²oׄµ…À¬•°Ð;ZÝÀaË^¿À?º(Ø?Ý_õêtôÄŽ*^´¢¿Ž#ˆÈ¨6•Ýßã.¤éWjªSbTWü‘´j*hbI+Ĥå¤TEVÉ{\lõù•~yGm– J~?ì*(å¸ô?KÍѾ7ßîT¤uNO¸Ü7Jý3¼Ày*@åäÁ;Ø×$S¢ƒ‡ƒ^!²"ØÔéîá;Ò@°‡ ÙÏàŽu ög‰ÿ cIéàár;xJš’¡ººØ©%ŠÂ%¢O µsJâÚ>*]iÝ„QvO<ûÑ¢¸ò‡ o`Ÿ¡¢Ö77>®‹¡´¼ÛZ;dݵìDaÀÇ4Ýçâü-[Ç^K.N·aX¹6XJ¸;uáš[Á1Ðna….YÑ줸“ëeE™ÌQþ`ðÖe4K.ÑÇÏÑtgÞiÞÆp}·yøWÕ¬†Àð“!ÙÛ¡Çœ+ŸÖzpqB –78eŸ,Äjó·[êG(hÈÐîñÑ“–8ý̘Àõ““àCfû^ÝÕ–NtZAR;½º9‹s©Vè ³›ÊC¤‘ò·ntçàžvjp¤5öCQÂCåÞ²—ýF@#„¸/n,a“7.’05ÊsyËá@-§ rÙ„WPÁGíjýÆ_ºÇ}³èàHÛk¸³–:od5ú. 2°ÀY¢14“}SfÖ$R9#›ëúq(mæ-7ù¬o8ú”âJkph&¦ÞªL7òM»ªÜŸ&ôÜL ´£ÙoÜäUÉøßÒÉßÄ—bšß¤ QF·<Ò,):—ñòûôc/ÿ2¤Þ}•¢Žôj»Ž}?í«ù¾áû§­ÌÃÔ‹LõA˜Å Y“¿ ᲃ‹`ºÎñóR(r𮵼6ˆ‰?ú©Úl ¹z­oª.A“ÌÅϸ/öc†xYH •þ@‹‹/Èï¸RŸ+tôGÏ8à§—>å…,¶•Úcåm+¬Í¹›¿¹>ø¾D»ÆÛ‡Æ¢% EŸ¿­ä‹íˆ3E¬×ÿ'|xØؘßwÌPT©!)™ô‚ÎQ ó§µ÷ ü×F`x@·3WD„éW€&})bxKèB”Wܾå ¾Óž;]+\AïcÔæžãî Cf*ôÔpÃjÛ˜‡±… +ÁKT •ДÍñõoç#q´}‰ ˜¯úñK› â‚öù/‚í& øÈgwøb­ÍÑs˜þ¡Óí—ÍÚ½Ã[‘î(‰…×´¦Tï£)~òjWÕEsÌx¥åid, üÁ€JI]}àZSÀªÚk<`‘Œ\¹J`µÜþ¥¬殳:+öôX-OvǾg!ÅHjaDr§ Ì›ž–¯êmíFð*Ž¥—íÇ‘Tx7yŒÝˆýÊ̈ÔH„ZïÏ£­ã­H§ôM8 Ãde5OÓ:`nÌH¥ «h ¸ gol›(fX®˜”Í®òñ(àëz›S1{‡¤%žÕØ(mõ“^Ôj€›PàÌZpÓÚ÷ÁTKiép½/4è¯õNw†‘$K)¿WÈa¦]Î_5jÍ`¸ø'Cu&o'€‘gîõ>ÄÏ!5Ó–¦é((FOîº Çuaÿ&åëdŽaºÂ-$c‚sÜ,·Mó¾[òKÃ~K-Ô…ÅCØ&fæ÷ÿrÅ@`דmt,Ú/õêü¯k콈ô–uð—QÞX¹×G?ÿO˜Ëàb–™²ž–Ã/^µŠ|è/:±xý …-Ǹ…‚7ÐÁÔ½”YĶygQzÒR– ÍgÇéÉUg%ZaöD¾Y°]Q‹й¢ÉÀ· Þ¼ Ŧ¿Ù6;FT!²lŒU¼ 5÷»Ð»ŒüÔÖ3+9ðú<ã”û®æÛ·?HÁÇU¼±ã¹c¸]…SI¯G›Ì(z'fÜWÌ™ÖZ <ôÍÀZðA)=d¶7åUI*`”o-vÅ(ÁŸØ >NÛQ¸‰óKQÍô’£[£8äg‹¨úç[Ór´t§“U µ—»ír ·í`É÷³ïr§YC9'8K9Rñeã%Ð ¾ÖLoš³àÙû4{lVtÔ¨Ï ŠŽa¥Tž·ŽBðŠï×’µ JÂ;$ªì#ùðV£ž; ,ü6š&þ A‚ÂÉî¾µãà°6áØE91=TÜüSŠ‘^Vë‡ØØ»ÖÓ1_5\)\ ®;”‡Æ•±x''Ãþ=¶õ8?÷qÆàÛ*¶Üóì“%ù®éŠ·ì£K6ƒòßcƒ—0"úx|¤GÕÒŠÊ‘âAÖSMËK.5œ+~>Ö\ñÝÏaTŠ sÜS½ùdÙ3y£às[†Ä*VZJLp×Z\ý9Û–Ì}r6Ç›q/NöeÒ¨à|¢µ–ë +¦§Üð"¥éݶ›Z€RXF·‚oiºxl0Pxiºªô !^b€‘­Ý×÷œ¸û ŒŠ¥ ÜÝf‡¤,ŠŠÀuzCYLD Ñó‹‰[+ä?¡LŠ:˜`Š`1uu¹Óµb¸&4kÊÁõжi>& Õ«¤HvLhxsQòèl%f^u˜±·Ãz%ýÇCZm¼ø§¯€.¾ƒPÈ|K ÎmƨJ»y0ØgÀÝÛDÅû6\0P5O HOŒe®Fi Ù’~ºÁV©Úç{3fþæâ| ÈíÙyéçtûä6!áT)l¯ˆòÀˆ³¦‹']Q#®áYfÖI»LŠïÖ”•ú.G§fî<8¥ñÀ#æ†õ#ûÅšø[ìŸâRTq¾B¼â¼I|äÊЋꡚ3Õ‘òK´€}$âøpÜ%5š'$‰Ó­+\ê×Óƒ„²};º²¨xwøçr†’D~¿¢Âtåf¼ÒÑx3ÂTRFš²f«ÉH¤Ë™mÌ”Š[lݮߠy‚VÎvöè´S屓»úÄιZÃŒæWTo˜Ü^Õ¢#Ôs¶'ëçåOEªëAÔÇ}Ðõ<÷³Lü«P'W Páß_§† ëÜgÏ•ÖN.LÖšäÔÆTSÜ®Fý¦R߀‰÷Zî“qÊMO0PZ‡II.±N˜Á/zeåG¸?>‡ÉÉn &½ø8\kÉcpÔvälÓ‹NwGOذÀŸæÿ.¥³\¤ Ó [E_aŠç­zD ôSž°õÍv8ŒT¡4ji1hQñâ.Þá{æåîÔ|•;ÐçW¹E¡”Ž™ÆPôvŸçBpg;ÑXÜ2ïžÔN>pÙ”?Ð+‚1SM0ôùñh¥§–Ã}? “ýŽkiÂl“‰ôdçTgÒ@uNãF~Ô‡60ˆ=ûküªürŒ7iT«˜d²î>" s·­»bÍ×{œý¸mÄ9¦‚ñ¯.} ¨Ö£Êu‹'|¼§,6ò½þÕ7~âf‰yÀ©>=Álð÷zFº€IeE#ËK¢Äð×­*Íã]ÌË«#™úëYi¸Éìí'^2HŒãpÛQñÚ¦xÔó¾/çJXÊ›¿(9í¡ÍÍoZŸuŠ1õ Â.`_ç5!v ÊÛG3¥óð1@ÃW–Î…ÕE.Sú¡ùå_}=‚ÁU’é”ߣw«wí¸$?8SLàù fÊÞÅŸZnnD˜‘·ïƒgXf]L­–Úíà¢øó ßG§€Ç_¶›QÐLsOo„ŠAn[B«(‡Œb¿ð£Ö1ãÆ ™Jñóq Ñp´iÉýŒ<`|·î·ŸËþ,,G,ÒU!Zò•:Ís]È}öéðf²œÄ`‰QþG1‚'ƒM‚¦ Èr†{Ãuu©‡©ð_|2m^>É¢Q½iP£iÊ”ýýPË‹–6ðóePõÊtÑ·ý7¼À¢Úd <þÔ|JN0Æ\%s{šÓÆ£ñáÝ ì\ø ÝÎà_Ùä4‰´uös÷“ aVñ—ä’¿Ï:vì²hIqb–,EúôThJ?ò3¥f’FÜòQzL|f=¡°Ã#ÍM="+T¸Z#{ÕP÷ ÆðЗ¥Eã«~ZGF\’J<˜êE_ÍÍÝøÜõàäÞ ÎC†:¶ƒ^µíªCïã]ÕÝ ¹ç+‰ hDzysSÏÝæ¶%  í!d©…}ÀqÜfœÊÌY}÷$hoh–Lø ÀT/nNê!òr– RÙÅ5x_Ç <U¬¨ŠAØ@ˆ ¼XÎË})ŽÛ5c´ð¿„O|‰Eb‡6`ÌL4²÷¥ÿ:°Ÿì-1ÀUF!ÂÊJÁÖæ¡$:V}jixÞuöŠÅlTE_…¦ßø‡­'Ö4»Þz“{ìó²M70L­JUÿ¢7o3ç¦dÞ±ÕÉIN‘†´ —¤L}Ø»ª#\®Õ´ÇË_E¾N°Õ¨!àP$dÞÿ^@Ôåb¬J¬e¼ßr—ƒCI9±pÎ5zÍB‰ÒûßäAHþ㌸È7a ''r%ªýõf'ú#†’§†³WÐÿØ [¢ÈͲx¬Í(»½Z…¢`*j0-YQvÿ5ò^ÈŒM'®ÕE—™ªÂ@ÅA«ÑÓ!Sƒt!TíÜYª‚‚5y~¢ Ôa¶@œJì{iGkTã®Æ'9«»ŸSäB‹ñ\i™ÌO YäƒÜREs$$É©òˆrÏèºÈô 8®ìKÿP~ы߱ínrÑ'ÙA€G‹¤ÿ'Ñ,ØÇçcù#”ôGÏÃç‚$·!+Yò?LÓò¼}BDæ× x‡¬½`ôêÏ.zdÀœÍ]¼eÉ{˵^µ¡}!ÂDèá×vtê…Ÿ{8¦ +W’1ô˜Ä3V5·Ž 6kªáº¢~£Q1¥C‚ÿ Õ—¦S¾ºñMä^°]òuè]Q{ÖzÅuš÷SMÇE&‘²6Y^54‡I‹3‹õÖç÷3^‡hO¥y¬xK¬ü8ÌÈ)½°šÝ§4ÁŒŒS¦^OƒXq’±»á2qõaGHe·}“/tQòâAËù¼jˆ–þZð=¨ ,RøVÞ‹gÌ×Ê´¸è¤4Q0Âàç¦Â päà&#w仯—ô|”ÙÞ¬#aì÷j“7~¾©Ó?d+Ö ë²Û*è_ŠBÍ =PŒ÷O_³GuÙõ¤@÷ß>Nç%Úô‡Þ ü†ˆÖ34칦 ¡`ñê@sY+;ïc)?È|ïXæá~°2´ÓÞ s7Œ§ö¯þc±UßË‚bêßÚ‘câÏšqM¸)ÓQIù‰\Q‹†ÕßO`Ô2ÎjTbžvâ-•“`Ü&iP±–M°-иy[ü¿>‰j€$]m„ãÉÓͲýMø³ ¥„#Ùš–xw —ôž’œ©ÒlÏ&ƒ ,‘˜"äçüí_§NFö¶MFi¶añW‘‹4³dBħ§í¿˜zpÍ~yQ,ÈÍÿk˜úÉÄX´z„¨ÏøHjî­ÊÀL ¼r.ÌG²‡î¦n\.RÖ§“ ¿hFFm.yõ›¸Ï¹‰ðåeqcÔ{ÖBö3 ˜U{K.ýâRQóþmÀ“ñ‘>4ôÆùb|õNâ|ºZøâ>ÄeCjEêåƒýéAru+Ç»Ä÷‚>Z!„ŠÞ ‰c¹û|Ö kr9lö†„ö¥’Îóz,® g³Èåÿðí¸0HqÌ; RMc€Çu—îl ‘)é¥yN±3—ù׈ËÐoœwבTã°ûØ•‰R‚f©/Dgl°4€Þ¢9JDòÑìùYËÑdäèθÓÃ8dKtߨ2’Â?ÙX¦ÄE×ʧn{Žç)]sÑ"YÓ¨BªÐ_((äàÁ¹Ù‰– µë5nN¤Å«ãŠä/ó¶Ó#ï‡:ü”wŒÃÕ¥T-3ìbA‘ûì_½n…p2pT÷V.¢ˆÛfIH®$j{⬦´ÆÙ3Y2ø¸ê™_×8jñ¶ÖÌ!‚oëô,æF‹ ‡ÏìO"š.÷LC€ó|.­ØýmOž3^¸÷0«žä5fÐ!¸˜¤óuñÁc—zÝà¿+ãÀȤgM »@´`:Æ‹žtá"fcj@à}*ÖäûQ:Ç›A¸*"ÚA½sÜ^¥>È>"ÌÛðîÅÉ(èÚ”Å>kN 5Gð#j“½ç¤·õ=ŸŠ gÒ¬¦Y½:êE­ê½/ަ›"Å}Ü»}Qúð÷݃’Ð/BLчTqSyž)ž«­ ‘D·á¿ë‹¶ê)cŠMê'îâEwÁ·ƒ÷„a D§1ª0×Xo½Ë §¤'åÓ ¸6ü«nÙÇ º[€§Þ2@µïv©µî?cwŠçÁèºÔ¡—Ák´Tµ¸àމɲ´´êþ¦Pàíb-‚ ‘¾HâüJ:‚º^U³\N†I—Ó–?€7pÔ‘ÏÔe¯èæ”ïÏùØ],‘8”üøÜàO—±ßE8Àቛ*»«á>ʬòªˆ—ÛÃaþõÀ´ª‚Œ¾cÄaüúÙÀ¶Ý–È¡9»Çq+L 7$_¼Êƒ‘­ò Kˆ-KÓ±¢ö¯k'תUïCÃåÝÐñu… J?j—f+fëvß¼I;Š1¸ó•©äòTpz‡q [ÀŠÐŽ™s×lë¾7Ê#Vt<Ñû͉ʮ¿èÍ1BGß Æ5Źç!•opoØ`Îâ&¹µœFZçë¢ÿO†«¥.?—µÕ-þÄ¡ÈÖn‘+ òå³{ekbˆáØC7 “íkñíüq+ÏÃåéôœ¥¤‡!<¥ëûŸ4DÂéË* —Õù†‘u ª±™¹ëéÍ­oMžÈ—·cvãöõõûzùý¾ß··|~Þ¿?ox_·¯ïÛÙ/·²áÙýööíü;ä.¾‘ÃŒÎ%³‚ LðWîEç¬zf/3@ŽìëpùÈQìyàÓ”‚;Öõ¯áȆž×b]IY¨ªxooPלÝÈ0ZÈy-ë2öÚwzÛ™ŽYw`Éö!¤ÅÓ<G’ J-J–’ˆÆùÄGÃp¼4†Ý'U(¨€:¬zèÒ\/Q¹o9À± ‚–ÝpÖ\¯ÛGѸhøCº/úæÓ3ÃJ¿«½Ù÷“»É+Îáà¾i›d°S`ƒ„ß´0{¯âƒ}~ü‚6Ö ¦¦m›Kndùq·Ÿ³ŒÞ¹ñv«û¦QoßIXzÖ†{® t%çb®2ÊdÀæ{Ä0Eš¢ùé9;,Þײ`†D<5q ó/IO÷û#‹~t©šþ€Þ}Âhÿ!²¼¨îVÂÚæ{ãBj— ÀUÐs^iŠQ ÕêŸ*Ð/u¿ÜD†ob½ZîéKýWØÍ›Ñ¨C‹ÝQ$‡’ÑŽøï~[Gû§¬WÙÞ=å™k¦"DÊÀVMÄ9C\ƒÉu27Mkb [ŸÒ¨SÁޤs/ëµê†Â2I¹Z…ÀÖÒÉÝþ×M¿îêG I9§ƒPµŽÖàÂ\™\ÎtÔ]©ƒÊÙVf7ÛìzÅdž@_('Ýì»e«¿jIÈËÝŒŽÆ sˆÄŸO”ñÁ 2òXŸþl¥vâ˜b;"\I-áTPƒw]l»ó;OE(uC ’ÜI´ßÆÌ¡ímÅ 0tpnµí½‡Ú²ÿ¾D龿ˆLyi¿·˜ä ˜—…Òj\§_<ê3_ Z¨-êèðšÕ—ô¢ý 0°@äš®¼á™Š6è†íØŠÃEW=G9â(ñ²qay…µmjÜv„ÁjâuÒñMÄ¡=Þ\ô¢7Ô˜òËd t³’E,^~s:ít2èäÿk­5, 3¾%)ë_»¡D¡¯ßë?py<)ÅPðHêù{#:…äFq_ÿJx«“ëÏ%Ý#W%Ugñʈ6·³+ÞÚí‰ÓZÒâÑøHÜq»5ñÅÀF3¿r¸%ÙæP€#ðÑâƒÆgúyLÏêžµ•q›|¸G ¢”¯e ÑÆAPa’‚ìüi7ÚF°&u)©Áü 'òõd#àqCËF‡ Ï!Áäü^‘¨;J;é!.ƒ¡&ˆÙ|r›œ¤Ãðv°>BJÓ`¢nüE`º˜޲‡Vvœ¾E´A%Ùk&SýÔâ> žòKû²smf—B-£Ô Ãy}•t®²!OžÞVáZ(höRëÁ¨ÆËÖ±ÇtK©"®ÇI/É$–RÌâZ¤ÿk·m[¶ËÚâg%Xž<ÜçLB2!Ñ윗ޤ#ñG@-E^ŸÜš«ß”*q9ŸçÛ˜yJ¤_?\oã‚À æ‘&üu ™ÑG¨4Ç4rwý¦q“Q¢ØÊk„/ Þd”´'ápŸ]rP¿ÿ >±Yï°ÝRà<¢tv¾–`nRä{¯Šj…t À樂­< ?€)€ÖY÷t½ôãÓ#÷_¨ÖKÁ‹;èÞbÐßׂ÷›æ²@xÜ÷zW 1¹í¤aÒ^§ú8Ñ{$“¹T¸n Š8ÿp S'È·o dXçlóRrìõò&Äp'0\ÃK„Ï"?B =Ñ1â,ÒÁØ~Ï0·atÞ»4øá¡ÓPˆ+p–ÂC¿x è-rWç`O_Å-<‹(-” t®¿ «–=Úßq;ÀðÐ/é÷:5¡)b Ý_RHÛÖ…´'™2Mí¶“,ð”ÜM˜T\t¢ñÙ“Ê™b”·d»ÏÕbqG`Vƒú^¸:ãXßrÓ—¯ ”óÓ×¾YƒxK¬Á?@ü!Å#˜ý¥j {Ou„}¾hͽÎ+f¡{óŒ°èÌáƒÅæ¸7ý¦~oÏ29^‰IVÊxÂ⢮դêôR Óƒ€‘¤ž« ò<:*#S?f5VShÐÀÖ >g`·!—ê]†)xnÉØÄ]‚¶šÎ°ÏÑå÷ô¿œB;ÑH%äb¨Ç´òpŒÕ\IƒÐ翵|ó8ç¼P¢üEóÁ|šC³ÜÉ5GªÆô‡‡`Î%Í“&‰ö -¢úHÁT½ÂŸœaÑ´…²ÈPðz2«yv Žº*¡MÓíÆ˜rÇÁ\²Þ9­`žMiQ¢}ò”’5Vx()g C¤¦OÏÖÄuðŽ#”0aø) Bä(ÌE>ów¨)¿kå€ `}ÌÕ4A€þ\kƒ8â£E”¹7"mñmAAI© î\àø“BÆÊÜùÎøº5ö_¶s|ðŠzÈ~ô¸Wy4Hã·/'‚ DÄ0aìïÀ ð…‹ù×!+rz©ÁMÝì|mL7~gíbµ0Ý`ò´lñè£g_ÌÃÚ[ĵQkœªË_±¯7 £Íi•öÊ™}àí@ðaíÏg¤fžÀéÿµÉ§õÛµÚQ ù0‹X(³ÝÍ æ+Áz= ‡Dá¯nÕƒÕÊǨ_?͆EXiN"8LâšCT 8Ù5bŸ4™JUT¶3ÚqÚYÅsÃ$<¯ø];‚Lmcˆ³Ì]Õ³*æê²ÐÄätªM×ÇkÂ?¥ó«ÎmG£(S)-űA “´e?²_•å,ÅÍ®.^½ž¯5M_, ÄÁŽImóSkRÖ¬`·æ¼h­g^ñ^6Â|0”W~‹:_­‰ìÓTútÏÅçT2†âìX]+ªõ‰)(Ô8Û‚iÏ4¡¾0CH`±‰+ãæ$ðÈï¹Ô<ñç2¾‰*»›^¹‹ÅºA¼¹"xðƒ (¼Ä"„S öZ}šjeÓ’Ñ×å$+Bõ²)üN&`±«s‹›ÕœYºk›TÆLCž$ŸaßÙˆع zä/Ûä|O> /ìoZvãK®"HÇgkXEÛ°úÖùôŠˆíÁ÷Í(Äš¬RÑà¹Z6lÑ¥G¼#ÒÑ^Ìešç=ßšéíĉúäz‘œã2´»#”Œ–Bpä-ÒªE®T¦ø & à¾Þ¦•Ñ!”-âícÏËt{7Þåø„øùÓÍÂô¼Šè† –ÉPFöã– Ìw‰ìmnTãâ‡uí¦ªnu ,K(Á'¢Qû«õDP~Óþf¿–C­4?ðê*sÚÀM¬3¬\§'ò¾šàómÙµí¨)/·4:gk-ØUjÍ#Ö~\Háøg$ù¨¡ÈœÆ/‘:H3¯€ñ í¦ÿ(f¢Ø½Â±X"a6‡UEQ„®ÖŽDN!‹ˆ¸0}ÌGÔÔJ±v2h›%@-ó Û·ý\Ñ۶룶ÜB+‡²KÛâÈTýö"ÆÂh…‘æ_!ÐŽG"·D·1}U݆³Q¥y¨Ók^Œt·û¶]*ÔþcÖ4®«yßN´3XƒrfžJÀ¿¹Ö §½'Ô|Xó÷zƒ£ÈH¯FݹË(í8hƒÍ¯¼ÎÐ ÍâÑË+)< Ûó‚™J)7êÚ$âÉÈ«N‡7sâotðÎa3Êݱ_¦®,¾‚Æ(«½f8æ‹*¤þôgÑ˽œ[0Êý†9ª°Á@"{@ó—Ýø5+Ÿ•òà Õõ!õû¯5£ÆôÈ«¯ç¶`Ozk•Oðÿ»Oc œð:Y<÷(™2TztvóRNë\ÕMÉRiè ÂHÄ+2,¶%PNkM©ÄyYBŒlVSÒp~ázÏ5Žox>ÅŒkЮ?¥£Å-g³˜‰ž"¼u‰=íñÚ—×”™¦í´ëìGŠÅ íQRuºÌRª…7˜fj_Ú¾ÃÚºge­è.rЗüý…Ë’ói3 ÙDE}µ0kʤ¡C ü·´1Ä"ó¦"õ ÛX¡k/ÎöÕîÆŠ¹¬ß)TLß g5þ ÌS3Z¨Ð–¹ò†Û7À÷Ðþ*³Rtã0ì ˆg&»g'î[»{ðÝáC(Ö&|šƒÊZþ~ß+L§r‘ð´sÜ$„1gy´ò-<Å$Õ VÂ;äe0ç1¼Ÿ hèñ*,š.þP~ªeèk®¦ŸwêpñKGû”ìÂ{F3޾L¸ø<ôÆ¢à#2Ýû\®QPàÑ­}µ€d²Ñ¼DÏ;Rc1W ‘üÚ¡–-÷pwÒY…‚ùÀr)õ@/“wpcõžœ î¨e1£ñš¢®Lhy«: ®æŠ1Ùç=À/e:ˆt…Ón`0"ÕšòNR>›.eIÃFîŸÐÄöqgµä–ð@q’/7Q)º÷Õz­›³Þ|aŸìáó‰{çVRË[ÿ<Ÿf1ÅüÂõ²Îd€GV-õ¨ ðøelíQ·Ð¨âÊÃO÷Xº¨'ŽBÊ¡Ñ!Žh‚µ$ÇúÎJä—ñ€Ë(1'÷<(žjªõOY½'xVf®Ëα˜9ež~¼„ýØ@ްNå·5‰“ÒÛm¶Å´r³0CíâUd2sKWKÊý¤ª¸äéÔ[²wKæ[ƒ«©$Øá^]„ |¶+~tþ€…œ9›rÓ—¦:'©šè¸ âàì  N÷t`u Zw†rZ†mMT=¡ôë ù´.¨]®ÛoR7O,R¤(S E£ï¾]Uxg‘€Ç˜T¾]îdzyû¿Ðñõ6+óxŒhY×ú.AY|ŒAÕ$Ýdth Ý‘:lžöáúo,à×…-H3L™½ˆÒ]RÂk«ŒÊÌ»7GT&¼ºñî•A»dSéYúݤü¾¿Ïêîó¸oe’$AÅÌCŽLÿ8B.XA<‚OBæ±t8Àè *@c¹fòdbß­¿³i×çöCNÓj1Ä÷é74¡ó:é5ˆï7€?²Ä˜ Q7üȵ#˜01ˆëÒ– ªyÕGhñ‘ ªö«¾é  ¹=¼ÚÒ/`~‰:ÜÓ RôƒÞãW E´¥’h/žhº<ÍØÑè†,–ð&¢%0ˆmùëOy@#ýˆâņ±4ÉPÚç0ÇÛM®Ä@ëþVøB(3…qÌô£Ïž‚Ì« ƒ2þÝiŠ&_±l0n­˜ÿiZ…9E]³B'ô)°)~œÃ&‡Ž¢ SGPá!ƒ×m¹A•Ç×Îzn^ó7‘*|ž$Â#!Ÿ <t¡[†:MSäD%îÇÈ÷ F¢è7éLÝ ¦ÿiÕ‘°&elû^mõ—E«„TË7˜ïšë_ûEÈõN ‘Ú#ôfL1Wì™jøB_™åœæÄ=7˜ñ)hòçŒß߉¾R<ïkÿ—ØfÈ@Ò_¨ü¯ŽPÛ„Ëô´£c§éE‘Äú‹x‹£«?´“]'^2´À6Ö HdTcY3' Øæ¡nyMm¹É)Š^€¿Žy˜þçNÿdÐíˆm—ÿx0H2ÂK÷•ôî&—I=­„Ȫ ØÌýìø²ü Þ óÙ.ÈÉÂÖï>z¡«Ñj”ý/µãÿ6¡tê¨ïrú® ÌXè¿CõÌnbU0ü—ð ¬|uL4 /9yÙfr0aA²¥0‘ˆn!êH“q­# ØA¼¹={Èy((ç R˜%ÓÌu¶†iÙî·UuUÉ(Só}æÒ‡B}ò ¸ÙÝw©­zlIxÔñ<`z&ò ÿ†µiœø ¯Â ÇÌ䆽ƒx³ˆ„ƒØs 3d3µC6P’i~^gŠwlÎòRŒŠ‰‰ã9BT@ׇåPZ W=/¥ ˜P=U;+4ÒF.ßT–Ó$EuìgŸ˜ÈFºç|ÙÚkQÚM?Nç¼+ˆ±m˲…å^Eý`c×GuçX&]¬Cÿ3õdˆÁcÞNp`  Q´Y|èäËüþ{}ÿO}¥ƒ7ácgŽ¥Ð©íóöD\•ìM{áE7™Ï¿( x@P#õv›7ã¯gpyàÙuÇì—ÀŽØÎnöºÏ UXÎD¤0‚M$ec.ŽbG¼:÷0u;kobWÄKoÚ+@-<¹Dì#5= £8£ú3q ®Wµ~›ä®WO¸~ª7|›±.Ìþ£¥ŽÚ饵ÕãŒp}Ǹ晫q}WÀ‰Ž{=—3nj˴WÌ,Êý”3 áÿ\ëÁ)X~\æ|{~øÔ1dÆHFûÑFœ}ð–Be †+†ô]@7Kuõ@:v›©e ^ç¿@wn‘ö= œlxB –2/ã™`ŒRc¢“ˆ¼9Ýgv¦š²Õt•‚Mø–.%•ç™Jµ\‚ƒ xiQW×j ÞHœ(§YÉxô«CÚ ô¤´SO‚0æC|3¥æ ùõy`Wò¡B¸®î‡¬ÿ»YöCß¨×·íª¤@Î'‰™¦åŸK¾‡zd™î˜6/gùãå¥,º´EÁÆð2Àb¢JÕS_íìQ‡:xý¡OöÊ^yµUGÓ¨xÕÂ\gÆ/ÞNöî”ÒÅðŸPÀ\EøÃ‰Íð ¬[L’ó27š¤n"åpæÓozΠˆmEO“Vh¡ìÀª\zKØ_VŒ}>57ýÚ}/ç´³\×8bhS©¹ö¦/¸†./·FÈúÒU`k14)×A`ùTôФªûYªð;–’ èJ:Ú*Ÿïyî‹;Ù5îSV욢Á· uK½—©G#œ¯úe\Q§¦?ïYCjÓóÅðÛúKÒ¬æé+ÙÜt^¨‹ê$®kâ ÚÌÖÏVÃÄŠããOš$6âD?Æ#:>m#[¢®``0Ëÿ#zÊ¡Pã¯û4ìúÐmv´ó½½‘~¸·NâüÏùGOŸ‰}ßã*¾h`¨ã[ºS†|ÕV7 ¼„^¶¤¨£…4Äšü<»$ qa h~€Ú6zIÉÞ}h|£À7OèÝ~ùe›Od‰N¥Š¶AˆœŽm@áUãåúìÓB„¡»¦?x\`´}º~Èy°‚‡J!‘v¿EWŒë'ÿQ rÐ=yi-ow ZY&ä˪ƒ8èƒ`ä±5‹¸ø¢Ý&Èšzoqƒ%âÖc^°ÃÞ†TóKq\¡"ô¤îLHC­%K¨Òúö}þ+$l&ÖãßKmU'’Õ´¥°Ã'Läȸ‚‚(ñC¡´_ b ü‰ê¼âže¶÷Ë„?DâN6|/—>›hÒFtjûd’+T%âÂEÀX©NdGçü;# ê ì'IïA²%z‘]G—ùªN^, U“+GÔ(‘,¦‡ ,>X±3q>§Þ|ív†÷asš7÷¾›¢’Ò¨o_Â@?nA„ß)¾ôdfù:×àAHx”×íˆóÓüDˆöÚõüüÓ7Ù%<¯ -—L <6zÎø¢'(ŸZoGŒØ»jÕ%H¯%{x—ìZA;gcç\ l¿µ€)Olgêm::5Ž¢ÀšFõ­Ùrˆ»6>À‡òËä{ãšj®Zöv4*þ â1töÐL Í(Dµ¦ÿ]ô|õéÞjOvþBªÊ#®þÉ {”ƒÔ²‚?Q¦ªÉz«+}y>_‹Z}À¦fŽžïðßûƒCÌÌìÅó,I…c§ç¡¬ú™K¯÷ÓŒ™†ÁAÃ3g ÚÐKïÿ}¥œð÷7ÚãÅÜÔ 3N«Âtþ{•¦ŠÕíO}«2­jØÂ '¶ ¦rb‹>âƒ÷†7ãxý£,xkÚþ½À†6 1Záhàoîªno®"br\,áQõbäB0áèwÀ?¢«w6ö°Õ8¯ïÌ‚Gx—l:ظùÀrÈéa\Q°ï<éüx´ô£Óa¬ë9Bß÷È›Ìù8?×S–5QofmñêCÚP5{à •¯7€eè€ËsíÂ4H± 9.'bjñg¤ 4ïz/K§¤ÄéÄW~ù$–Q|T]g´AÝ"¶×oƺÙÒ<éÔu(‘¹£:‚Äo;BÑÆDä‡]»ï¯’°;Ñ+S z˶.þùsÌ"ïéŠ*øä¦™ˆ B9É‚¸€‘¦ûËÜâlöB|g?ÅJ7èö¾‡ìQ Én%}ý&¹î{ŸK1ª*ǧ*_ÝQ‹ƒ æõîžës vž9UjêŠvs¡Xüdší.3>!V}“Iìh¢_‹\®‰Ìoí˜Â7a–°øó¼™^³óuŒK+j/l“7N^ÃSsñüéÇÉÏ“ ŠII¢WiE(ŒÒ¶` 3œ\ÄpaÒ)eÚ¹ù¹¢ÎQ ÿZS†0PúÒoYRÛ2^ud‚QŒGŽ5yKtÿF’m¯,Æþã/Èù=ò›|½¾ã5íXÕ?ºØzñG$Q1sy&4}û3Nr²åBÆN‰¼–ÈÝ­;rŠ6®;®ù¸}¨ˆmë‡<å]R‹–ÅÿÅ ;B⪜ ;_Ýå¾ý>éîPçÎvƒ*UÀ© Œ²±V O§?iÑÝÉë*Ÿ’ ¤,]¼´Çt±“7ÕØL7ƒµ`×>¾*„ =î—éâIO½CÜܺͥz ©½É¡—I£­ˆw—¶;¨£ÿG‡U?¾…ñ\fvê/¨ÊýÄcù"Óg¨±÷{þÅÒ(®M­2¥›–ìYÜÓLé© ó¢%´W«Sån’%Ø¥ƒt¹ÎfŸþ…úæúÚ¤”pž¾D@ÅŒÓR“ õNå}P1_rsž×3Î쟛& ÏÅÿ,÷n”wQ¿‡åÄþÖÂÃ’ß³}QÚ£ä!!ò ¯.…„@nWZ}÷«5æñ6ï¼4äûŽÂD„† \ÕRô'’¾n?òü ¹ƒªÑ:<Ñî¨2Ü<*Èð–Ù^£ºPL>~U݉#Kbn4ì\Ú¬¿‹VBßý¡e•¥tkÙ¸‰/³#' Õ‹„vžh~Ú Ÿ! }›¾Bl1¢õíçú¦ Î…wÎýýÚz üaYfRo…øîÌg8sâ…Õ¢;/[¬>pîƒã±i=Hb—ºUöÀ¬ªq”Ð-fàä"WUbC@d‚†+{éz’G^m$ÂÉêœèò«3$8…QeÝÜŽûdI@Mr¯OàÒ¬i²޶ÿnêÈrŠÃeÀÕûWùЭ©¶;çè¨æ FAÊür|WC†Ç´>Û-fÒAŒØ«Ö]Rà8†\fÔ}¾ §o«ÛíÒ‰ÐË#Nƒ„ÙÛ‰÷rw$È{n:0 ƒÕ˜y‡Ñ2£ÄFOç}ê$³ccœ>í)¿—ñ\â\Œï}R´“]ÒÅ_é-%–Ý—5SÉ9§ÚCÑãß·6‰Aq>Î'|yWÕÔvD$rM®¥r9½4JLûè¨þXE5BªpåQðwØnÌK¦SÝ­6ŒßŠˆY;ªt‡†ÿOP{“@UOÝfƒWŸÓ tòMÍ?/_(Vð£Å.å]¤¬òƒ¹?þJð00Gnƒ É•¨¡e<ù øš>€ßÐåjƒìv²Âæ"/³Ož³~å*‡.x¯u)È ½15|ß¡Œ¼ZHßÿM,?í…¥¶S€ÍàÃ)zéªWÿgF?¥>ÔýšŽ_7m¤ÁõTˆ¨= ÑÄ7͸°{…ÓCFKßl+ú»úA¬Š¡¨@-U;h$+õãÿhtãí*Lc˜IåþAxçìTC£—œ×XîÙCârÌ)âÇŠCÉ3èçÓÏ(%qãCb]ú,’¶Â 2$ÓÍíõT ÃÎoi¦¾Øø•xúŒd¡Åa®Ñ¸&=H†j¶ê¼ñÐDÁ}–Ýx÷ó 5oñëü¿g’Ú(Ž«*ºDçÍonð‰º?Ð/£LNÊ×g¶ûºê†ý¿}mŸo¼ËÒüHÄ"ùõeLîö¯#ð7±­ç` œÊ´Êï-o‘`×s8=5:N¬šQþ_5Mr³ÀÕ(žWª%Ù4<.לg­í²¨ò€§^³ÑN/dE®¬¢ ê7Á­ää‹û „rU¾pé‹VÎý´ü_HŸgV§åé«ù’—Šgâ ‘sÈe=$ÇYžtÈœtÚœÒsܰL>{!Füõ%ÇÜóÓq¹»ÃÅü©ÃkÑivÕ¢ÜZœä1%íãœ=¼5нâÑøHÛàkE¹Ìu\_ä^·xCØÐcØ„€wnö¹á{à ›ÑSœö âçü—m‡^°%TM²€6͸ôÑ9>ÿ&­oÎm•“ëîÇbl÷×]©]ðQDÅ–µ•pŧ'¨î½ª¤Aÿ%Õ™Ž6ŸäE(•ÿk¬‹­3¤BÌjôþbª¸^7EG罪‚£”þ¶eZ߃I;òy?T·ò@u„ ªòËð4ülRÒÇÊ«S×vÝþF¸H¦:º•\ÂÌÔSå%§‡á¥oîÒD]¥‚©%°ÓGÃ8kꌢbíNRnFvMò±´ Ejïß}ÛLx€Â`‰o™:tõ åûd¬˜òþ(ÍB÷†uª¤7/¼òOÄÏîꬽäü5¬@åPšÝBr¼ýd{¢[¤¸æE$T[¨ ¥„2H¨Ñ¸&•¸éॎEZ€q°ÇÁøš¿£a#\pó·ÐûWŒ-{èîžn››FÕß™2È–AY¹r RnÕÝêý:Ù4>({(—rF’Š4B]:@s~ñÅ´·„®hß+DCPß6>r†ƒræ‰kõÕÒè·ùÊóa0%ïߟm /Kw׬¸-Ÿö‡Ôå&Çì¹… ìj S©t°UúÕ#ž‡ÉRèk†ºD’VI¾c^o·—¢ÒÎj´áÖ†ã*®õ2GRE=*åµÝqÃÖêN•>í8ƒjvDJ5hB¥˜×ìXYNŒ¦VØÐ³tÐ ¨—önØÑ7 ýf°!_L„ÍìfÃcÀéŠÎcãQ™uêný;ÜÜ–j÷,=¾Í 2¿&)fÞäMT<¤ø¾¾ŒŸéãO oPwÀ<ç{\nJeO¾°IÒ”µ-¸§KÈ wCZȘ£Ç ‘޶x§{+PïfÙ‚>Õ†ŒÂÇfhj²¼¥†~ÂÆû¯×;û$ºYøkîîài8õõ~þ„"[:eìÛé3&îKÅOö æƒn‡ â¿9^©›OùÉ•÷в‚VÅÙÍ̬&rŠ¡¶hÆäh¸¸.S†ò¡ÌDœëÉþq9Ìœ,Šv^­Ý}l~@´~«D—í4s¹®„ÏxÀO¹ Ž™qÆb•&Á¤~¯«+\x l·ðŠˆÃåã}î@®$¦ÉÛ€±%!~~å˜îX'x§ÕÜeC÷uCöç` \»à ¤ ü|©6øÒoÇøí{Ià–_’Š…c°À9v<ìÚ…1P $ý’íùùO\ÏëµÒ^£­ãÐþçF7°˜û¿ ˜Òƒ”ª.a1°‘T‹bÙ2YeSUl‚~m»h}¢ø ïVf<ÞH #–Õ5²9• "IO|s^# :4©äðÇ^i—<õ±°>Kô" uÅ«h`N‹ÒºƒðyŒgÉRôb_”¶ É(½ØÚ,ƒX¯ÎŒ¸ß>O Ž$Ä™”&¸BLìÑ™“ s ž8”pÔ–’Bˆ\ œÞóç6hƒBçtûpDô)ZR^ÐØ}PÝ)\¾ªÀ<–ûk´SÆ ?lå ʘÃa s¶g\œAæáUõæÉ‚á†~'¶-a^„{9öUŒM@?…7˜fj_™·…ÐÂáCÖÜâ_Ê%¨X¾v£Š¦ý¿xêHjšN·sÑ•qÒ.¾ýÅ:M@1„z$ˆ£‡{Çu¤KøžTN4l¡M)ŽNÿRxµà-#l'ž˜J â‡zŠgêÞ¶NQ+ª;hÁ•`@-Ý¢]×Ѻ†3Ð[^ÄpõÍš 6߀õNZ#ݜĒŸ$l8RŒeÜF°µ~…%o}¨2YQÔÄËÒÔ,!¶Mÿp™>k “uõ'­! !d+ ·¯Ø˜ÑíæM~Ö€ä)7³¼CÒ‰}Ÿzm•»5^!‘1%SåßëÖ•õLr£†¹àŒÎ飨³Ý³ÛœÀ™AÙ]’°0ÏjE"5ÚXÚ g‘IÉ/w:0sfš±RØÉÄ4y@ð€ jÌhÒ!]§ûLx ÷‡l剛ÐÇS…šæšvÆš(úÓ Ú ¼/k®"ö™ÍííÙÙ¥ >/I^>¨“ðÁH¦åî|ay‡ÎL ¬×ßWVŸ2),N 2,‘›ÁkÅ1cÌ=³õàSÊ¢ÃÓ©s¦êœ°›s9ØÊŽÀ@ˆ!Fýêºãm_þ1cĕڴ­Ôß9îÇOK’¹‰ ô¬ÔmÏ'ž'à!7¢àåÆ@ð7’¼½w„ŠÜÝ…Àx$Ñ<˜,êK…ŒÞÌöîÅ–~!Çð%@·rT5 ŒÁ*²W"Â{h4yvawð†_7.Q¾ì4Ίô$vj'!Ÿq|:9±—Õ>ÌH §v¨‰$³ °¼þ€¨q¶.’¯‰q#ÆÝ±9…×@ÓÌÃy˜iPÜÑN¥Ú^¿,¯²rêo·¡å¶þ#“‘”ÒX–‰¤ß2Oó«› Ë¼@çòc|ùòDp} Æ#Ë¿#êѧ´×zÿUd;àˆsï+]eÙàpŒÏTÂÚžF“q®k—z¿ÃÉ©wŇep4ø·Wyö©×˜î3ËÖÆ›<ÿtºËmÌ,ØìÊ’2Ô¸¿¿‘‚¢ûˆ‚‹Ç1 P%Ü“r¸.g4h‘ßkáO‰ ÷©äj™©,-†`d$ Þ­¯Ð[íïfž¡¯ÔpçÁ(k;‡©ãö¿ºÑj©ßǤeæÌ¢¹NÒªD+J†·NÌ Ø q™V¥5’ãÌCaKRó Û¡A'þF.¿dÇw÷’ÃËQ}Ðç2Þ’~AÿP$Õ=]wáè…‘Å’vb1™Å[Fï±¥I(^+Ÿ„ƒ]µ ÖF3%å"Ò±G*œÝíšÝ®±®.TnÕø­["4¶ û(>£­´½žÑNç}G}(ôoéi ÇH¨mÓÊ¡MrK ·Á´³jÍ«ZzCö›K^²‰Ç¹KÊP¡?°8/6vcûgÐ61ÙÈ£~… ×fq……‰øÜbZ¿®Ôö¹Û¡äxT…CÎl´};º^:׆{ÿ®õSÔ¤åÎía†ÄU!žNî~'N§K;}h’k;ÚÈ=ë“¿a‚7ÔãËýðâo|Q,$hM®¯BÔóvïQ÷Æ´Qä)]ãqÏ•Œžÿx×x¼ ‚yK‘ýA$‚c] uytÎÕ Y ÏÚh­St[ƒ)ÈèiõS1ˆ*™'æµ=°=¹Œ‹[æä¼ÍãkL×ytR1^ÖÉ>1]?Ž˜#£†–õ¶£¢LÏÆÙP;#Ø îØP'ÛõnÈ<ƒXXù–i‡pÒ‡Ù_ZQ&°*ì~ð " ÐÔ÷©°ê™dÈ~NÜè å2¾·¹øðlƒ¥ÍŸ3¢ 8ËøØ—²ÕrµxxrW?¶3ö„y2/Uá'¼¦FËÛeç»ôr¯cºÉãZ5{~ƒOþGü怺Àê_PÚaUijUÆdg0üSÁV“…9àr|?Çö`ø\PÛ4`¥ã;y¯6Ž¢ƒ«fÆnñ÷ª²›à!øÆâ¦{¤"\~s-}ã‘/4‡ãñEt:‚ö/ÀV=È“l‚³o˜öcKf2k† À8‘K]™>j D•ÓëöIz·»@ï¿Á¼7“~Ë]­­)ÅUSØÐÁ'`c¥!IõðñKr±Jœå›ÖÈ ´çÀH¯´H³«ËQÈÑDáEomãmvæ~ž]Ú²D“^…V púÙlü%øs`Ë„1jXf·øŠ7r;(Y˜«Ä.z VÔ —Ý0Í&­LP_»#Æ+/i›³=¦è2—¢äSÅtØ"à üKЕè *@c¹fòdbß­¿³i×çöCNÓj1ÄŽkR¶ÉëÉ  øÁà¿W–ha©F·Èl¼1pG7:¸ õ1 õóT+{¿¡nUÇì*šE%Äœ(N`\¿³1s“’-7K ™îb.üÕ#~Ü"&— tc­ÙÉZÌO^B”¾t,-ara1¦ìhc·QÉãÍJ­ëDv¬Š¼!a訨 µôáµU"älzmw‚gK€ I¥ Ý .Ü‘1Ò›‚ü5‡yÏ Ñ}÷”¦“‹´­ß²oÉDy6ñ¶öëDï.3žPW¥[=Ôf`)ç Zƨ{••)wœ3'7M›Þ(ä q…ÎRä1Ÿ±C‡Ÿ³üƒ“F”rb/kMlªëÐÞÁ,•èÅ'pÃÒ¨¥ó€zœ?‹ ÷ëçâ…ß ºyGÄFiÎÿ/,j7‚ÅWihæ¨WçÑJLøķ-×4@°ÎÚ~dˆv0ˆòï†M˜j, íb IÑp¼ÃÓ?„‘Ùôc-üý‹©2ËaH!v´Ô ¦.-Õ>è(R2¤ÙÍ, dMÌ C¶'Ã;hWú±÷çWà?Û¹ðƒáhÖºÎÝ'®Î•’G“jfœ{wË7}“h5wsžÌÜÒ¤ ®ÀG{Â2S|c‰EÒ­=Wê ™ä¶kz…e^\óï1°”q0×ÏVT^YzDÝí¸ï$9•ëkêÜ¿hC½ GÄ¹ß J~Pd¦j}È¡Uª2±¢øÈT:àt }í}ésß;Ñ|þILŸråú{†ùìŸÊž­#U  Šëó›Ñâ·5––N´Æ(D›Y{71ûã¿J‘²9Xº{ÿ0é Ìé¬Çø7‰h=—ifŒA§­`+‹ÝäÓ¯w,;`]±¢ßYß·ìOž!L µ=ч¤$d¨A‘O`د·èuƒ^xÇVSïFc·¶ •Z“G¯4±U—ádžUÑÕ|U§øºøÅ‡¯ÌÌh#¬ÊLPÃY ÕDAŸ™b×oÒŽuÔ\{‚UtÔhÀ†KQMˆ?½yX]j¦x‰¿¦ÿAÐÆØ"ŽÍÑ+°[;´²šqêÞS€fÊ?uQF\&†„KëE žŠJíWý›½ò¥ŸŠÄ/Û뾈æŽ&ó9¢EÖ1á ª±;žQ—2·wSÕM°^õl?O<1è‹cﹿ‡XÚ!Ƚ·ºã’F“šU?Vñ¿Í.T PŠ^*tq4§GT•Êmñ&½k4éâ§mRH”ÜThàcÖðE?°íRæÎþÖ¸XT6©5¼ê"Þ´(¹Oc‘@ `ý,ü¦¤7âÑ’§1Š„‘¹)œ7˜“IäÓ¾L_Eã{}‰8£Ä¥¬T#•†½Ÿ·Z¹¸I¤§p×j<ߦ¾3#+|ÙW¦‡ËÇmC‡Šë$‰é¾_õêˆP;·¬® 8å¡ †[W´ŽW­†¿–>ëW6'ê¸9ܯ³mû?¶9‚4^Ú°û´:ä^fš'ÓmX-˜AÏf¯´zú^žHæîæ=?_NA-ïó .ø'Á[ªv*Â^j·`ÝAåØz•·8³q{Àp óåæ7Lm;>æ+í¹¬ å^í8ëðFJ«Á %zß."Œa{MËÿ‚/Ú ÛßÙŒCWJe,9$ZŒ¤ LE–~ÙäÏ[åú ¤Ua’}䉟›–píùŒpW¾ûêŒÙÆAnNWíp#ñ)¾F eØÚ° ÿ(‡q@Ì$R× Ûý\Æ–64Øùc?ì+››ùç¼­$°Þø5šƒ^ƒ²êõÏŠÎ:cž9d.iqÒšjÿ 1z¥ê…óKt•é®r÷˜nw²ðâM$ùqßmíÔ±OŒ™†Ä5¬íïtiŒ%ºÈ¦qìË:Jl %àÍÔpL„¸¼Nž×RókªÉò)?<ìsáãÂ?ƒ¥ Ô¹'5lF­\zlv—dÔïžî V…¯s¯Sï6è¶M´ÖD¬B]‹ŽÏ UÛd¦Îõ]–_å-ºn—@|Ýï̬¬KŽ'y˜p………ÌBÊ1öbæÕŸ'SIrç¦ÊådØ!Oÿ&u(T‘üO0 ÙÕŽÖe=´kJd/)ñ:A³¨ß*Ò"JB\¶˜õÀßqãaKþNÛ5À8öíVÍàg@Ý^ ÛOF•Ä*:ÿÉÓ V£,±[PN´ŽÒ‚%¡Â“­Éèèì?HØ«nd³Û'˜y»ÈUÞY+—6mcѶ YŸ&X4ILüïûtQ’΋Ì÷ ®sæ ×Å_z¨`é# ƒ5@̩ܳð6¶Ò̾‘U…IhÀÇÐ’ CÜåÈ™/(0¯’:=ô«Äû¶ø.‘½C-i_•Ø$Åà|*B¤v_…³òÎÈ{)’ÅœC°'*Ëæ2d8JÊU×Àæ3Š`m@–Á'XvP>ÉÂÀÁŸ"£[ÆîèO.(•8‹]Jî}<í6d‘;•—Ûèd‡WL¤|7qsÈzûðfÇ›%Jâ:H¹òú[èÜl.0eóÿöìo]óD™³Î £‡ÆÒŽ2½îto(’É&ø"è3ËÅ k,ïÙƒlÖ^g2ïDíÜ$õ•våZØ^Ë_;)2I;&i¿×5oó«vi_(â`¾¿)I~à'B‡¾ ÀGøHç&àùðXt û¨õnrAáÀ’ÔP/‹ªäÀ­€˜Ÿ¦,àESÕ.D–ÐÚ¾ðoþ¶kÝæ9¼Ÿ#¿<Ë"ibäÞ©âjÀ³ï<Ù¿þ WÔHÒ÷U»¿'@ AB,Š­e|¹¶T»vjOx•àtŒçÖA ƒpö?) Ü]Ƚ-ùoT´}æ&$-XŒ6b—W×}NòöQ¹S]G‹'û=þ4O™÷ ²/‡'0£E×ÞiT<åb»dª4Ð(ýŽ8Þ­#UÆ„ë¿ù’È0íä±åÅpÖ4„½äõ|EÜÍO¾s–A­‹Âå;yQ,¯0µo\V~'–¾Q«Áã˜6v¾®úx52‹²bNŒhW볊oß:.Œˆ+ìîÍðRd‚Ÿ@”E0¿¢eTâÕô8¬ñ ö<_;d{ˆ_Žæî¯ïFr*ÉÉ\Ð0E'õ3ŸÛ}Í3bfq-Év«È¥ìØjÄ:sÅý Îyá Bà ÖŸ÷k598“ƒüJõ<?Æ›/jvdö.£XÛÏÀƒeþ|¾ïí G’9/~ƒí»ÁÔK7[‹xÚc¶è_ked fõ°á9öÚhÍûSõ8mò»­Ö#ü›¬‘¤0´ò}I>K¢ùÆ¢áÁ;IÞ!¾o¿æ¶:6 #"è0IJ"†ösQ·I"¢Äã_Ù@ÍnËájUYþ¹cG½Ì4šE}kéf¹zlÈÀ̽,uòÊ8«&‡r ü¥~aÙúVJ¦%»wï L…ÑjP7g#}d¾ùã,r}ûÄ+Ù‡“lc3«]Ì  ¤Yý9ã§ëC3ÔõP?ä"¬\œÕ²ƒoVïW¸n ¿Ú¶BAÝv€‚I`á§—×.zNm¹*eáÇQ…å#D´¶ÂrÇû6&‡²ä$"mª{‰$®-ÏîtlÆ-9íFzy¤Â䄊ߧLÎJ­j‡kºÆï'äôøy½þ©Åœ–Ut¾Y½Ä¿Aní2¶ìÐÓ×?ÙœëÆ?jˆ4‚O)ým2ÞÖaã#œccªØhuìéÐG¯1a‰¡ñæ³bIp°+4á¢é1–u ”£løÕá–ËÌN×Ád—òBì9ÊLƒx^|Ò£’*¥<æƒÕÕþÅGk¡XT3ïfXÿn«i¦IÝ'’nXokÓàbL¯ óú ¥•ø!ÿ%ÞâRœ\zVãW´°l»Øeo+Ï£ïh}ü¨–€Æ*v¾‹òvU¥:‘Î+ˆS=è—&ÆÅwBp Þ}›ÓpyzRÇc%6ÊÍNÇ’ÞíË\XqÍ&“'ûž/ºäÉÎ~u$T:&Wâ–[¼ð)»w3e˜ª…HD@@ð·a›¬°¼$C >¨Ãwû[Ø÷´¢¨HfDÛiñ”ªŠý±¢ñ0ã…'M"?ž&c÷'‚öÜ•ø“0k3ܽ‘8PÚÞ É+ô»tk+È3˜¿£ù©Z¦±µž`lBI’.”.”«!þñ1æöιµ‰Èœ`'{œv¥0¼eq‚,Œi"3zÍZžc ey?*¯‘Êû{ûØ;&SäB`@ì‰\6Ø8<õ½K³¦/»‡]ü ôúð¤ÂGgr–Û†ÉîÚâ\Öë›_Àž´aý+3\’RŸž½G»Îûç^bÐ$ nõ’—v IHÊ=ö̤ÊÈ´(åKc:þß‹$ï¯q¢Ê™É´ê©2íC·¾&ë™—¦­‹øŠqõò›‚t«1Mೆìr¨“m˜€ ÎÑ3›ûëí|7ñß±{Ôæ éî ›@?⮇\ɧ‚ú·'Ÿiçß=OÒ`jà˜;Ú4é*4^’”S¬¸¯½¶ÉñåêþÓ‰.Ðjñ¢í* ’¡·#E§µÜÚ$c)²î·?åá¯Æ*T×G€ŽEuׯ;½+&ô-± ÕœóuùKõîU±/d|˜[ sgH‚¡­)ƒ«¡€˜ÃoÂüët_}Ù9ÏJ3¼ø§½íÑ ªðV‘Ù9³ºô”.ÝV>ÐiVF®pûÿñ› ÿ€vÝ& A'ú©ýVH}σïÚäœ_oüz2Ç…Tn±DAÒmˆÌê‹Kê¤ n?ËI=Íœ› צ{è‡'çv¾wRĽ²9WïÀ@¯&cÚÀD@EèhâÒ˜8 æF á¢øãÃúc›8Ó7¥A>2³LiôOz|­6`7S »‚ƒé} ¹l{áóT×É“ù™ô Ò4+añÞ]Qµàügv­]‚çÍA¯QÒö Ѱ9§k|i¤ƒ/ébU%,v(|áØWªà? ûƒHo)H~л.”•’'G}2ëý¤“ýB<õ‰R}2°xÂIDÍ-´ç\*}ûó¶—Ç-=Ö\– j6 ¯ÿDÊà†˜Ä¢Ò‚Aˆ‘*¥ KöíiØðÕ–së.´Kõëë2Ç#e»}ˆ\Ò÷®z÷$†~EZ; )쎒Ð(ÖY VÑCSÝ„Ž{6¹?ö!|°eʈˆB„‘báΓtXrR­Lu˃ÓÀÚšý¾ae‘Ù™IÄc§`®½Ï1u]f¬Xä´ƒ1«t™_‰_uH’‰ÏEp$ôƒš×éñ~{ËŠÑuŸ+ËàX~6ñ%3ãÁýh¾Q. 1Á¹Q¦b-hS¦VMDP¡‰>r¢‚="C´ PÈGÜäÖF„TScêÒó¢÷½Õ·ÅWËçÆŽøWÕª—ä,üù‡ñRüw0ç—ªc 8 7H¥êf2uó´ûÕÒsñ,ÖñgOµ <âGqgUÆègf~c} Ñ‰€æ å„Ò ´ k~oûšƒ±§s2>@EUx,ed(¦ ’w0j&ªj‰œQ^ì‰îýº„@Tߥ]•¸µ‘5¶-³|ç ¼`T…GÕcÓ;õ¤œmoi8ªÒ @Ö;ì(Ƨ]iÍTeÂ…Ÿ&û0Ö ³nÄÏ*DB±ü›Ú‰NÆ®U¿mµк2,¨*ââôŽwî‡êes–v„LÝyhÕ9!©ŽÎý6h“ |¢¿Gä/ø¿H·ó}Y¶K:Å"¢Ñ¡ÝØ…‚³1ÈȤÝEÓg­Fäñú?¨Ô'´g¢%¾aÈÙWÔ]6}n / ‘ˆ¢¬}V8¼ o©ÂE”#·Åid¹9!^“Ë·†Úƒ„âØOjý‹e VׯñvTTC^ñM³Dž=13/§Ï,WÚ"Hèd ‡™ŠaìµÔ•…©¥QÉÿNÚ_‚²¸%ÄBé´ö±¹„i¾õüÄlÔY,]—¡ùÕfƒü‡nŒ A d5*êƒÂL}ÐÒXwoáÅ`å!¶þv)²D¡ç'Å”;Bü4. :ð’#(øÛµÀ€YË© òzö“ÑqjÛ.Æ_ÔSíèûî0nÈ$¢õÅ|ÐY–Õ&¶ø>iéO¬ai@\<«ç,©ôªì)X¨äØ&RÔ9Þ¨DÇ[ù~À¸6õÖõ(ú÷ÊQ²acƒéÏë0í‚—áÖNç¸IÞ:M„Û3Ò`‚ã6’¹‹ì€;\Ëd·I@ò¿ º$,«ÁÄlp»Hº÷±Ôªú&!ÄY9µ½øGð÷RkŠ‘Úaïáݶù‹âù8jy‚òmJEAÁž™z´áD°“³d+%wg«ÐÝ'žléÛ륯ˆ}÷Þd­†l¤‘¼~*´¡XW,÷Ø1¡ tQBÄ©[ƒyyòpsx)Á3|×_Ô/I¸¬MÕ–ó¼õRv€üaM›®ceðËI0]ëØÜgcÏÂ8p%ï¤lñ‘vÇ}³V‰úíÝLO ì·lEÝ-×O€C›o¡Â÷ÑÌyT´™²pƒzSoù‚¢ M–n”«ÿ@¹¡L ;"ýÜÆúUÜOU·nðH †ÇnŸß«ˆó…©`óî a—,²Ö9ÞjË—Y݉õê`Üx=; `Ó°1Ä#žk1Ì;„~;Mz~—ü÷J»)¥ HK)½¶U’ÜÚ ÑÆNÌ)Œ×¾dº“ºáÔÙÙ‡¬ƒŽâü¢eºo9²« &6ÂS­8À‰ümäú”u¬Uü)¢Ñ0ÞÄ…7»Ç§˜dXÄÓ &þ®á ƒ]Qý7Æb‡œ\Þ`Q¾YFCFµÌùdzÓ”·^ÃÁ{¹Ë‘môY«qÈQT„2ûn©_‘FŠòš¨ì•ZyÐÌ ^gà+R8¯(¶(£tfN£wD½­D¢EïÑm;[ S vå}Γͫš½ óZ.@³üoÄѧÇð—:|øâ(?ìH$§ú±ááas¦Ûå÷jèW[ÃÃN#Rq×.¹mS†‡'ƒ‘ñ÷ µÃÙ>úÀL¾/RᆛÅfÔŽŸ%åFvi†Xu‡Pã1@0uÍ<àÖ9õ^©Žô7óp¯…½ü'2sºG¼&4bú!Êèïöˆ²îñ_§¡DÈ…«l0*"†S‡µ½w`BR "ͤlKÜ m°7õŸØ½Ì_@*Ò)ÊDo#ú"œÓpI£¬¦ÚàB¦œ ZÔ«Ø«§ †ø[øh‹ÁŠîšº•ݼè\ÜJ!nRè’–¸ì-ú”ÿ?x—¸®"ö  u^9?»s”ü„4'~Œ=7gT»MH”`Âð<˃ÿl¿Ú¾ƒ`£àâPà“`‚îñ{´’ àîrRÐÜ½Ãøkù‚›ÂQ1D©“ù²\¢xè~q~OÈåöcp¤Î+°]Šìk G*·¯­ÛЫlÖ¡‹º'v¯ë;‚’ÀBHÚ‡çWÕ}ðèeWŽ+_º<ÕraHÙô_ ‡$^ñ¤bPƒg ÝÍÀ› ˆr™Xtc ÷ï"Ð8î‰{  6Öø˜g3Lh÷œbü\s£â%• ;æåZílhè…Úp„CýkpÞlNµy2üèÎþb!2W<Ž tó˜x-”3!&SCø±;±MIçë“ÛC#”’Öé\–…»Ž¨X0êÛ9èRvX€ò7N¾¬Ê¡hæòc§(祖þ'²f¼©©¾4[ÂXêÏ‹r@½¤89ú•³I¼axNŽe_åt3tÂIñKÍÏ@Š¥â‚Ù~<Ï`«jðOª¾¢¿|JÖu—ÖóË» ´7«Lx¹±––Âuõ4Ú¾‡uÑ¡H)rïcwâž~ùUòyî=h›'ç½Þ*.vy¼~×X÷ÐqÕ5ít5¿çרÕ{ŽmA&W©Uþ©gL(}õ£›ÏulÕDW„Ük¡R¡ô|·RåØ[éN„G€åó<†TwHüH=³„øß¬‹xs‡Ó¹˜{ ËC9~¼7OB­êd¤%Þ`æ¾åQ¥GÍѦ…õÐ@`,E¯S\öe®ÞÒ*ƒFÏ47m‹ŸRÍ‘K-[×\m­ÖfðÇÅ y+ëÓÖšÃl¹÷¯ÌÛì~Nõ_RHm~¼Þèg7œTµÜ·°¤±nª?•˜Š‚;ùÝŒk**I6dÁRN·8§b½Ç) çë’~½Áõ†NCORiû‰Z€mL| Yí"óñ5ù°±þ±€Ñ€•/ÇÜ:Áò¡Ì0=Fþh‹ Þ~@(«»tXÐ&ô¤mw¥Ïx‹òÍP!Á0Å}b— Ù÷Q!ÿR¥ÐûÕI–ÔáyëÇÛŒé§Jóð‚è?µÌ0áÝ4¢»)B‚JÖ÷£“ܯèV¬s{·W[^%cËúß´s„Z QºÃ›‰o=-ìp” ›¶ä ÿÿÃñY÷:ç¾*¢ùö I€*OCf«4†Š}GU»[À£ûÚ–SÜãd/žaš:%/çÙßshFÖ}Ý9Q ØŒ^¾©…ZÙ­ã.{ ¤Sœ5E<'tª¨PæŒ<¯\0 ´£‹ 8¿½¶’¸¢ :Zúïmì ´qpm8CàTZÒ4>üÍ$qçQ§Ô=ƒœÌˆë÷HàoøyÊ£&VJÉßúX„Löà”ŸZLÒ‘Dá<•Da Ã÷ÏGœ›|ÙÄÏù<žr{á–ÝÇ îåÖu”+ã6Qy4XjIãb‘µ@¬ù ŒÖű™Úúk©Í„}ž>zÕÝú`£¬}óñ³⎴C‘ãü[×Ç£ix=P£2‘}pò%ïx!úQbéY«oöz^,cy3UxÊCƒxæ:¡%OК2mqƒ2ŽFj˜¥>­—èЙç({aHçè Œ¼ª–Š¿u/ÀÐYSwvf ¬wîˆcÄþâ¾,XÅ¢—)Ý©ÊܵÊQÁ¥mÃz¨ÏšÃ} O˜öÅ>¨T"†ÙŽ^»nð(ªDá+‹]£ƒkG :,’ð€$ÿë sV¤ïȸI¢è {U/¾šëUQiUPá›'×¼™…ìõDS¬ërHml eûö+èJåëø»JÎÅ‹üûi…µEdê¡\õ>«¥ÓV‹yáËVîïåŠu. Á8ý¹Óª ™CV6§ö¥uM?fïWÌ!:~ÊÈŠÁæýØ%™µ`“çÑ“ð Oò°uÝg€pb…©Xw¡úL3Á^ †Á'«Ká¿ËqvÑš›g¬3Du‡@í|Zå¶? ˆŒjM Ì’<ÑÀá Þè,–“Ñ釨úP}ôö©Î‰Mi¸*LpýJÃ`ß?ÏòâO5Í}a’‚Ñmƒt¿¾éFTZ¾.¥)È¿ºO1»¾©(}¡€ÉWÞŒ þØ['ûMèmômÁjbXÐ÷§ X­6ÒJæ³jªÀïòkz7F¥) ¢KJ‘L e•;ñ6¼¬é} êÂ-ˆvw4>A×ÈøGË j'×îØé¼oPÈìkÃ,ª/Ò+é >6¨»²â ü·Í¬¾]«ún;]… „ý~tâ e£’ô‡ÔNæ ÐßDp6úÆ×™ðI¢1,L¹jà§÷ —%9qü Œ=<ê›g;Ϲ:²›šzÅíà*‡ÝŸK€â×@P¤kâ¾O.§H°+°ÒVý–°À_1‹éÒxÅo*9·'|BKqi’ Ñ(Œùs}³ŠWçàŒ”ãTNÝ+gŽ^5!yªC²E0\›JW©ªŽ£ »–š\†QZÉ*÷Æ3Ü]¶„HWPTY£V,Ýߟœ‹¤Œ\{øfÿ LSØ (@9¥:rcâS >~> fNÛaMJ[8âûþH©š`^”þ1ÌCngnxV;“_wVe“’éO^°¼{iÓîŸkS©Þ_3`5ŽÊ®ØÓòAKÖO¬øw -ãµñª#w©Ñ Ø öõÚ-‚¡—hN® 2üы̵$×e+÷ÊŽoôð¡NÑ´«„uŠ•ý0•±÷BZßb¯!ç­&”ôO¯Ä»Š;  ˜ì)g$àº%JBÃSc:«îøœg27êýK:xx–AMpÉq Wë·Ÿká6éeŽaÀë,ØËîºÑÛÞÒpÛCùíxÆwI"ª²˜DÜŽè‚ÂY2\(•O}¦@Á%+÷ðÜø —vŠ ŠÓï®Ï €ž|E;-EtXe›šÝoú´.ß[©¶•sLtºîß<Öªh=•½ ©æë üãy±½×#Á|¿ÓÉ»¿ª ÕÉ×ða&~c<Ús Gv–4¡œ *¤C,uuì½WÒDS· G>bSÇk%Ù Mù!Õ&³±È­<—üï‚$S…{N÷b¼+“ ®ð©óŒnílšl+…ÔõýЃ›uîd»YÌÊmZ…‡« ‡&³±p,Jáénô¦º¬¶)ð·Ñdô:‰ºñ,Ÿ®&7„ª»GÔ¼kN Ò Éf)ó´kФ¶!6 5 wQ§¢ôýe 0T©zb0öWòØX°´c_‘¿Ù‡þ£Á™lŽ;Ø€Z½E ô‚W‰:Z¥aC"æs¿"ð*YI"6‡.]"L‘ÏG•± (ÑÚ2ÝÀ±.¦™Ó±;¢„^žÙåzg„Äó<@r“SJªXòu=Þn£yÙ5,±•&¢]Ó—‰{›­—Þ¡åà0!¼ÖÍ~ÿ23ÎÇþ¨$x£iß!íó¤’½Œ_QúÖ?j¬I`’ÜŒA&NXÞ¢¯ÞŸäÊU7!]Ïã9#?Þ­ÎÝþ‘$9>¡ÀS™ˆL#ßçT¯åÅA–9ÿ Ú—§ºöY²³f,;hÞµŒ^\Īë ûÚâÿZ³¬v­©zlËÉøê€t\ØD)h[/ëÈš6¹ÐÇø—ÎB0©—æä~–p ³p‘¾Š¦|dñx!€E(4MË?6Œùlý„G‡Ôï-Þ;Ѐ:ý½8bhNö³“¼Â).¸VF„%A6ö”ë÷Ö:ü®>m<~Š ¼‘%u:ÝOüþ:6Œ`É8°з4Ц»%š¯óŸ Ôsð°›•°õºA$Ê0÷³O¤IÄhï}‡ñßöåL#™-ŸGô” 19[…Åkñ=ŽÜIÝ:Ý6Ë¢N±xuà/]‡üIZ˜¦ß„þòѰÉYeH¿siþ>¨„û*6»ˆ`t/ße&@*<<¨G`‰™Û(ã‹!Ú0÷ç,X£Ø#ý¥{#©Øª+s M ÁíAÐ;¾¬êPã×Cu¡#K­^+ Am˜r"vg"AIs½ÌçÇLSDîÍ/¥Âfîø8½w4ˆ\²ésÄqrëÙ¤¤×5×p0¥˜¬¬’2LÉú2Ú¨ž÷"]EöÓä)XLv!Ÿ7cœéÇŸaÌa8uÞ¼O~…]#Ë!Ógööàót4/ÐÖ'J>îÞP yʦ-ìîLà€¥ÒIPåñŒ´mÎf©EcÏæ¢ü(è|Á7ͳ=²‰M >};z´Tç™03ÕcP€Až|fý¡¤ÄÒÃ?Îß-jZÂŽŠ¹Ÿ]¢aŘFh _6똅ÞÚáJ l­ŠXx´Åk¹> 3çðßî'Ä\–~ž¢ÁAó§ƒ+õ›Ãàñóâq±Srþ·ÿ—|'Ûqä̦Ÿ91Œ®"]——´o«¯˜ºh_`$ „égÕ¥uÉd›‹enqÜh÷[¼^…~À?]>Un‡!i7ï˜2qDÜ@uHí4£{iýµ3¸d–X÷ƒ@³…ÙDE;Åâr‡È£ÊöÁnÍš,.qþÎr/t‡˜®ÆªØÿaëôâ*sê­‰¹~T…ëÿ9Š£’Úhâp78Õ‘G½_¹"U9\±ïÿ$È•=2¯õ×3…Àg~¨Œ›;°ßÈ‘‹Ú;Îzeb„3¿óí×=ïYìòz^Í~tßC¥Fë@Áߊ÷ê0h  ¤÷‡TµÃííÍŠ8À4×/2vLb굮ܣ :É«ÈÍ KÅ~Õê"Ó 1£ãþ°ÅDª„òçµD2™d’Ð=cذ-.|Èžž7Ó«YyR–ØÞ%Ù)[+'`û§ àU¾7‚²…3PÑ Ô(+±ü…çK‰}o>œ‘æ@^m™¿HEìØé¢oý'¹ ¡ã­u²rè¿xÏꭲʛéÔѳú†U}ÐÞDô÷1w<ÌÍ}9G«“êùܽÔöFÀTåÅg5}òÔ”e–eõ{ïÚǨÖå¹C“8šlÕñ‡úêë6eUˆU=Zz+â¢)hDÃë.Cï£ ´ZðxמÿkÐXœ¤Æ¿úCùÛΟB£}¤a¹Îõi•*ð§áâ>¿úÍÙ ›;Î}P5áV€~òq[LžVÏg—ú•OO¯µFª5Ê:Ü5¹ǯ˜”6žù!|_çÝW-ÜjÒ_±R<9À|¬qˆ`+aTqúu(2ÛÎ…Sâ¦ñ¦Ÿ2få6žwŒïgÝ(ÞXPʵ}‡ × jâ÷ùÐÝ”zþ7ö*AmlwB¯\öŸ(êŽÜÿŒP‹/Ú­Šg½¥ 4P5kظýàBJ™øFTêôiS[žÜ¬nE]RÇIö-¥ª=1á9Ï$†°Ö`´àÞV#ÏÛ"Pd(?ù•£¥\ÿ`×TP…œÞÈçD„ËL‚ªÖ‡´h$ÀäÅÖ¦Á] |xu[’(C|?5Š·‘T´Âè`ÅGù[_µæK°Në°†'Q…° ½' {9âUIŠU s#ÿW|Qõ˜ÄÝ×€·U|O¡A ‘ð² œÚY8=oççŠÊåöô›ü:¾Þ²?‡LÙ}½ _oP¿Ã¥?áÒ†?‡DâoáÑßðßàà*ølQŠÂ}%Ϩk eŒ”@ ±8íu«®¡Ð/ŒA}ð£}©@‰åcH%{\¤p·!J%°³âèìl¶Ò·ªw• ÏLH\` ìJ ¯Õä΄¹¹¡YÁäÎ ³Oé1/Ãô«;§¸²ªœ O=Wu¨BªN s‘,È&¬÷”µ Ür;’¶žhTSüaéüt.ø shì2WCD2á‚̹ãOtFgBšÜF7Yë=$(ÕÝlÛ,ñè Y.¡>Iá·gÝÿÒ–‡l>á¹¼wÓñÞ=QÈR÷vöþYzÛ3L®ü¹”3*Atµ<0ªaÓyPK–Û>6 l¬È‰FQÖ#DÅ  èK@¼‚ùÙ8›)ÿr„~æ´ ÈIÊlíjÓÓœL”ëA‚36ˆZÖ)x®ü4(ýk§ºù§ýˆØðáaË+@^ ç?ßù£©¢Ì9ê“Ú9±à$߉Qü,“æù/hY+ê7s*G¶!Š*S˯ `3vO¶¹Øÿ~Oü—fÛ~0D¼Ñ·Ž¿ÜØê )-™Ë ÂG hây˜úçÕßzK…Š´nÁiãÙIÌš…„9ΊËÚö«è2ËB( ²ƒiª:«`±óºnkæ¡Ruw€˜HŒÈZ|ÌÉ‚ 7 mÏ\ðµ”E Ðü”pæÁþú¢‡¢™c=ˆAøN—PºMÉì,ìàw mú5»ÎrÊœc,h ß/Q£ŒVˆDtFž²{Ù+Z,ùéa?iï£ÂÔMÒl6|¬l ŧ³‹\LªnËr•vñ°5ð߃Ôýªse½‘;™ìløÛ ÿ~ë>ØNDÒÈ(ºÑ;’ïÄ[X*„PÈe|ApÁôBÐ.Œ¬ý&½QþÀN2VÃ…^‘S0DÏŽ5,„, *§»™€G÷LvþD–¥uÁN9½þo¯4`[Ž7FoÏg¸wp¤£~—x9Z"< eÝu…hZçÝ5_‡ô¡o¾ˆ‡Ê:õ·0±þù«b"¿Ü55öp¾’|%/­G6˜®ÈNX-Ô![D9ü8yØ>_¬ Qt=ßc N[ã|C¶Hñ¨+ÙØ€È Û›¹ùL‚kNZvLQl«‹Æ%C‡å£ƒ¹¥F¨¸åkOœåøFð¨˜dÃ4ßG/&ßÍM£I\ptoU|þ¿Æ5Ü&›o£›Ž†A ¹’ê'Ü!½:]LgÆ´¯{º¥&K@«çT)#žõ°UšÔŒA{($.\›ÁüS§·­$å1j²FkÁœ/¾¨(+ŸÆ³fZ;CK*"í!›A²ùgÖFÛ–¿Š„ Ëgüšoï؛ œé͆êÔìôÃÚíœÙ¢z}Þ›!^¦î…ŽÉtluSãÏ)ÎÌš;Ÿ^ŽŸàÀ–‘…YyÆöhÊ:sGÿ,¼GÒ"ƒ>Ì«Kå-IÔÆÔíWPàGz³R¡n†ÑM`vì~ŽÌ„0Ïå´xu|ãv‚e =9¦üõ å; guAެ¬>Ãï³ó·-±ˆÜj«’ÝR‰Õ³±P} ~‘TQ_SÌ®i=áðC¹h^Ô>«ÿZº?Škª¯L£^É]ÌÔD£ÕZ•™’Ž&sJ"‹Ä¼ä[ÿiwm\¬X7·$¹XìÎ$lNö:›;FdüÅf—a£^ól%w¹PÓZ"ðm*‰exýLÄà¥LWúGߤGó›ÈÂÚ«Í^m—på9\¯Âsb¨`8ºLÕ­ª•Äg…Ç ‹_è•éÏáFiÌ’"ç Xƒe~}/ÁÈØ½´¬| v¾\âË!š½àç?s¬ÖÙbØ:xÎjÆ@?„¯0­ÿ0ᤩ©Reà-ˆò¶ÚÚØlâ ¤ñ# N/U¾¦²_oȉHöuq—=VV´œîÑc»ù5Û=-¾ª4c¯g •"Ð…¸•h™ ÷ïM¿ :Ö½‰³îÈS—ÊØx&5Zý ÊóFQ-–e>^[ÌʰìžóBíÔQûé–Å$ëz±h.ñ¥ÃñN¤ùóN¢Vk;í…¢†šMu$‚”ˆN«bU­=Ñ—bëeT¯U#|3œ0Ý}E—o5P'ö ¢UfN*!úÛ¥IÞ¤ÈGKh™Ó— :^Ú( ýóa˜!¾Žb18îÕþ}šØ$ò¢iK3XPf95Ñ>ÄðZ¾æå†_"º)ÃëQ­[¢yäô›PjœÌŒ1¼Q’ò1#ë.V>ÃK.3CÝû„Pqõúc¹>¦Á¡Ž1/ŠgQ%­Ä–sÔú0lûí†ÝëÞ6×ÅCæšUTቒ^…Ã`ÞVй]‹‚‘º?•ónáä“%”£.@½E]±lù!y8”vÐåP­Jb*"WqÏøÖ¡ìÓt˜8é)2LüNC6¸®Úþ AV?›$;¬À½[ѯ³åQ„–„–¨®l½¶ö1ƒ…ïì?PoŸ§=¯…5jÅ ge=¡1»I4¯ðr/`dÔT¾ ¢”ñ'ë¥þwöͺ¹£™ãcªJV7‡ÂÏóÑ×# ENFîƒËi:œ‡=úõVn/Dd-ö3 ÐīÈTðßQiŒ0Êp‡ŠÙ¸·,­à“g°{ÞCÛ÷ÿe”ÒbÅêW0«'½w!4bï–)ïu_Áª©Â¹ÅÆÛ¨O#·8Oª½î6vý°6@ÎC5¤Êš©üæVѨehvÔ”Çæ|{½"¡ÕýZW•4;¢vFñ|©ùÝþm^¶ÿ y°B¥¦“&o E˜oáUDS¸˜Î¶º„6Ì[*Sivc`úZ _úN®[\ÆÛ"|JÜrd:©•›ÊRëÐÜ!”÷¨[ù¸õ—öâU›éÛ¦ü‚,¹'ºÆí»›™ÔJãß9<ËŒãÕÀIìôV¹úT¹ùt$Òë~0¥ûŽxáÅë茼R~hÜážOTÕͱ÷Ô*·ð+`É™U)Ÿ¸™¶åÌ äÌ8{âaúœíáBz¦£êÀÊ’RU¶ŒÇ:o?}kÉ~YtãÛ2_â·y÷s“¢J¶ÇÄBî¿¥U²Ã2Ùü·’ÈÞéï–Æ—¿ ö»ûïüÔ|Âîòly¢Î±Çï!~¾=•9 ;Ð[ xQ¼Ë¬›=ƒæiÕ£Ôϯ®;&&0^_ÁÜ ow"±œû +9,3åÿW&çŽÀÛ%+ý¯øzò©Ýˆæ,âš(ÿ ÿUýIÞOO$u£ÇPhFQK©fhÔnOª+•B5 J=L¢õÏØÕl® ĘžœüõbþY4=çîÿ@ì#Q¦Ê)»»•·Î •šÌ5z ^S½†ž¹Ðø(*seí‚}V.ÞJå¾Ò8V’º•ȤgVŸzÿg·`×1wæ{Ó¹ÜÁs#rž‚mÔÆ~r½\ó媡a¹êÅ-Á–ÕæTYÏ^²‹dKýÌ»"1-çÄ]R¦£ÏÈÄT°ó¾Ð3+;¶4ËR}|וË{+ñÁÉ Þ7ÄíMŸÖ›¥ÁdXíš?Ó4…aÿ59§,dCUÀD*ú"OtŒY\3v$U鬌­L ‘1¶ß’Õ󻈎Â+j‰ÎvÈðÈ3vFÞ™¥©OI– ê–!vø®FÓÈ-íó¨Zî3 |'¢ì0 'vñÕýý]£¬ÈÇ+ò6"÷€Ë[£ƒéê 8¤)Ê-q€¿k%ˆíõ|O`UPr_™K-ÿ„@¹E¯U𴉋Ñp«¨dǸd³!›7ߊ'³è™½ímÿ\ÕÏätCש¬õU·r˜°r¤ʆWÇBe è©8O¤%sØ]ñ£Àû[FM§ôr5-iÕRe¥_ôs$r¶lгÁÄZF¼‰2¼4×…¯8H¤ÖSUµM“s'ÂÞ¼ò­òuÊÊ:$ü2”PÐ×B4º¹ˆó#‡Z¬¶v]ê¾?{ô[ N;Õé¾tªÌ¶)¾¼ÂÊx°¹ãKø4€.O©h_ŠOq«§ßuXâàBHÁpúK¥åë Ï^Qÿm|Q„Yªk}+ëkPÆÜ¤+`}iBçÜ3¹BË<ÜMЍ±à4“Ã% œs²¾dŽ1)'aFÖëCUJŸ~Ë›µøÞT~¸ž¼æn41þOißËí×qûœ`núÑX‹2SÀ‹¸}•0Ñ)xS©=9…\4÷“°è•“Îr±àe^¼ ú¢Nyëõ!ì°;ܘ¬óà–)ò÷‚Ú«Šó|èQÓ ÄFÞ¡FëꌑaÚ Î•G'ßaæÁhúk…Æ€Bª5Ž”ö× g4æë,±L*eœ`øGÜ †Gj¢,µ!ÇÄW{/%‹ bQÒúß…öx¥ÔÕr! I‡ÅO®sŸuBM‡ ·T62ÎÈzzÔU–gE‰xbŸ<È2¿¥†%á–Ãju‘äm›äOs]BëåÛ/惣–#ýÙDÞ¶ÆÌŽ¶î´“Â (Šùæ¶ü„¬Ði¶p–«z”[LŒõˆe×jàÍ£ x`¯ï8d"úÒÐ/ˆÄGWKž#Ã(õG¦%ìÔÜò¥•õž—Å*ÓO÷Yå__+—Hg­¦‰_–—BZî:e­äh·–©³Zˆ7ÿ{÷ÁmO;ú71 º§m`á" Ÿrð4UC‡åçéì4«:Œ7>ºŽçá>ý 8搜šx Yš[ê‡0n(¸63,‚iøÎ¹ý­ÏÚÂQÖg¥‡ÓRú’ÝÉŸÌQ4}¿Ð«@óäSý§§N713õÅóÜ0?#†5b¨ *ÜtX1ýßB;ÍU0°8qBgDZ‘ò9ú¬ª„ÖU|ô¦tKE™¿ðˆ®|iô`µfÀ¸ZéUƒA‰[ÁÞ_ü*îjq?`†øÆ¶'@b±q#Ê]Ç.GÍ¥ÕÒH=“×𽉘hé¥IaAc^£"&@‘¥WÕ¤9ï9ËOµ©Yº§Á²Ú»gÿ áAU½ìBîiþ@-¸øˆM-ÍNDeÛ%)‚=‹Ú×sÉ7üuxé þÏí;Iû`å‚`…0-Ôl·–B,ë„vç$ÍFŠ©ÔÅ™% §? [{\ºǃKGIÛ±„3Î/Œ†½‡ƒöº3(j ¾ ¦w$„ƒI Ä ª ˜»øÓn¸ŒÏ{9€q6x 8oCTi¦úãi!4vÿ7‘Y¾93¾@yÛ+C_³ï©´¥p0'ýJÖávZ¥ÇΣ{¥2¬ê™9ç:‹@²•RV±¢.÷.±,I‚NN$9çgî¸ðh<½ ]•…ÈDt³'ÜÍë›3y̼ ¡0yï˜bF”À±úîLå¨Âð1èG,}ŒÊ(CSm‰—¦Q³Nk¦ØË8!åC+Ù=RJ©¿Š}Áû¦!ËÓÌ`¨5a$á–GåÊ+;I[ÞškëS+á_w€PûÛâNBðü&KÎý{”¥È ÐlÕÆ¯¶F¢ö’¸g8«5+¿.²í·ÂD"9í™e­CFÎqþ9,är^Ðè™wJ"×/Û[ *µ6YÕ`v”~zµã9ÿB\G<­]uÓ“냉ù}Ë5ء´­4IL™—µ=…xíÚW ¬àÊFÅþRsÕpCwï½·avÅcOÖ°tA B+¤Í­ k2ÎâÊÐuQHÖBqÓêÄ=‚кJõ8©z—¤bÛ³Òöª-øž‚é„C‚žgg¢ªl)Õz,³wŽWÁ­ÆoƒÞ›íVŃ•ö¦³ù‡¦¥sûÒòØ9ZŽúYô,–Ëþ§â©°€XÖ„PèMeèmÒœ•ÌîÚ]—¸¹Ež3-'C°;²•a;´Òèkì+ógaÞÓ.·»Ya ó‡Ó@Ñ@G¨£<Ô64*§ÙÒ7Ÿi ˆ5kâ¼,uMÕpgýZWþ)ó‘¤ÝŠ»¡0tì_Hma²Ó¥[ÒvzC¿$ùõ/rAv/pޝ™uæ3Ài3CÍÏLfŸñmëž¶‚d1§öÏ“±ž LXÉÃÒ\P0¾Ãd˜TÌû.f`ëÕ5R|ÊÓla¤÷--À:…ÒsÎÉäî¯,°¸€úÚÙÜoV&lÞ i?ôÄñlupýÍEÚÞ‹_ÿíqbV³Ð! ²å#DÂÝ%Ül‡BO»©`*G¹6àôYF7PQq›6d²µˆº“oK'ào/ ‹NNÒ–h§É_·<*¤ Sȶû®­_ÝO“Âý¢®$~™¯(()€Keø3AéÃ’b‚,Xº±­\ =”™0Ìb œ›ã ×9.ZÈÂ3MÒðžw"ˆî„lYÒ¸ýÈa(œ Í¹Ì ¬|“èo©7üw‘^«¹ØêÖ.ÃÐSZR>•x1ø¦¢C4_›-xKŽ‚ÓàÁ¨öfêaˆbÅCŒNOvÚ[ Àøƒ6Ìü•§¦âw. à˜|¶¢z‰Ÿ=—&ú3IbJÑ ÷‰ìºy·‘¨IBÖº÷­z?~Ñ1“W»Ä¹ŽÙN¹ŒPû_f%ó]ÒMó&¢cS_’§gš·éò_O“C´sœæ…£PjõÒ„¦?qÑÿ³3½ ¢+åEˆÝp`Óí_óyÉTùË­xd&ØD{õíË{¥¤õbWÀ¤Ê؆….É6Xfô˸MÌ¢evv›õ§Oúk®Ip/F?=P—y1ûRPšÀû|ð§bÙãÝM¥NáãÑѦæaâë ­G¶Y°;6é÷el{–-NžYýôzôr0ç_O- ƒ~Ù„ œ£yëœGhS ÔŸüihvc僵¿Mî³,(³³·J§•‹eÆFe8Âc=óaÁõÖù~{ËãR Œ»´é“ÿ!Ûí'FC¶¼_Lz–ñêZ§ÂNmÙ ;Å·jGÐ0½ úëÇ«‘¿Ì£l˜E[¬JïBq#íå¤ÏùÒÅ,ô± ™õþ`ýšluŕӵ©XÓOŠ´®)0;’ž2b“·à ¼ßøcuÓlç*“bk;NÉJ‰8ñÒ€)’•ä•I3!ùäÉì^0ý5ÅÄ=;fŽU1JªÞÉ[ÀôÙbÀ‚æ¬&øŸ¤Í]|üŒ-çUR°i^lŽ­‹þËh0h÷ÒÀ 5Ê3ÅÁ—o-wQDÈ;°®Ujá@.-Ug)…7 Ф[šæ¤ð `xzý–'³õkUb=êÆÇ­æ¶ß³»viıÿZ¤óš—ŸÊ7÷‰·ÍÏÂã¥ä1_j ª6ø&yÞ$WA~À?òý»}U~¾­ý»³ûv÷öôûtöôißoHWÛÔ†ýºÁûz;þÏ« ‰óö¢|ý{ãûv öêûzý½ßUÕ>E?·k?oMŸíÒ¿Û¾_íÕïÛÒŸíØïÛ©×Õ¢Sçì¿íÜê½ùõj¿ðèJú´úúºŸV‡O«§Îûv}[㯫C¿oJÿa»Û°ÓçêLùúôòŒñWõç§½aÅÐ4§h(ê’<)*”«˜‚]PïÑÔ¨ƒ€ß×Ñ^¾÷sw ך¯­aj×ÔíU&éÑ}šhDFš=¾=Žº} …ag‰O‘†®m`¿rà ÖÎÚ?3¦in—=ö¯äDE^õ)FÔÎ,§Ô†[ü7KÈÇ,SqlŠb +ê`À& ´›õ¬˜&íÚôFÀjVtš´rgµ+°qañ`%P ®iž:Y§Ë7ØU†—•Š{áí-¿ygŸÈþîÀš–šQ CMÀ"Á}ŠÏ5'~à)`©÷8É1c¯$äY©Ô€/—?Ýѯü„Í߫Ж ŒxYÞÕ0>.®9õÁ½]ïD¶›ËWY¥ÞFjg޳‚mÒ0I‹¢²ñoèÎÌC¨-pÀ^W‰âyÙÏ|ìÛ¡hÑrÙ%„\Òù€ÐFbǤ<¡Sª%|kKh²xíRdÀ'%¤çbVG.¯½q.‚þ¶%9]qQ}“ël‡׉.œ®Ú^>$Ô„e&CM#]™ÐÍÛÆâöÛ ú-¬aƒD°"5ƒôþøZh/”U÷‡…€SÖ&¡²ènÖô8^€Ûž=q}õF” œ>ÚçµÞ¬kñû±ìj™z2S9¦HÚ?Ó€~}ùîßíÖ™¸T£±z±ã…¼5ІPˆ­ZµìIu.¢ï9i@!zJ<×Oº‰ó$:6ŒÊ€DSœnä!Š|ÐVykêQã™÷'{Ÿ›E¹)Q?m¢Š,CÝ(qG,Œçð0ý½ˆ¯PÆ´{Ú«ïÆ¿üþ¶ôT¤0öô®þT2['^]™Å› üU\pܲ®ùÊ’«fñV#˜X ¤É®gpà…MHôºÀV¾*stõT+Á^oµÀ:ÿY÷¾4îÅÄq"Ú-^ïµLþ¿EhÖ™f)ÿ3wÇ‘ße® žÄ60Vi´¿ÅÃ’?È‘§Ç€e8àˆifÕõ  ËÀlëcÀíh“BÆ;"ÍW¸°®C’S´©x‘Á;9W­‚M fWµ\2`ЏGüù; Ä@kñj®õ°ÊÅoÒØÌ")˜½¥¬«|m&¤åz”½rŸä®5à4S³ŽX×7 wòùÖJ3ºO@|&¼¨ötÒe“í¶PoÜׂ±;««ÇÑ߀™Ã0³4¦àP«m[ü8èH¶îµe˜ {óxÙ#ã¼#ËJÙd°ú¶]17àªV¿C £AE? ä“’báûáØY á§<*—¹ï,›Ý ìPƒÐ¯þ­UÇ¿|aü²¶Ñ‡ªŽ£•¤l6¹Ü\]¥vÛuúáaØã›Má…îB‡kßNÜ—÷k¨^ÉýêÇFgz2båÊ%ò, •*§Á»oL  ™7Àl‘½<~Nï˜c¸í/T¼Õ °T:½"ŸÅ:F%FhHØ <ü,\åsã3¡'ÚPóýö9è×,ƒó후±ê¯Ä.)·ÿøÖ‚ÁèËjÑBÂaÓçÞ _ç¯;Jf—+†Ö[©‰´1‚þ @‹U¤5 2^ä#ÕêãrH·¥g…#öís2Ô¢;tך†«}÷m T[hãÒñ'Ý@øëƒ*G”s !ƒÿ‚ }gD â¶/ï-äRÏb(K¤ã÷OENäÏÖSl=pmçFÍ”ch÷\“îÖCö×õÅ­çP •œ2½™—ìò3-R¨Áùyo…Ø“uVëfÚbïŠaMþ0°£“ù‘Aúq@yYd Òòqè ßy®u¼ÿYã0u„Þ“§¿b?ñüw“kùtPïß BMK«z4aÄm°á¢ÇAÂ8…ö¹P~R…|{ã“p"¨ú½‘CÞ(…koû¯ËÛÒ^…y‡7cørÞ€RÙ÷6éÁàLà‰R oD˜ÿcüi½Ž½ð qÆŠ¶U˜`wàÖ¥âTC“VŠä…Ëý⃀7í»5Ÿ¦ALº±Ð)rê¾vÆEÓÏÑ ­9b-oºWà Î(—7XQ4?ïÔ4ry`SŽ˜.u¥æ¼i2Ù¡cel|¢èïxP»R |ÿdÊy|&6Q€f✭$8DFFžÚ™/X ~N#[÷ˤÄ8Ô,`Ë*$Ž«©“ 0s*’ Ìt¯ñ¥Êv¿ÎÝì8‡ç¡?†'­¯~¢$WH/’ã“f½•A—‰ïðªYïy9x2@öFD"ïзlBhFLƒÐ==´ÿeocX« (nïÈ&ºº`仺´ÇqfŽT£0ö^jk³ÙŸ\`æ ÓWœô(…)¢¦V‡òÑN*…²Ÿ8Ü­~¬Îè³r‘ë·›h’„_€ÉÇ_¶`¢4¥›ða@MiŠ-–¿tU€-V Þ¥z-¥Ÿ^›f}ijâ% ÌáÁféz–vÈÕ¯·°?·ÑÑ ³/UµEæÅ´e‚öÆÙ­¿Ù㦿ã«&Ð]œõ B:Ù&dyÈf+—<Ľjf«cÛþ÷ÙjæÒ-L±v^ľÅVØVN¸šD)T¹¼›À†œçlª'ѳçno$­f“cãOAøeêßà%HâÁ5FÝÞB¿GT!1H&>¡ s•çò'‹<<<®è…Ó§-LÃüÇÐÙÖ|"¼¿£ý‹ø¤Ê`(¿æ{Amy"Š=¯Ë>ñ-š÷0Zµ–§ON%~(dQ·X25 Ü12v<8×o·íµª´K7—l*ZkÌñÝ”¾*GçlI[€éÚ'êR¯\£t‚tÔã©Õ2% Æš÷aÿNU¤¯*·T}»½îj$Lõó®,²Ýúº„‰:ÌkQ‰ïçÐ]A‰ªL~ìíJÌ8{]ÂÛú—ìW]ïB¸Ûº½’¼ê­ùÎ8@t!ÂÄõuÊè´†¡Tݵí Avhnéƒ Ymb£ ¬l:ëQóÿ «ÒU<Ï+_lÄ{&†Óºa¾¨ž<Øh3TÎ[òq8 “ÜS® y…8…‰Í56­öåY$êÞAäj=ß0/¡„>B{ çìp~"‘`Ó+daãÅ3fCdŠE°JEÒŸOäIxVûXÝõ9ŠðäGäÅOôޤ_Ñäfò%Ã…ñít&˜÷‰H„g¼ZÕ¥)1Çkû¢ù¬: ~Š+Z¼RЂÔÙ¬™â–î¸y£MØíæÞ†b²á•ËàXRûÃɺýsܱÿI=E« 6pº6!2‚1–Km¤;Fu_Ƶ†„Ø+¡ž1àoÐâ–»ãFqø+óË4ýéσÉþaó@;!Y'Ùþ%jð[R[º¯£ßÎ~h8Qº.à­ÌbºOŸ¿¾qLqTq·,ã[\xÞ{ÌKÔl{âÆùLÒŒG‰=úÔëwž‰¦ù•ýu™Ft,­¢P1ÞâÔ(3òµ¼m.a€ÿŠÓ÷ns¡KYg";/#FdÐÒÒ Æ>ÙÁ!OCßòPö]ªË<><¼ÆÝƘc„šr ’YMmõÔ£îs3Æ-ÑXì.ÉÁªª Ÿ˜Eˆf*^‹! ÔÈŽÞ\›ÔA…ÙJñ~8®4/¾Èfuë7<i¨H£dÈÈûæ/Ð÷6÷cŸhÆnr|Éq÷GžÂ˜˜H † rîJL7SĹ˜¹n®geðÚ…n(Êõ5’Å..›)&‘8ï°d…?sälЧ×võe0 ôbRĈJ,ææJ ‘B cýñaÏå\qŠ0&Gåi—ÈùŽV]´¾¾&” ¼ÿRÐ÷ôßä ìñ>ÍK–\u‚¦]e Õ;_'´ç°$òhbAbÐå¯-° ÷Þ¹e*É÷LÈÙ’3׿`MËËå]ÜË©àÚ^q’ØqÖVK^–2èûÊû4)–Âd€ùü=mÞ´‹0ÚZf¼üJ5¬@UŽŠÜS©°'tÓ#bÓe>g‘êh¹VkpLšeË/­Ê\^«Jè÷®´Éîp™;ó€W›=⤘¬wŒ§³±§›¢îAs@Ûä®Î•Ô©ô#“;Rs÷6£Üô¹¦¬þOc@ÝI'[EHŒ^—ç Ê"?wQ?æÓ¾!ÁÕ²J†u“Ï l%àî8¿°ÆézݪëÒs´¡{™DL‡Ó`˜€û. EÝ=•?ï / ÏS?©ºc Þ‹éEϳÁê'5ãnæ­Lêî=@`&×úÔ¼u$ДûÒÐ[õþJÝÒd"_ë‘PÅN–dJEy`E„zeŒÄlºÇºküø4q™P‘ºé°ãÌNeoEÍ×M<ŽêÍÆdÄwÅ«gEÖ=ÜâÓQå4½l„XæM =Â@.·ØÎV j»*¶ïíÛYä-þ!t y€r•aq³@Yežã¥õÓ<'‘3¶¿Ñ¡ÏкžR°£p@e¨÷±ðûÃÉšDLœÑA w@y}ªadHi« è’çp±ì’á\—»´”8®]×ñV)xu¨,|ªjÇ2ßʬnð@«Ú#¦d8ùG *äl¿òì€^6)´Eüb–%(”£ª‹QùÈò„`ºâì^ô«?bîÅÙÂáÆŒ?UµÌ¦¾±Ö»¸ÛŠoú.)ë[Z5úï ×vrsRæŠ?„Ó1OòÕòO¤+(þþX$ 1½#h±ì³ÈÖÆ”Ýø*‘€M9„™B¸˜†å‘ ô‚>y¶ÕC0Äœb9Ùrm¨b¢ ‹™Ú‰Àø¸!©ö’¿g„þPoÍÚ<ɽ ›Z³8oÅŒÀ™ÀƒÍx÷‚BšrYá›8`×î¹Ð­aÆw b@—“z‚R,|ƒšnºyदÓé*:•ÚK•%/PyKDÌþ Ýû˜g Â&šy´SvVÅ«¥YäÙ‘?õ/¿›Èؾ&PÎýS²"¹é†ÕY÷Þ7ÿC˜@&_jÛË75е„Ö%_“¢LOÔ3œÄb=133ž;æt˜¯˜ÀB{ w¡/dm l)¿Ù2ÀmüB-†Ãaªà®ºÐÖXÛ«º²väCŠ‘öêÊŸ¼¸¿>m?¯ü^[^ÒžxÜßá‘´•N2Aò0ˆ ·pÀ•ШtƃÖ™°øÅHãz®÷žE2akµåÍÞ†x­kÁŒ²Ž>*µ€)ªò»Ðäc»=8˜™ªúmæ=äåþˆïú]ò{î—N$ÛŒ7±®DôyNÎÿ^Ü5ßEV¦ûE’z£JUŸ‘v_ŸˆŽÝýkÛ¦³dè÷í³i’B#0ÊG™¿}”.žÃ`¡Iƒ¤‰Ç£Å–mË0\YmÔé·ˆc݉Àbã•êä«èI‚«%0fºT>Ö^´BB”ºŸ“æîÓ”aqa¾Z2£çúaE…ÈÉ›ìë¬äkoˆ" ˜r¸ôa‡º%­ùªLx=ß½iVû|ç²ùŸÁ.΀÷dèÝïõ…MÁ,YÒ c[¢šÇ‹VÂä§®ji¤òúAý¤RØi¬yùyVC(<‚™ÑhºÄT{!Ì41ôÖŽRn÷yî¼õñdò_G-ì (àfo3âåVºf4J\[dýÕñ†ßAÄìé)°˜xVʧ¢ ±pHÙÀØ_9»E-UEL†©l£’]²Åï$§”C<~T÷~ªí §…–Vçç[²<ý1{¨¼:=m7ðÄ:pOÒ†¥á|´Ó¶CZ>b±Ôö8vTp°–)§Â¢mY²ZJ=+'¯ôå°•‹êñbLû/ûlfÍ›'£Èü×ÏîÝL2Óܽ꘩o¡ÛH ¼â¯æ5TQÃó…òi° ÍíáªÑ ÷ª¡#Oü¦£tY-'ý0 #4èç ¶#9X;¸í›rèĤ¤=J«Ù8ƒ9 —ûu:tá6Vò$”|ƒmZ¦Óˆn¹Åz{]„TQl<ŽÎý¡á®Æ–-±PÚhîEýéN¸nôh< Nª„h7ÿ_ºM«BŸ½„þ—¸’ k‡<ÿ"S„`N‹êD,Ïœ”¦SÅ€O÷ú+,þó‘¡+ƒK÷¯ó3Áh¢NXü»°Ä: VG½~ûJWÇC4–"¿ÛŽ¿Ù\5j¹>4W¨2Ïž‰‹ÊKGv½÷vìΩvÑgÕ%3ÿ /I‡iAF ÐVŽE[/ül·¼ñjùƒR-üRK46ÍJ*Âáø÷K&NÞà0€u¸ýì­)çH8¨ÿ|×,c†°ž‹ŽnÜ#ŠgJßÇvGÒlY4zP+žCðgÇàñ Ù˜›Î5‰h€?$àZ{›œP£䫆²ú 8ï‘JÀºmÓ͛†{õ?Üí0&{^_)ü‘ÄŸaq.DõìúûK¸­«2}÷ èǼñ`û__K·Z¢-CG¶ÇÕ+¹OYŸÙ»z×ø’WÑ ´ÕµÊç0ѧ’8L£[†7j‹©\ü§*λ½µˆÀã0R"'AðÎļ\.í_¡ÿRÃ-ù¹1®T7üÕSöƒn…¶’Ãm¹ËÜ[9|âѧôe ¼ç§Ïê,‘(Ãý˜”py îoxJ»—¸Êöv©–é·)ìUÆÄqd Ì®5^M-R´Û®xÊÏBE|5<¿zEÐ.îTøAì,Ñv/‰†h!!OfºqÍ"_Fö´Z¦ªG¦Yæ8ÃXVzŒâzÐ¥B%Ô6üRÃk³ÙQŸ1UtïÅ`I¤5”è†, ocpYî“çé£x^cþ‘ý?³QƒÍ²$ã.ih@'ù—)©nÉNÏÒíï)Ñ•Çî7Åp3 ¥X7Öy°¹Ê/FLnŽHiThZë\L>qÞvÛbÇŠâ }€Y4éIÑ#’šT€ºß´e»ÜPÍBw‘”9¸¸Žø‹Z}$Õ>MV5}oÒØ.C˜(Â" Îô·–Ó½ªO¤ùP“«­[Ùæ¨/½Ê_7˜Ä,b44'Ö©ÄÏ8Z8创—ª5Çñ8BÓX’Tû™e‹Ìq­Ðráýáè¸êßD2ê7?áR޼àw–4"b)g aÊÅuJÀîE)#ÒÔrσÎ/Dê Ú Û›÷;þi1*öÖ™mF4mh'¶Ž!‘­rSñuâFÎxœxc줃ËCt)ð‡’ÝÍöºœmsØ¿%âp{ïùƬ-ÏfÝT@ôŒub¤#—kÚ‡[oŸNvË8G6ñ਴™0q ç¬E銴(G™ü×É«…s¯Zäÿhu,ÝRØ65­ñÕ5»ÅP]IH¸TÛ2aƒ³´å½iÃyNª"wJk»ua‘uë# P寡N/º5[¦Ü¾ƒLèx9Dœ™ç)H¬^{¥!Ï0²O\ÈLÊb/¾´Î¢ŽŽã²_*ækãYÂ…¼ÌC¯„NpèK‰Ú·|Ïá{ÍÝæß˜ 9þ2ZÞ~ deØt"|ç¡©)R§j0«ç–Õ©aÂ4<Ÿ~ã™ÊBѨþf#’ä2±EÕà®âØc£¹#3¡?¸R*uüVÒ»®ñÙPm4Ä pPË8àé&ÑÓç»99ìMìe´þcqˆãGê·Èü5Ûù×çî çC,#eŒ).½7·[ÑŸmÅïØg¤®Å¡Íj~W^зʤÁ¼Uuõ¿1ôGÔ|Ö²Œ¹âñŽ›hï­¨…ÝÁa¤«)\´ú¦êÁBv˳ð¹¨QmmÏ `ܤ‚3ÿKNQþ³¡4*Mfa­gN¼PGM.îë²;CÖ’Á B!ø¾¾iµX¬”ÙÖnªQqŸ^Ðu„„Ø!rQ¡*Ü N~‘)’¶°|¬qL¹zìdÇBãkp9âA‚ß°+²NuÊ2‚ÂÓËü±­cv¿Múµ^àãðÍZp^' ؇ò¦6ÅænOdm|ÁË$låjléaÐN÷ qny•©"ÏèŽDZãߢիfÙØH¨•m¿xSt¥kV¥eÚ7xÀ牴fOÿ@—š–¸L=È P*AðlêÐ ÿüÊI!½úL’ûA-å÷[òáä”/"~à¯Qò…U­ù<)P[7³Œ,?Ôš´–«Õ58zá°év³xißLSæÝœ|›"ùppœ½„J«qC´ˆ$ᆣDi­“xVÓ$fN™™ßi:›PÚö#“G¢•’+>:h?Þ7Ø_¤ÉŒ…(»…ö€Ö;K¸Îk’`˜J.ëìD¦39¿xå8,Hà?ëÏ´_è,çOŒ/ ÃÏõÓñ¬É}ü¥òX?ðPOúÕ¹­z #@œö½™Så¶÷Cò F\³1ªD‘zƒRá§q÷´8º´:1œ-é ÄÔq°9o´3„XÕ”t7õ‘Mú†1û áM  Dtõ}]¹å‡p÷ò;ÕI¢©&½«,‘A9ÿ‹ÿFpÛXfe rÀú0ä ø/×S[æ÷m ì"ڌ೚áehwè—‡YëàìÇ é+¡ø‹´ÄèõŒ¾Y¶ÒÉ`žNUš²è¯æ!¦C78 #ˆÒtßÚØÈ{·Jö÷3Õ [09|^v¹[ˆ(²zïË ÍY:ðã†1k¢{²,œHGØ»"LxÜwAŸ: ÒöÏw=™6ï®ý8Ó"3_Zá:nŠýߜĆ„à7y^d8Æìó˜ðˆM—¿ñeÕ%MØÀar O‚A{GÅ…Ý?EâþÙÒ?ZKÁ‰­`°pDà$êÞŒ!uþá´¹½ˆHÛ’plaÿ}XÒ¯Ø4Ägo — 2$ýiˆ€rJ¿.Ï$A„I+ CZ™§oòJ:< ~ žÉ‹×ˆ”Ð,}o­C”’µB‹<ôÏQ+²;Ÿñ{­†>ßÜ'•qœï„)®,Ôpcr&rK²ÕÓm±y¥Š¶*-bÉûèŸNàõKpžÚ# cŸÄ¥HuV€GKÓ‚ØžI¬dœKQR–ï´6;Œ #¾*&~f÷7ïN6úþäÐÅ_$.I[áØ9£xlªKÀÉ È¬Ðû¿ƒÉù/"4Q©eœ%6q9f¢µ)‚CÅq1üå—]ë/@«m¢™+X" êïgŒRrnl.è¸Ã´ÝI+îÄÌíž.)ª ûQ -k±_ŒÛ{íöò¸†¼E–H` «Y@õlÞwÒ'àªQIgÎJX ¨ê!Ç ýsE÷fe&9?¤~õw”žÎűGì“nÎ%uQ‡•Œ”0GjçÜû»~ NKDpÃ\Xˆ€.fµà¡¤˜•E±Ç~:fòÞËŒulcU ÚdÔJð=´Ö¨[#;ËIG°~ô;¦Æ|}åSÍ3&»çŽ (ÄX&DýâÜR¡#çy6xÒ®Mô çðƒUV'‡†ƒ‡¹gx9üYÌ+"ß$s£ qùY,Tßù³›zLˆýò¸äá”ti% Cà ÙîXøäqñÒA‡·¨‚»çy¨»Ô–*&þ¥-u'øY (³BÞ€ÞŠú܆ZTd¾Ø–¤3œÓ>ŽÙp›¢þ¹$"Å̉ Ök~Jœ‹øñõ¾ýW.Œ¡ ¬‘¦,¼ÉB9x…¹‚÷ßµ¢8½ jš#q¼òêí ¸ á1Çè¢lhÉòà¼}çÄ.Ù÷EG˜YØáýta2bÛG YÜP¤Û§ôGÀ8d?qçF U8h"–Ê—‘ùÄÁ~ƒÆþ¹:ÇþòüIï†úm°à¢}•ÀÉÐQêgU¨9Cyx …^¾ë» Ý)_ šŽùk_#1½ºë‰$MíPp¶ÈF‹Ä ÍaCtFŸ¥+]ÌÄ…QÃÒg¹ýÉ}ÖK»½=Á^敲f«‘ƒê©80Q{ ü1¹ÿ·ø%\N [©Ö£W‘o<7èyI¿IQâœËç' 0i_,­—2Ó”l \IžÀ‹ÀÀ^ â!æ`,4tÎH4e­G÷éqSž;Ÿûp-À¶ïÊ(,”šÁ^•þ›F‡H*8u¢ò㤗 !Š…:9˜‰?ÅÖz¼ƒú*»ãLfN[©Ç¸·ÃÒáÕ:[„×½ØÏÅ•M,~TÍXϨðsî{ß>3÷ÛÎÊ.>•ÕÙ‘ìæJVäÖƒéï)žÎТãëN­/VôB2 u¥I¯ºG!LGa[Å‚dy÷7Y"e‚êÛÞòÑšáÿvçõ76Ìš·.€Ä›‡g7ý;}÷¹©ÖâÌ´=)>Ž`FDË>¸ù6`”¢nrZÿNÇ=¦G°™4`˜pÝY<ÁZ˜1*Ó’Hë.“Ì $F±1WEÕÇžjÍu0Éǵ Fõò™TÉð¶ëd {º*9cF­óñ³#)öÒÄÓ‡x0\Çgè0÷Žé_(}¿«j4@hm· ÀŽp\2ý GXi(\ ȇ‰Yÿ®ç <à‰ãa> ÀûÚ²Ý1½¸P… :,<â¢l0ÆŽLÕÝ! D~úÔÃN<_ŸΡõ.ÁÝç•$á ‡‚f7afvöJKkÄ­–y€JK© ¢Wv"¢—*®ã®*¾·7 (ŸU¾0ãÞàžöÜÄr|Ÿÿ TLUcµHWšÒWö:³{²éUÄIÎ;‡é’¡==ºšJ»*aànϱ[¾k÷s/øÇµ:‹Í^ÄÞï&Õ¢QT‘?éêxÎß—°‚4À©(ÚA<ˆî ¥@Ãɲò/þ¹ÎÖ‡6õëÄ#w튟á_ü$<¥(Ømò&¦qûñÏÜJÔUÀ¿+N8—dèñä‹’朸&u˜UÒË/µ‚I!Kà`=‹{7nÓò+wŸMæ­siꦺ íï 3«S;¢v€úTâÃ$Òr`¥ªWñƒž¨¶“u¢†½ CÅÀTŠUÙí7¡´" ­‡ÿ|á#œ\µ8\F¬WU¼É—=¥W:Ñ„]ïøÚ¼º†Égg–=z¶]&û@œi1–t(dI© ]å¦4Š‚Ö.T 8Î $ø98ƒª<œäX÷B: ¥õ'ÝÒd·×%šÞþOq\Ç›ýcõ4L+Œã–ezþÏæm- 8á˜å wñ°÷§?¥l”ÜBß<ç'…ßÛÆlŸX»È”®žÈøê‘6¥Í +._B– GŠŸƒOŽøA ‹Yƒ%ÙÖÆOæG-bNʇÊÊæ.b+Ü~ìMÿ*»a¤Ll…aF­WwlJûÕvDŸ!Ê‹ùYFØZö8…ñçìRq–Á3K‹ºÂyá_^®„.´¥¨yàŒPg©ºFAÖ‡@ÓßîTõ¹•¤*œ¡™ ”D^Éš9U'øÛÝõݬrŸÚÀ,›…*P¶Ã`ׄ(Àr*åàf>oßo,6à2­”¼©®ùÎVÚwêßôB(ópYwEͯ#Ñ•ØóÇj jeÔÜåÈ)žmýï¼æ‡ü)ÁË¡ERašHÙüׇ¶“ ±L^¹ºH0mÚæÈˆŒnÒè¨,b¹ªÃ~|›§³Ðd6 «3ÿœÁ˜jñEŒBó­É)Í=§ÄÊÝÜ„€]ƒ\¥k( ¦6•ÎyGºÍþÛ‘9hºÓ¿š)°ø8"…ý7µÃ¢0¡ˆÍLâÄ\OsÕ”Z‘AsA—¬Í߀y„^º[KÉNZª³sJ]ü@¤ÅŸ‘}›RµÁÇŸ*ðd)R)„‰ë\gmXæ¨eÊë½ E 08®ƒI^¡?Ò„m#æy6` Õ;ï©r½åòኹqàÀVX}7 °ÆöÌ£©òH¤0½2Ѩ¬!âñbˆÇó3I†oSPê´LTÄ$‘¹õ K¸á1½[}máC« Ë‹«à߆¸7ŽS]÷áõAÔZ/„çXŠÃ³8 ò’Ø! ô;ËQvÝÌÎÁ” è­âW=®º-ó^'j@°½€q´,×ôv”ˆ’ˆ ¨ LôìÞn ú›šÞêo´¥ó¬iÔÜ'r—qyxØãÍò¥V§M¬"ýà $%¸¯Ò~{ {ƒ­α\±Ã«|@”ÜePÐ:Ç‹ جÇóúAÔq<Wtésj-ñx K÷z·n~Ê"ji„ºzd‚4ÁްØrMñË#¥#iŸeÚq³Ä^¨˜È³Øk™ ‰ÖXp!21­4ÅË›%Éj“ÚeÞÿ; ¢n²yë±2[ï‡*ÈštXv_²Ä?­ˆž/»lÆ íŠ9bgŒ‹·Ù¡²GÌóõviÐû«c§X|È: 7Œ3øv|’}<÷Åk÷§ Ó{7ÿq1V3„eÞ1õ‡Ö]µÔâ3|jwG4Ž„ø XÚÕ&J޳{¡¼LyJp(`À<p½I 4ùmù³%·Á0¡šï,<ÔUFx uv°ß½å’òãàcÑû‚²MD´v@ª=êÓ—Õ9&á9~ - >1Kº-Á ÎB‘àƒYj©h“Ûò –Œ²Ýû¯ntæšUÅðJ œøX Gá,Ô.£F¢ˆ0þ]êoóÒ¦ƚ˽,z{X”†üœDºØ}Û6@–ãCxPWBÍYÿW_Än—t¾NOKTRÀŽèН)o:È‚ó°àdSSõ »Å:ô‡ÕIãwà ÂÑ(íùµÞ{ÄdÜnëpûLJƒä í‘M^ò駉s×ö(—¼ý¥úƪԴ³h”þ\7$HÌjŽ.“j½úćY¨RC<é³µ&ÐþµšáßÝ WZùíÆÿ.rÅm¿TäP]ß½‰k€½3/¼ç^ÜшŒ•£a¶±À-8Dg˜Kš!€Œš°¼{üë©ÏuNþ ’#$²À½ñÕã–ÒC—ã4üÕÈí‚#“¹t²;J¬ÜÞ‡Z ½÷§trò½|û­ªÎL};ày¹iu<K9ؤïÞ„møç­G‚Šèg±DäÈ煉<ÈàÜ޻›••&ƒiªO«¥¨î¿' Ñj›3& „M»Iq“'7Jõ¶üíäÏJŤ×6 EZ{§5j:dÖ3¬?ÅH¦43€xçOk\8`'ϽýÅva°¡É¡)‡aÿJy‹Æ%ÕâÒÌO†‚mJDó0,…bs§òÁwO®íWÅ·¿¬æ¼çÃ;á—?ˆnõ2´ñÙÈy–.–¤†ª;'A`OlZíónýänɾëÍúêÞ«`a¸!%Ü!£¢»GEŠ|R òÁ:cvúb%/¯` ºjä«7MííâÀc?di=}¿×¡ÆË®Má+n;ÉlØÞ×å¦õò š¸³'HXÛ[çÔ›:M"ÖLÏÝoêgÌmrç:‘¨`Vc)5ÔcÌêˆç±>ŠbƒªØÏÕf“»¶’ësÙ½À[Ù댑®úÝk/ôåOC/¢c‡êàý‰º¥=ßG2Ü›Eå3,ŒÓ‰M˜çi&äÚ˜ñlÅL§( HüÁÙf?,(5+¨É …OõYa_§oÀ‚?öX¨ÅFìÊ ÷Ôý6Mîûìöï¦J³Éia·#ÀÌ"" | N‘SásϘï[Caý§ØàSq0ÞÌøÀZ»µ¡™r²¨¹6¾š1:Œ“&ì«_8lh*ïP)àÓ‹Éáô$6”¢:Dã,`ÝoÙ 8h:Ð3žö¾ðßøS9W~”I~’Èíÿn®¦6îM"´~¾7îçIõ‡ØÑ’ÆÓbáÖ­ ç§Ur‚ì9.ÃõÌòAy@[î×gÿDç‚õ–2±˜«n•´r+ub>øA…æ·<"‹ ÅyŽû³¯ñâ„ äù X.“Ž(vLEgHF‚p2ŒˆèE^8|²’½õõ%Æî»\CÒ·ÇÃ¥6)º5nÎL=)€µ¤v¨KþW'§Aÿs:±82}E®î€Òil=qD§¥#¾ë®æ…H¨üð™à2‘èïÌ©#xÞ`üû—šš¼˜vÁ˜²Y˜Ç Óv »©¤KÔAPž`S›©#ojk$†oûÅy¶ÀAx}Î e@óC¤Wöˆ·‰5 ý&¬ŽÏžA_,Øÿ’-“{ù‘6ÚñÒ”xlŸžc­¿øPj†ÒÃV÷²ºñx ”%c`Úµ]Ó¤"3%zS¦ûxg6ý_­¯åø!ÉUNé„ 9GéYê'ƒÙXÌÛ÷ñ-Á¾vò§ÃÖØÌŽ’—¹$!ðlëõ–Þ½5ÿ2¤©ósb¢dóèמg¬á~B;æ=³aH;a㽡/ˆ@“HS ~ÇÚ>Þ`—# û;¦ 7O›ÂE°SÆm*=DÚÌ8 þ°Š®ëÏ.k/\a$Y|­â´°j׺½‡—1T$õX³)7‰ÍÃ9?ü*«òÒèãa$Ê9ûÈÝ®®·nÝ‘®÷ýÁc(£šÉe1i=¦ã“=;c·’ÚOËj*;÷Á0æ[O,<Î¥~}Žžôðød•›„6qÝj¶Îž—Ó i–ÕE7s‡Ç¶ËŽ àmiœ <5)ðÞIì‚‚71>O$…\ &Ô¤L±âˆ54^á›tÚŸDëö ;e€ˆî¿ÕcûñíwÛ5š U¯Ž´N˯·«BWqa;QØ–tþ)/Áùº¯ÅTsÛbýuæ„ì0ý‚Ƴ“·p«›kî<½£²bLÙîO\PlÎà$Ü3ï,ÌËM2Æ4 8£¿ÕJ¨ÕŠeÅV¹bt£f˜½kâf»ØSø2Sl§‘g=ãk’ø Q’½‰ÿg}¬ñ´Œê-z€Jvj/¥ÊPi*CÝÐ?¥mó?†ùqÅ„céÀ5Ìw)3ÅßQÚH{ògºl‚»Q¡+TN»ëôé×)cVî\ܵ /ÙÍ9 vP½¯_—ùЈºå±YíÅ`˜:3â ò‘a;Ñ#Ìè~³ìd!¨¨ªÌŒII¿µ&P*ÕšƒûjÊ?+Ôu¶²™“£¯Ê瘫‚^O•2ƒÞˆ9³±y†“ÞT?V-ôÏ„÷þ™ ¼± ·œÝŸÝ3ƒÐ7QŸ$KKÝÉÑÚFRžÓÖØòú#g„,©%yk0R ‹Ng’èˆI8˜ÆRk…,ê?ÎÙHYˆoäYuÊüEÌ+;T1­‘ªhì `šmú–ûBÑ'ógb¶†ìmÏZ×<—¡[Ú/¢þX× Gb¶x7 ïoÐÛã‚’qû¤òvžVŸh>Çblöî’f„3ذ“h¨*Û{dq)Å•÷ŽÕ™uø.š{)*»ò=ºz* tÌ•”ÂëxH{žÿtưt¯y¼ˆþ)¦tvÇWgœ¦“§Vóè!ûUO˜˜M`T(–\›"+ªxôæS‘CX\úï.êãÀ›š¡]ƒ7ä¼?ÈKØÏ5\rV ÌXIðÆø g4ö/ ù Ñ÷yYsñM|þbÑ<¨uÒíÊ Aüšì·á˜ÿ÷êÂäÌ}½wÕ²c*¾þ:7Ð_”MœÒ™L#H¼óæèßùjˆ‹9ð|½DBÍØéí.D’[ŠXaáüpl¯@»ªHÿ[êªp„¼Xær4hP-ÁÄŒSÑYÂO3ÙJŒ»6µç\PÁ–¨©· 7NH ý|\†¼1" Ru¢Õ µ.¹nªÓm aÕˆÞy$[T¿=¦§˜~$Ðôë-¼ÈI÷¸ÂºÃ"˜ÑšÇcÛ½¼G­Ô[¦ÀD)W‹9“9àŒÎY’t¿>½÷WÄö†Ñëšÿ®¥ £sgô+üc”wMð’vAŠnΓ!A¡ê• `N{û8ET…ã Vgkÿ-…¿(á[êKæýÊëº:×ǵZS/¦x ßd(÷ï«Ó"4ÌK+Ú×P#¶¿EAº uBrûoÐέndϼ¦g¯{²ͼÿ!>R™£’UJDµ—¿sÍAý-mô¥6=ßë.!,\×¼ÍUä—¤²•ÎâtZ7÷†ž¶²ö‚L0AŸ?Y¦[z<‹x»ŽÊ° ¥e_²ƒîªù: mþc8B¨ò—ÈŽU–.X—4á!b3Ûn‹X|'pCru·x"Í2eQȤS¦Ÿ¢(ˆ=AXa<îj b<,5±#q·K¦· ?¤›Å{ÒÞûˆRU½Á‚@vå2N•€“ó%KN…ªÜ=Á Q¶¯ŠÚç×Ó÷³*Ö\‹®g±¦PúƒÐ1ðDE"×¶ÈYj"é|{YmYW8Í»¹a_³šœ2ü}ÒáÙá°’µš\":`±Ž^«œËžwAr²ÿWÃr”¡Pðìè ûƒ†çD±'[ià›Êî\Ãô)–*8°E`Z@}Žòw%ƃ'¦€ºPZ9êŠÓ+œrÅCZkÛ[æ›2;ü  ‡¾¾¦2*NÛ”:y·°?¡(ÇåÂ`£ã„äÇH›¶M½@ Æ’6ã¸Ôý}è˜=ñ­Ó%¿™@&¬ý6š¶Ëdgö—NÇ·ïpÀ–c”Î"›XÏÜcìú?­Íeªiè3j³YzÈ×úø]}a3âH?·:|Ⱥ´"mԉȓY;‡%Êúõ•Nëh··3K+®Lý+1¼Xp”½ ã(º‡TÈãÀ‚ÙÓïXÄ11p©xXBöú˨)Q€s8†šÚûç±Ð5{}|vx󃱿ñ¤4Í’ öÓÅË(T[}«e$°°xKké” j;P»c*Y¹8Ça†‹J¦$ô¿#ÓòŒÿ1CŪ*sæ˜-ª‚C6óÚj égAetTá_ÛÛy^Œ^@,¿X„›ÕH<žcqÀª næ Ïç¶²$q)¢)jûƒþà6~f_=öªª å~–ÑŽD9OŒˆ~=·a‚àK]žÎ]°®L™&È7ŸÄ ¬lȯ”Õþ#xÙwW³<茩žF¼›þ+ ÅBñûpÓûW8 G.ö˜kd˜=7 ãûÔ$õ &ê\ƒxÍmŒÀ8®n¤—¤{4€îø{ËkFµ¸ ]X4¤Åµ¤žhR¸§9·I-ú“ƒcÚ9†A_à2‰9ï¬0< «D^+{Ût|> b¤\Ýfã¸Åõuf?öt_îÒêp±ð©Å8¯±,g)¼ÄäÀ}¼Æeœ@($×ñ“釉1V…(7œ½+ºÉ~Ü+ïGÝÝ”g#ØDàÔNëä¨Õdëýô\)ãÒ S'äaYQ_4­œ9ДÝõ®¨Æ†ÿcÃÀzúCSV Cô§Üv)s¿#e_V<ó<Ú‰èÚ-$3Dš ûkñ¬}ÉL0™r´gùye5®ê ‹*X‹º†HA‚É–{²}ÎÈ4Rb¯ÒÁ>Û›SÁF^ü¢>î7ß±òÌS8Z’tó!÷Ñ=‘6ï ºîÇŸ©ï:6nY Õ5£…X7®ÆÉ"/ƒ=>ì;„ÀÃ:Ÿz*9Šû1ûR#ZRQ!KgÞ”Õlò]81¡—‚ Š÷^§#v1ìSr­¡šÂÓÊ®LÂz¡£ËM¦çK”æíƒk£yXAŠ5xç׃k’“¶÷|d¼p”aã6ß­ùlaœÚŽ:´žÝüºÝ½|†x±‚v)wÎk}$Q¬ûææQز^gæ‹•xöyȸkþã½\àÜJôÊ4t7„·{éž €6x4?õô;cMÆ|#³Ð¤Ú„ð7sуA»Â4vL)xÍXཀྵöh Æ÷·FÕôýaú¨y_ §o_‰¨Ü ½a‡Ö<ƒC²ˆŽÉAù—5PV¶g³+»uÒ°8ŒaËûèc–>|ÀžVšœ'Ò¥&¤ú«Á=ãñ·‹Qê±Mß´ë¢xÏ_€æ|:pt‚áeu°ª¥ôWEvã Z=Cc‚!2Ë¥!Ì´#Ì<™z2Ãÿ]¾Ì>a>Í/HÇÛvß\ÙA23²™¤î°ù9;Hv¯‰ Ãz@6›Þòõ¦ßÅ¢+.Ji1¼>y¢19Þ¹0ìZ0¡ýÛ F©ÿ[KU«O飗Ò,QÔdkzl9‡¦üªâUݼ¡ ºú\ÆìËŸm4e|{ër™4î=»Rá5äœóR±ÊP­èsÍ OµRSćEeÞkl~›…&˜“D7ò`ʯ¯teþîv=þÞ\]òï…dñ2ØÞÛ¿;qâÖ±ZEa‡*§ÄY[{÷ýJÏÌÖ[¤ ÕŠKËùk»_£Šg=Ñ]íŽ|„0ðmö™‡CoóHãÃvÝv—t ]r`˜ºé1“]WQ/œÀûŠ•ëòÄ‘ð:6_Hø)Uü^X•rõßÐ/ž8 =ï¦u;ŸÝœ¼’ƒµ—pëbn«™™(¸} üç]ޤ³‚´â’‚IEÅòK3;Ä£¾¼ÖªŸ’A’ºä›4ßê•éEHQ¹‰6ì»n&ª±8M,ú7a]½2Œ?JÛÕ¬üvqјø?btŠlbçvp “ŽUß¶¼Û2ßg‚þvÇ®ÒCä¿Ñò"½QñWH¥+—àÇ6\ÎÛ‡O9M%ô=šÆ™cËXIؘYC9`š¾µ7½J3ÄÚÅ+ÝpIœüTÿxêŠUžì%A»¬´ÁjxƒÜ†—0Œ«N?&¯ê1ƒÚ%¿a3„›T‡ÐûÌÅÌ™ÃÙë1R ˵Ùç>ºÓ›ýÔ­,Æ}ýâZqYÔí'ÙŸdç§aöCF‡ùè>Îñ8Û d)¢Æ Ýp$NÑRù§K@µÝMsû#B+ÄŒýT½ |J‚fÐÐÍj¼ïâºÆ>/CZ2£4ò㈇dp5ƒ~S7¶†¬·Uf/Ùªuž%Æ?C4˨ü\û@ ©RGÙõ-U©I£È ‹îrÁÇW«Ú}ä5=Ó‰,¬"C±Ñ!ßñ‡3åÚ®§ ™iRøe=ç1¸ ‚ =z¥ü$üJ¹8,1ÈÂ\HÉ®ãïÑ @P£Ë2m˜)˱"2_ä•Eør8u—â"q(Ò \Ï—HçdUdòP¶ÎĽýöTDpéRÜÈŒØÿÿUÐäû}ºó'À,š[ ú‹ä}÷Tþ¸f‹Vö£©È·þ½V¿çPdˆHh™*O8²]fˆÂù¢&9“AþãÔ‚ U]²ðó#n+£zzŠÖzz3ù"* ãÁZT)­Žç<+ëÓü09Øxº­Ñ[ï|܉rŸS•;ï¸D}sY~Ú\t˜ì”úŠõÔPºFt¼7QOOK)s~GÏÛDîÔý úΉjî·cQxRQØ<_‹)¤‘à~xgP”ÜZ`³Ë>¿?•jŠŽlb?Ù‰›„úþ7Ò­Cϧ1£M`?Zµ_íc _ò6“à]= 0i8~ ~qÀzqÀ=Ê1ã!ã¾Pø‰0é_¦3ÊüðEÿsË&1¬áý¿%rì«bŸkÜ¥}„×6—‘]ÉŸÐȹ ÌÁÄ«5•Øñ€’$̬9;Gâ;‰qTÃ?žÊØ ‘ãÚÔ®@²´\±ëöˆÙËŽnzäH1ô²ZÃ3Ö#ítDçC÷"ÏÃxOGXRÁ4Ï,*¶Ra+î`¬^9¦˜äI[‘)“ÍCVËšZ·ÓaÅãâH»%Fœ ¹í2l®wš5#Ä„ðAÍ0‡Ÿž0äs{Ç…œ=c8¶3¡w®šðÎäÃ0–Áe#_vê¹,ŠFµÚÓ‹°©E‰\·ÚÛ±Õ ­ÑÕûc©ÇHÌÿ7Ñý‹­ÎMéÔ©×zzu®,,æ¼öÇgŠ{%’>ÒÕþ‹Òö ÿ|<ˆkýÍa4AV¾\$Ž•{p‹>H‡Ÿr?ª®@ª«àúO ª0¹ ÓdðK^YbÎ÷×<ð¼¦Äê{ZJ|¸à~U.@{ÅÆûwÄ‚­I{£FÍøcÜ.ž!@ùi”¨Â÷Ó„pÞ¬ûŸµ8áï™ã’I|‡j·=o€4X“±46ܺPÝ/Œ§ îžw•ÐÐf`¨`äqx|yåÔ{Ÿy;JÃJöÌ0Y1†ÜûDJ!ç3í³7oLñ˜î'¶N­òø×L˜ÿ!¿Ã=µª°Œ¨X‘zp ,y³6¡F{÷”;ÌÿSð»QóMóøùõ¸ØÎ8²c!¶´%½•?š6 b¤çµréšB™ƒ]:æM’Õ;¾I’Fù=Zëž{˸)T›_3¹”|¢Äæe¸Õ­Ø¾~9)nºJ«Wl _ø¶#di4EìDG˜“¢½p"c]+‡-Hv¯øä„`¡6œs2,m™‚F$éü\Ê ÎÊf¹Ýxb-S*_ˆî^™ç#HÇ)lòý»!}T~¾«Ïöî·íÛÛÐíÑOÛÑ·}½ _oO[öê§íèóøtK>­óŸ?lï«d8þ݉ýº‹þÝïý½ßUå>C_·e/«¤_öéíÞOöêGíé/öë¯íÔ‹ê¾ï«h¸¿ná_UÉßn¡‚¯«E¯«¢éõh„úºTï·X§Õ¾Úú¯ßÛÒ‡ðÜ íÖéóõ"ú¶òŒñWõç§½aÅ ¸´ÌîS9¼êI!rô òqDVÞã„Ììä½)¼¹ù-ç§nÔiFRèX2Npâñ_´ï‹³ÈàUöÍ,¿­®‹ÐÑ0à’QjtT›[ÿ+·ˆüdvWЉT"e—§0›1©v`[V-6Ôú¥(9Âç|¢(ŒÌöaü¤üj5 ¿iýI””ÝÔg D3õ_QIé>6&'mdS)‰3ÚsE³Kj)™ Cú„9ÇÞªºõ‚éÈ´ßþ›Ÿ(ëËq s«Qh+`Ñc‹õIÊ1€J¨k†¹5¹†;l+{cþ†.fU@¯TbÅ97±—7Ú{BÑÊ­ÊK«,\çf*¼÷Y.|62žè$?êÍÐW٫̲ìÁi±MN4‘ôê‘»ÍØiR%:Hé±´.â »£6ÔV‰´±]c:™K´âËr$¦Ž¼ê1?넱N!*@x’@֔ʂkôº¢^s‚XŠÅ¢^2Oò°äæÅE¸¹F âv,Ú‚èݧYR@æŠ;p;±Zœ7öÚòð—”øT´G¦h[ó®4+ùð6ùž›á&…µ»|,b !~ñÔ”5,’v3Cè8gþjõªjW¼ÔÅ⫃uëAòõÖS)j²n3m2Ök›ºgÀì«NUÜE¯CLwíÜYÞ!ìÏ„ífO²!XÒiéÓòÙžX€08eb'¢UwüZÉ¡C­Xuì.§ˆ´>b=h Q_-…¨|s‘°‘Eéž#ȪGi'3ëGEVÍ]Èz£XjƲ~iJšÓƒR;ÈR8NÚÙ©N)!¨f k¸ ÁÀbåø!t—àE?Fåï¼ô›ÄȧÁTÀ¯ˆ%¹´Åy ª›²iLonÑ2£¨eåìõÁ'Ûͧeê1|ÐÐ-B[ñJèšúLyû—àV—vXÔ΄½é–“ùýæ²ãuËz<²†€O¨#eO8ÔE @-\•¿8iæ*)ØÖë‘èîh+ªòì€ö~í·A²(o$äY©Ô€/—?Ýѯü„¡sæ”·#Lår¢ÆÔ«°œs¿gzý =ãaÓ#ê€I™„œ‘wÉR°àë~)ŒÈ PÇ, ôXʪËú­œ%п9»(|ˆÕÊ(%·ü~'^yäÛàÑ5Ó´êÞž>.Ý€HRoš•Z|“Êsä›ëãè$R/02…5:^£)øÒf6*‹´äS?ħϸ="t¯jÖLÚÐ[jÏMÈO€4>ÇôÈj?7šÐ¬1;ˆ(‹âåMze¦$AØai:ùඦ5Á89_L&"k+ncÑ2)´„¬²ãFˆâ÷~ðåàJ£ˆ¢—4n#Œ¸Å¶0cûàJí±ÕaêžÒs«aœâ’gã£øÁ¼,rMôkÞÍŠ·pîÖ ÷FáÆ¡¡§×Ìþªn‰xámß&µ“ñ^œ ¥ã 9˜,)>²e“øCÏ]%¬Á³D2Ò9:œý ÒŒ£EÇN®nÚàE "S næGú¢×bT3xEwù,±k:kúQȃëåHCpŠóUûŸhÿ—¤!'㹪rð½¸t†Óné-gËõ>õï8ý=ƒµLþ¿EhÖ™f)ÿ3wÇ‘ßeðA}€-²#}wöu°,~² 5±Œ7ûè]ŠvFçBÍÖ5¦Å©UèÕî ^£l%=›/g¼Ûë'ƒ²W‡'Å•°]•X¨µ)ÃðÁ98™“[ †@:=p$ì©©®ÛÐèš;ºmq"`¸sYÇ"ü·ìàW±ÅÊ&`€•Îo2® kK¤t‚™ÊÓ¡~¤Ýë,äÏ;⌧WVÀ Ù!ñÕ¼Þ+J÷ÕÛÝ÷K™ô{&d5U=c‚¬“tÀô¾^ÍÓ•>Ë5øÖ‚¿p½sÌŠD,Señ¿ãcq€™^’PÇ&r¿ŒUh•Y«<©­·ÎzDL¹ÀwÉ‘¿Æ„Et-Ó·ź£é“ˆÊà<ÓåÂgWO£'Bæåçó){ø—Ì+æÏƒÄLwÃî ÜTÓ T¤*~! ÿ¬ôpÂW<'ϲA·ûkû‡¹uþrгðs{Ý; ¹”ѬÌ€ P9Æhãy~ €»-—O3Î>µÍ!¤kTmµ7Ë«MO„À¡ó·†¡ ø!¬ž™2“ååÅTm*¾ÊÂzfË‘5 ’åŠ'-@—,©G>¾oKÏ@Á¯D±þe…bŒÙºk<†‰‹£ Ör#X÷oE[,cG(á5,©Úk*ª-C«XŠxôï‚í™|5oJº6V´¸2®¼+Ø×Õ¸|W…¼ â{-ÒÇ­lŠ]+BkçsÝJ/‰–x=;…ÅÒ]C˜,Èåx0¿ÎR‘2(N —¹$Âވ̾ÙD Åöšvm›Ðý§¯*¡ô~ìð(GõHùÖ2ì­ãn˜³Ø›?zÚ®—éÁ¹“èE%-ã:$üêÊâHÎÛÌó*þ…Þ@4 gïϺïG8Ú{s” w4;|wêâ˜Èÿ4?ø"ʰµªÆmI0 pU ŸYØ"˜,ìIä1Óz/2ŠJ!Á»;f2Œ¡>íµ‘ÈB«Ÿ¦CüÞ;ˆT$Ä+Íìç Ð˾Ë$b0–rÞ(Øãt/º§&ùBÑBÉB cB ]àO©Þšó‡’½¬‘¡—(!|5úVôMCëÇ6Ú™wüëy=•ÊYifmF U¯™_.«ð -ªôŽƒñeñËÚ¼¶ïœÚ“ ´TOŽïâúb`ÆÏêM=‚’Œ/OU}’­Tó‹¾dKå¾d3A}MÄ- £•MLÖJ\ErK>8ôKâÜ,’¯rYžÙàeÇ]ã,f•¥çÅ®WÔG«&ÏœFCß+˜Ü0UZX'\hΈ½ºPÝÚ~¨ií¿a:jÍÙr ‡cå&Î}±Òcï›cõí´<£Ð\ácu§\÷fKqÿoúœÇ!,£^ôOŽÝ¬#·Š·åE†òû}° ¤¤Pý¥òÂôëÆ¿ã=¼[3¤Î$-Žæ¤× g.àŠg´àl½'¬¢w1½ùG}¨ýJ»ó ïjøN‹¼bžB ±@Ï\ MõgߨT•1bk/¿¿–xP¼Ÿ­,쉤ýåírGZÓ$ŸìJ[è®Ò*´)äw/9uGÝÆÙt^˜ŽÖR  ìå…+‹¥Î¢–®ÑWö¢š[Aˆ¯²ÏÚ)E$Z{(˜œÙ5½q,œU´Ï7éyeß ¿ ÖE˜2³…4†@O±àöNà9Ñœ‚Öö€ç;c±OFrбaÞýl3#®Â„¶ß¥@¶Ú½òâMK:i–’Ú\i$‚­_Ç&í&”­˜‡­‘?>ðRh$ùì ¾üü”ÍùÑQá&dE]ïgsq” JA§¥|ê°xºÅ~õ%Ù—ß¹Õ`_½úÖN³³QÐçŽ6÷ºË¥€´£yæÚDø…­Á9ÓÐ%_`6ç視õíüïaFšá±4¸-ÃÌpT@æ¡ôuëœ0³©Ž¼OESI\A6JÛ©/Î›Ä i¥®-qœÓ.IÕåÈ% BjyÑý½›ëðóRø•+ŸõÅgðíÖ;)‚èE‰¤yPpÖ´ U,Š‘ëÓž+zÏn¹¡”Æ!€ ¢ ø }|¡ÅדVµ+Hþ—ؽѽѪÎy÷RÊÆ8Ãkús…ó B­¦ ìH©˜|§Ê¢Œ þF>À‡)FTѼE.Ò.å6rNìW÷ØÞ–M¶üŽzSvÕ¯'™‰Š!2LŠPÑÕ-ÉøÂ%tôqšX  •極›XL Ÿ«‹e0i0nùª56Ÿð¡gÐo­/¡.®è/ÛhéöÔñãîëâcnŠ@JTLè~/9#zlϰœ»þVÆ$ËQÒ¬J*KÙ]mFKpÈÛ¶Ýéáó¬1ÒU·#"Ût¥ÑSý¥j¶}ü gBñW÷䥂ž‡(U¨!¬²T´/}MnÅìùàïS¡ºGغ ƒF(ý÷=ó–ôÎ2¯®ìuºØ ê¼S¡¼’­ Gt)5[¾èàçÂEî‹a¢~º»ìmËçãts´—^‘˜Î{‘-V æ ®»ˆ!Oq>2jÉ’vfOvÎ}Ÿ†+섯ËK’£¬N«èTá”ݵés=õAcd_x-²7«ÕkußwþªËY³¼ŒöÞàC?ÙÑ?7µv÷.î+HŠA¾=IÄxö›{ §hX™ŒÓÔ€ÜOÀé¨eò5§8«º­Wr¼U1üô ‰÷lÃÈíº¶CŒ°ø2u(Of¥ˆ°“4"tù@B¯¡:Þ.÷ ÐÀ+ªu™5\ïñ>¥vˆþ0“ÎDx7!ë…Y› :ò |&g¹uÄÊdø~%Fø0r³vÓŠhʬlÆHãp¯¨€ŽQ|1>² aóÏÁ*.<º2ƒ>Г/÷ñs × ž·õ‰¥{ÁΓf«súM¶Ô#ý(«<œÝæà¢ˆöµÁ; †S˜ªN_¯qcÚ›ƒA—:€l²`­¨¨…R HBEXüF†rO¨ITÊò¥}aDƒJpÖÇÛX{šÏãßc/ Lšþ:mõ>Íܘ{ïñ‹d>O’4™?ÏoX:Ñ;ö6%±„ÌL‚Âû$íiÚ4±Ró½]Ó¨ö—(Ü.kG–œîZn£P År]Çñ«7üùÖ%f‚RÁ~6&Æ®æÙBläQk὞èËTÕR¸ãf9P­:6–C¸Exzq‚ž7Ê_±¨Â…&ê~fx’™ôQ!ŠëNIçGÚß jVúQ2À G›dnætä;'‰· )¢JÔ)˜ÿ„Ó1OòæR§ßïVÍ`LoHÚìŽýÏ<b=çfBÄN¦ =¡êÑ<Ë0Rí\}yXûEò¹0 5ÿXæÈTŸªLЉ=ÕÆÉýM×—@Ä®úQsÄ ÂÍŠÂŽ˜3´+nÑlfãZ SóVÍÚ—’w’GfZø]„» óŽâ8ä¤JËbë]ßò°!$æY{M“Í)ç•Èòþ)ƒõ€^a@ëñè qŸú›{U‘÷æ$»šÓ ßw†¢ŒîãØPˆ¢2JY=:.tv®ËÿÐ+h~Ù1eÖ)¬»ˆ«ME¯ÑŒœ/½ºñ‘IªÜ\÷ã,Ÿ¨¡ŽV#eœ¢‹þkHÜSæâùÜí;*¤'Ã8sï£ ØEK+XF¥%ê¯ ‡qCÌMH,Ç~õ‡ÃK Þ1˜ |¬ˆÓ™8 +ð™uSiâ–y’k@¾z*j='Np'‹‰»¶÷ 糕Y–²:¼×ï–DAršZ‘ËŽ‰ÜìÌ0HõpÔ¿ðÄO¤j„*vß¹ P1ëÖj ¸&k½;†+©ˆÉæE5áaÅ¡~s!‹té©£™ á ‘_Væb¯ÂRHâüã•Ãóÿy"o~>*Z ©—+8'Ÿ!˜t¥ái¸"ÏV³­æ–žvGü¯O£ïT|Ĭ!>ÈÅL@…ô~-®¬k±oL>Ű‘¸ h:JET*娠¹<^,{|unµ5½Á ßGd2e$Ž™:Ó4KX[ûí¥ÓèÀ§"E¯J+·Æ·Uˆ`®’ Þ‘p¢˜ /Éî¨(c{XpÕÚgIJû—ýËuá†@GY¼Y†€ÎSK9s¥ÈúB—ŸÁ¼«bmïÏWdœwó:'ÑÓºòï|¾½|Šn$õ‘„Ì9]#ï`e¡*7ü[Ü[ÙÑEUP‡ò„\î?HyMŠDó‘ÉË›(Æ•“^Ý-â^¡ó¼Âõµð ^’ÿy”ψˆÿ3¢#@RAB•^Ê\´×Î…%.䬦yc¥òý•·–1óßxái±ÂJÉÈÂJ`¸ú[FY®/3ý¢•Ç*ü^¤·Ÿ®g£ŠÀå¿PAœÆ•r…"JãRìɺ yT…S œÜ(‰Jޤ½S/©žË_†Ë®8À)-´XþRWÉûÝ„ìÁÿtŒP¹¤ßUS„]yà~d&Ê<Àeî=T,;Z@û# hà†&Wñ†ßAÄìé)°˜xVʧ¢ ±pH0ŸºùÄ•õ ¹¦÷þ„ÜldÓhhQ¨ª»¢bó„išTOP/ß^·`ùoP@#nÃEó<&¢ò¡¸«:B:@GHK°4IÛhÚñõì%}Ù€°å5©UDÁÌ<˜ g$5ú¸ü¼ñL¿´ÿ>?›[¬O+R" +· Kâ$¶›º.Èh‡U ß÷ˆÁSZœÍ±|Šú†ÌPCÞ&§¼èH°›N ä_‹°¤^ÆmŽŠ$4iŽï“>Ú™!÷¯ì¶µéõIà»þÈßc;C`ˆéO¨ˆ-°Ž<᎕շ¼{•醫I{DËûá•âyØÜVpgùßE4ØjÔ,aZ‡|6>ã ­Tãèm7í ~×ä@!ÇBËû Ý‘©L-¨eKd0¢$³ù^~9T©J¬,„’Ê…_‚ƒ´7±O"’¥£!°PóA!­J}Ú CŽ„]bè`ÈúÇ‘7`áCè]¦ÙŠ0 ìÙð™ÖVÃî,:‘á œ1=N/ç¤oZ Âë“ý}—¦ Ó‘ðºÍ¨3÷ d·vßæÏÒŒ ÷å Aà袪í4À¶¢u¢–RQ/Aô”Ùâ‚ÝjÑ¢]äœç>`³q‰µÁüu8º…º`NÀ¡‚\Øô`€Gô %oy Ÿ!ó­ÜF€ÿ ¹—YB!egÃP§‹;LøVM©ìîž|¢{ªÏk3QÇ%úê—»×ügK’âù~%[ ×.ê €”½ûÜ0[Dñ•Ÿ ¢\‡æeX¾8Ó¾àˆPPa2%}vlÕáuóñí ›þ‘X6Ý]_+µôg¬@ ÄÕ«¯Û.µV9¿Æ -æRèø%–¹Ö«ó!Èdmº Ë<<ø¶ÕKP²žhÁZÇäa!güjó>|>j}ÁÍIWàn°#"5þÑ!ŒÌ$XÒq•ªÍÛëOÄ…ý««¯îqòbAÊÍ'–Ö[„ªÜšŸš;õ#Ž©GÂÛÕëSÓk÷a¦VŸg£)Ë¿[9‚—œ£h¾M+o|A‰r‡ÇÕ./i½/“¬ÂªöJ×o„8¿ÀÌ&„”‹^®^¦“œB4xvÃ¥R*[Y.'ɳ:‚ŸÎ8]s7e°ˆªþ"~ªÊ ¿ú?Á$’äE©P¬úRAù0ÑÒ™ð6+çṟŸÇ;\‡Ð3rO‘žÄ¬,âøƒêù'Anÿ.émÀž¤> 7¿_Z§*Ð6L»H¶#Xù“ºó ü;Öeœ‡gßVMÔÑM|‹NñAÉ'Êp‘Yöø;IˆX\¢\Ì£{Ù‹hp‘0 ×+ø˜šÀa÷Ú³[ Òª_AâÉkÝšDZ.:¹HÒU礫dŽShí¾Ü‹pBhGåVf-F âI,„ì Ý®ÜÚÈÁZD2𹡈œ#=4[ g»hº2x#íÚ±£GÎKF8Í•VFô|@WÜlÍã×á+ltk0“UÍZ]m³Õ;rˆ#MìûãðTÞ²€‡éV*`ô%2º¾3{›ÝJ€ñUÐk.à6!/;0˜‰e “À[¤ÿsz×ãÚϹèæ¹‹CKïeXÑ%û­U&"),%îW2¼ÜÈ,xÙŒlvºßF0¸³}0Ûf<°žÐÉÇÝmØR:×sû~ÏKÑÜ­˜‹tXHYž{s-¢âÕŽD?ì6Cž•HÑë)lìì Õw1"±û)ýñgzïÝÁíÒén•#‹+–FZaqèîa¬zšñºæEÐ9%CF!è#ÁýÄ·Nä“…ù¡]W¾P ú¯uLn&‡º`I«e—sl~ø³ùæ²ø›mFÕRÜ$ph¯d×&)‰P­›‹Y·ÕR-Ø%‘¿©aÂ4<Ÿ~ã™ÊBÊvžB¬•qH‚ºQ›ù¾ËÉü¿ŒMÚ%W¯¤I¥8]:9Ach$Ó»¼Ðq€?Õ` ¥ë.í-¿ ¸ Øv <‡•8y”E=RtžÝ\ÆhÔ„Å,~ŠÎoèv~Ï`ß3Ö#16ßJêÆ·k· ýê´•ÑÍÊp$F¯ jEúŽFP‚ÿP<G€Ö~ão‡q|­Ím»®Ù>ÓÖÚg™¿‡ØvkVa|¬ëµñçÞ‹g£ ? SUk2&*S‚Åqç& ¿¯æ9M‹³@ÇÂÛw>õÄ@“YšòV‰ ¤²˜ ²æÅÏ ŠÍ—ó$•õè'&ެ=Ùe¯ÿY¹@–ϽÆ$kÖ¬ïë$_<Ñ®¸6¥QeåöÆ¥„éõ×+ê2 _ÔîË´>É«¶ûëÛ®7e¹.Œí-C—ù)OžZp^ ôGÂկ̓ïw;q` ø›Nš—f‘»}Ò:cËîô6r?Ú›ªIøš%ü™ªŸ˜,'U䜈Ǽ0]ÄÉ+m ¦]z)SxÀ牴fOÿ@—\Ü‘EYÐNÍøŒ„Ú˜• HñÌù(?xð¬e¦´e¥é¥ªœó!¹CÖ—i8”Ôpi`!mÆjö×±ÊØQR´ç„Ò*¹ð˜>üÚ’Oêâ# à#KMARgË.ÊZ÷«Œm.šŒ¶À²ƒŸEô°ºŒî¢®túN*Ÿ} éuê:«ÓMÔyZ›Íô¦ŽL‘h½F›¾`b@2s 5 %ˆ·òS<Ópù³ƒ=Ñ?\³ka¡2W…✢ì…Ð,5áÑÛHCS€8h±`I£[NÞ=óDL¼‘O X†´ÐÀì!“u¤4ˆ$²Ù‰ÊÌ@ˆð=½&!o¨†ØßMc²ôÕSÃ[±RÂà;u:‚Ô‰ê©P¥® òÄÏž×ìù€’ÕHþ"š/S•èÚŽF)Ö¼@áfP“ü\¸¬u)ôó¦k0 üQB{ ý™ú0G˜¦ôƒòï¯sUp,œS^gP”üu4pkÇeÀ½`:«ê ›V«|¤ˆî‡…xµÎà{6›LŸOŒ§<[ñž·AU*fÙ? o•np¼Ù†ó´¯þˆ³n£c6Q†Ê ã]) ÙO70ÉÉôê~ˆJÔj¯†EžÁY'ÎÀ3úš7&kÆ\7¹žüBÚ’?þ_D)§íÁïáÒ.‚Çä¨5²ÆÆ¸:‹ ½¸Õs9ò)ŸÃý ƒÊpìfº"Hw‡£Þûl€{•ܦ´Ô úa@ñÊYÖ‹¿àH¸^X[8Ñíÿv9ÒŒZ!d5ÞŽýíµJÞ)N¢G!¡­˜…Ëèy)HuŽ£ëuÕ ¸b±+on~°mŽôGsECYó´íãý¯TÞtiÆn–‚“BnõÙ/—´ºPT)«à‚IòšÒg¹ýÉ}ÖK¿bW»_;fÊKw¾Ù5ñö@°=u¤[KÝÁßœT/§tø(‘‰ãÉRzl÷m ø—2ŸU¤œ½Øµ["–Lõ  É,ê'õ(³°YsÍõ-þà1!ºÙÖ¯Ú+Þ|DQÞ’`N´õÂm'/È4‡ ”˜`ð>Hj?ÍK¯²u.äwõ²CÅAÄUû¸yí ½í(JüH'ˆÎY™þû^•}l©(*¥\2Òêb‡@¦‹¬–v1ßIÞ#qûô§æ Ô¶Œe¿CÎtô°©ŒZÙ¿Õ¼âcBBVõ›†ÉE‚„hjëNµKægA²6' Å,cJÐÏL¬96›l‚,GFtj¡§’@¦ñV(•9 MQSI7ƒèË Ÿÿ”*˜–¥Ð_ÚÃ$~Ÿ†@„é3c§Ñ™ö¡)ù…âÆ÷5‰U¤YÀ;€Í,šÀCù4SÝÞÑu[™¥Gza]:鯵%ȵÔêMÛ6½'-+“%Júhù–“F;ÈüàèÇÎ=´†Íf`õDó¾')jœa;Åž¹àäkEàSçÒÇà›¡køTÓWX•%+TH s?I3@†ÏÀW$<¢?‘׉¾‚ÛAä.ËT‚¼1&-†ÁR%­¤@‡?OF¨?˜¶/ò{*¯l@Š¨ã•æúw0u-†ªM,ø¦0ˆvnî#¥˜§ß™ÃÕ–¯˜AÃ*ú¸1Ì.ŠM}Æ]§Ä¬^×Åt}õvòKúîÿ@wÂ¥gK¦ `QWPÐȧ¡±•Ý©DÙá ÙúÊD%š¥Ò°|¡ž:¢Äš¨îb`ÉÀø…9}¿êkØŽ¿qtâÕ-òHî¹{z¹¦u#¢1J¶F ”Ð /#í–é·©h“H=k)«®ôœ2Û!'èš<÷/ª”¹2ð¿å­êzAÎýxÆhûÁRª'X+|~~`GLãOÓdƒUüÿ‰KàÆôhÊ}ȉ_ǘb1y˜šÖ.1Dè=Í'vÌ™“Éÿ\ìÃ2dn–­M=—p$΃„ïëh–ÎX¸’óœ%wžKÄ4ÇÂ0\-žU Ø9šu~:j­˜Ó:ùÇjšKa– :Þ³)ÁW{ûå°Ëwjéú®æÇnD"«1¹ÿsK$ ÌðM­ûÄN*RÑ\t¥Ë¼éPŸéŠƒ6nl›t*iTîú ;1éè™ùoïxe:ŒÿvsjZbÄÝÂÅÌ Ö_V†Ñ¸w&—ØU÷f‘?3˜1ÒìªBc´cRIF³éÌoôòv’£†T®™­ÅoÊbciè÷ÿ\uÆ^›V‰øÅÍS^³ÇMü5‚Ü8ÆG³mµÿ!0ù4]õŸº¼g¨—’¼œ[ÎjöOúdØÉŸ,´ }ì(\ÂM™CÝù㦦\>lGZ”&?¦¥X_]Õ×ߨ\Y7f Ñ·™™aEÕSÖ•.&Ôu%Á#d„Å –1‹Ü©£©—?Ç^}r 3JpÓ}L š{)éêV‡K^¸Öå¤z%¸piÅ ‘¢×«kh­éà럋¾mΛ¶ÔBDötÞfºJlÊ=ïFª‡¢Æ{žs_µ ù{è!Óƒ¦ÙVÜÔ;1'ùß½élD„òbW˜ÀúKfKCE]”üÂýåEëóåLígñCéŠð© 2æZ¯˜x2i–hïd¹1Ôëaç(ûN24çÂ^¢ ÙDX7Qç—ïzjÝêFâ#¢±»!–„ÿpô¬·*~Þâ^7ﺼø!,>%!òX1Æ/ížý¹q@guó…Éö#âØ¶§ù¢Þ쀣óT€“Ê?‹š©÷NežKAjd·@ªÚª·B×1sSéõ:לÔ²k©|¨¡hŠ/€ÕDZŠ5i#Þr‰DÔ;z`#†…Ü:{}éÑÀ°Qçüê@Mø·[-ûM:‡½y ©³`*fe>‚6g2Kðßø6ü=ºøsÀ£äôÏ»fë•}‡IX`i”2ÊЧÝC¹Œñ ¥UO%˜Ç÷³ ȃp;ð¨Ê?BHn Jfb ËbšIvIw¬pà½J´*h(ÉB·»qÅ+DT¾’ÿ0¹Aa¼ø±e%oEefÉy,Þ$ Œï3D%e„)&’k­Cz˜ba5!­=ÁJNõø»¨YòÂËpzÁÁáÆ&qøÎ#¥ÜM+˜å@ pF!×¶›± NòÝvb Z zøÅÔÖ(k13o ®Àýñ }Eár¼‹¯W¶lL»>ž3îTyG aaq½0%‰Š1Ýü±ù±—]ÇVÚçÆw·=nÝ#q“¤ÁÒ+Eÿø8"…ý7© EÅÉùqÑp1)lÁa4ÙV‰úŸeEyk€ƒWWj S¦‡ÙŠñŸAgÅÔÊ‘ê­Ð¿3Ö½ÁLŽ4ëÉNd?¢hþ-X9铱»µ`ÕP¤}ööh¬ü— ½Ú*hq^upדr_^|pk8.”Ž¥x; Òz,‹^eàï,Ítaš‡êÈûf ÿ{Xáǹ„QX)ü¨vëV?÷z /vÇËx’›CµëÒ_$†hkh.P]S›òÞü>\2¯õviÐû«c§X|È: 7Œ3øv|’}<÷Åk÷‚ÂGÌŸ­D&§è÷š*ŠQÎ:Òšû'fª»ˆ7B‡ß°%V ã® …†¤ò¼n´¥05OxúþÏUm嬭 ,bI.» Y /žm6&ƒé,^?¬Æ~ù’6 q³/×ùЈ:’j¬§pk1ß‘CMb1héS\ Ä:ìÚ]Rlƒ-UÔ¹ê9k°“‚úÌçÿ"ášDµ3öPö¡à¤¯Çƒ_©Jí¬3‹Â Id¸p€öÚ}Ì-Êö>›¯ûÁ|Ÿ]è=–o<[·üyD¯²ç•º#Y=P5I 2äâZ;tEŽÑÅè°NR¬×nËJä@ëx˜úK, <…1´a!_C4LæüEõ’Œ­Š ÂH‰-ì`¤W D[¿öè°©ÀºEÄ\ãýj14…"«óaYS€†u6Î(˳ì5Xp*ã-¸F5“/9 '‚ïúe{‰RáN/IŠÀú±Cþ‘æÑ7Ü!]ä ªDLß8$ÿh!W³I’ë›"²(Õ|üKTù¶¸Š¯øŒPX…>wD=±ÇhÅO2†ô¾)TÁù‰ö€ùˆ°ý[®´÷´D>VFõÃÜw»@ÒC£¸cn°ì?ïË:3¸{=òkü'¡ÒÖriƒsÓo/õ2´ñÙÈy–.–¤†©ä‚ÊS¦¤:Á}]aR^Žù%%óÅßëž•ÙDÁnèA<ˆw\¹T?¸ñeš²ü#yꊧÚXÏ‘Ãg3¯À”Ñ#ùÓÛÐûŠH`~’jƒF`îïfÀW^ÓPåݰ=ׯ‡|ù‰ ¿‚ëP³|zß;`ÀÕ4ˆË÷Ôò ŠF_¸zÏplAž÷D7xšmWSuèLÃ¥ì̃R÷›IH¯QªpK,2[=Áô9â !³@n_@ ‡Z0;Æþ±Â}{7²û2=¿âšr$Çg¥]99Í]]Ï(© &¸ÍW¿»‹ ¹nû,XPqWßFíw˜sº·„3Ë^ØC«e\*¯ï†4°d!Ì3Eï…<ôêo±÷#i` QÔ9à;x+MÍ•ÉmÆØA€ÙøW'G‡4e½²Ô¶_‚²Œv„_[?›Š<Ü€AñH"Ê/¥´˜Ä4‘Þ4l’ðÖ`ïøS8N4[Û¥KöÏÿ*Þº+«÷clyŠ`<¿¬£¥­(¼¿ÿd^¹öÖA§ž­+¯ùBµÎü#Üþ‡2!¸ç1heYÎ]³LÖ¿+TjÞ¢â|$$ªí€§ôYnÁ\aoƒ=òÀûšc‚ŽwÀ{å.r'Kë(%æ›í1ç*åÿÁ5æ<× \ßA‹wèýum`ÁEí’i1Lp¼¦J\à¦9:¤â­¾l´û“Ü¥£lToVW㿃¡^á†üâ{^ùÑofîÀº°IÍ.Z¢+|P{£a@óßÂ4®H’o$ ‡ïèÝšÂ=·RaµÊô¿áëï:re©Ñš®KÃZ‡áƒ­¨ÉŒRõÀa„œÿcZµ/óê‚á >´»º³ôÒT²­ÈRk½»42÷=+}·Û¡?¸6©®Øà]Âê©øPj~Àÿ)0ú“NspH*yš@¦´-(zÌÑߦj1È®“¨µ,on°b«-s²È}<ö{˜ò4¼5hß-Å Ë0†¶çÏý«‡¿î öÀ­Xú6$µ¨Í4Þ¨ñ×­—kÊ&‘þÈýL õ ˜™ffA¾k+5"g‹+Þôõíê)·&VVëÒDßíN9ë—_qép&hm^tõ?ÐÒ¼Í3o„ûˆ)"fr¢„Åç6f±ôðkVH'ÄPÔC‡,héoQÐF.o ‚Y¼0…HÊ£^òÞ‡ð+'’¸½7ç®P<ù}Óß÷?cëáàÚjPì˜À½PŠa "¤dqöÊ ¥›¯0­l¦çþ[;sÓÍ€ÇY7ÆCßYÚ~¤8çXNÿcÅäHQÍG\£ÝÑòé˜IYﯓcv¼ù˜ÝÕÕÁ4(‡‹ÝÄÀÁ ÆÎ)ñG=×–îãÁÅÑH¯J)¿øñ58<“>TÜ¼Ê }r\,pÏÙ;_Æýøt¾•>ÏùBè].¨×†N 6¨rM‰ ^Y£nûAîn÷ã„a*Qóª>q·Œf5…%/§–œñçÆÞáÂD÷Îo)5£¡.!NbSGÐz㪃]3º„R%qùPÐvÀë\N*[IâCPŸ‘Iý'ð^ª¨c–âÎYÐ<19qÈ,NbèèlÄ,ôÕ;º=ùßšJ­öƒ~0¨_ü3A»^q*6ÑåÖºkÂ*8Ÿ³BÖ‘Kºt»ªdÎËúDvì{-ß•éæî êdSÍÛ"‡1&?±…Ìß¹–˜8{õѬñh$cn‹´W¦ÆD$Q¬ò`8òœМÉÒ 1þ˜©Ü!Ÿfíð’3Eé)fP|bŠí"'“VIÍ6…"i‚éqR,3J…¬uTtÄô¦\ƒã×·ã’R ÇÛ¡\T „?Œa¹í3ªŸ²Æ]{¥:îbbu·èµS«ë‹ ÏztÌ­ˆT2|ßü½£ Kÿsœ ¦#êz^=Úݤ‹!¤Q35aqd’ÈâÌÑÔ—ñ˜(k3‘[½FñÑW’.Œ2/=û#fa9ÏÔWdw=m¹ûƒ Tç†È{&ÚÖè_f¡m€U«°òŠüGäÁð‘1Ïpã[á ÞŸk¬,mŠ¥ödô±ëãµ}ißñcÕÝd—)”»µ:Z‘Ë||^dÀF ð+Õ˜Iß¹¸š°Ë+£@¸º‚°,ì òá½Ïš ÷<£ ü¥m‡VcÁl¼ˆ÷Æ„e“‡ÉÍ<ïh!_3ÖRòÔêÄÕÝ\%\ì…kµ†Ú¦ ÂÒ¨€J£‡§ò»Ü‘×s_Dÿ:Ön„%£GQ%¾h'YbŸ­B½%³w¯Çߦ€à2þÀy÷«KÒ⃹GÂJc ” ;wõÞ@¥ôwyÍÈÿ@»ªHÿ]ºÚž€Âxm©cÿ •ÿIΌςksÛa_›4ЧG;ô(z #œQµŒð×$fH¥7´7NÓ¡úzÁÐLjîs{ËÅÄŠZ.äx–×ðË =iÔ0,éä»[²¹$åõŠB.Ós „Aà¥u³ÆoŸ9‹¤.S©Œab¬~ýÛ;QvL¨øí¬ >Z½‹+ßìSç§´ë˜Ã¤>÷#ûg>LÅ¡ª6Õ !s…îeeg“’Ù`—•½M…?š%­¼àeš7’”¶Æ{­^XO‚¢ò@ÄÓúdi}-àš?©é$«–K¨w[ÛÖÉì è`„0"Ùš\ù^‚×Z1#,QöbYuÚ3áï¡v}éÖçæ„¤¶ ìæâ²¡c¢ËCª%ùYu ÂMµô¾Íäî¹Û(Vì\‚¯h _½ñÐÁj™X$Ÿ|Âî‡ìQÆø~¡*5±O&y©ñ oª½ªÁ*Ø•ÅÌíÝ—ô}$¨ìZ]´&ÿ)S€xvŽU_ÛíOºz¯JÊg¹—@ªú˜džßxôÐl–ã6K;³`œŒ­^šú‘ Ý$µ&ÇVy~·˜¨‘78ÎíÂ\ìÃöT"`>:•Àsyk´ bËÑVÕû\,|Rd>W††v° pŠŸtêÐ ó˜r—± ¥ár O/Õ´)w ÖT^LÀ ×}<Á›"F2ŽÕWÅ](‹¿uÆZ®Ë¦´¤Ô4åÖËIx«cü ËrÙ€6ò >††dï}‹šrè¦mÓÒDe¥ÇZðÕò’¶‘Ýœ$* Ùk¿\ú$”O‚ˆ¢a“Ê­“1Pf_à˜žLÈ<êÏvÓ¥ŸÖx—˜!jwïÉÌ@\ §ùÈZû¿ËÓ®Ž|ޏ>ïOŸÒèmtI“2BÀWXÓûú7¶…e.ºs„QÐO¢´M+qJ,MD].¤÷²¹w‘üÙhP‡ŽVÈÊG‚0˜ê6x}’€œý±ß†Å ÌûJm‰SBÓú"©ë’í3˱ËáV–±‡ U¿¹ôQò·Æ+æ/…úš÷°zÕ|i\¦ÐÇ ™»íXuMì¬`[M¼“ ~Îýh™"œP9ÍÚ•ÀkvI?¼]Ì7ï.žØ˜¯{²ͼÿ!>å¨E¨˜Ñ˜âsTv¥ÔÕØ( a «(‡1·¯ìEpäËDw™o9ˆF<ˆ2"!³˜ ztÔy'´­{¼“²Mtk#vËxØ€¥|`YóVêkX=î °®AÍ‹M—´|Ö"©$ÈrJÓúUYJÌÇL$÷ÑÉ­÷È9+k‹5î¾Äò—/W7†‹©¿tQ¥é7·¥$…k¥:æ˜Ú§©‡rbì§ÎhyçNÃ|e )hGã‘EÄ['´Ñî/x¨v­©2ÓCÏbÛô:)µ\I{ºiMfo2ÍM#Óίó5DŠª4 ¼#GY¡4¥¢¶âPI‰q„é ±ßî\Ãô)–*8°E`Z@}ƒ¤sã#~!ÅçÔ Õ™,WGshÐ µ­rÛvjÌ‚A VâMòõ¢¨ì`ƤOmÞáî!Qœ¸ˆÓ;`.É£¹ðÑ(êwú6Ç'·ÞØ´ ÞiW”Kîr¦/m/5÷ìËÛ4y—Ñ–«Ë@™O¦Ék¤³Û™GS—û6÷ÀÏ´>ÛÕx¶ÀòGÖ¶Ø«ŒÅ+ ‚«ëWÛ‚Ûü|µôšÍ¦Í=âŠéÜ\À‰VÃDRRWãÜ¿zœGŒ*Ô¼º“eíËŠ«é©3ÚÔ"å0íŽã’ÜìR‡l^êU½ÎÀYÆY3¥ŸGÃÜØAÁÊ›Çö=áH´nå0"L—W;§A>3Òã9öfçKVÒã–môþ÷Jö''Ý$j™M¤E97®XoÏ'Iùhà ] ðïÝwYlÔkEZ®NêçÓåeb´*pỦ¥ñ>àI‚É7ñ+t¢užÁ®ádÜÒÚ«Jüù»®º7å˜=‘ò¸¢´•N$¦Åº‰P†ÈR¾àoûþWWaHr2ðçÀDctãö‘”ëq\ʱ?ÇŠšMmÍ^*•)¢ß›”ž«s‰Sfc²JgÆâͧËÌE¯Ü¡ûÔÉ'5/Êu4Eê- ˦}¸9;z¨Gfù8±œeœŽãè¦aeøHpH’•¤Šjw5Šs“Ö·êt²ƒ3.XBóÕd9YfK=ð)¦ätós‚¨R­ŸÂ™.Á/6ìIÈÿMÅðKR'g7ÖXýéˇɓ†Tikåü°T hŠU_ýà˜óÙ寣A•&\¤‘ØñÀ´õ|aKŒ™Ê«kÁwïüìL•üXpÙÊplÂ.Qb£Ö¤R—?ŠóØEëaò,½S€øyúi?û)…»ƒÔø!9„ºx$·@rïxŸ$À´›…ÝÜåî0uÛ;ËC]óÂÚ§$ÎI)@uqÛÚ  vl†¦šk³hMÉ&WR 7HJÔÍ{¯ÛËO}kÿÎóÔÖmùœ#íçu£‡5(5°-í•u§¯wmŒQ'‡ï—H?ŽOŒIj¦+ÍŠcÎÆôL«°Ü×{ÿ Fñþ×®(c9C9zEŸ¶ «Y¹Péç(!œt¿aá}À¨¥à÷E«\ê=É $_uÏ^pöà&Œ7¡õù¨@ —K5î¥!yðçIŒÜFë=—,£œøn\Š æÉð‹X¹¹šñËv b«?jL4°¿¿aÿKwãäòårq—ÝwõÇ[bKT|îS‘¹ÈÞ7Ê$†ƒìd«ë ½K?$ûDsd+™$S~A"vöuÊLä"¸å§õ†kÔü,{ec,98v ¡»™‡hZW÷«{çrñJo?HδÓqr`,Íñs´u{‚¸Ÿró¸ÿ'1z-20xèýžû^T¤€Q’$S«ÚÂÔ°–ç 2zCÆCþx êô¶l†;¤ðP¿]QÜ‚o3h÷³ÉÝŒH³zrdÅ“.MµµOˆýÊâiœ m=c9;ê Òãn~ÖÈ•Ê]$oN/eÅŸ+‡P±Äšò‰™pöœ¯ÓÔ‘h‰q›Ò ­@BûUe…¢´=17ŒZÉežSR!@énž›Œà3M‚Uˆ žMl&)i‰lÆÆç†*ï'ê,[™Q¤Ë pÉt¤V¾·VVŒÚlì1¹ÖiÕÊš<¶,%¬„¼¬í(2d)F9¦Œ´ê*!ÎüL KH7ŸXªç®º€ào½*dðb—‹™àæ û…aëþ¸Ù Â|ï–,™Û4r/¥¡…z÷¸œ+ŽÏÑa‘Þ%E1¼™÷ usÊ'ɱßö~@Uàæ3·…á9øQ•¿ó>S‘we„ƒ_þ`]oÿ'½³âJnê¤QÜýb«t­£Å)!†³¯HM–},•IŽ˜ Õ#ÜVŒ²|=A²¦¬Iš|Û|µká~ÐÚÈ ˆ§ébž¡~wO^ئÅPÆx j?À[í™_b=e’‡——‰°¾XpÚa¸Z: ߯ªZ¥£°CËÜ»ÀøÃ3?kµø‚«¹ÏË\fØØTOGkh´ÆcRp™3HÇ×àìˆV!ìØ•,£²B˜bÂé²±F™×';¶ï[e¸µd¹©œ¾{ˆ-_š}»bãZ‹ùnO¡²gzv\_ÝZ^R™²½Úúxß¾‡à tjù|^¤ì•aoa4.å*­ó¯K/{Û@›ÎF~#æ xè8½Á‚¦¼æ…¥Àõxɧ·ÛXla×y.Ä[ò,Ÿº2ÈÊw³Ó$øQð¨Ñ4­œ9ДÝõ®ÞwïŽå‘"<{6ù° }¦PDk~Úééo9:®wë2HYprŸçK¡)CÞu8}|Ãñ$[òù ¤­lþßwìÚÔ{ –à6 Ö0Ò•†ï.G¡t–9,H€šíÁMtûþïåÙƒ!A@ÄGŸã°“þD…Oî“+Ä0_ÓùàþÑwß„2ÊŸ+›€ãôßÄþC×8·Aí,8Ú`ºÎå,ZP¢º7Yݧ-"ë- cy6áÕ¥Y¹a¬)})ájøn‘4wü~µZ6^né©¥"߯U+rò–zþ®·€¡Žì¿­Ù+k×m8ò6@ ìkÔï¼·Iº’ÖÃ-ºIcp°=¬»\|ÙQ×u{쀺[Úà9ä^/±:Dz/Ž‘ÿNŽdrÿ(ú= ÁÂw35˜§±,ÔNyŠ0êŽß2½+Š_¨íÅ#ÂúØK}ÏÀû-°üRjœ h™hàýØÈ *óÄYw­¦Á„H{;06ã”øÌj9Þ ·"¿&-ÿ`6EX±Î8æÞ@1™@Ih(^1 uÛáÓ¿X6q¤#çÅ!ÅÑWU-ü²9´@£¾ÿ{”ê“2åðÅÅ•HaE³ÙìÙЫ¼CPÉÁé´ÿPÇ”è[ÒþŸò‰+pé­õ*ùM.¥g¤rT¸idr›ž×Œ¦çùL.<Áf9à@&š>³¡(f<ÛªTxÇeÆ¢šìWë(‚²ù“>3 S<•T€šÁí®‡gB¸[å {)?¯Ö§Ë%%ŠDâ©L‡¯×q)Ÿh©ò`ʯ¯teÿgв oãºt¤.sΦ‚Z•½¨ ÒÓ=D˜0Ïù'õ73äØÞ›°·hQ’‹¹^1cÙ¯Síê³’Å¢µ9Â%?Fû¬›<תŸ;Ñ~˜‡o/œ;g^P‚šêŸ© tŸfD+Ý^# ó$p ¥ ’å¾lžöK‰ÓvΛ~:È!G`ÃÙrÎØ¼1…»[ª9øó-`ÐCªˆ¤Dªf€–£¿„þÁ sÿ8’¼ÑĪä~#”˜w3Ìv £ë°fB{tqäÛÝÓIy‘ýøä†óà{¢€ªº±ë 1ø]X|ñ›ïåY”—ê",=)@è×\[D«X³à•Æ՛_°R ubìqëÏþ»r´0á:D‹.ƒ æÄShZ®^”û´¯ó;øDÊ sB GÜKæù/â¤GwèüŸœ§‘—*˜í¸vfÍЗ*Ø#©x„í•H 5.0·Z€BéÒ¥–ŠCRœ¸Ê)䱸ïñáDuÎ#L‘æ¦áçX8“oz•}çAzy…sMóô³¢ÚÀã-;ý~ዯâÆßÑš;ÌnÖ¶'2‚,öJWަ¿™nq·.¼v7SFÑRu„)$öâlP…*ðÊÈ'º%ˆZlsiœ'wŽxœ ¥Î禂å%L~Br¾5Œg Öu·ƒ8ëÝËùiÚôòWÆDLšnqÊ‹l[êŒöQ˜lÙ·¼†c_ŠyËúyä°±E$¸ÐT89}‚DHA¹ñ‡3åÚ®¥ìZr˜€Ð¨SÊÆêv§XôÕ{öXaÈl°wðoÄqñêä+§”¹¦[?]GÛ¡®L½ç…¢X>ä‹´÷ÿ;»µ E ÖBÜ?ã²Q ùY”üp=Š:c$k|¡Œ{Àoùº¦É,î‡?BÓƒÅÞ0½£-:€f³°g#gRZ $òÛ„m5» <áÉ.öá{Ìzø–€“ç0_Ž«ñ1A¹ðÊ×l$r²“ •v1Ü) ør ¬›`àŽ+]jcby¤ ±"ÛýA!PñÔCK3_û˜Xº«¾§ˆ6¨³÷ÜXDt^UÞx×òµ=´ V|‡Šß9г¯4¾ÖÞÇc{Ÿ{¿„ëgb”c¹+²ò“ ÚÔÝ]ÂlU …-ž("Ÿ6ÈÒÈç•k"R+wñ­2f0ùÕ$Üô“zÛCÊšw? ¬Ú$мà®ò¦ñ¦¬?jF“µï’ 02-¯iIŠˆ×2îùy?*-!’äæuÄMœ¢-þo*Éè¡O­—†•cÏøRWŒôí6-ßvõ$€Qaµë Â„ðu)ÉœºùQ¬hã(h>ø¬™b»êâ]V£¹=õÛìo®V7›¾ˆ“ùóUÁm™ºÖyïLKqkqã>ÇÅ?ºF&/ÿ ŻN£ðÛ!{†Ž+ÇúÑHý#­GËGHG*jžè©Æ^»gŒÕú–TW ÿh‰Â•N¶+HrÕˆ~Æœnó΀î)N1†‰',Z*޲Рù 4°p~lúçK’Ö"eb@Œc>@òŸtGÖX±àNŽl5®‰I¡@©CÉEÇawîß9ÆôkC©ë¥z\ýGóÚ9›Ÿ ÃõŒr÷œ_Ôbµðî}iÜànÎOZ 6e6^@sæ*ï—Í[ƒ„”?Ù…>Ïéx›q º+Üÿ{^9xj.\J°îu0¶7±ÌØ^ÚÈž¼J·)¥i3æ¯){GèîÛÒ€×çØlÂ:¢XSÈ|Œ< ž jU° ¾$ìÀÍTm0´RÙڛƟMçмŽëø«6ÞŠÉÆ5ˆòýº¹}NÛöÔß·d?n³_VÕßU¹ûv«¾Ý²ŸWE:ú´ªú·‡øoú¶Júµ‡öëßÛ­?¶ìÿ7Y?nêßU½'no«P¯«w¿Û¡Õ³½õhåõo_íÖÛ¡¿¶ð¾­~âýº¡ûjûoá·¶Ù¾­³ŸUµ}»»ßn€O«jõõW×Õ»_ÃXo·B/ª÷ýºìɯûž÷×EÜbÿGIóyT+Þ’ Èn.£m ýgA²k-«ú$!$€}Éns¼êÐÒ#¸˜ëî™™ZÄä`İ͌åo(hñ×z,µD#t2%¡é½.»¡Š$o¹à,q:ë×’ c«›¢ûÊH¬5•4FÊ«¾Äémë“o_e+q}B9Œ»_¿åiír»èGЉpí¡QVè9Piå-Ö ðÛ9æA¼p§žy—[îLÆóY™lr‹½A‹X×8¡)Ð`D­½†¥µ# mª›’ÇÎ?t Ö <¥D+‘^W]ýâ=uDŒ=­Û‰l³K®÷[½ƒ3×ëéS¤ÅpSÍ ›AžuRW[Cå Ð^tøœœèl_  vè^©·L˃ɺƬÎ-·u]ˆ<“ʘ’ÎæÛ[÷ÙN134l\´ lI¬m`/e£ù-á±YR@úeãÐB¼ÝÞ‘1 c|¾˜Îø"FˆCÔÆhÉú«ðJ®Å¨Vf˜  [£V¦fmî¢ÑÖPlÛ|ÝÔb¬LátÇ’Þ1 É»@%HRzìW/´PNŠT;aß¿ä-’Ί}××.e,î¥ñtÍÓØO ,¡›ÃÊÛ²VÏ4×f-¶ƒ¾­T'u=wßxôÃÃÅâd²áÇgþ÷|­dŸÛ'ÅÁD¼ca„ˆÊmØ .or§î»™_Á¥ tãÈ QGåáv'×?5ý×m›în3¸êÄRgv0Ú5›u÷[$ãúAû¯Å­"ÅÞ-YX)=™l4E¢j$ÜIʤ¯=¸SÜ@\urgG”±œ¡m’&hÈÑSÉ%δ.)0~ñ¨ -õoV=›ÝäŸÄ¨%ÍýƒPÕ b.háK{%åöCuzGšbk^ p|‘x;[y‡—¼æ”ÐàD£Å=ösŸÒì¶Œ8XßPø’ØôÆ´ýÃ_zÛ¶ìÚ9òSãs#3C¢§#ÀÊÚø2Döçmd¿2Ñ[Õ2Aßé$I®œ² 0á±1–•?Ø]Ú¿0û”×2E©–èß…85.Äé³âE¤GÈ2ãÃØÙpPEªeo2²°$%­ Œ“ òɽ¬¸Žâ‰Û5Ùô Ù1¶OÄ›AzÓØJÙGþ™b6¼Ò^5ˆk¢°¤¹]*äÁæ¿!þÛFþ$Æígœ¸NÁ’A†EåeO¼¤úÝ"„¦Ù~l–6öMº’–žúó×øœ™Ð›>X’Aº”¹zÜCÈ£ñMeEì¡xà‘Q·4ÊÂÅ*¸Ån|ѪE0g»=Oy*å¿•3,§³zQo )i%Æ4{kJ@K"1øšR•3¹Í!Ã)]<þ±¹µÚxÜÚãšqhñio­¨ÃÄñœˆòæIb¤ëAÊÕ~õ3ŠþµEôÓ{í· ]ò`”’3Ò—ª€JNñ-LàÊÜùþ“œÈ¥fh[ê¤~µÆ«Ý‚€ë3ĺ}: Yh"ÑØr¿4–|Bw1­†æ$õoñ­Øÿp®žŠÜB<<­6+Ù «öW!x€kT@óÛ-ÐrŠ0ï(ܹV)Î\V&úi°ä~@†-DQrAÇW«Vh|N·“ËWH†>–’Ï~£÷ë:œJð/'OZä$ÿ}€FÃÀ5¼J„^0ªúáïzÍdõ¹§å¦¨^Ų3s㊢pî‚]xª¥mXr—êÏÊ|â¶£ã阜Öh®áÞÒÒÙºÊÛ€@þ‚¼ÉŸ¦¿‡:b€ Ò7p¿äbó®p ÍZ_Gõ‡Öæ÷õ7knïB'²¯¸,*A©¬¤’‚J?×*±j~Ê;…Bè£ß\6é¯.A´,îµûÈ[Ý­MʣꂱGjŠ´¾½€Ú2ôqŒ–=áÅÒÄÀm$ÞV~)ôÜsøïRZRYl÷ÙY[!¨?æQ¥šêè4?‰,Ñí«ùˆö¯ç×Fýe5 j uËA·vœÇÔtŸ/r¡Yýò@I–ì@UÔBÃZ¢-t}‹%?Tr s£LÕ Y‚Zë”Óç!Ž/yZ62UO.;¢ïPêÁhþI#U]Ê7'Ƕôl”_ª_n{ÅÎ*`Nä@´y±ŠñúÄLZé~*?”žv£‚-v·ìÌÈߺẹ̇ššJáoc:šúL[ž=7É­»tú ©é¸F\úáÇ+e°óŸÀO¸ëI$ÉÑ{¹M¯çØÔI-c6FØ ÅgóæCÎã¹ØâÜFеT‘Œýãžak-¶›BSVFŠ^î|8/ÙÙ÷èòµƒºî¡–9Êú­€©/cóV·jöÊuc™_<‘¸Úí c¯Wó9°q×»k4ÿT’?8îŠúKü¢†~±³™ R‰ß˜aŸÂ™€¹„W‚öaa În?-w&@L.m ä€åwûSò†Œ“Fµ¯ˆ]휰ÍfõL÷-¿­jCâªr \Õzº‡³J_£Ý—b¢B˜¤I’I=1ǧ8·'×¥o"ý¯DÅe‡)KNcªTô›‡5€kž–F1nùVvµEPCï£v†Åݰƒ‚#“’Án“±lö‘Àg¬›ßöá>ˆA1â þºÔƾ÷ó›)Ñ@‘/­L;«¾fØæé°à%§¶¸ 5Ç™ý'x]èœ<×Üt3)Ó}Õø‡gPóŠL–±Î7ç×a Ùÿ(8T–ö˜”ós ßÔú›YŒˆJGÜ*÷Ÿ' CÖNÛ†îŒE!ëi‹ŠU:_—e ÏÃgâéiª’a{3[hþæw6÷ÅWâ2–EzL›*^³Bb©°þ6×KÒg}Í“¤R`Hj§²Gþvûfg} B¨‰Ûûl¤J©•äÂëy¿žóà€røë#òúf­ ¥Í÷c…ßäð†ÊJOa)>½£#~0ð?¹˜fõ^ÎI›6Në>í ñì³è9÷ð‹îUiZ¯‹ðå¼.W«nH¿‹J%†ðÓûžV•vö äW®x¦ñ³GœÚþQ¬äÓ‰œq3ÛÒ*†Ñ'![AÛË^m"Žª#h:HŠ=ü­q)¢Ê‡›¼.Ë/Ü´ÿh¯”vƲñ8Þ-éZoú‹E³ÞÀ$΀‘ÄÆKRí}Üãë–êø$œý¢¥Åxï ˆNÙ<àah¥X/ãŒÖÁ‰rXàÝHh:7“ä½%H#ެa2ŠbCŠÍç?‹üY_2ÀY‘K†l8ŒÞPnÞïúÔ›Án»Ö¶×(÷†ÝùZfÔ¤ç×V»vÜ<ˆx\ù¹Ð4™˜Dysƒ0è…ñH$fùùê8‡ôNÛÎò͇n£ùØïæ €€,; Zf’âò¹õÅSÒl´üF/(À&憠‘‡’K²Þ0“yº=iò„Îoˆe¿›mIÒZTÀíyÞØØ ’?ŽD"V`¦òaÃOu~öÍîú›Nló•è\(^þþíZqv{²ˆ’JSà÷&‚p?Ü.þóám§ÖÀt9­¼Vçÿ ‘,ð½Qó) Ýº (‰Â!%Ÿa>þºú¥dªZ7–™þÆ|†)E3£¨xý,$Ƶ’“€Œ~(€¯LÙB5§Ö0å{·%8LûZ*ëQ©¶ @0…åbãÍ…œÐê̇¡DÆš3iŒ¿Ãh0€Ì>„E´k$ iÅiwO—¤fA“L³¬ì7`P·±I0øj7O_Ÿ FÏÊ×keˆ%]7wÿMm:—Eþ¬ZÊŠ1…}vu™ÜGY»\²»N/ñ†ßAÄaJ÷•á.q›¤n†í޳.[6âFhç Ò±ì´Æ¶ö m–4\„m¤øÉ|1þY—ˆC$'LòZqŠ@D [MóÂGÔ%qRà÷FÁ>@Á?ûܦ1ŒÒ'ý­.Ž46ðŽ7s\©Ò]"YeµD¹ŒG£"1äì—Ý»XCÔ?.æ²FŸÞø:˰t/ÕìyöuPâÝŸ¿È‘,Ã' +?“Jö»,D>éXdžXGAè·l4 !»26>ö®ç·ÚÜŽÌVŒËŠuû«ÿXânfvI†±¤‘¡L‚HÊ\«,[zCVµÈÑ+ÜÖx„=Ô¾Ì;¦úÍbÚºò€‚±a•f sñá\ˆGã+& X5ÚJÓsl^¨?-¾²üvPÊN¢ÇhÄ N t@Ū—àTJ)øàp¦õåÆÀXM `¿Sàˆ„ù“[¢¦¼ÂÃt¾p#x oþ;ßž&ã±v¸$ùÙ׿kSCt ˜Cì8|¦œµr<ňs¿>ªFpÄöýBëÍ‹ȸ(qƒ¢d™ñ¦¸G9}Šý{A›<½O¸  R¨F¾·…ú¼ÉâÑó«?hxæš÷À¸[ú5Â]¾ÀjùãÉ·üý uŒPoøVMOæiìî#dn¸Ž×›ÍY]®^#l{£ºE¹=ÓÃ÷Ž}[ $ꂤé_„(ü'ÔñÔ»(ßN`‰ôˆ®KOWõÞ¦v¸jà#²‡{‡®JªµíÖèA\,ì/Šáü"Âò‹ÿ vcƒ«Æʉ!Ÿ¡pØir™ð.B㇓½gmþø?Ð×b¼ãÖ=‘ƃ)r™)àK®š(ñÒ;ñ®ØÊ†?’ßÿ”‘¾ìÜè§×—¬Míïè>£j"`Ëcén E¤¤Àóˆ#áÙ½öü¢ŽU+¦„Á<†Pý:ËÁ¤qT‡ M6Wì”us§íÇ2®e{uT¢þÊù4—3xÕmw€Åæ—û©#vus‡)e~)±w¡ 4sãf4eÌV‚’ût7”´m†ÝùYf)w¡‰‡r‡üâçzÆíÛH¤÷ôF+ý$êò•v}+Os&Ü“.Å5½±g^^¶äøøL< À=,S¥K8ÖXGÐW­NIÕ·±9à&")!‡µVÖ“hÆÓ7=©ò¢k¼U½ :qœëò=ˆ¦Ûì¾Íx •64·Ÿz£Œm(ÅÑÕózÆËByãSè*>Bqnio§·í8­«çJâß»Ph€ÍÙto=m V½’O+°$Së8ͬ‹œÛ’³gÄüJJ¹ËdsM,r3½lAíÎTW0(GÉôD‰Tý“uöÑ] wQ8Y»Jà­ë „Î×ÜGô6r¬Ê_"ÑxR—h„Œãvä‰oRs1ž¡ˆ!oaðzÇŽ9øW¥2Ñ¥†d»gøh«L'K^VϪœC¸ÂÊ,ž2 òùÅÒ\S¨Im‘Éü)ºi¥iwhÉœbRМ‰ÛËk?ÿt¢µ“Þ·è­š`kJ`OYðöQ \8µúÁo#Z9UÇ¡>ºÁ¿aÍ×™Îml%+­m^ÆWç[Ã6ã±þí œ<€+pP Zyên)[lèdÁg(‘IO,G‘Ù!ÒÔ¦?¾ÞPü1 F{< /ðÍ br` öÁ£!ù, 2/¡Ê«bw¹m6.Ó¸AŒ£§B5B0Ù€‹Õå }ãxrâª-ºÞÀ@/¤²0?\_$¤ž’X•\ü’òZ“h‚ÑúÍÚwR“ÈeŽ‘ ";À\p!¶Fv¬Ø©aÂ4<Ÿ~ã™Ê=*.t⓯„–¥n eš©Ép}nkµ€p}ÓIè·~¬[ÕX}ä¾D&}c1M[ñc/EÄžýR(x}‰Í8RÜJI,ÆæõatžÉžw‚Ëž{Á¢~•ûø;KÓ_ÉÖDå6·Â¢õrIr:™#µ&Ðu”µŸƒ?±æT÷\Ì·IÉÕóÒaÊ\ßõRƒñÌáÙD°óHR¡1v~η/¼äX¢sµaß¶Eº’CNÒ ûŸ1t âBÿ¸Uÿ8ÃǹX‰Ó gÁi;=ù¡ÍH.«ÝÉ.}|\j„À¶¿¸Íâ78E§ …+Äd¯c`¢®ý?©²æ—Ii|?lØ®˜¹Þ˜Ò )¬#ŠD^© ñ‹ÚMôÁ–aËŒUþòÒPV ¬ôjBŽ` Î¥±ö}ÞBVæô þ£D‡=nðwä˜T5,º«X’ZÁŒãÚ€.nÝX(.ð:„|0ånž_pî¦h’€ïŽqòJvÞy0*ƒdºŠ?š³°àhòáï×=å í-fÉ™,ç³;ôi*Tpà?wÙÌùÜܘ“Þ4Ù$G‰&ahGÓ-|ù3ggòæú‰-³ŸPLbú&E*Ö ×6Rÿ$;W‡Ka' ¬m| §ÿ Ý\Áç¼.Ñì›6wþ]G3´|œúÁ¬u–z,*_G!ç÷öꎄŽå£ÉK“ %œ&ªlØ„RV¯ÄJSBèà+P§tÓñVBjëÇ1UŠ:x$mEY§ »œÀ‹Æ~ÛeYhž1xlM‚óF’¡Ô,ó—YoÊmÎe— çhê½xl-V~v¶ªvåo”¢q.èTKûfqAÊ÷ ãê_/ÁKÜlË òôw =í¼0 ݵ¾Ò‘2úº(ÿSð0 ÍHoÍk¼…íò{j\ÃίtÊ-ÉGàTlJÌHùK®ËY‡/ƒGç ÞÓ…7žV¼¤MÂ’Ó@§èÎ<ù»z¹Ê)ªRë±ñNr©7d&ãfHQÅÜÀM·\ã÷©|o¨Ež5Ânßoñ#!é”-’}ΘÃ߀¬6àË:¹ìî2§VŒt¦¬»â)n}ñÍLlF¼]žò#ÚÊ©³Ê ®~ Í̆Ÿ—ŒŽ €3Å!œmŒë¶·ä•\ZÅzÄ ¿‹–`\où¡Pûf*>æ–úÛ‰Ê;ŠîE9>ò‹B5£ÛÑî?çþ)ŒT;ÍB¾S¾{M€Ycçqr3Â6B/Yªb5kÈ'\6±7ùe—9ãYu™½Ø×ýL‚ç–¡_ij”ëà6xnoõ‰M{بÕÐùé*^½£¹þбQ¡E£wˆ]!x½T2ç>¶‘ rŠ×5QUµþ¤‘€‚u§‰Ù½)í#æ¾aXÄO¾…¡ âÖ3|;³_lµZkðëÙPqhʾéicNÑû#±ð2Ãàò¤Ã™l'¯Òg¹ý×åÒV$ktND‹Ò”9þT—ñŒyãÌXR½ @‹Ò2ŒBœu=Ï0g R ü<ÿ8ûp“ Ø=ú5™¸!&—=·Rgñ"íý0J=lS}œ4çL,ˆk©åÛÁ{CÝ1w㲇¼…[&¦†Ã݈^9?õu{ŸI0Ï“<óNEÓÉéY=˜J¶ÃOÍÈ@ûyôMgʸ\Ë‘'žÀ €Wܯx*ÖºiZ-;‚ wT’‹˜ ¾G‘FAqDzvàÇLšnÞz·à´-ý™ oÌ-ÿëNœÞÆ)š€{V˜åˆùÿ|³CT}qá„GlÄá>¶èf±ü2þb Üߕ΄˜ í†/o cذ5—Šãá€pâ`AÛë˜+q$R–Û ÑÈ^‰ýŠÐ"VæRã<A³8£íˆ-¦›­F+Ôÿ[¨e'@‡€³öóZ†#ÔÚÂÁy‚/0W§ …—Ø|ÂeGýôº&¹ñ›a!ÉkL sõoÝDT(àñ*§¦zâ,\LdFAQp)ÿ4œbx6sš&F˵ ½„øN,4íÁ€æÁê¼±€aP{ic`ž â9¿ ‘öLX*.ÃTdn!êT‰;zÎý™ð2—Ë|ÜîvV[IM)K,[~ñìE>ÖVÎ 7ØnGÐ𬫠¥òhêíöc”Ù\M&ÝÇ•Áã&ѳp!.nvÐÜ­KzÑ`(ÅüK¢ì|è~ìö ý|š–ô{| YFÅ–( ¼ä{ûž­­/¬ËßHÍO|ñl#âŒç3ˆX)ÖJíõúÁq—L+a… ëƒ>Ì6nê– R¥`£e¾(m§ËÖÐ#GhHMsoÚûÄÀe“´wÌÇ—/6ò1XYÀÜœùÿ‘á ‘Eãå(ºé¬S&GXq4>"§«†UðÃe=„2Ö#OÖiƒS²!-ן°Eɱ„bìáÏvHô c‚î’õNÖjþM@BYÚÕl qJ yEÕÚð™¤%R¹ñ)Ö?ì ÏfoLðc8(n+Xµîþ‹µàxšéçE˜ ó´ö–½Œ|j^‚|¤ðW1H8⹦¶£îã”ï8Ø0ÖâáË ÓlÉÇAO¤ÒA ã¤ñjã”ý‡n©¥Ør5R«/è!KXöȹ´ƒ=M»÷‰cƒx„4àÌéßB¡þ§Ÿ*”¼Zƒ'äuæÅê·L-ÁCõÁBAÅjÕ·D ãMØÌ Öy’4ÝÑç*ðaz TD -O½îõж…ÙŠ` à4%ùüM¶û{”±«ìp€mz'òÌþÐê{‹5%è²u¯‰!¦rc†fSã@wn Š’”œ­#®§@j÷í~A8ÛfŠz wY†o.-ô§‘ iÑ:û!Û=sã^>AºYb1!®Ý7jrÈ’BÎ`²fð“}Dñ$Bh"³n.‚Ê Èû‘«VF̧¾Þ¦^ òÉoI*ÕÊ.')^‰öf>V‡ë†SÑ2SJiò _Iå |´™vk3eV/íoõYû0>eòC+ˆµ™™3 5ü•Sý®(ã˜b­wáRΩª²<çÌ\°wrÜDt×-‰Ö6ñ½Ô;2LÅeUrIܓÄWÆønâÖ²¡¿îðS¯wŒÌ.W65ϘßÓµ uÙí:ŦþÌl‡T¿j†" <3 â°f%L ëÐóËm@4‹ìj¦aÔ´É÷9—ܯDBÕ ³>9ûá/ŽšëÂvÅæ‡™F¶O"Œ¹'ah’«å%MX…À …|´Ç{g0|:ætž03.oNÕÐ S¦ÖݼӕǸ¨:pº÷(ÎÈ®u· K³~¾¸ÊÀáäî¦öê˜Þ.@$ä÷áºlKþ pFq ‚ÈuD’šKÒ¸Òð‡«½.Fé{_üÖˆ²”§ßÛѾiçÄÖÞ+E¢äxvÛÙJ}\‘lVÞ9+šº"¡,ƒtw††#ÒÝ æWËÌzä!Žã¼³ÈšÖ’¤“Ž dÚ]gš@âxßߌÖÜ 2khÀÇ*«1ÆBÉ(‚Øø“ícЏ'78ýAOäñiØüŒ”êR«¹”ï2æ3·åXÉI¶pç§_/³ºój¡«9Ní|8 lͦ;@½¶y^V,ÛÐzŸ˜¢ì¬Î$˜°y¤a´(“ÆX!,Ec«lL>œ0’1ŠÑø8"†$ ¦ñI)ˆm-.U‘.E_·È¸UFg±Ú>d¬wyÝén^ 6]øœŸiB97ЉP J¶«¸"wJðYð³ÅÇ/ÅÜü¼\¬ÒÊ·/F-DËh2†ºùnÏȶ7ˆ2ÐÄ€èºïÐL°¸ÅÄ×Cp4 guš¸t±øúåõŸbÅH>\k iCÞ]jÏl Ï„v>4†‰áäÚ.Oµp!IÊù>ãlªŽ@Õë.ê‘‘”)/¸f`I÷êNP}Œv"€îUÌfæp ß—óGzõrAQ™®¸R5s…ªóì#$ Éy²…ršWk˜˜£úøv›Q·àà>|¥›Ë •¶„9vï?]òŸöQhêˆ~¬Ôrcád#Èy}ë-‡à(Í‘N¦[33¬Œ‚,jÈ r­ù î^f,ŽÖbug€´WƒZ‰Í¯š$ Ÿøæ ƒ“^òF½\bÌ…m±À…êκw ÞfpóŒ²ì%‚˜Bdýž„¾Ïù‡HÒ·Dôÿ-¤¶Äéù$ƼÅùÕÊöÞx|œæ'„ïÓp϶ · ·©¹ÇQ#yî±õ¹¥b†PûXs˜ ¿~,Ùü¬§$Ε”²­¿3EJ++Þœ¡Q?óy>u泈ÊÝÏ>ÌÙºyÿ…|”ù¤>;íYÔÔ)]ù¨ÑêÎP¸sß"ÄØ@RG*~×”‘3%å~5µf`ï5•“DÜïC».–¸uàFôH†ü(óí¹¦¡1Š}*—büb»‘{PQj7‹ë‘U)thbëJƒA²ÙÿUà9Úc[¸ö–#ªŒÀ— ¦ÔMEóN˜…"]è‡5‰{Ù‚¾¹^œ$Ñ@i'Þ£§¾4MÿWqû^jµãøo¯1wg'EÀÿWæï58'ËÇô]'E<>RY©áEb¹Í'´ÿ'Ks˜"¹·2úÎ^Ÿ•œŒUñ¨ÛPºÿ%¿©l`i'(›Fˆl€#ë˨ö•«’Y8P¥ýrCQ ù,´ÊSGˆ»‹>ˆÐÀ½»õ«"®Îý §=ƒžX«˜@:f1•ü† 3 <e¹"÷2ï­*4>FUc^Ê.MýV÷ ôúë"· ŒLò,ªX%Pqfµ}äb¿sraiZa:üþ¸Á* ð]JFã¦j‹¼£­t×zl섇='˜õñ·Á”Îtëâ±xîçÕˆ5i„5^ÎRBäÜdB§òÓ>ê0EÐ…g6Þ‚» J»Áíï?7TGý$ºaÂÚ Á ³%ÙºUÛq›7ëÄühæå3§*¶ oyÏYÔqì¯"’ð¼¹1N(TeÇ«!RÑO¯t!“˜7ÅìÕg,ºmöRYÝä˃ø â‡E3YøkT§ŸsÔ4ÍÞäê˜ÿ%rhiö)Ì Z­øƒ0‚U>‘w<©é‰…è^£æð'RW4tÍ[µà`R€Ô gûÍVóØÕ“€­p!šqúQµP§JY/L$ x£8’ô;múøƒ€ùë%ˆ>Ì î€¸Ö°§3?ásê™K_K.iöÖ9_˜)°C]‹¦µøTôùÅÂÏŽSmr÷;1øÖf†Çu+ý%×7CJkŠY¿«ô>â=V 5ê!p^Ê:$1<ÔŒ´#[ ÊHœ»ØùxÏQôo<ï:pÉžµáŠ—ód3Iðá‚ e‡œ+ÔSÇÿП‡?I>5•%~‚8Ð&rIíóüøP½9¼¢'ðVîÞGŒ.ª &cCz'—P@Pîç°è8JŒùC²š!„¥!ûRšÊjÀÚz!?ûÓ‹ImS® 5ÓDqq…)½6˜­‚ýsCQ·èx¸v10Â÷²ïËBµF#N±Òfߘ˽DûIä4¦Êèd±|À,à¸J@Vþ'pÍœ "QЬ“„ƒ7:ßlÊÖ%×øVÉ õ BÛ‚Rˆ!x /H”Oï\¸øæÀfÅÁýàS3ðÖ+wI‚Éõi³ØÌoÊÂASÚ90î4ÒÍQ»Ó´겸zT£Ú_”.þƒ—æ o&oQ²ð7ëL«‡òÃ^ß”ÈT e§ÉBØH—ø`ºžÕrï­$øÎýz¨4”üJHsX~ÓÈJ ƒ_Û½;Ýp¶†<–  wäèY>‚/ÈSê]·9@Ü#[1–X*·ÊƺT[µçeÓh½«_¼0ì¯IÙ—ÕV,ÄÞ*uX)ò™Ï‘ÈX'aa¥÷»—Dœ&ù.¯þö#n%1.§–¿ÀB<‘X$–,ô˜d|ñØ‚.¶guËZO…AÆY© ¤‡ðÙØ­!YÌhú›€{ýÒYR´§ôÖÓ2°~D¸Zñßw¨l(Õ)±%pj8T\ËËÞO{•’jX@L ^:jXÔ4œ²Ü¿À*Ø~Á…¼È„Öþ—:Î0¿ðw&¤?Â/7"ubA+ÈæŒ0—ôTNé;†7ë4­6jø¬™%k5^xªÜÕÑ%Sð‚*c¾Cb‹§òS·ø¿k«rp­[Á%ak ¨¿¡nÞÌ¡™C!†@DÉ“׃>E˜·­:•Œ“¨Q•=M²¦z…ê@á•ÄPDþͯ ί·òÃs„YÙ€·  ÇÁ*¯Ëª~¯E¨F£Ðc™Œ+:29ÚŒPµ¢‘úp扌mþÓkßÿvß謤Œ\£UÁ¹y€&åj¦Ó:ÑvøfvgI8× ²G”ëa!¥ˆÈ„Úð2"E…³²Ý6Ãy$¬´ÃRA8èí|ýÁ dÖi¼Sü¾4Vó!`¯™b %Ÿ)V/=Nš2ÙŠ®SÄ‘A¯Ý·×›é•zÈ×5qµ)lí¦¯¡±µ<šhEðYÛ‘ SFuµ¬ ”(2ÖŒÂQjì±…÷Á†giÉÌDÆaŸÝ6ÃÍ{e%!pÑ1îqÐŽ1ðT´ Ü3ßE¾eœÐÓjDz8ð<½¿ÛY„†Œ³)qÊyQà.$ïð3MÑt$±(CS5ÐwA3Å&“²h¦¸¸<Ë Ii`ßéß)HÚ¥vY⃭ ¡U˜ÜšSšè²uAùÇ.ç©snwûìç$ú$4‘Lj„ЊFåÐD+pJP:©7Êš¿áÂguÌ ÁÌlFrß¶ÊbúrçE—Ž˜²SëÝUf.øjÜ!‰ßàp†7Š£«-ox%yÕîØÒð ÖCbd_º,ÛH##§Ôâš‘z1  0“r.í{Ã׎4ÞfM0\ —ó_1j%øáôËO|AGQ²+@t—ËcÄ(Ù óFD©í-m@5¸-êcóï̈MCj“³Q¶ÓOé·“Õ~7±~3oƒâ€¾¦R-7c,æ2ä(òœb•‘¡Ö¨È·n~¨îü<šõž¹gáœtµ‚Lˆ¡Äx*±-ÚH­SAUtµ®› fÚ+ßé•Hpc‚|ÛñÏ•¼>S–ˆ”j'ãœá3(ô[BÛ’~qKX+8»7±aiO‚À™pÃÌ52áø±ú R娂–w´YÌ= ÇZm£à±ÄÙ Ukí†ÓK…¹EŽ-°¬ÛS£©w¨Ïë¼cä¡ÇOoéwb'Â¥µˆ\þe -¼•„ý“xÍÁû4 T\kš¸ùÔ”1 žÂ;®' ‘^eÃÕ¢Jïr¬b|«Ê®Àт߭Ö4êúµå³M8ô*úIÏ9Ò meà¶›ì CmÌŒùž$ýèqü]pxü›!&aEcï°Øt9Ñ~ß1½3’|2øª@4þ™ÓñùðÓ«7ZÜin‘™tÎÄç"”:îWzçAŽ­3U騺NÁ<¼7ˆëlˆ"ÅÜó3'P±‹Šl1/÷í; i øÃÉ- îŒ }V…c•¦sÚhîäoü#_éZ E(x =’@Xì¯g^ŽxBôü¥ò†»Ïz¼tÚº&8ÎtÇPL©“<äÑrK¨ç·ð¬úŠÏ´®kŒîeIà’?–tkóÖ¬êÄôÛ5ÆxíÖÞ³éêƒi‹¾€÷1Xô¦ÏÚ²ÌX¬Ã_®«ݘñšºó³ÚÁ’¾q¯‚¸ÿ!¶Û ;|¥Ÿ\kÓ‹ùCÀ¢\´J–Wî^Z€ÂóŸz—MçÙìàbeÑ p=d¶v®oRmk‡+GM°½y[Ã/òÇsšb·g·$È©¬`×6u)˜5¥ð~Êÿ ¾Ó˜ËÿSF˦}N¢pÒc½°;ܘ> ^£Ãz~ú±}Ôk`À/àÜÏfÁØ|Ÿfs Eìf+õþy^P¢õ uϲ6z O®ÈŸ`©=b€TÿIœBrahIÃew;™×¢Ž*^åÅÏ'‹ÒlPÅ@E=M_(4""ÿ!ÈŒ<ÄñÉmµÕ\ Ü‹n Ž}a!=Ö½GØÓ3fæ¤æ'%4©ª›,ä°2íBnÜ-÷|û$Õá|Y†ø)û˜}!ÉÌSI¨¦0qÏ,¹±NüP¿:[ÚÙ›e}GO¡SĽ‡mƒ Ju ýmæ wª¾â÷ÂrÝm0 w:Þ#Ò[&Ú/¹ì+Ž }ªD¨n›ØÄ †ˆ–1S»ÞÝK ¦iÙÚØlyœñ˜ Ò‘ÜÖ/J¦®H6¨˜P‘Ô"Û°¦ Kέ–ŽVîõVæï®µX`w±úµãùÍAuš×ów=}N禞›¬= Ý+²D;‘8CŠT¨Ïƒ›Ò5û€TøÍYaáöŽ 3 Uƒu­\Cö á’ J÷bç¯Ê?þ11–ÖÝ>è¦0h×¾ÓgízÊl& çü¡ÃÅÏG »8‚È㋬e!SA~î/ÏÕFw ¤Í‰°ZŸM´šqAÑÚLÒ¼µ9ê¢ä¯ÓgË×íuÛð^üwð w TȾ4—'Ê<€–dÒšŒæD<&ÅH PE…¦ŒµÛoîm²Â$C6õ4 üÿ«²)ô[(6’²á…Ù)‹‰/oa€âïºK„O2Ú2i¤ö.‡þ±ÌA9é"R±¦X¹Žz¸éáÁàn‰“&ÊžŠhm*Ñ,xê£4 2‚}&sZy`¾)Eÿï¹Ò| <#\–v­½¤ kUÒãôUãÍGK YÌX©±Z|@$œ†>¦KyÝd±36‚¼âÇw§î꣘íEö[<×ÕCAÊï‹ï$ ,GP_O)‹m0 ¼ D\…Uhlàc¾Ù]B8oû+è¬gû¿ŸLm\+Ô}P7Þzã,Å;ÃYY£ÅèNÈi¢õ¡û“0½ž£*ùEYàä+%ŠÚš_[¼QöKy“ÊtôÈeË¢Wafï¿i„S…bCChƒKœ‚ñLÑeÆ`Ìă¢ƒ-£¸RÊžâ®VãÉΔÇ]¬=BìVµQ“ˆ#„p8õMq -ŒxÑŠô^K=“!xÀÒ\baóy,¥qGIù€€v§<Ç;”Ý)BQ¡yµalÊŒ-]â!*°ÃÕ™tA‘|9ª€f¼ã¼é Ëâàyþxë‡êLƒÖJê:\^ªô ½kÌ¡“ø†9ä9TC{ìb먾&$:íÓULpË[›DÊúšEËpÐwË:o[Æzi!! @ÕÁöYˆ"ôÁ¾ÎKbêvâßxôJ’á^·`Û"\‡DBz µP>F+)‘Ñì#ÿü‰ê÷¿HLMÝ­èË‘}Ú2aw¦œ0wdŸÖkM äÁÁvg3§DGaÊtó®£ð{—>ȆUŸQK¸s¾IŒn8©èÆÖOoýè¡.G/ß'Ôf¢‚^„¸œäí]…Ôa>p¢q\»ƒÊ*÷©ž¹œæÎ¬%›?Fâj®Ò8n•-… BJ½·'-?J5Úíñ.¯’¹j-³šÍŸÎü.†kì¯q #B,5¿ï6"æ7;©PBÆ~«;Ý?š?ôVÚÛ†w :’»[Xëʧªq}€ÝÚ Ë4,>ýö&"íCSóžMÅl&òMDÀNñ<<:bQ;'8%x0H‡âÓ“\¡ÜÆiu;%‰àèÞéfB2ÞØ˜ñPÑ01’¨T×›mj•þÕg,þ­LRº¼„· NÍLqˤ`ì9åPÉ€_Rߘ{$ÔIB#Ü»hò º££U/£¼Ñs†óäÂ|á÷.…G”»ã ‚ ²’xQÚø]™×0  Ïuú•{®±¼|4_G¬h‹ýDÈß»#á Œt¼¾Øz”¦peÀXÖ;mq·, @2Â7Fñ[z££cêEàâ`y^g(*z–3g’ÏyUÙŒmÛ‰š§yh»f£Ûèê ¶PM.ŠMÿÕ Î¤–Þ‰<™ ¡µ<ô<š\x¨fè髆®WV¨þÅ&s/d?Ÿ(ðzƒ{•ŸLs™ÎÙý#³foýÛŠæ§d@•ôDâ×0ŠíœÞsÈIÂIÑQtn¼xô³ýÀVYïÚtþ ¥±-´þT§ä S¹å5²Y—®Ä?ß±ïç.pÁs7ÿuÃ5ösÈ“áýO2RÒŠ²)”Šr¯ Ù»ã>"ãAŒJŠĤõe“Ú, ¦Oõ…œÚ íV]üN%4P“P!îýˆ14Ðí»÷LR?-Ò§\&T¡Ç3Áâf«£øˆé#ˆ–’þta»ñ‡3åÚ®¥ìZr–}4ÕŸ}4‰v2ûþo|µÿW—øƒ«·ÝqqwÑ[•lòw2ž^NëÛ6ê„J»eI11âØ¿N3ß*²å Ô€+&à G/µHäuŠšdJ8‘Ò-L»€yÚÝ&‡º2xh>&ë,„¶’M±^§ú…/þ˜iy–àb‰¢‚¼}Õ¶@Q88£ïrªhÉZåƒO”Ã1¾ ´jZE““£2&&Ï ÑÙèLGóGV!ög:@nƒ†èî®&æPî`õx-¶]d±A-r>ò–ôyì~›€¥UݪͶr/SšVÖnHÿJ$vÃ"Þ-`*…ò•óÙ “úˆÍÙ»òø,õ·J6‘Áå(€â~ ƒF.Ë"CgFžqOªY<¢îC¼>a8ÿB“>ÉY¹*X€\öìÜGŒ¨·XÿX]Œ…›Zž°ypö™Ç;-½ê7U‰øUøRWŒ¡·DêìàV/¸@‰ü—’¶ Óóò}ûUÇÀþß5"‚î=8'·€…z€ÈK4I%v-u{ÝYYÛ^ˆ­ƒB@±»Àª)ã'íuĬìŒrùzT¥ÎhYt—ø²~Sà¤O*0eØ„g¤Ênâ±–®iOˆìЮºBl#x–Ç£<³ü@¡•òàÓ‡Ó´§AgžwåRtÌ%ù…‰˜Ù÷uiY&™IúÁ †Pr¦RÐû››—o >]1º*Ò-À ô2Á¶ÕU"A»—¦¶õ„D€µ‹s«rpØyšúâ¹Héa©=J3^ÉÔØ>™¿ß¹Hks7Éè!PÚti¤¦?ø‰0éd•O7ûå+<»&ZL˜­9\JÖŸ'/4Iy‚°X»$‚AŒ)t-ôM9 ”[¿t¹ÉEN±ð­Å U]ôùž#ðìJQ±°(Çþ)‰ fO’sàØeÓ9 \߃æßøÂå`Î|Ê'Ä`=}I›@ÆÐÿÓúþÂB+䟧î Ò§.I¼Êz§;}`DÏPKÝžåyôW[ÕX¢Ëù¹îoôœåüæ4]Ä$@µ¯­è»9Q}ø |õ"·!V¥DüWË«ôLHJÙþ76FPV¢yžçìIø£˜wìÅÎ?€#~¹sú2íŸóñôë8jC×Ú"×Ê^ºBîØ Ƀ`ùJ¼}m¶d2½õQðîú©0bñäS³ësÎõpužˆÒÁHA·°uô—{Æ}«öv¢vY#£Ã²©CûmᆰRIûýÏÙ¹ Äa5yÈøýú§{vÌÒ°b1è3·¬Í»y9˜J ¬JZÓn¯ „˜øþíŽr«RÙJÕpôMÁ¤–—ñýº»‡gáðô·íÕÿmÖ‰óõÖ>MmûuÃý»[>~âñòkŸÛ¯¿·n#äéL>G?nÆqýºÕût?ýºçûv¾\Cáõ²|ýŸ?byóí¹óõ“jÃáõ×öëí¾¿mÛûvk‡öêÌùôÿÃÜŸ·fçϰ'ÏÖØù5|ùûÏŸqÇÉÔîOGÉÖoÛ«SçÙóç×ÿ[¯ òަ©ê¨ ­Û Û¥A .«l!õá¨ß¼g2ŽãXc¯ÕõàÙ]ZaHúÉ2Ôº,Ýr7§È¡‘Ц”JÃù¤fŽÁþÓ‚;ÏU³¢†;ƒJW“GÂ?ÀàUãœvª†ÍÙxÛGµ' üL5Ï{WoOl.MFþB¦QpбüÑ\ÈëtýOÚsÿ3Í×i$¦è*€ó}{‡ ì9*2²×Ó訶ê{úl~VË~\·ûlOÄeÏ›móÇ™–YkÇH„ËÀNóïB¦iÜ}0RC¦…—êž=ž^¹µ¸mBu2è8ÿ7«‡R„v‡Á4c49Vw›„§Jè99JNš¸¹(ªc@ë`Û7SÉAƒüéã¥|•ï¤Ea¢í- ²³ÂÞ9…rù¥å…–ºÔ÷i7³­Â•'ÊK$`üþç½›úLõ ¡?BE28Ö“P󕟤J7ðbÁ©£¤8KL\$TL1»"„7@Eo”Zx@úÉÇÃl졘Ùó\àõ¼¸zr­ï9Q“3îHÓ®LäPàĤ°f-º«cv”÷³úÀ,ѩƒµuž@aC%Üóб_ÜÛáÙâ€^ÁkÐêï¯û¯rQ:OA½Ë3¤ß˜ÌVy%ßRô@Bâ}w)ÔÉgŽQ°M$Úr¤ 93™*ÚÄ_Ô£HU¬èáÜ{#˜A+[pÿV·,æ‘võ½;°yqªD-î(*ÁèsX7Ýþß“†R…;BéwÒTÖ¶z[1È›Òô¢Ì¿Z7h8,ôd g…#êÌjPbPúE=ZkœwÓ‡1ÕRmÎØ_Hka'É  ƒUJ¼3±÷þ…£%ÙjF¿x„sÏÔVüX3&kæ$Ðüü‚©ùÁ$;ðàkŸ0eÚyâ€4à‡Õ.U¦Ä¨`â0mõiÝ]ä)ÿZ{*E¾ŽÞìs**ð‘°Ù_"ö¿–êIêïÏñª-Û“KŸLöDűeDâ%#ö˜úµÃŠmPV¼áBŽ‚L˜5¢Î‹Ü!Ö¹†ÃüF•N!:+£‘©ß§³[ž§þZh7Çó¥yeh¶“k;:»ÙN~×DK¦^·dýÊÂÚÆéìvüØÞ›¸7/ê!ß~$’+ å!x¬¿ÆI×ðÿ[ÓYè·ËálAöªfr¦ª%J^êVL©”¾ëêýl'±†B²Ó5•ä9‚üˆmk7Sü—Ç$€ŸÅzAØ€àè"SŸóc»@TI`Ö‚Æ"à .ì³%‚kÖ/¿ªMq1¾b»;ˆ³õ„(и¿ã&Aúdœ®k§úQ’Íha#äx\*~[,Fk2uáÝ|J¤èïõ˜åÈÀs±Û4ñYlXü”bÆØý½fŠÑãu fJüsþÏÉ!‘åÆÚ}A_e.í Ä™æ^ŠåËÖgœÍˆ:h{nµÒOüªË"ˆ|Œ™lmŸÆÓñ5éG‡õ_뢸7Â3r§ÕÞz˜¢—HÇ£ç±äèS·Ę±ß X{ ý_JÏ8JÆSý²ì¹vÈLþÍžbV¾¯»T®B²ÆŽýšÉ÷g÷R²²Ãæyˆ6?ÀÇèŽÜš¯¢/®n›zõŸÚ>be‚߸õu=Ô0 ?®Lþ5‘ÐŒ®Ÿk BÏ'Ø3  Fì§\údÒ‹!…q³P®úÛ÷‡¹_å$¿Q{ŒŸÕ„¬Rµ—hrb•=´(©ü÷È\x4ƒvˆÀ0ù šl«ëk«1×éa‹XFÙŠÇ9§ëêQ%½[€„!±%ÈCueÞéÿï~v…€#)¹ˆXëmé‰dêΫõƒÖó·ö ÎsUÅ´çÜEÁìï[ó™ º¨æD÷gŽÔíE«N©ï’–rK4P#ªS½ïéùÎOJ'ã hèu”’?šRS·£.bs\uÁ5%ŸýÖ¿èØòç_óøƒ2[+¬kuûET‡鿃:\C²a†muó|Þñ¦•³ÆðÇ@â!¥ä’’:œz|^£=|¾žQ·»EÏm_€z¶ù¼}Ž£FyynØ’€^Á#X÷,'«ªšV¤Õ’«‹ ½RO|ÓÙØ£„£CÂí¶6oÕi†Ñ‚m³ÁnTUÁüû³LU>ÝÌ· }ëÍê@Æäq¦¥`Â~•—ÈÍýüš?ªG67UC¨ÿðå/Üp4ç¢)»`þæ¼­„¸¬¶·Õjá*d$Q¯dµ(IxX¡ô|” ´<UILý±·Õ^YÜï-bŠB&˜f%WMR)š½öâhHi7‚:êÁÌXwF_—–büÚF¥„š*­g1lÒÔêYMðÚ±ÏM@5ØÕ‹âM¸ÿ•S·U^NÅzò:þ¦-zµ-ÌcŸÖ„çÉ%o½\DctWY¤¬Q‰ø¾ó‡§ÿ}¦.*——ºIV&hž§•sôÎaû´kHªðOòìãØnåâ_ÞøçÊé[y*­q{q±éz¾Eýúšßp‚Z$œÂ²ÝÄÇ<íïáqõÙäªÑ)©ÖXTV³3 ´'il°>—ùD¬ÉFðÀa|íQ|P µ.r;?ÌWNžൊÿKŸ5kPšzù!LeH’&pù™é’Çt­6;<·DLå{õÉ ÿU±#™hŠ®y}Õcÿyö?dŒ…m×Íó|ß7Íó|Þ áL,!:Ygx4\HþFïp´{5®Fùß¾]ºŒžùDާíüô6=y¸1#] ç“”]ó|ß7ÍóŠB^7”cÑ«údPlÇ3àÚã±g¦v§â­u@Óä"‚³0ÕIJ|i»4 O§·WˆÆ·€Qqá#˜··žå@5×@ú uÉFC@…J—PL¢Ü©·šÕ…`:Œ].‘kù1œE·ißx´ ‹lø9bÝ€_È^÷å‡vvPDøÜ<ñôk2\Î;jf•ÅäþXÁ[‚æÂ¾·µ•!’§¾'ˆ‰»sþYfÝ›› xS+Uçì€EÛ¢\©&^ìtɲ1¦„Ѓž§6ÕȰ=& Æ»1©}ˆÃŠoù¯åž›Ÿ‚˜ˆ‡ÞT)r¿]àn|oˆLú]Õse£¿$ÞÉ9ŠœæE¹´}1/¶ÉOãÁï ø‡#Ý‘ù,!”©Šµn£ŸrḎ˜z@þV)BdöJòœPYk±¸!s±f•X˜#l¢ç· ýÍZcòß[¢JПÏ÷ŽÄnLoÞÛB ´C>¯o#H¼óA“=k\‘Õ_Ô°B)üÍRª—ÍNëæªð ` p¹ôüw1 Á¸.óxûdÌ5|’Æ?Ð, °ôû9Þ$ΫußðZ€=+Óf÷PÅœèø„è¤Ù‚#ù¾úÑ™uºà%*e²jÉå-+3ßÊpÓå‘‘ün]ÁáCx 'ÂÅýŽQ'1r¥9(m?ƒ²€3)oõoäû‚êŽi_Õí‡*í9¯p†ÌT6ÍT¼t.±€¨ÛÜÌ.Ð !3QgëycuñÞ,y‚‹¾ƘhhŠõ[ëJêÙ_‰µÎiÁ‚>r:$õ7ºw Vsþ7/ÊÅÇLçü —Tâש)PtGŠ õk@ ‡‘CÎäSùZ§Ã츑 &åÞ•ýHopŒÆ»ºE{¡8 ½%òÍ$k„ðsý÷ÉîÖU¨ÎŸboüá:2ŽÌetJ¨²`j5 F¼Tˆ$¤òÖO´ˆß´/$„}غokVYüBBcdÑ%©ÀŸöïØ¢*³­!jøêä¾òãS¯ëk;ûO–~\s?ÍgS¢Ï賂ø·^‹A¡˜j]Û Éú †äåMŰuÃBî©$áph僚e¡âC„œ:H/bÖ] ~6"Rd «Þ Û¶G8M±7¿ù´YÖ-©]5…¶>=…õëÜT‡)foÐú{×?Ûù¸ªý]-L_ðʰ* >”æ5bqí'…båš/$k‰{ЉcwÌ•þRþÌIb§§+îþ_1hc: ÁdK”ˆ›¬5±O÷ê, ·C¡šÊ9:¾‚Š!øÄÐÚìñX„¯Ñõç½|ÓåG$©ð‰Ô³aÓZ˼íèÞØ®Ù7u:¿.f)q¶°Â Ôÿ¨¸Ú={`¢3}÷êC¸ì,®¼>&¼Ô‚ñ£è™-6%תq2Bbî=K¹Œ”Ö˜*G¦g;`ûd º€pL#’vE%“‰ÓQÚb#wRÆøI·1€›¼ÐËó™q:æÈ´ý7Ñ×î*»ãÕt8“Q³à8"BÍŒ£`¸æØž`%iD^–õšHÀ"¸óI%€ežÊoÄoiíåk!ý^An`¶žçYÙ2uM¼µ«÷eË#8#•ɤøFô­Želw\]n| ­”­}ÿf ÜliŸ8üº™øl†Z€N¡Bj%SÀí§á*(ÎØ”gޝ½µSí}]]äŽàçgþ½Y¶|õ%µ¡ido@In ò‰Òa/S°#xb ;r |¾îŠäXxÐpr#!EË^x§wœÙ¬®éo^Ï»RÿT²Ý× YLáa’ÓÕÈ@ãq?îàíú±õ»=®)5ã¡U1äÆrúëÀР2[w·–où]B´[PÀª>hò­ryE{¾œwi^[À÷t5š Ë-ëKö7#pD PÊÛbÂ"Ù»«•k£áe,Ýùÿ?. »·9\h33õ]"P á‹VðÊçª<6”³c c½ÞC83BݾӜ@Ú¾‚)pî`D[„.î]Ì#BR†_R+¤8¨³ÈŒ+†1ú™?Ϧw °|‡bÔTÜg6¤¨”ëÖ,âw«„¬O·~ãCaá^üý볋ÄöXÓÙø¬)ÞTäjÍóÊ_Ï̀ʓÞV´¡bw¨¯Û¤›±'Zc\d øÞ4)ÿ^ÿøŸ-Â"O›Ñ¸§ôCéLÉ|uVïáç¨fÅ …Æèíc©idp““eSñQm!]–V¯¦Bìbׇ'Áöôe+/²«Ø‚Hy{àSÞ ¹®#×\góϧð£ÔÜ·›Hǵ"‘òxøbtÔ'2Ul.¬ð–'¯ûØøR§¹OODNY#!-µ)¥(¦„:¿ŠExrß0 iùàâÌÌaý+é Ê&‘ßêz¸Ùßꑚx¦Œ£n¶ý‚>ØbvXû?¡ûŠÉ e§Dl,¾Hr$Œ/i-a<¦A.~›BÅ$ú+eްÒ9”'Èé.“É-õ»OCÞ´qp^õÅCçéŒà£óUP%·Ÿ5ðƒ†Wg}y; íË$s cÂ.²ß+c—ýÒ@ÕÆƒ—­uÊ4½@C®éÞbúcòÔPav…ç•ZTÞï»ê’ «º ¢€Ô¢\Îumô™ÚS‘aNW¶4L8èN:ÛÅÚŸ'… š“'¯,ôÞ™+R)-”¬w&›Záåt†ÄeŽAª›nïœ÷0‚˜lx¶—Ã]qvÎ×^úÛw-‡ø‘9 ¤B*¯–„°ÌòÍ¢Zê:ã¦1wØ/óÒ³´çù&~[zŸƒL2袣‰‚4ƒÂÉtyBŽç•†h*½qð(²<”6™YùÇi‚_w|j6!÷5µÑÜ]KÑŽ#¦þV?M~K—U·,gÿ9ùùv·µfhiÇ{¾ñ£Ò¯$ÿf°–æ–è¡¡ÿNþžùwcc˜žÙk†<3tÞ ÜÂ)¦ [ÚnVúG8äð‰{¹è<ðB=® ˆÿpàQÒw½JŒ¨œ©©í(ñzC{ù˜—oÈ@ØÛu+u_æ+¡I}Y···´š´á<£G M~‘ È•…žI^Vg•D¬8Os¦¯2?`ÓžõD=xÁò¹ñ‰ßf¨¿ª@ŒF\‚:›Æ {ÄKÊb[Ëþ<Ø(?—úx~W|÷"¤ß‰Z-Q¤ÆDR¦ .•< ³ãâ³nùš‰^n ^6¾YQßmJ§%¸[N¨ÈèX^)Îb Aò,t9ž·pIkÈL[$® 2ÓávÆè¾ cS†×BŠ Ñ_h8´‹–ÚÛ$¼=4ÏõŽE9LÙ½®Šn†hTòDQ‡i­þ<¡Õ'{MOH!'³ŸÖzÖE«IÞæ 2Šåƒ‚ÿ Y‡óà0жÏë‡4a„RTXi™öÀ¤¦òìâmK†"qÙ”Ážnœg˯«¹„Øm…åÍ~^ün<†ŸŸ0æmJÍZ0=ÿ ‚PÉ€kæk%û¦ñI±¼•» ¤ÊÓñRrȦk Ù½°"D)R·PŸÂ¤½^¼Sü!åÎùˆa_0n¤StÌœÔ t¼˜Á .2o³ ©¿h ,6" áÏ™ðCæøq\j+_ẖ«ÎŒ½vjÜʤvG™5tø ¯>H]äÙ{ôB·Š°r¨;ôQ¯,,:“ŠßÎ\ÐI@àFâ÷ôê–Ø!}»'…]½¥–<×£ŽmßÖŽ×éF죕âȸ)Y°ª5}fôÍ=¼Nþ߆@Ìiüpô 95˰b:Ǿ¤³í¯`·æ3á@£Ý'f||^?HŒ ôÂôÈo-ò9% à¦í õìäé¯.ÑœëwáL wޤÞؽ۵{Š¿v1Lݸ'­îr‡¿§kx°oŠûQOg€ý,˜S÷\g¸Š¬dÚ:ë5rå3ž†éúÌ^ßM-mÒä*çÛšdàúÎ÷_nY?íßSÂPt³Ù„úsôç¸l%™æ´ÌX¸%8³0ì)I\Ù?-Q ›Ë'Rï×;u $‰Ä”ïžÛ ²~÷tSîïN¨Ëè´”úÿ§KæBŒ8%V“OiÇó$Þ"ú÷s“'Ñùéÿ{ÓpHOréF48=°Þ”aÞyø5X2¤­WlÈqŸû³ÛL†ÊÄí—׌~]õ]qïù²]Ù@;ë…{s²«EëOÒËÓþÔD?$MP9/qSóâ}‘… Õ2<eºÓR)·ø«HMÈ4Þ«™…t, )9x´ðåq‚êÝpÛÛŠ–ê›>O¤GZL‚ºÒÚ—l[B1y[Í `ó7ïÃÎKsÚ&K†¥B £¾€‰Ž"”óõØÞíPù À®²¿ÆöŽß^0Û®YnŠƒù7H+#­ÚöVtÄ´k,^ÿZ6'z~&Zœ^Iú;dF*LÏ®cgC’SÜb‡l.D¹q;ûª}Do‹£QU(Ï L¦›ù* 0?²ã‡.³èp Î \5y £)uÒçà„îS…±u0zÒ©Þ–‘#h¢¼‹Æ[f‹Ã‘ë=ôé`¿÷^wDcf¶(MØZsóD¶œ·gÄî\iì”ç&çEê‘£Ù!ú¾úË»ÄF³)Ý]#Ã{AERMe-òŽ«¶ h¼„vÿ8žáqgõØ"úHÙhPÃKñàˆ EÅe(áÈÚk¾êÛµ‹úuþm´¯…jslûO#ßÃ]«1®Q¡nv¯¢>«ŒÌŠhÁ“Xo6A¦ˆZ¹zر>µ›ß³$6rðÞº¶ð”'™åÃõªâ·kHŽ‘³ˆ¤dć¨rq] Ô^C=Ç?áZ±¦Á»}zXG•Úf–üêtÛ/›t6+¨³ŒÑaTBˆyÙ³=¡rBM¢%Tžb<zækWU¾¢ /³‰Ûç[ãEÉÊ¥Wy  =¹%C]í-•Ý!Qš’—[H¹·EOJ á?b)ÿ':¨.…õâÕ~gšw']Ž Lœ MZùÏ?™…ìbò Øáp¶–m·ú~…žzòÝ4û(Ë€:¤aBªûÿ|S­½–ßM¬“Ðç>gÃsçzVŸ½ã4R£»äƶJx¯c—UA 7uQ™Ã ,~–¼w}eøsΨò°Â^9éiò[‰¸3Žô2ckŠlŒ·D59C_ø#õ1ûÏ%Š]ÕÚc¤‘:ìuPöbNu2ëò>× —½GÒz"ŠÉ÷N;­—ž|íá7Dí²ñíÀáL_¾ÙÏ“¼Ï1÷8ú!š:1ŸŸ#743fîÌ›TY™“óòµ·ôàŒž+³‹ùBžºÊv­ê– FhëGùîk–~7âçø½¾xéúoµ‹ÉÝí?{¿ÿt°áåp5.¥úñÁê9ÝÈñ`²ƒŸaјêù £/µj¸$?õý<^ÖÞâŒàFÌÆƒÛcLA¡ìÏK?¯YÚlªõÖD¨*«Ë†t³¤€$¶5ã<šCfÈ%)Ê $ÏÓAa†Ö’sÆî1V”`4ü íÍûÝäð×»üØÍDüÇÌÕ¤;Àæªmn.âh*>é|»ŠoÅ•öi ›…Ÿ¸¯j¬§ê®Ëø½•ëHÿWxDJUã¤VÃvL,Àk›ê|E©‚‡ s Ï‘¨Í¡¢þ iõ˽ê».7Áôíçؔ Ç€óÐ*&é¡yêÃø‡ô?Ì[/¶Úfê&‚E6F9˜²4ñŠó~‰¦,s‹Êø6Â]1‡Tø6 ]>'1 (vä®”óæ ÷Ê:¯8ò U‡Ûã>›Éo›gSÛż#6øù êÁ`Š ³[ž `¡Wø½“ƪ»yŠ ŠÚn?jøÄ¯ûÚõÌ8wižP§‚0´øêÏÏ ?¶SOO¿˜ý‘'ƒÊ<¨07óÅ-(2íÑRÅAà aÚ>É™¤`]'Ö4ØU->©ÿ£©ª×&ÆÚ0'oÞüUnÚÆm¿Æ`ˆB=æ$ŠzMµ~òÐ&@œ=6´š,]J¤"šZø9J{6,wW³¤ÔFÆ^.˜dƒ8S3»fn"Uaö UŽù‡!xô‡÷J¦’OxQ:n B¬g´¹¦Lg<ðT˜¸ÆqÆ=Åõ{•^1:Ækñ ³FžI‘áh#‘½!΀«Ap¤sª¨™á³ƒ— %¨ÇÎé?º½wZ Ç4Í0'&"ªƒË]Nå^6¿Ž?&Êlþ¾SÜ«$@ݾYÐæ´­­Ðõ¸XMÁ¯¢ÒLÿ¤XžŸÖñQûkt ­œrJ^ýSè«Z‘â$ŒÀ×uF$à×3·¾3jð’NHæëì ^cªÄÓéýÛÚ‹j€^w¿Ã J›stÜÒMŠ*–ü@&]®¼ß\åìTÜ@o$vŽætCë¾Â÷üHžÜ—l ”HÏø8`¿¯™—ëaà¼ÊV ”ƒõvƒ‘­Ê&6­/N? í _Ø¥ÖkZFŠÿ ö~ ¾å\Ùµ§c0ÉH  [Ìj5~×õ| E=Ø¿Šá h9Œ¶6¼ÐÃé.{ >’ýôˆ@hJ°Rc·lÚ2ýƒ,FÞ]ÍL¢«R]Lz°D€1¸]a›°ªŒ/™qO¦#°ŠÛè)úFpM`J^s½ù¥n1ö¡¦Õ$»efN=¾Sü1Jk•ô¢cEy„b~ð½ÙÞƒ¹ÂhV@¢”ªx…ÂÒKóyrM[•3 ¬oÛÞG[ÀâkM-7¡ãºáªøbàœ(˾¦#Ërg¿‡þÈ®¼½S"yÕþp™; æ@ÀÞñ×Y=½Øúò·~·ðäÉ œBþÑÙÓš´‘9˜ÆL¶¦už Ó1ót`°=˜(jqš9É|]3E•ÞÇb®5Ű¹ã[ÁÝ{ …y–H3~:Ó9Æ…ÏêîṡèDûU®SŸÙ»Ôâ4ãÂLØ pžÎùŠrÙ*CË=úÚãŠà93a4ãN‰o(làªjÚUW¬wbÄjMv;÷º}1à굤™Wêgâ6ºÜñî«PUÞ«ðƒ[œ¶7ŽÕkK^è¢(Üe¸%P¨:öl(ÃÄÛ·Õc ¯µ\MÝ0Æ&›Q•Túܳû¢‡—‹=²$ÝŠg€Åæ´] £g,­›æbèáj8DÓ+U)z§LǸ¢PJ’•ßtý69~2*ƒG¦d¥@í_KI˜,‘@€Æ"Ô3Ž‚ò‹ôpéÔà\¿ÅhC£L õÍl½¬"PŒD¹C²9—'øYÃÒ9Ã…Ð0û•¶èÊ÷&펭kÒð7ÍãZµìç=M~E€çiÌÉ$Î.f2 3·¿Q^IÚIØ«×A°åû`6&7~/ß1j\'áQ7ŒËDЋ€n™KºG˜æön1:ƒ‹€Ër¦ßF¬R¬xú(*UXÄä¨kón0ÚªRcý/¼«uÀlÎÍÓ§ŠgežÍ<¡žDøP|jŽ9œÑè1~q—|ûsÿtùwÒXv|ƒ2¸ €—AÕËa½?G…¬¤Q „Q©¬À³ìÇ%Í`¢UHðˆgVbœ6gVHN˜pZV†DjDÔ÷í©«`×ég{?脸Ò@¶Ô¥¬üšÖ3é:z¥H JÙÎçýAeýîŸ5 õaè=ò\bžs’I“Ô{-_¹ÂŒë3}ÙdNxà¼7±›Bf!'Šñ ©<HGXõIë Ë9ÁÖŒVw›T½\Í¡)xýÕ¡¼S.·Ýó´™; É8V„¤ ‰vl‹“éÔ¸oÌLޝU°Òš!ƒ7é’Ÿû)º½ïoAö–y—õ.>A+òH0ϳâ04%e…¶?‚8;¶(þžZâ–u…´}‡#Üy§(,6ž*p ¨ÛMª‰68á`²G ý„D-Ç›‡ã ¡룾0aOr̓àHÁ`ز2\XÐ^ZêdÐÃélád®b¨H¥4µý+¿\Ù¬Š]f#òuˆ¶J«š#G[&ÆL“i‰,¶¯gÎìl»¹'ÐŒû›Î¾/;¥”ׇÁEýÆÎ$J,.¡\I,f‡P¬_†ïK\Š;LtLWõtV6¤N±ëIÔËëàìîÈUsùÙ­^ÝÂAO®n-5 Jlt&*Ÿk´²ÏÒé|²  ˜ØCÀk°ÕƒqU.– Õ=Z°Úù˜.ˆÕŒB6ßÝ(Þ¿g‡³’=ŒÜ–Ûtµõ üˆ¯'Dd’Ó†ävUs“´á»ìƒ¿ˆ&ã û‚5Kñ †µ ë©'•±£ ŸÜt í”$>nóHº2žëQÜ›”x´ 8R8’V,Iƹ-ëù–çÄ/»ýç¹ÚÚö¯×1 ÅJ6ð²Ül&\ÀÝÑ!Àr‘ š9˜ì‚ËOWlA.Aï>~_9kùf¦((|+dv,3àœO9Y_·>qIÔæmZÐm-mÏ”¸+^Ë\“û¤]“óm.$ÇÜûÙf>/ŠNÈáÔDÔ£Ð{…CŽñÇš5ç¼íYžXDãá„ã­Ð§"0­ÇÂW*DÐõYçþ” fŠâYW€ëû“Íû)˜©¥ºÊè­¼cC" ¤›—è»(ÀJ\?:ˆz¹õ>g1zÒ£ð=TïÎmK65LU˱¤ÿ('LF82?ìgӹء¨³‘Ñz’+bnþù`"ާ‘F//zb]±øL$'Ñ”¦%£ù#ƒÒErUžl«ÉæW VH€sTÀs'.òX8U Ç}œÆ^2 zl±o‡^f·›Õ{b3X…Å3ï.ÿ/¿a›hEÄ•³ê]ÉspS´Û›Æl‰ˆ(Ë=Ÿã¥qˆMÌ'&Á>(ºïGXuâ ¦‰­a”TaT~ý Yˆ„r²­2XŒÍêÊ“šu²>ç¦Õºƒß¸ÑP3· <Ëá8FD1ëÏS$Ì­·•k‘5¤]Wv¨Gê]»Êî1ãoNδ.n¡«›1&»V.—>¬ R×?>ؾçøwë§©àêƒEæx€ri5&0&É«Ú<[ûä@` i¥E˜.GÎ$âʳ+Ôþœš`ý¡~K–Ú¬‰¡09ÎK½ôƒg˜z½K•À pq©· ÅÂ ŠŸ¿ËÍq;9m.w§ O8m‘«ú» ˆ€²'Ï4î¨,Jë_?¼"™ Í÷‰Ù\c%ù/ôm¦ÂÑ [â©vS`=¢öÌÉóȪÂ×K2ƒI!ªn¸Ð÷&ŽEN'÷T,Ñõ²::AaJn„˜•™IU™Ã‚Tèõã:>#*I iœÍl/áù‚*ã¼Nübá n3H£¿_§ qÓÓD·)ttÉxø> V9Amêæ'®(!Ž }úªæÑ”ÃüCÀš–mÝ!èÐÈ…ÔI¹BÒ¸K[ÀBô¶ÔdU<Ù›õk—i.›G½~•¤7¡ V¤Õ§§Â;Ð5`ý8 »øZ„/<á{þR™o­PÁwÕóž2]ŠÌ¿eˆÀ¦1Täwhdƒµ$/ A^½,Ócó×ƒæž ×á³pcOo´8ûú*‘›rF%; 7qÎØKñÌøvŠ»[–g˜/¡W=q§É´9ÌR»Oô¨¹¯³ÍY1çc?šÄîn.4ìÌtšebžçÂ)_zÒM*…a· YwIæ![Œ—ýü ïžhô‚LdÇ™÷ÉOÝØÙTÁûB8 ôæ²z $”µÐQàI&†hÚ³óß~׃ðøíD†ä6Ï[Ã+•9#F›!K!â7õËŽÐöúZ4—‚è6tAÃ3º±»ôV¾ÉgÀh¤¡|Œ\w¹ûóBè•Wv­?ÒŒέrpiéåÄÞŒtK&ÞšCïêžÕŸ » ¤Wøz8ô]y´•ÝúíY÷ó*ÙÆbPtCcà¦_i{±„jÉúø½(^Ó 3È]Xü©øª×ÚZÈÄÌ!¢gä`k7bGȨƒ{Q¿ „=ó;ʃ÷y±¢æ(v×ßësgùLuè%ò¸Ø¢Ž+ÎÂÏá:B"ö¤Ì›‹J‚ ¯W@{mHÓk¶êÂ?Ô-ÿy}Ƀí¶M§BßXñòdŒï⚂נŒªڰʳª 饸¦nÌæ|EÆvNjìx² .)·aîpQD’buÅI¾»“O±_¡Ùÿ.x¢yë˜.Qb(o…Œ`®ÅzËŽw«®|±±)‹¢2$‹…äOf‡yKÊjozáɵ½FB€­Eñ¸4¾”É/?”^í½úæ+ñ@}é)?æSøô²öÌ#…µÄI“€•Æ{~¡c´ª¼¾‘ ² €$ã N¬ØÇ$C²°Ã''üØQ¢15°ÌN¾fh[@˜@%®xlGÞbë"ÐRµ…j‘T"î©Î‚Js­w[FxÌé/Gí@× @¤û~0qïìÔ–öÀÇsl[ÒRT>cWÙ>"`ñ¡Ä¬<³GñU8Ëô´€¸V©«ü. ¶ŒµBô`#¿Í}N­]<(„y©ÀaÓò¥Ž&ME½NXÿP›fѓثFÝ`×ÀE#ßj;H5}ýçã<-ð -L5·üû¡bݱØo3¥oëE¦Ó?qlæEÁ:-­S®Œº%Ø{qF4GÕ§Ð[ÇØBÆA®¡\ ë´<Ó3üÛNeûdÕ ñ ¼äås^4¼±0…‘î\XŒ>,¥’žÄû5©¬êšÛîÉJùvÄ'1̃÷ÊR>¦Õ ²¸»üßxº6ª¡ Wx«9yh4Ü›õ7Ão$Í  1ÝW-Ž3pR³‡…Ãð9 ï±'kÝNò:L³ŠjDñ¨åmX`‘À‚7.NM+/ÀÊÖ‹1ÀÝ’”ÉžÛ/©nu™Û¤ómΆ'à†ÂŸïqÙ¬Þ5ðe/”N¯§#’ “5ŸÔÁä‹Ýšæeá`ŸÅ-…£Ãk “™…'ü+kËpßê^±ÁHR)lÀFÖe Êqí¶HR.Ä}Šžír¢h8JüáVUóE5½ÎjïmÝñ‚}!ßæ¸_QÒÝwÀN|¼ÈûAl+kä&i.|ß½†“;dOÊ‚X'³lù–çk5Ï#£î¿‹«h¨¶(½ñýpâÑÎÕ ÁÍwRRFÖ@e&yFeBx`dŒù5ap 2iÿ2ÇÚàlRÅoÂì2+n rÄ £îÌ#Â)/ì¡I4òôp_}WY}¨¨ÓÄb Bÿf"ý>Ø (S•Bv+JH›A§0ßò•u²d,¹w 3AG1¿ì´‹9ƒ²Ëû¤sÝÜÝQû®zd°ñÇ û¬V}Oï×*‡Î=ß0Ò1熎6(ûº^œˆ êý(¤~ºÈl§ó1ÃùöUôàš`Uû›:¨#ÙçBG¹[õèI"såü¦ˆI&D/vm G UO`Â)ÔÝŠb}ªÍtΧ ô/÷ô? Lïì‰Hü…þc¶Ü*Ñ4 Ê\d”4s«:›”X/œ]””?`À5\;âˆ(z¸ŸG7fBÆÙ3¡•¤òrÕŽDŒ8…‚À´j ·å|^[â°îBeÄž˜(W¢tÒÒáLÄÞ¹}ùÛP¤·Ñ?Òq“SÀÉŽvZ>£é¥ÂÁ7UŠö¶+:wVh¯ƒ´#œ§@^=´!®L-»U³éÇ×m3bSh\D{Ã¥I¬!+ÁhwšX•2ãÞŠc&­þ¦Z€‰{¸Ÿ­©9ÐËá ¥ß§'¯ê@™ NµÒÆž!sîi Úø™Ÿ[Å Ÿÿ@íËN!ªéè“‹fw°ïG^²Bµ˜fËÎnÅÑÈ­DôšÁ9ÛO¥ÀJ3Üä X²»YúÝ\QÙç}ž±Ž§ÄCµÊ­hŒuæ=ácÂB4B×2‚¼èã}ߺ%òèXx VVWƒŒêbHÝã`+ŠÖ+Sá?-a¢¹Ê£èÇ^T=™&ätUÕ^A]'Ñ"<Év‰ë±ñïÑrÖ"©ú »˜À0FÕ 2€l},Â[ƒ¤St{›ß*¡LV0k¨_iïÿ}Ds×p'[ø7ëCß?òüJGç…—1pÞî^¨ï­¬§œ|"ÅeŸ!­£tDÏC5Wêf8Š=J! °´ —§ƒ? ašë‡WüF½ZÀ±ÚñrñÇØÎ…ÏA”×÷ê‘åEä0œ¹:ÓÕ›A M­×ëI$Ïðy~{Ö3jþÂA ¯(QEÓ¶_Jwß6aÞ‰¯%”ÃDU æ"»úã‹õ!j¶•5†×Ñaz5.Fš†Áø>¤ÈZÊÿP”m·"ÜV,<·÷ÂaX¥²w@sÁH¾_òâññÒœö{v—ífÌùب "5³õR¾t$`:»†ØÕ¶£„L9#F’)dj/¶ß¢À…ç¢a{÷Óº =Gš¢k¡tÕóåÄŸäñô7÷ÑM„ X®ƒ’––®WŽ™®:Ãm‰ÁáŸÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/latexdraw_logo.svg000066400000000000000000002065501321075051700266460ustar00rootroot00000000000000 image/svg+xml LaTeXDraw 3.3 \begin{pspicture}(0,0)(10,10) \end{pspicture} \psline(2,2)(0,1)(4,4) \psframe(3,1)(5,2) \psbezier(3,1)(5,2)(7,2)(1,0) \pscircle(3,5){1.5} \psaxes(0,0)(0,0)(10,10) XD LaTeXDraw \begin{pspicture}(0,0)(10,10) \end{picture} \psline(2,2)(0,1)(4,4) \psframe(3,1)(5,2) \psbezier(3,1)(5,2)(7,2)(1,0) \pscircle(3,5){1.5} \psaxes(0,0)(0,0)(10,10) latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/line.svg000066400000000000000000000231061321075051700245540ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/logo1.png000066400000000000000000000013631321075051700246340ustar00rootroot00000000000000‰PNG  IHDRH-ÑsBIT|dˆ pHYsAAë™"tEXtSoftwarewww.inkscape.org›î<pIDAT(‘=RÏkU5¹{ÛŸÌÏí¿·¹ÝþzíÏݦ©µš» ÿuwЭ.ŸSÕ¼²ôÂlÿö>óÄäO¿ô»­xãÕ•gŸœžjšÒ5e_""Š n»‚õol¿óÖÉÃ?ûz£ëLÌ!ƒá.õomÚ`xç•å£Ó×nÜ©¹IÌ´‰}=Ýü 37H)®mWóí;óÔä#½QSz=‡ 3 ‡ŠÐÊÒÑ™sç/ßzíäÒŒ;Ä®fÚv5-›Ÿüvýzµ%š’“Š¸0§Õ‹³ß­ÿ6ØØÜ.wï »Ÿ4‚øÍ×_>0îÆÎ?ââçkM1뙡ò™÷?:?jÊBÓ”Þ¨-y\¾æ¦-¹iknÛš»RS­®@°ªDÎúsJI®¦$‡5wR¨2D8„)ˆˆÁ{;eÓ+’“~œ“ÞÌI=%EJêIIªúÐD‚ˆÈÌ¥iÊïMS>Ô+_^²¯Ö¾¿ „Âc ˆi dÌñƒÜA\wÇ'¥ú©ÁÍOücƒ°%çÎÝ IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/logo2.png000066400000000000000000000117741321075051700246440ustar00rootroot00000000000000‰PNG  IHDR@@ªiqÞsBIT|dˆ pHYs!*!*s|â#tEXtSoftwarewww.inkscape.org›î<yIDATxœ­[iUå™~ÞïÞÛÝ-½ ­Ð¢“:Ò,‰¦Ä¢f¦Ìk*™rRcÔÌTe GmÅ q2?œÁª©ÔT&V&+š8nÄ3ˆ,"¨È&² ºoo4½Þ{¾w~|û9§Yjæàí{–ïÜsÞç}Þç}¿Ebf\îöHÛó‚™ghe`*õ×1P ‡‹ý$ù_dþcwH C© jŸŠäAÔM„<$¢D8¸ê±.ÛºV¶­¹Œ ,s C½©Þ¹œ7 ﬈, D˜<0ˆÈÇ~÷a½¹ê±>û`eÛš&0îgàÌLÖhfk03“½áphÈ È„IƒA6yƃˆXï36Ñ/V=ö@Çÿ €GÚž'fþ.÷1sVÆdn1F³%/#þsêØd ^„’×Hc¨>§ÃIJ!€@E"zI~õäBc\i{¾œ™Û˜y1+CT[±5ÔÚüÉ´g„øF»s^hÄÁH²`-"‰ïøE‚+_ÓÄŒ™9+™)n¼R|†dê=£ÙË V'|ŸÇÔ/.–~¤ã߄ »/âçA Dô—?~êᎀ ÜÏà¬öª¦·‚ç}ÄXàkA‚†ìÙÐNùÛ^$6” òêëiÓ†Hyd=¯Y@Öû‚lò`&Ê Âýž¶ Xùøš˜ùg’!õ•aR†ÆkT^ÄÑÁcÏNc€Çÿ¹B;QvsŽ’,ð•?`„fß2ã{?yúogõ‹­pF¹gh7Þc†_˜pŠaa@H€Ag‚ÑVû&βqc’€F€ºÊV÷Þà'™¡ÂDæ¿g Âxˆ À8û¶ iq$ÏûÄ.(ÍPež"5›ç¸>6)•ìu«æY°Àª…ì%o_sÐÛGýÆÍ;›e`&5Öûžx¯ƒÄÙ€˜áa?ÁËÞá`3Mt¬Ã’AéÊ †DÄ 6Þ„Ëö &Huž•£Õåp—þLþ¶Þ è¯(î &üì`ÃÄØ”L‡ì;ÍeF—Ii„2Êè… ›ÔuÖáÁÄ,,8ÄD,@­Y€§*‘c[„**ê@ a¼ĤTÇÀa(ìLfK× • R:3Ñ…C+|àq1Ádÿ’¡i¡S,š³ Ô{µ¼»êÅ‘&µ¥o…Pé±ÀÔ±ìà=‰ˆMA©U[W ëzÇ€aDãÔW‘!<öø Ü£ÎRÓ°TQÞõú¬8³'ŒO‚àzˆþ˜—YÁ]S^g˗ר¿‚‰!lQoO‚À’³ Ô»¢Å&v-so¼¶vÒ•5˜=½£ÛwêI1žœŽ¨ß!"qÇmóê³!`ÿ¡“ç?;zzȰ Ý|ãÄúºê’ * Æ E92:&G†Ç¢Î|ÿè©öüH±XdÕ0Fëˆ]ékHø¬€` ÔgÎiÏ’ÿÒÖ?ìèÛÕÝ7²léüiZwÑq¶wôØ‰Ž¡4ã}}ÑœÚ%­³`ph¤¸~Ó‡=RZ¡%˜sã5Õ×^3iB2 ’›”Ìg»zGö|t´wçîCý…BùUb¼@ ‚0 hI`’(!ítÊ‚‰y@8ÝÞ=òáÞ£†ŽË—¶LQ`¤Ï TWWänYrS£yÎ6|pöüà°df’ bÉ`É—56)Ñä+kË—ß>¿é±~{zË—§×HÉ$YŠH2E’E$%IÉ$% É’Ìy©>$¥$)%eÏu)‘\>WñÀ lܼçÌô믪­œPž«¯«.ûZ뜆?nù¸+i¼Ò‡{¾¹pRI.+àø‰3ƒÛv0ú`û j³ZðþîÃýŸ8qÞœÍf2(-͉ª 噿©å×6Oª¨¨(Í@Yi.³âÎÖ«®i¾²âå×¶t€9Ù+ŒÇ¿.ˆ@Yc´Ï‚ .ˆõêFÇ rã¦O­¸³u,n}å‡{öç{ÎãÆÏžÙ\5cúÕÕE’_yck§W\ÙλÚp¦³wìã}LJâ®Ñ½Ã¾lVP˼é•Ën›ßPUYž€/ͽ®¦§w ðö;»»]_€A ºW¤*c Ï~Ä÷í9%T¦dÅÇûõ;qæd³qײ››T;W2çrq÷ò“ÌolÙ¶¯»ýlϘ¦;IÍ)]¡åžÇÐôµÕV} …ïí88ðÜ¿¾þ§3½£æ¾[—ÜÔxõU ešâBJ¦(2û*$":â[èý0+@3‚·Öï<](F®¿¶©zîÓª´?‰™éŽÛæ7\Q]‘€îž±uvõ0Ckù^A"0^²yi»ê¸»ç\ô¯6tŒ% z·.™[çµ!)•.øÇ>I¼ÞJêGiåóç Ûvè4w-[:¿)—ËdÀÀäÉu¥­-3k͵×~÷^çX¡h;PÆpf†7øâj0I–öà 0¤…:Îö·îØßgî½qFsuUUE.Þ.`…÷{)8âÚÀ;›¶|”ïî€êªŠÜ²Ûæ703ýù] ' ¡"öã}ÇÏí;øùP¬‚„¡>k£üà³™A¬GÙ°ÀžR2mÚ²wÀ¼£„ë§M®‘ôÚKŠ´ñ2Ɔq¸”­X”¼vÝövs|óüµ+îlmœzuCŒŒŽÉW×¾×7>æ}°4cj“ˆ…€—¶\(°¥q¾û\”ïî/˜û§]3©Üy^mõïÆ @©âÈ!;iÜ»ÿx ú­-3ëLÓ·7îîêëŒb}²ûd@6©ÀI|¤cLÀf:ÕÞmŰ¾®º$²B—¢ìÂàâ ÐÀÖ> ú½×þaç™á‘±È¿ít{÷ð¿÷I?¨DO:#Ä5Ìq ˆ³@Õ×?(Íýe¥%BÑ>a¼ˆß+”u㘞¾‘Å200uvõøÖmü Û–»Ö`  ¦dv“ _(SR¡ó¤ñðàЈ ¼¬$ãh†Žš Æ#Õ‡øâÜk«›§4uü‚–W®†€ë4ùÆ+¡ã0Üôà |ÃŒ`x2*Jw?™{ãªï 7l ƒõP ¹Ý&Øn1r¹¬øæí-“â-fÏl®š=³¹ÂVzÚHŽ7ìæÙï<>^(xJÉTV^’1÷ŒŒÉ˜Xú}ƒ€ ØU†µ8u[¾´¥±ª²<]}£;vê5×¾uWkC&“±a`T €>¼^µh¨ž"ˆž&PUe¹`ph”CO‡Æ»°P`ÇÎÃíB¡ ®M¹ª¡¬eÞôZí5¼ºvÛ™7ÖíÈœ.@]muɲ۾Rãõ45½ÙÓ7ËdÐY@g ¸zÀÓƒØñ”«êsæþ|¾?Š‹ä8`h PF…^¶£’ö8¾!"ܽìæ&ÒC3}r¬ïȱöáÑÑ‚|sÝ; }ë’›jë¯È™Ú ¼„Óoà0ÃÏû ‹#W"—•æDÓäZ À§GÛ ñQ%qh¼d6 ¨Á3»âsssf“`AˬڦÉu0<2½¹n‡-‹wíùlàȱŽ!Èå2ôío-©·=KvEß{ 6Û£d['Hˆxܲx΄ŒWÓí?tr,ri0"²ßRÈH’'ðÝ%™€ªªòÌ­‹çZáÛ°iÏÙÁÁá øÍkïvF‘d˜yÔŠy_º¾Â-x À dÀ/C„)0¤vYY‰¸cé¼ sï¡Ã§ÆÚ;º­†@˜ì¡aÖ ¿LóÅ,Ë—¶L.+Sª{ª=?´ýýƒ}ˆmg:{ ›ÞýØ â_ܽ°®´4§ÇTúŒwƒ-šÒj“”Þ¾>"о·¼º¾¶Ú àë¿ß9É2â Cÿ€îf&Æ ÂõÓš*g͘ª…ùßooo8k݆z{z P3±2ûgËož˜è`ÁM£yøÝf×}öÊáæ) ÙgŸ¸oâü/¡ÔܶuÇ‘÷÷.xbçu†ØzÝ Kz6ÊÄ8©Ù»>Å«y9#„X~{ËÕæïï9œ?ÝÞ=¢ª{<, …"ÿöõwóóWË&À-‹çV¿»íÀàŸNw±æ×Ý%¥9ªœP&¤TuBFd¨²²LL¼b‚˜~]Sî¦9Órsg5ç¼d>Ò^|þßÞ’R/&!Èzxz蜉 t«¬L×jg”ŠŒ,›Ñ31¾¶pNcÍÄÊ28?\xû¬ð‘žÍð˜fÂÞý'†>9ðùàœYÍ2A÷ÝûõÚgÿù•ÎÀæØØ½+UÞ»bQe*­R¶·Öïùù¾3¥ê3FûÃã€7?@j´,ÈU}Þê „:@@]í%_ýÊ '|Ü}ºPˆ¤m/KÄJë—þëºÍ¨Í®k*[´`–-öþ^Î6:Và ›?ýÁ?üüÜO_x{xl¬Ïù‰á/¿ t! –Œ”7¨‰¸0 2Ï=­¦+ß?ÄòÝý#{÷ï·Mçv‚Q9s=}ÅW·­ç«ó¦W2_œ=­bëöÃR:óOžÊ³ÙŒ[…jKhÆÈÈbph”OÎGŸŠmŠÅȰ‡P3¦ÌjZPOš21„cjFƒ$èÑ'Ÿ9’<)½RJëE1‰‰;•è‹Ç:5®²‹ºoxÁ Õ¿È3¶ŠÄ¬ جÑß'³å‰0IKYuA.  'ãa¦ Øédl ¬^Ã쉀Ço²{Ýx„…l ˜|Á&Wí«?‚ÀRM‘³ïÌ!¯'QÉJèYX dæà`ÄÅPžõx;ãåvr³œc¶Œ°«×l§)Tûø~ZghC–ˆ¡ˆkœwl¡c€Éd h¥5ÓParŠ-;\[Q:T8)ªY¼Ì˜‚@±Y²Á<Šu^и³:×83è°[¬~âAV,ð×׆5AÐKôÚ˜y6ׯæjï«ÈxÛÕæ½Íh:#<ãmgÉ–ÌRþ&²•É6?ÝýRhϼ©b‚ß'ðBä€y@ÐEÀ 0W‡÷(ßëçkƒ]!¢IÁ–ÐþˆsêЙˆ „šÂèß@Àê'öâ_©nP𦰯¦²ÿ,cG@‘ôŽ“Œk©U^;þÉ‹YôK¿@DÏ«)¶Þem¤ßÆ (<…Ëó4Ù9{óþd—¾âiú)†N<},\Ý`O8&„‘3¾(%ÿÈÜjXýäƒDøµeAXA%¨œ<ÖéûÞÕ¿aÛ;pÓBÌv+5ûlÈ!dÎ8ÖlˆUœ¶?IùÜéC/O‚è—D´5ñ˜&§µOK›qíH„B\x`7šM+KFl4Ù…À[Ìüt`³°úÉYž%¢cIû/&â/š`Ax}¼öiŠ$aˆù`! jX-Èùû¥äït}%h›˜|zÕCÃBУD8j½$¬až×‰ÅEY@±ëÉöã€oA°g™O°aŸ”|WÏ篞ۛ:9ú̪‡:… ‡HÐ{öÁ‚Ô<’yYÙ‹i«éàÆÁK€…ôç»ö:4ÖJæEçN½~2ÍÖqg‡üÔÃÂÐF‚~IDEcŒP@hf( ‘ú˜T7ÂëzZºŠ€5Ò‚8¸X`ÞËDTDÏ¢{;ÞLxÞl—´>oeÛš&)ù¯¥äoHÉ7õu5é&¬ÁSÇüéëÈ-e‰ÌÈ­¯H2fü!Ò¿Ïv”Z âî”üj$yUþØ+Ç/fÛe-Püá£ÿrƒ”ò)y¡”\.@òOÒçåÂe*©íƒ•è2–’ó‘”ë¥äŸµúò‡—jÓe`¶¿[ùœRÎ’’IÉÍRʆHr£”Ü ¥,ñOŸIv‰ )¹ ¥ì”’ÏJÉg#)HÉë¥äNì{Q^üíÃ팫ñ¾ŽIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/mirrorH.svg000066400000000000000000000114651321075051700252540ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/mirrorV.svg000066400000000000000000000117731321075051700252740ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/object.svg000066400000000000000000000103171321075051700250730ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/open.svg000066400000000000000000000146661321075051700246010ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/polygon.svg000066400000000000000000000064631321075051700253230ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rectangle.svg000066400000000000000000000106211321075051700255670ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rhombus.svg000066400000000000000000000063311321075051700253050ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rotation.svg000066400000000000000000000076271321075051700254760ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rotation180.svg000066400000000000000000000127371321075051700257250ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rotation270.svg000066400000000000000000000125351321075051700257210ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/rotation90.svg000066400000000000000000000125331321075051700256370ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/roundness.svg000066400000000000000000000045011321075051700256430ustar00rootroot00000000000000 0.7 true 1.0 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/save.svg000066400000000000000000000147201321075051700245650ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/saveAs.svg000066400000000000000000000160131321075051700250460ustar00rootroot00000000000000 image/svg+xml ? latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/separate.svg000066400000000000000000000061311321075051700254300ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/shadow.svg000066400000000000000000000064421321075051700251160ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/square.svg000066400000000000000000000101021321075051700251150ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/texEditor.svg000066400000000000000000000046451321075051700256030ustar00rootroot00000000000000 image/svg+xml TeX latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/text.svg000066400000000000000000000063141321075051700246130ustar00rootroot00000000000000 image/svg+xml T latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosB.svg000066400000000000000000000060521321075051700253760ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosBL.svg000066400000000000000000000052411321075051700255110ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosBR.svg000066400000000000000000000052411321075051700255170ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosCentre.svg000066400000000000000000000060421321075051700264340ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosLeft.svg000066400000000000000000000060371321075051700261120ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosRight.svg000066400000000000000000000060371321075051700262750ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosT.svg000066400000000000000000000061321321075051700254170ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosTL.svg000066400000000000000000000052411321075051700255330ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/textPosTR.svg000066400000000000000000000052411321075051700255410ustar00rootroot00000000000000 image/svg+xml abc latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/triangle.svg000066400000000000000000000062721321075051700254370ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/wedge.svg000066400000000000000000000070131321075051700247170ustar00rootroot00000000000000 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/xGridLabel.svg000066400000000000000000000100401321075051700256330ustar00rootroot00000000000000 1 0 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/design/yGridLabel.svg000066400000000000000000000103721321075051700256440ustar00rootroot00000000000000 1 0 image/svg+xml latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/history.txt000066400000000000000000001542431321075051700241040ustar00rootroot00000000000000************************************************************ Version 3.3.7 -- 2017-11-19 fixed: crash at start-up using Java 9 fixed: pictures not correctly mirrored fixed: control points not mirrored ************************************************************ Version 3.3.6 -- 2017-07-12 - fixed: the tooltip that shows LaTeX compilation errors while putting the cursor over a text shape may freeze the application. Moreover, the displayed message was not correct. - fixed: problem of encoding (MS950) not supported by the XML serialiser that prevented SVG files to be saved. - fixed: arcs were not correctly drawn and saved as SVG on certain start/end angles. - fixed: the installer cannot be run on some configurations (e.g. Fedora 25 with Wayland). - fixed: the shape deletion is not re-activated when clicking the PST tab and the clicking the drawing tab back. - fixed: the generated PSTricks may be incorrectly commented preventing the compilation - fixed (usability): no message was displayed in the status bar to explain how to draw shapes. - fixed (usability): better feedback on compilation errors during exports as PDF/PS documents. ************************************************************ Version 3.3.5 -- 2016-12-30 - fixed: latest versions of PSTricks break the cropping of text figures. - fixed: various problems of axes rendering - fixed: shapes were grouped after having loaded a drawing - fixed: some attributes of axes were not saved in SVG documents - fixed: colours were not generated when shapes are grouped - fixed: incorrect message was displayed when an export failed - improvement: the code insertion dialogue box provides better feedback on LaTeX errors - improvement: buttons added to the error panel to clean the errors and send them by email ************************************************************ Version 3.3.4 -- 2016-09-17 Improvements: - Instead of double-clicking on a text shape to change the text, you can use the F2 key (the text shape must be selected). - Can click on the canvas to change text (before, you had to press 'enter') - Can import cubic Bézier paths (as Bézier curves). The second control point, however, always equals the first one. - A log is now created during the installation. Bugs fixed: - The preferences were not stored correctly on MacOSX El Capitan - The look&feel was not correctly loaded on MacOSX El Capitan - The backspace key can now be used to remove a shape, fixing the deletion problem on MacOSX El Capitan - The use of the Fn key on Mac El Capitan blocked many keyboard shortcuts https://bugs.launchpad.net/latexdraw/+bug/1618941 - The import LaTeX text window does not work on Mac El Capitan using the Mac OS X LnF https://bugs.launchpad.net/latexdraw/+bug/1620059 - Copying PST code requires the ctrl+c shortcut instead of cmd+c on Mac https://bugs.launchpad.net/latexdraw/+bug/1620328 - SVG Paths that start with a relative element are not correctly imported https://bugs.launchpad.net/latexdraw/+bug/1604992 - Crash when loading an SVG document containing a 2-point path https://bugs.launchpad.net/latexdraw/+bug/1604968 - Scaling shapes does not work outside the page https://bugs.launchpad.net/latexdraw/+bug/1583116 - Borders of some rotated shapes not correctly updated when located outside the page https://bugs.launchpad.net/latexdraw/+bug/1584487 - Copy/paste a plotted shape does not work as expected https://bugs.launchpad.net/latexdraw/+bug/1580483 - Boundaries of a group of shapes not correctly computed when moved outside the page https://bugs.launchpad.net/latexdraw/+bug/1582559 - Groups of shapes not always correctly loaded https://bugs.launchpad.net/latexdraw/+bug/1583121 - Install scripts do not work on OpenSuse https://bugs.launchpad.net/latexdraw/+bug/1584037 - Cannot import an SVG path where characters are stuck https://bugs.launchpad.net/latexdraw/+bug/1605718 - CSS style not considered on some SVG attributes https://bugs.launchpad.net/latexdraw/+bug/1606545 - Some icons of the toolbar did not have the same size ************************************************************ Version 3.3.3 -- 2016-05-01 Bugs fixed: - Performance issue (lag) when the background grid is painted https://bugs.launchpad.net/latexdraw/+bug/1576964 - The last working folder used to load/save documents is now considered in the open/save dialogue box https://bugs.launchpad.net/latexdraw/+bug/1574741 - Grids' size not saved in SVG https://bugs.launchpad.net/latexdraw/+bug/1574739 - Text cropped when exported as png https://bugs.launchpad.net/latexdraw/+bug/1533256 - Template insertion is not undoable https://bugs.launchpad.net/latexdraw/+bug/1533254 - The links to the forums and the bug tracker system have been fixed https://bugs.launchpad.net/latexdraw/+bug/1533253 - Wrong error message when the /opt dir does not exist https://bugs.launchpad.net/latexdraw/+bug/1577169 - Confusion in file naming after several save/save as/export operations https://bugs.launchpad.net/latexdraw/+bug/1577176 ************************************************************ Version 3.3.2 -- 2015-11-03 Bugs fixed: - Issues when resizing some shapes https://bugs.launchpad.net/latexdraw/+bug/1504095 - NPE crash when exporting shapes as a template https://bugs.launchpad.net/latexdraw/+bug/1504098 - Crash while loading an SVG document https://bugs.launchpad.net/latexdraw/+bug/1504437 - When importing a template, the document is not set as modified https://bugs.launchpad.net/latexdraw/+bug/1504096 - Too long precision in arrowsize to be accepted by LaTeX https://bugs.launchpad.net/latexdraw/+bug/1506727 - Tex binaries changed in the latest MacOsX version El Capitan https://bugs.launchpad.net/latexdraw/+bug/1502655 - PS/PDF export does not work when a path contains a ~ character. https://bugs.launchpad.net/latexdraw/+bug/1426749 - Including pictures should support spaces https://bugs.launchpad.net/latexdraw/+bug/1396899 - The XML charset used to save SVG documents is always UTF-8 https://bugs.launchpad.net/latexdraw/+bug/1426877 - The path of the opened SVG file is not saved https://bugs.launchpad.net/latexdraw/+bug/1426846 - Resolution of the exported rasterised pictures improved ************************************************************ Version 3.3.1 -- 2014-11-23 Bugs fixed: - Plot figures not saved as SVG https://bugs.launchpad.net/latexdraw/+bug/1393692 - Rotating plot figures does not work properly https://bugs.launchpad.net/latexdraw/+bug/1393694 - Mirroring plot figures does not work properly https://bugs.launchpad.net/latexdraw/+bug/1393695 - Cannot change the roundness of the rectangles' corners https://bugs.launchpad.net/latexdraw/+bug/1395469 ************************************************************ Version 3.3.0 -- 2014-11-03 New features: - psplot is now supported (and can be imported from PSTricks code). The parameters plotstyle, polarplot, and plotpoints are supported - On Windows, a shortcut is now created in the start menu during the installation. - Better integration in Linux environments (using the installer) https://bugs.launchpad.net/latexdraw/+bug/1369488 - The commands pspicture and endpspicture are now supported when importing PSTricks code. - Support of begin{pspicture} without any coordinate when importing PSTricks code. Bugs fixed: - ps2epsi should be used instead of ps2eps https://bugs.launchpad.net/latexdraw/+bug/1369416 - Can hide grid's labels https://bugs.launchpad.net/latexdraw/+bug/1279086 - Text shapes disappear when typing an invalid LaTeX text https://bugs.launchpad.net/latexdraw/+bug/1382037 - The error message of the LaTeX compilation was no more displayed on mouse over a text shape that does not compile. - Still have problem with the file name while saving a drawing. https://bugs.launchpad.net/latexdraw/+bug/1369490 - Cannot parse psaxes with arrows https://bugs.launchpad.net/latexdraw/+bug/1388145 - Text thumbnails might be the same for text shapes having the same text with a different colour. - The position of thumbnails of coloured text shapes might not be correct. - Dots may not be coloured as expected when exported as a PDF document. - The size of the generated PDF/PS documents might not be correct (might have several pages or large margins). - Axes were not correctly located when parsed. ************************************************************ Version 3.2.0 -- 2014-09-14 - Translations updated, Chinese (Simplified) and Sinhalese translations added - fixed: Freeze when continuously pressing a key https://bugs.launchpad.net/latexdraw/+bug/1293804 - fixed: Wrong selection of control points, points when interacting with shapes having a diff number of points https://bugs.launchpad.net/latexdraw/+bug/1287687 - fixed: Wrong bounding box when creating a bezier curve with show points https://bugs.launchpad.net/latexdraw/+bug/1284310 - fixed: Gradient shading feature is not read from SVG file https://bugs.launchpad.net/latexdraw/+bug/1284297 - fixed: Changing the position using the spinners does not work https://bugs.launchpad.net/latexdraw/+bug/1278045 - fixed: Should use ps2eps in the eps latex export https://bugs.launchpad.net/latexdraw/+bug/711936 - fixed: copy-paste a Bezier curve always gives a "closed" one. https://bugs.launchpad.net/latexdraw/+bug/1277542 - fixed: Text cursor moves while writting LaTeX packages https://bugs.launchpad.net/latexdraw/+bug/1274875 - fixed: The parameter dotangle has no effect when parsed https://bugs.launchpad.net/latexdraw/+bug/1318369 - fixed: An imported template is not a group of shapes https://bugs.launchpad.net/latexdraw/+bug/1318648 - fixed: Unicode texts not painted correctly when not using the LaTeX thumbnail https://bugs.launchpad.net/latexdraw/+bug/1338041 - fixed: URL not in the correct format when opening some files on Linux https://bugs.launchpad.net/latexdraw/+bug/1340056 - fixed: Crash when adding a text shape that do not compile correctly (several pages produced) https://bugs.launchpad.net/latexdraw/+bug/1327181 - fixed: Exporting drawings as PNG documents produces files with large blank margins https://bugs.launchpad.net/latexdraw/+bug/1359810 - fixed: clicking on an already selected shape, does not unselect all the other selected shapes anymore - fixed: Crash when clicking on a text shape while editing another text shape https://bugs.launchpad.net/latexdraw/+bug/1362187 - fixed: After having loaded a drawing, exporting it as a picture does not infer the file name https://bugs.launchpad.net/latexdraw/+bug/1361516 - fixed: text shapes may not compiled when user packages ended with a comment https://bugs.launchpad.net/latexdraw/+bug/1361382 - fixed: Changing arcs' angles does not always work properly https://bugs.launchpad.net/latexdraw/+bug/1360910 - fixed: Grids not always painted and parsed correctly https://bugs.launchpad.net/latexdraw/+bug/1323268 ************************************************************ Version 3.1.0 -- 2014-01-27 - Opacity and strokeopacity attributes are now supported. That permits to set the opacity of colours for the line border and the filling. - The size of drawing area is no more limited to the size of the drawing. Additional boundaries are now provided around the drawing area to ease the editing. - In complement to the previous change, a page (US letter only for the moment) is painted. - When zooming using the mouse, the zoom process follows the pointer. The zoom increment, min, and max values have been changed to fit this new feature. - Like many drawing applications, the view point of the drawing area can be move using the middle button of the mouse (or both the right and left buttons in some cases). It is more convenient than using the scroll bars. - Better rendering performance. - Ukrainian translation added. - A menu item has been added to go to the latexdraw manual - A text field that contains the LaTeX compilation error log has been added to the text toolbar. - fixed: mirroring shapes did not work https://bugs.launchpad.net/bugs/1266219 - fixed: latex thumbnails not created on windows Seven https://bugs.launchpad.net/latexdraw/+bug/1252030 - fixed: LaTeX packages declared in the preferences are not used when loading a file https://bugs.launchpad.net/latexdraw/+bug/1270559 - fixed: The text field used during the editing of text is not always correctly located https://bugs.launchpad.net/latexdraw/+bug/1264869 - fixed: The text field used during the editing of text is not always correctly sized depending on the look-and-feel - fixed: The grid is not correctly painted when using the inch unit https://bugs.launchpad.net/latexdraw/+bug/1264999 - fixed: The rulers do not fit the grid when scroll bars are moved https://bugs.launchpad.net/latexdraw/+bug/1265007 - fixed: The grid radio buttons are not linked (preferences panel) https://bugs.launchpad.net/latexdraw/+bug/1265051 - fixed: Problem when copying-pasting a group of shapes containing arrows https://bugs.launchpad.net/latexdraw/+bug/1268354 - fixed: The quality of png/jpg/bmp files is poor https://bugs.launchpad.net/latexdraw/+bug/1269458 - fixed: The jpg compression is inverted https://bugs.launchpad.net/latexdraw/+bug/1269457 - fixed: Copying-pasting-deleting removes the wrong shape https://bugs.launchpad.net/latexdraw/+bug/1271762 - fixed: 'Show origin' does not work for axes https://bugs.launchpad.net/latexdraw/+bug/1266287 ******************************************************************* Version 3.0.0 -- 2013-12-23 Added: - Native support/rendering of LaTeX texts: texts added to drawings are compiled in pdf using latex and then imported in the drawing. - Can place texts at different positions: bottom-left, bottom-middle, top-right, etc. This feature produces PSTricks code based on the rput command. - new localisations: Brazilian Portuguese, Hungarian, Japanese, Turkish, Vietnamese, Serbian, Russian, Czech, Catalan. - double borders supported for arcs. - A system tab in the "About LaTeXDraw" dialogue box to give information about the system. Improvements: - Can add/modify texts directly into the drawing using an integrated text field (no more dialogue box). - no more dialogue boxes to change shapes properties. They can be changed using the toolbar which has been widely improved. - when selecting a kind of shape, the corresponding widgets dedicated to the selected kind of shape are displayed to customise shapes. - users can abort the creation of shapes using the escape key - the graphical library has been totally rewritten: - better shapes movement - less memory consumption - the text is now compiled in LaTeX and imported - no more button to create a line; you can create a line using the button 'lines' - better use of handlers to resize and rotate shapes - the undo/redo manager has been totally rewritten: - less memory consumption - more stable and efficient - more actions can be undone - more information about the undoable actions (the undo/redo messages are more precise) - the error manager has been totally rewritten: - the manager can be accessed by the menu 'help' -> 'Error console' - the error window displays all the errors, not a single one - the shape handlers are no more zoomed when zooming in/out. - the widgets of the parameters toolbar now appear and disappear more accurately - the selected shapes are no more unselected when selecting the pencil. - can undo/redo change of unit (cm or inch). - the lime and teal colours are now supported. - Can zoom in/out with the keys '+' and '-'. - PSTricks parser: - using a ps command as a value (e.g. linecolor=\psfillcolor) is supported - commands qdisk, qline, psarcn, textcolor supported - better support of the command definecolor - better Mac OS X integration: the key Win/Apple is used instead of the key Ctrl in shortcuts Changes: - Tabs are used to replace the code panel. - Text support: - Font family and font size cannot be loaded from a latexdraw 2.* svg file - No more widgets to define framedbox. You have to do that manually in latex. - No more batch conversion frame - The ldp format, that was the default format for 1.9.* and older versions, is no more supported. - The PPM export is no more supported - The basic EPS export is no more supported (the LaTeX EPS export is still supported). - No more button 'default' in all the dialogue boxes. - Handlers style has changed. - There is no more the choice between line and curve to close a Bezier curve. Only curve is supported. That because in a future release, every segment of a Bezier curve will be either a line or a curve. - The PPC (point per centimetre) cannot be changed anymore. - The change of unit (cm or inch) can be performed through menu items in the "Drawing" menu. - The type of magnetic grid can be changed using the grid toolbar. - The magnetic grid cannot be magnetic when it is not visible. - Because handlers design have been improved, it is no more possible to change the opacity of handlers. Fixed: - lp#1076032: a blank page inserted while compiling a document as a pdf - lp#530184: the option 'showpoints' is badly painted for Bezier curves - lp#675155: the scale handlers approximately resize shapes - lp#675150: the unit saved into an SVG document is not loaded - lp#598504: when you copy paste a rotated triangle/rhombus, and you move the copied shape then the rotation angle is set back to 0 - lp#880677, sf#3296077: line colour of psdot style asterisk is not saved. - lp#911816: crash while parsing PST code containing $ and framed boxes. - lp#756733: the pst parser did not use correctly the unit to create shapes. - The border of a selected ellipse did not bound it correctly. - The painted axes did not match the generated pdf because of the package pstricks-add. - The html label of the dialogue box used to insert PST code into the drawing is now correctly displayed. - The colour of the shadow is not always correctly loaded from an SVG-latexdraw document - better position of the application when several screens are available ******************************************************************* Version 2.0.8 -- 2010-03-15 - fixed #535631: cannot export as pdf using pdfcrop if the path of latex binaries is defined - fixed #483517: when importing a picture into a drawing, the created eps picture is not located at the right place - fixed #506868: in some cases, copying or cutting shapes does not respect the original order ******************************************************************* Version 2.0.7 -- 2010-03-07 - fixed #531658: pdf export broken on Windows ******************************************************************* Version 2.0.6 -- 2010-01-10 - added: Turkish localisation - improvement: check in the installer the java version is 6 or newer - fixed #506849: cannot create PS/PDF documents in some cases - fixed #483528: pictures saved into a SVG document cannot be loaded - fixed #483520: picture badly scaled when included in a drawing and exported as ps/pdf/latex - fixed #502915: fonts not always embedded - fixed #504743: bad management of invalid SVG documents - fixed #295531: in the batch convert panel, the field 'add sub folders' does not appear with gtk laf - fixed #505284: when importing SVG lines, the last point is missing - fixed #505515: attribute 'style' not used during import ******************************************************************* Version 2.0.5 -- 2009-10-06 - added: can export a drawing as a pdf document using latex AND pdfcrop - fixed #434030: export as ps (latex) does not work anymore - fixed #433971: the "export as picture" dialog as a bad title - fixed #434204: generated ps (latex) documents are not cropped - fixed #306954: SVG import: some SVG shapes generate empty code - fixed #306953: attribute inheritance does not work for text attributes - fixed #435265: better management of SVG font-size - fixed #195898: a too small triangle/rhombus is not visible - fixed #440739: the size of shapes with double borders are badly saved ******************************************************************* Version 2.0.4 -- 2009-09-20 - 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 -- 2009-07-03 - 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 -- 2008-10-31 - 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 -- 2008-08-25 - 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 -- 2007-10-20 - 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 -- 2007-09-01 - 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 -- 2007-06-20 - 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 -- 2007-05-31 - 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 -- 2007-04-04 - 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 -- 2007-02-08 - 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 -- 2006-11-15 - 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 -- 2006-10-17 - 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 -- 2006-09-13 - 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 -- 2006-08-23 - 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 -- 2006-05-02 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 -- 2006-01-28 - 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 -- 2006-01-20 - 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 -- 2006-01-13 - 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 -- 2005-10-22 - 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 -- 2005-10-10 - fixed: bug with isModified attribute - fixed: a possible bug with open/save actions latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/license.txt000066400000000000000000000431261321075051700240220ustar00rootroot00000000000000 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. Copyright (C) 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. , 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/pom.xml000066400000000000000000000232341321075051700231520ustar00rootroot00000000000000 4.0.0 net.sf.latexdraw latexdraw.core LaTeXDraw 3.3.8 jar 2.0 2.11.8 UTF-8 UTF-8 mavenInriaSnapshot http://maven.inria.fr-snapshots http://maven.inria.fr/artifactory/malai-public-snapshot mavenInriaRelease http://maven.inria.fr-releases http://maven.inria.fr/artifactory/malai-public-release src/main/ src/test/ src/resources/main/ lib/ src/resources/test/ src/resources/main/ org.apache.maven.plugins maven-jar-plugin 2.4 true net.sf.latexdraw.LaTeXDraw lib/ false false lang/ res/ net/ org.scala-tools maven-scala-plugin 2.14.1 ${scala.version} -optimise compile compile compile process-resources compile maven-compiler-plugin 3.1 1.8 1.8 org.apache.maven.plugins maven-surefire-plugin 2.19.1 4 true false **/Test*.java sh.tak.appbundler appbundle-maven-plugin 1.1.1 ${project.build.directory} net.sf.latexdraw.LaTeXDraw /design/latexdraw.icns LaTeXDraw ${project.version} 1.8+ package bundle maven-assembly-plugin 2.6 src/assembly/assemblyApp.xml LaTeXDraw-${project.version}.app false make-assembly package single org.codehaus.mojo cobertura-maven-plugin 2.7 org.scala-lang scala-library ${scala.version} org.scala-lang.modules scala-parser-combinators_2.11 1.0.5 junit junit 4.12 test org.mockito mockito-all 1.10.19 test org.swinglabs pdf-renderer 1.0.5 org.malai malai.core ${malai.version} org.malai malai.swing ${malai.version} net.sf.jlibeps jlibeps 0.1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/readme.txt000066400000000000000000000046731321075051700236410ustar00rootroot00000000000000 Java 8 is required to run LaTeXDraw: https://www.java.com/ Look at the online manual to see the installation requirements (in particular regarding LaTeX): https://github.com/arnobl/latexdraw/wiki/Manual This installer will install LaTeXDraw in the selected directory and create a directory for shared templates. Administrator privileges may be required. *** Mac *** A Mac app bundle is now available so that you should not use this installer. See: https://sourceforge.net/projects/latexdraw/files/latexdraw/ *** Windows *** On Windows you must use the install_windows.vbs to install LaTeXDraw. This script activates the "run as administrator" feature to install files in dedicated directories such as "Program Files". It may ask you your password. *** Debian/Ubuntu/Fedora/Opensuse *** The scripts 'install_debian_ubuntu', 'install_fedora', or 'install_opensuse' will ask administrator privileges before launching the graphical installer. The script 'install_linux' (to run with super user rights) will install the application using a command line. This may be necessary in the case where graphical applications cannot be run in sudo/su mode (e.g. on the latest versions of Fedora with Wayland). *** Running the graphical installer manually *** If you want to manually launch the graphical installer (i.e. without through a script as explained above) in a console, the command is "java -jar installer.jar" (but you must have admin rights). *** Folders *** The shared templates are located in the following folder: - 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 (if the installer is launched as root). A shortcut is created for Windows. The first execution of LaTeXDraw will create the profile of the current user in the following location: - for Unix, ~/.latexdraw - for Max OS X, /Library/Preferences/latexdraw - for Vista, \AppData\Local\latexdraw - for other Windows, \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. You can then double-click on LaTeXDraw.jar to run the application. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/readme_compile000066400000000000000000000001051321075051700245150ustar00rootroot00000000000000To compile you need JDK7 and maven. Run: maven clean package install latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/release_note.txt000066400000000000000000000002441321075051700250370ustar00rootroot00000000000000************************************************************ Version 3.3.8 -- 2017-12-03 fixed: crash while saving an SVG document and running the app with Java 9 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/shortcutWindows.vbs000077500000000000000000000003421321075051700255750ustar00rootroot00000000000000Dim 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 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/shrinkScala.pro000066400000000000000000000031711321075051700246170ustar00rootroot00000000000000# proguard @shrinkScala.pro -injars scala-library-2.9.2.jar -injars latexdraw.core.jar -outjars scala-library-shrinked.jar -libraryjars /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar -libraryjars jlibeps.jar -libraryjars PDFRenderer-0.9.1.jar -libraryjars malai.swing-1.1.jar -libraryjars malai.core-1.1.jar -dontobfuscate -dontoptimize -keepattributes ** -keepclasseswithmembers public class * { public static void main(java.lang.String[]); } -keep class * implements org.xml.sax.EntityResolver -keepclassmembers class * { ** MODULE$; } -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinPool { long eventCount; int workerCounts; int runControl; scala.concurrent.forkjoin.ForkJoinPool$WaitQueueNode syncStack; scala.concurrent.forkjoin.ForkJoinPool$WaitQueueNode spareStack; } -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinWorkerThread { int base; int sp; int runState; } -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinTask { int status; } -keepclassmembernames class scala.concurrent.forkjoin.LinkedTransferQueue { scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference head; scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference tail; scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference cleanMe; } -keepnames class * implements java.io.Serializable -dontnote -keep class scala.runtime.** { *; } #-keep class scala.** { *; } -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod -ignorewarnings latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/000077500000000000000000000000001321075051700224205ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/assembly/000077500000000000000000000000001321075051700242375ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/assembly/assemblyApp.xml000066400000000000000000000010221321075051700272340ustar00rootroot00000000000000 bin zip ${project.build.directory}/LaTeXDraw.app . latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/000077500000000000000000000000001321075051700233445ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/000077500000000000000000000000001321075051700241325ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/000077500000000000000000000000001321075051700245425ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/000077500000000000000000000000001321075051700265355ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/LaTeXDraw.scala000066400000000000000000000112271321075051700313400ustar00rootroot00000000000000package net.sf.latexdraw import java.awt.event.{InputEvent, KeyEvent} import java.io.File import javax.swing.text.DefaultEditorKit import javax.swing.{InputMap, KeyStroke} import javax.swing.UIManager import net.sf.latexdraw.actions.LoadDrawing import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.generators.svg.SVGDocumentGenerator import net.sf.latexdraw.glib.views.Java2D.impl.LViewsFactory import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK import net.sf.latexdraw.ui.{LFrame, SplashScreen} import net.sf.latexdraw.util.LCommandLine.CmdLineState import net.sf.latexdraw.util._ import org.malai.action.ActionsRegistry import org.malai.mapping.MappingRegistry import org.malai.undo.UndoCollector /** * The main class of the project.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-19
    * * @author Arnaud BLOUIN * @version 3.0 */ object LaTeXDraw { { if(LSystem.INSTANCE.isMac) { val im = UIManager.get("TextField.focusInputMap").asInstanceOf[InputMap] im.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.META_DOWN_MASK), DefaultEditorKit.copyAction) im.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction) im.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.META_DOWN_MASK), DefaultEditorKit.cutAction) } val node = Preference.readXMLPreferencesFromFile(new File(LPath.PATH_PREFERENCES_XML_FILE)).get(LNamespace.XML_OPENGL) if(node==null || java.lang.Boolean.parseBoolean(node.getTextContent)) { System.setProperty("sun.java2d.opengl", "true") } else { System.setProperty("sun.java2d.opengl", "false") } } // Setting the size of the the saved actions. UndoCollector.INSTANCE.setSizeMax(30) ActionsRegistry.INSTANCE.setSizeMax(30) // Creating the required directories. LPath.INSTANCE.checkDirectories // Settings the theme. Theme.setTheme // Settings the factories. View2DTK.setFactory(new LViewsFactory()) /** * The main function. * * @param args The parameters given during the call of the program. */ def main(args: Array[String]) { val cmdLine = new LCommandLine() cmdLine.parse(args) match { case CmdLineState.APPLICATION => launchLatexdraw(cmdLine) case CmdLineState.STOP => case CmdLineState.APPLICATION_FILENAME => launchLatexdraw(cmdLine) } } private def launchLatexdraw(cmdLine : LCommandLine) { // Creation of the splash screen. val splashScreen = new SplashScreen(Theme.lookAndFeel) splashScreen.setVisible(true) // Creation of the main frame. val frame = new LFrame(splashScreen.getProgressBar) // Composing the user interface. frame.getComposer.compose(splashScreen.getProgressBar) frame.getPrefSetters.readXMLPreferences // Removing the splash screen. splashScreen.setVisible(false) // Showing the user interface. MappingRegistry.REGISTRY.initMappings frame.setVisible(true) frame.setModified(false) frame.getCanvas.requestFocusInWindow frame.getCanvas.centreViewport // Flushes the resources. splashScreen.flush Thread.setDefaultUncaughtExceptionHandler(BadaboomCollector.INSTANCE) if(cmdLine.getFilename!=null) { val action = new LoadDrawing() val file = new File(cmdLine.getFilename) action.setFile(file) action.setCurrentFolder(file.getParentFile) action.setUi(frame) action.setOpenSaveManager(SVGDocumentGenerator.INSTANCE) action.setFileChooser(frame.getFileLoader.getDialog(false)) action.doIt frame.getFileLoader.onActionExecuted(action) frame.getFileLoader.onActionDone(action) action.flush } // frame.getCanvas.getDrawing.addShape(ShapeFactory.createPlot(true, ShapeFactory.createPoint(100, 500), 0, 90, "x sin dup mul")) // frame.getCanvas.getDrawing.addShape(ShapeFactory.createPlot(true, ShapeFactory.createPoint(100, 500), 10, 90, "x sin x 2 div 2 exp cos mul")) Preference.flushPreferencesCache // Checking a new version if required. if(VersionChecker.WITH_UPDATE && frame.getPrefSetters.isVersionCheckEnable) new VersionChecker(frame.getComposer).run } }latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/000077500000000000000000000000001321075051700301755ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/CheckPSTCode.java000066400000000000000000000020771321075051700332450ustar00rootroot00000000000000package net.sf.latexdraw.actions; import java.text.ParseException; import java.util.stream.Collectors; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import net.sf.latexdraw.ui.dialog.InsertCodeDialog; import org.malai.action.Action; import scala.collection.JavaConversions; public class CheckPSTCode extends Action { InsertCodeDialog dialog; public CheckPSTCode() { super(); } @Override public boolean isRegisterable() { return false; } @Override protected void doActionBody() { PSTParser parser = new PSTParser(); try { parser.parsePSTCode(dialog.getText()); if(PSTParser.errorLogs().isEmpty()) { dialog.cleanErrorMessage(); }else { dialog.setErrorMessage(JavaConversions.asJavaCollection( PSTParser.errorLogs()).stream().collect(Collectors.joining("\n"))); PSTParser.errorLogs().clear(); } }catch(ParseException e) { dialog.setErrorMessage(e.getMessage()); } } @Override public boolean canDo() { return dialog!=null; } public void setDialog(final InsertCodeDialog insertDialog) { dialog = insertDialog; } } DrawingAction.scala000066400000000000000000000022221321075051700336520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing /** * This trait encapsulates a drawing attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ trait DrawingAction { /** The drawing that will be handled by the action. */ var _drawing : Option[IDrawing] = None /** * @param drawing The drawing that will be handled by the action * @since 3.0 */ def setDrawing(drawing : IDrawing) { _drawing = Some(drawing) } /** * @return The drawing that will be handled by the action * @since 3.0 */ def drawing = _drawing } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/Export.java000066400000000000000000000307471321075051700323340ustar00rootroot00000000000000package net.sf.latexdraw.actions; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.filters.BMPFilter; import net.sf.latexdraw.filters.EPSFilter; import net.sf.latexdraw.filters.JPGFilter; import net.sf.latexdraw.filters.PDFFilter; import net.sf.latexdraw.filters.PNGFilter; import net.sf.latexdraw.filters.TeXFilter; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.ui.ICanvas; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.glib.views.pst.PSTCodeGenerator; import net.sf.latexdraw.instruments.Exporter; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.dialog.ExportDialog; import org.malai.action.Action; 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.JFileChooser; import javax.swing.JOptionPane; import javax.swing.filechooser.FileFilter; import java.awt.Color; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Locale; import static net.sf.latexdraw.actions.Export.ExportStatus.CANCEL; import static net.sf.latexdraw.actions.Export.ExportStatus.FAIL; import static net.sf.latexdraw.actions.Export.ExportStatus.NOT_YET; import static net.sf.latexdraw.actions.Export.ExportStatus.OK; /** * This action allows to export a drawing in different formats. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @since 3.0 */ public class Export extends Action { public enum ExportStatus { NOT_YET, OK, CANCEL, FAIL } /** * The enumeration defines the different formats managed to export drawing. * @author Arnaud Blouin */ public enum ExportFormat { /** * The latex format. */ TEX { @Override public FileFilter getFilter() { return new TeXFilter(); } @Override public String getFileExtension() { return TeXFilter.TEX_EXTENSION; } }, /** * The PDF format. */ PDF { @Override public FileFilter getFilter() { return new PDFFilter(); } @Override public String getFileExtension() { return PDFFilter.PDF_EXTENSION; } }, /** * The latex format (using latex). */ EPS_LATEX { @Override public FileFilter getFilter() { return new EPSFilter(); } @Override public String getFileExtension() { return EPSFilter.EPS_EXTENSION; } }, /** * The PDF format (using pdfcrop). */ PDF_CROP { @Override public FileFilter getFilter() { return new PDFFilter(); } @Override public String getFileExtension() { return PDFFilter.PDF_EXTENSION; } }, /** * The BMP format. */ BMP { @Override public FileFilter getFilter() { return new BMPFilter(); } @Override public String getFileExtension() { return BMPFilter.BMP_EXTENSION; } }, /** * The PNG format. */ PNG { @Override public FileFilter getFilter() { return new PNGFilter(); } @Override public String getFileExtension() { return PNGFilter.PNG_EXTENSION; } }, /** * The JPG format. */ JPG { @Override public FileFilter getFilter() { return new JPGFilter(); } @Override public String getFileExtension() { return JPGFilter.JPG_EXTENSION; } }; /** * @return The file filter corresponding to the format. * @since 3.0 */ public abstract FileFilter getFilter(); /** * @return The extension corresponding to the format. * @since 3.0 */ public abstract String getFileExtension(); } /** The format with which the drawing must be exported. */ private ExportFormat format; /** The canvas that contains views. */ private ICanvas canvas; /** Defines whether the shapes have been exported. */ private ExportStatus exported; /** The dialogue chooser used to select the targeted file. */ private ExportDialog dialogueBox; /** The PST generator to use. */ private PSTCodeGenerator pstGen; private String log; /** * Creates the action. * @since 3.0 */ public Export() { super(); exported = NOT_YET; } @Override public void flush() { super.flush(); canvas = null; format = null; dialogueBox = null; } @Override public boolean isRegisterable() { return false; } @Override protected void doActionBody() { // Showing the dialog. final int response = dialogueBox.showSaveDialog(null); File f = dialogueBox.getSelectedFile(); // Analysing the result of the dialog. if(response != JFileChooser.APPROVE_OPTION || f==null) exported = CANCEL; else { if(!f.getName().toLowerCase().endsWith(format.getFileExtension().toLowerCase())) f = new File(f.getPath() + format.getFileExtension()); if(f.exists()) { final int replace = JOptionPane.showConfirmDialog(null, LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.173"), //$NON-NLS-1$ Exporter.TITLE_DIALOG_EXPORT, JOptionPane.YES_NO_OPTION); if(replace == JOptionPane.NO_OPTION) exported = CANCEL; // The user doesn't want to replace the file } } if(exported!=CANCEL) { exported = export(f); } } protected ExportStatus export(final File file) { switch(format) { case BMP: return exportAsBMP(file); case EPS_LATEX: return exportAsEPS(file); case JPG: return exportAsJPG(file); case PDF: return exportAsPDF(file); case PDF_CROP: return exportAsPDF(file); case PNG: return exportAsPNG(file); case TEX: return exportAsPST(file); } return FAIL; } @Override public boolean canDo() { return canvas!=null && format!=null && dialogueBox!=null && (format==ExportFormat.BMP || format==ExportFormat.JPG || format==ExportFormat.PNG || pstGen!=null); } @Override public boolean hadEffect() { return super.hadEffect() && exported!=OK; } /** * Exports the drawing as a PNG picture. * @param file The targeted location. * @return true if the picture was well created. */ protected ExportStatus exportAsPNG(final File file) { final BufferedImage rendImage = createRenderedImage(); ExportStatus success = FAIL; try { ImageIO.write(rendImage, "png", file); //$NON-NLS-1$ success = OK; }catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); } rendImage.flush(); return success; } /** * Exports the drawing as a JPG picture. * @param file The targeted location. * @return true if the picture was well created. */ protected ExportStatus exportAsJPG(final File file) { final BufferedImage rendImage = createRenderedImage(); ExportStatus success = FAIL; try { final ImageWriteParam iwparam = new JPEGImageWriteParam(Locale.getDefault()); final ImageWriter iw = ImageIO.getImageWritersByFormatName("jpg").next();//$NON-NLS-1$ try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file)){ iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); iwparam.setCompressionQuality(1f-dialogueBox.getCompressionRate()/100f); iw.setOutput(ios); iw.write(null, new IIOImage(rendImage, null, null), iwparam); iw.dispose(); success = OK; } }catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); } rendImage.flush(); return success; } /** * Creates a ps document of the given views (compiled using latex). * @param file The targeted location. * @return True: the file has been created. * @since 3.0 */ protected ExportStatus exportAsEPS(final File file) { File psFile; try{ psFile = LaTeXGenerator.createEPSFile(canvas.getDrawing(), file.getAbsolutePath(), canvas, pstGen); }catch(final IllegalAccessException e) { log = e.getMessage(); psFile = null; } return psFile!=null && psFile.exists() ? OK : FAIL; } /** * Creates a pdf document of the given views (compiled using latex). * @param file The targeted location. * @return True: the file has been created. * @since 3.0 */ protected ExportStatus exportAsPDF(final File file) { File pdfFile; try{ pdfFile = LaTeXGenerator.createPDFFile(canvas.getDrawing(), file.getAbsolutePath(), canvas, format==ExportFormat.PDF_CROP, pstGen); } catch(final IllegalAccessException e) { log = e.getMessage(); pdfFile = null; } return pdfFile!=null && pdfFile.exists() ? OK : FAIL; } /** * Exports the drawing as a PST document. * @param file The targeted location. * @return true if the PST document was been successfully created. */ protected ExportStatus exportAsPST(final File file) { ExportStatus ok; try { try(final FileWriter fw = new FileWriter(file); final BufferedWriter bw = new BufferedWriter(fw); final PrintWriter out = new PrintWriter(bw)) { out.println(LaTeXGenerator.getLatexDrawing(pstGen)); ok = OK; } }catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); ok = FAIL; } return ok; } /** * Exports the drawing as a BMP picture. * @param file The targeted location. * @return true if the picture was successfully created. */ protected ExportStatus exportAsBMP(final File file){ final BufferedImage rendImage = createRenderedImage(); ExportStatus success = FAIL; try { final ImageWriteParam iwparam = new BMPImageWriteParam(); final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$ try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file)) { iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); iw.setOutput(ios); iw.write(null, new IIOImage(rendImage, null, null), iwparam); iw.dispose(); success = OK; } }catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); } rendImage.flush(); return success; } /** * @return A buffered image that contains given views (not null). * @since 3.0 */ protected BufferedImage createRenderedImage() { final IPoint tr = canvas.getTopRightDrawingPoint(); final IPoint bl = canvas.getBottomLeftDrawingPoint(); final double scale = 3.0; final int width = (int)(scale*Math.abs(tr.getX()-bl.getX())); final int height = (int)(scale*Math.abs(bl.getY()-tr.getY())); final BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); final Graphics2D graphic = bi.createGraphics(); graphic.setColor(Color.WHITE); graphic.fillRect(0, 0, width, height); graphic.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); graphic.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); graphic.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); graphic.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); graphic.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); graphic.scale(scale, scale); graphic.translate(-bl.getX(), -tr.getY()); synchronized(canvas.getViews()){ for(final IViewShape view : canvas.getViews()) view.paint(graphic, null); } graphic.dispose(); return bi; } public String getLog() { return log; } /** * @param dialogBox The file chooser to set. * @since 3.0 */ public void setDialogueBox(final ExportDialog dialogBox) { dialogueBox = dialogBox; } /** * @param expFormat The expFormat to set. * @since 3.0 */ public void setFormat(final ExportFormat expFormat) { format = expFormat; } /** * @param theCanvas The theCanvas to set. * @since 3.0 */ public void setCanvas(final ICanvas theCanvas) { canvas = theCanvas; } /** * @param gen The PST generator to use for latex, ps, or pdf exports. * @since 3.0 */ public void setPstGen(final PSTCodeGenerator gen) { pstGen = gen; } public ExportStatus getExported() { return exported; } } ExportTemplate.scala000066400000000000000000000041011321075051700340740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions import java.io.File import org.malai.swing.action.library.IOAction import javax.swing.JLabel import javax.swing.JOptionPane import net.sf.latexdraw.filters.SVGFilter import net.sf.latexdraw.generators.svg.SVGDocumentGenerator import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.ui.LFrame import net.sf.latexdraw.util.LPath /** * This action exports a set of shapes as a template. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud Blouin * @since 3.0 */ class ExportTemplate extends IOAction[LFrame, JLabel] with TemplateAction { override def canDo = ui!=null && _templatesMenu.isDefined protected def doActionBody() { var path = "" var ok = true var cancelled = false do { val templateName = JOptionPane.showInputDialog(this, LangTool.INSTANCE.getStringOthers("DrawContainer.nameTemplate")) //$NON-NLS-1$ path = LPath.PATH_TEMPLATES_DIR_USER + File.separator + templateName + SVGFilter.SVG_EXTENSION if(templateName==null) cancelled = true else if(new File(path).exists) ok = JOptionPane.showConfirmDialog(ui, LangTool.INSTANCE.getStringOthers("DrawContainer.overwriteTemplate"), //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.42"), JOptionPane.YES_NO_OPTION) match { //$NON-NLS-1$ case JOptionPane.YES_OPTION => true case _ => false } else ok = templateName.length>0 }while(!ok && !cancelled) if(!cancelled) SVGDocumentGenerator.INSTANCE.saveTemplate(path, ui, progressBar, statusWidget, _templatesMenu.get) } } InsertPSTCode.scala000066400000000000000000000057631321075051700335640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions import java.text.ParseException import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.parsers.pst.parser.PSTParser import javax.swing.JLabel import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.badaboom.BadaboomManager /** * This action converts PST code into shapes and add them to the drawing. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2013-02-19
    * @author Arnaud Blouin * @since 3.0 */ class InsertPSTCode extends Action with DrawingAction with Undoable { /** The code to parse. */ var _code : Option[String] = None /** The status bar. */ var _statusBar : Option[JLabel] = None /** The added shapes. */ var _shapes : Option[IShape] = None protected def doActionBody() { PSTParser.cleanErrors try { new PSTParser().parsePSTCode(_code.get) match { case Some(group) if !group.isEmpty => val sh = if(group.size()>1) group else group.getShapeAt(0) val br = sh.getBottomRightPoint val tl = sh.getTopLeftPoint val tx = if(tl.getX<0) -tl.getX+50 else 0 val ty = if(tl.getY<0) -tl.getY+50 else 0 _shapes = Some(sh) sh.translate(tx, ty) redo if(_statusBar.isDefined) _statusBar.get.setText(LangTool.INSTANCE.getString16("LaTeXDrawFrame.36")) case _ => if(_statusBar.isDefined) _statusBar.get.setText(LangTool.INSTANCE.getString16("LaTeXDrawFrame.33")) } }catch{ case ex : Throwable => BadaboomCollector.INSTANCE.add(ex) if(_statusBar.isDefined) _statusBar.get.setText(LangTool.INSTANCE.getString16("LaTeXDrawFrame.34")) } PSTParser.errorLogs.foreach{str => BadaboomCollector.INSTANCE.add(new ParseException(str, -1))} done } override def undo() { if(_shapes.isDefined) { _drawing.get.removeShape(_shapes.get) _drawing.get.setModified(true) } } override def redo() { if(_shapes.isDefined) { _drawing.get.addShape(_shapes.get) _drawing.get.setModified(true) } } def setStatusBar(value:JLabel) { _statusBar = if(value!=null) Some(value) else None } def setCode(value:String) { _code = if(value!=null) Some(value) else None } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.4") override def canDo = _code.isDefined && _drawing.isDefined override def hadEffect() = isDone && _shapes.isDefined override def isRegisterable = hadEffect } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/LoadDrawing.java000066400000000000000000000046551321075051700332450ustar00rootroot00000000000000package net.sf.latexdraw.actions; import net.sf.latexdraw.ui.LFrame; import org.malai.swing.action.library.Load; import javax.swing.*; import java.io.File; /** * This action loads an SVG document into the app. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @date 06/09/2011 * @since 3.0 */ public class LoadDrawing extends Load implements Modifying { /** The file chooser that will be used to select the location to save. */ protected JFileChooser fileChooser; File currentFolder; @Override protected void doActionBody() { if(ui.isModified()) switch(SaveDrawing.showAskModificationsDialog(ui)) { case JOptionPane.NO_OPTION: //load load(); break; case JOptionPane.YES_OPTION: // save + load final File f = SaveDrawing.showDialog(fileChooser, true, ui, file, currentFolder); if(f!=null) { openSaveManager.save(f.getPath(), ui, progressBar, statusWidget); ui.setModified(false); load(); } break; case JOptionPane.CANCEL_OPTION: // nothing break; default: break; } else load(); done(); } @Override public void flush() { super.flush(); fileChooser = null; } @Override public boolean canDo() { return ui!=null && openSaveManager!=null && fileChooser!=null; } protected void load() { if(file==null) { fileChooser.setCurrentDirectory(currentFolder); file=fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ? fileChooser.getSelectedFile() : null; } else fileChooser.setSelectedFile(file); if(file!=null && file.canRead()) super.doActionBody(); else ok = false; } /** * @param fileChooser The file chooser that will be used to select the location to save. * @since 3.0 */ public void setFileChooser(final JFileChooser fileChooser) { this.fileChooser = fileChooser; } public void setCurrentFolder(final File currFolder) { currentFolder = currFolder; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/LoadTemplate.scala000066400000000000000000000030721321075051700335570ustar00rootroot00000000000000package net.sf.latexdraw.actions import javax.swing.JLabel import net.sf.latexdraw.generators.svg.SVGDocumentGenerator import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.ui.LFrame import org.malai.swing.action.library.IOAction import org.malai.undo.Undoable /** * This action loads a given template.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class LoadTemplate extends IOAction[LFrame, JLabel] with Undoable with DrawingAction with Modifying { private var insertedShapes: IShape = _ protected def doActionBody() { insertedShapes = SVGDocumentGenerator.INSTANCE.insert(file.getPath, ui) ok = insertedShapes != null } override def redo() { _drawing.get.addShape(insertedShapes) } override def undo() { _drawing.get.removeShape(insertedShapes) } override def getUndoName = "template added" override def canDo = super.canDo && drawing.isDefined override def isRegisterable = true override def flush() { super.flush() insertedShapes = null } }ModifyLatexProperties.java000066400000000000000000000117171321075051700352720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator.VerticalPosition; import net.sf.latexdraw.lang.LangTool; import org.malai.action.Action; import org.malai.undo.Undoable; /** * This action modifies the latex properties of the current drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/14/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ModifyLatexProperties extends Action implements Undoable, Modifying { /** * This enumeration defines the different LaTeX properties that can be modified. */ public enum LatexProperties { /** The scale of the drawing. */ SCALE { @Override public boolean isValueSupported(final Object value) { return value instanceof Double; } }, /** Modification of the comments. */ COMMENT { @Override public boolean isValueSupported(final Object value) { return value instanceof String; } }, /** Modification of the packages. */ PACKAGES { @Override public boolean isValueSupported(final Object value) { return value instanceof String; } }, /** Modification of the caption. */ CAPTION { @Override public boolean isValueSupported(final Object value) { return value instanceof String; } }, /** Modification of the label. */ LABEL { @Override public boolean isValueSupported(final Object value) { return value instanceof String; } }, /** Modification of the vertical position. */ POSITION_VERTICAL { @Override public boolean isValueSupported(final Object value) { return value instanceof VerticalPosition; } }, /** Modification of the horizontal position. */ POSITION_HORIZONTAL { @Override public boolean isValueSupported(final Object value) { return value instanceof Boolean; } }; /** * @param value The value to test. * @return True: the given value corresponds to the excepted value of the property. * @since 3.0 */ public abstract boolean isValueSupported(final Object value); } /** The new value to set. */ protected Object value; /** The saved value used for undo/redo. */ protected Object oldValue; /** The property to modify. */ protected LatexProperties property; /** The LaTeX generator to modify. */ protected LaTeXGenerator generator; @Override public boolean isRegisterable() { return hadEffect(); } @Override protected void doActionBody() { switch(property) { case SCALE : oldValue = generator.getScale(); break; case CAPTION : oldValue = generator.getCaption(); break; case COMMENT : oldValue = generator.getComment(); break; case LABEL : oldValue = generator.getLabel(); break; case PACKAGES : oldValue = LaTeXGenerator.getPackages(); break; case POSITION_HORIZONTAL: oldValue = generator.isPositionHoriCentre(); break; case POSITION_VERTICAL : oldValue = generator.getPositionVertToken(); break; } applyValue(value); } private void applyValue(final Object object) { switch(property) { case SCALE : generator.setScale((Double)object); break; case CAPTION : generator.setCaption((String)object); break; case COMMENT : generator.setComment((String)object); break; case LABEL : generator.setLabel((String)object); break; case PACKAGES : LaTeXGenerator.setPackages((String)object); break; case POSITION_HORIZONTAL: generator.setPositionHoriCentre((Boolean)object); break; case POSITION_VERTICAL : generator.setPositionVertToken((VerticalPosition)object); break; } } @Override public boolean canDo() { // PACKAGES does not require the generator since it is a static attribute. return property!=null && property.isValueSupported(value) && (generator!=null || property==LatexProperties.PACKAGES); } @Override public void undo() { applyValue(oldValue); } @Override public void redo() { applyValue(value); } @Override public String getUndoName() { return LangTool.INSTANCE.getStringActions("Actions.0"); //$NON-NLS-1$ } /** * @param value The new value to set. * @since 3.0 */ public void setValue(final Object value) { this.value = value; } /** * @param property The property to modify. * @since 3.0 */ public void setProperty(final LatexProperties property) { this.property = property; } /** * @param generator The LaTeX generator to modify. * @since 3.0 */ public void setGenerator(final LaTeXGenerator generator) { this.generator = generator; } } ModifyMagneticGrid.java000066400000000000000000000072071321075051700344740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import net.sf.latexdraw.glib.ui.LMagneticGrid; import net.sf.latexdraw.glib.ui.LMagneticGrid.GridStyle; import net.sf.latexdraw.lang.LangTool; import org.malai.action.library.ModifyValue; import org.malai.undo.Undoable; /** * This action modifies a property of the magnetic grid.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/14/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ModifyMagneticGrid extends ModifyValue implements Undoable { /** * The different properties of the magnetic grid that can be modified. */ public enum GridProperties { /** Modification of the style of the grid. */ STYLE { @Override public boolean isValidValue(final Object object) { return object instanceof GridStyle; } }, /** Defines if the grid must be magnetic. */ MAGNETIC { @Override public boolean isValidValue(final Object object) { return object instanceof Boolean; } }, /** Modification of the spacing between the lines of the grid. */ GRID_SPACING { @Override public boolean isValidValue(final Object object) { return object instanceof Integer; } }; /** * @param object The value to test. * @return True: if the type of the given value matches the type of the property. * @since 3.0 */ public abstract boolean isValidValue(final Object object); } /** The magnetic grid to modify. */ protected LMagneticGrid grid; /** The property to modify. */ protected GridProperties property; /** A back-up of the former value of the modified property. */ protected Object oldValue; @Override public void flush() { super.flush(); grid = null; property = null; oldValue = null; } @Override public void undo() { applyValue(oldValue); } @Override public void redo() { applyValue(value); } @Override protected void applyValue(final Object object) { switch(property) { case GRID_SPACING: grid.setGridSpacing((Integer)object); break; case MAGNETIC: grid.setMagnetic((Boolean)object); break; case STYLE: grid.setStyle((GridStyle)object); break; } } @Override public String getUndoName() { return LangTool.INSTANCE.getStringActions("Actions.1"); //$NON-NLS-1$ } @Override public boolean isRegisterable() { return true; } @Override protected void doActionBody() { // Backing-up the value of the property that will be modified. switch(property) { case GRID_SPACING: oldValue = grid.getGridSpacing(); break; case MAGNETIC: oldValue = grid.isMagnetic(); break; case STYLE: oldValue = grid.getStyle(); break; } // Modifying the property. redo(); } @Override public boolean canDo() { return super.canDo() && grid!=null; } @Override protected boolean isValueMatchesProperty() { return property!=null && property.isValidValue(value); } /** * @param grid The grid to modify. * @since 3.0 */ public void setGrid(final LMagneticGrid grid) { this.grid = grid; } /** * @param property The property to modify. * @since 3.0 */ public void setProperty(final GridProperties property) { this.property = property; } } ModifyPencilParameter.java000066400000000000000000000220441321075051700352060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import java.awt.Color; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp.FreeHandType; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.instruments.Pencil; /** * This action modifies a parameter of the pencil and updates its corresponding instrument.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/19/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ModifyPencilParameter extends ShapePropertyAction { /** The pencil to modify. */ protected Pencil pencil; @Override public void flush() { super.flush(); pencil = null; } @Override public boolean canDo() { return super.canDo() && pencil!=null; } @Override protected boolean isPropertySupported() { return super.isPropertySupported() && property!=ShapeProperties.TEXT; } @Override protected void doActionBody() { // Modification of the pencil. applyValue(value); } @Override public boolean isRegisterable() { return false; } /** * Defines the pencil to modify. * @param pencil The pencil to modify. * @since 3.0 */ public void setPencil(final Pencil pencil) { this.pencil = pencil; } @Override protected void applyValue(final Object obj) { switch(property) { case BORDER_POS: pencil.groupParams().setBordersPosition((BorderPos) value); break; case COLOUR_DBLE_BORD: pencil.groupParams().setDbleBordCol((Color) value); break; case COLOUR_FILLING: pencil.groupParams().setFillingCol((Color) value); break; case COLOUR_GRADIENT_END: pencil.groupParams().setGradColEnd((Color) value); break; case COLOUR_GRADIENT_START: pencil.groupParams().setGradColStart((Color) value); break; case COLOUR_HATCHINGS: pencil.groupParams().setHatchingsCol((Color) value); break; case COLOUR_LINE: pencil.groupParams().setLineColour((Color) value); break; case COLOUR_SHADOW: pencil.groupParams().setShadowCol((Color) value); break; case DBLE_BORDERS: pencil.groupParams().setHasDbleBord((Boolean) value); break; case DOT_FILLING_COL: pencil.groupParams().setDotFillingCol((Color)value); break; case DOT_SIZE: pencil.groupParams().setDiametre((Double) value); break; case DOT_STYLE: pencil.groupParams().setDotStyle((DotStyle) value); break; case FILLING_STYLE: pencil.groupParams().setFillingStyle((FillingStyle) value); break; case LINE_STYLE: pencil.groupParams().setLineStyle((LineStyle) value); break; case LINE_THICKNESS: pencil.groupParams().setThickness((Double) value); break; case SHADOW: pencil.groupParams().setHasShadow((Boolean) value); break; case ROUND_CORNER_VALUE: pencil.groupParams().setLineArc((Double)value); break; case DBLE_BORDERS_SIZE: pencil.groupParams().setDbleBordSep((Double)value); break; case SHADOW_ANGLE: pencil.groupParams().setShadowAngle((Double)value); break; case SHADOW_SIZE: pencil.groupParams().setShadowSize((Double)value); break; case GRAD_ANGLE: pencil.groupParams().setGradAngle((Double)value); break; case GRAD_MID_POINT: pencil.groupParams().setGradMidPt((Double)value); break; case HATCHINGS_ANGLE: pencil.groupParams().setHatchingsAngle((Double)value); break; case HATCHINGS_SEP: pencil.groupParams().setHatchingsSep((Double)value); break; case HATCHINGS_WIDTH: pencil.groupParams().setHatchingsWidth((Double)value); break; case TEXT_POSITION: pencil.groupParams().setTextPosition((TextPosition)value); break; case ARROW1_STYLE: pencil.groupParams().setArrowStyle((ArrowStyle)value, 0); break; case ARROW2_STYLE: pencil.groupParams().setArrowStyle((ArrowStyle)value, -1); break; case TEXT: // The pencil does not set text values. break; case ARC_END_ANGLE : pencil.groupParams().setAngleEnd((Double)value); break; case ARC_START_ANGLE: pencil.groupParams().setAngleStart((Double)value); break; case ARC_STYLE : pencil.groupParams().setArcStyle((ArcStyle)value); break; case GRID_START: pencil.groupParams().setGridStart(((IPoint)value).getX(), ((IPoint)value).getY()); break; case GRID_END: pencil.groupParams().setGridEnd(((IPoint)value).getX(), ((IPoint)value).getY()); break; case GRID_LABEL_POSITION_Y: pencil.groupParams().setXLabelSouth((Boolean)value); break; case GRID_LABEL_POSITION_X: pencil.groupParams().setYLabelWest((Boolean)value); break; case ARROW_INSET: pencil.groupParams().setArrowInset((Double)value); break; case ARROW_LENGTH: pencil.groupParams().setArrowLength((Double)value); break; case ARROW_BRACKET_NUM: pencil.groupParams().setBracketNum((Double)value); break; case ARROW_DOT_SIZE_DIM: pencil.groupParams().setDotSizeDim((Double)value); break; case ARROW_DOT_SIZE_NUM: pencil.groupParams().setDotSizeNum((Double)value); break; case ARROW_R_BRACKET_NUM: pencil.groupParams().setRBracketNum((Double)value); break; case ARROW_SIZE_DIM: pencil.groupParams().setArrowSizeDim((Double)value); break; case ARROW_SIZE_NUM: pencil.groupParams().setArrowSizeNum((Double)value); break; case ARROW_T_BAR_SIZE_DIM: pencil.groupParams().setTBarSizeDim((Double)value); break; case ARROW_T_BAR_SIZE_NUM: pencil.groupParams().setTBarSizeNum((Double)value); break; case GRID_SIZE_LABEL: pencil.groupParams().setLabelsSize((Integer)value); break; case GRID_ORIGIN: pencil.groupParams().setOrigin(((IPoint)value).getX(), ((IPoint)value).getY()); break; case AXES_STYLE: pencil.groupParams().setAxesStyle((AxesStyle)value); break; case AXES_TICKS_STYLE: pencil.groupParams().setTicksStyle((TicksStyle)value); break; // case AXES_TICKS_SIZE: pencil.groupParams().setTicksSize((Double)value); break; case AXES_TICKS_SHOW: pencil.groupParams().setTicksDisplayed((PlottingStyle)value); break; case AXES_LABELS_INCR: pencil.groupParams().setIncrement((IPoint)value); break; case AXES_LABELS_SHOW: pencil.groupParams().setLabelsDisplayed((PlottingStyle)value); break; case AXES_SHOW_ORIGIN: pencil.groupParams().setShowOrigin((Boolean)value); break; case AXES_LABELS_DIST: pencil.groupParams().setDistLabels((IPoint)value); break; case GRID_LABELS_COLOUR: pencil.groupParams().setGridLabelsColour((Color)value); break; case GRID_SUBGRID_COLOUR: pencil.groupParams().setSubGridColour((Color)value); break; case GRID_WIDTH: pencil.groupParams().setGridWidth((Double)value); break; case GRID_SUBGRID_WIDTH: pencil.groupParams().setSubGridWidth((Double)value); break; case GRID_DOTS: pencil.groupParams().setGridDots((Integer)value); break; case GRID_SUBGRID_DOTS: pencil.groupParams().setSubGridDots((Integer)value); break; case GRID_SUBGRID_DIV: pencil.groupParams().setSubGridDiv((Integer)value); break; case FREEHAND_STYLE: pencil.groupParams().setType((FreeHandType)value); break; case FREEHAND_INTERVAL: pencil.groupParams().setInterval((Integer)value); break; case FREEHAND_OPEN: pencil.groupParams().setOpen((Boolean)value); break; case SHOW_POINTS: pencil.groupParams().setShowPts((Boolean)value); break; case PLOT_NB_PTS: pencil.groupParams().setNbPlottedPoints((Integer)value); break; case PLOT_MAX_X: pencil.groupParams().setPlotMaxX((Double)value); break; case PLOT_MIN_X: pencil.groupParams().setPlotMinX((Double)value); break; case X_SCALE: pencil.groupParams().setXScale((Double)value); break; case Y_SCALE: pencil.groupParams().setYScale((Double)value); break; case PLOT_EQ: pencil.groupParams().setPlotEquation((String)value); break; case PLOT_POLAR: pencil.groupParams().setPolar((Boolean)value); break; case PLOT_STYLE: pencil.groupParams().setPlotStyle((IPlotProp.PlotStyle)value); break; } } } ModifyPencilStyle.java000066400000000000000000000042511321075051700343660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import javax.swing.JLabel; import net.sf.latexdraw.instruments.EditionChoice; import net.sf.latexdraw.instruments.Pencil; import org.malai.action.Action; /** * This action allows to set the kind of shape that the pencil must draw.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/14/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ModifyPencilStyle extends Action { /** The pencil to set. */ private Pencil pencil; /** The new editing choice to set. */ private EditionChoice editingChoice; private JLabel statusBar; @Override public void flush() { super.flush(); pencil = null; editingChoice = null; statusBar = null; } @Override protected void doActionBody() { pencil.setCurrentChoice(editingChoice); if(statusBar != null) { statusBar.setText(editingChoice.getExplanations()); statusBar.setVisible(true); } } @Override public boolean canDo() { return pencil!=null && editingChoice!=null && pencil.currentChoice()!=editingChoice; } @Override public boolean isRegisterable() { return false; } /** * Sets the pencil to parameterise. * @param pencil The pencil. * @since 3.0 */ public void setPencil(final Pencil pencil) { this.pencil = pencil; } /** * Sets the new editing choice of the pencil. * @param editingChoice The new editing choice (can be null). * @since 3.0 */ public void setEditingChoice(final EditionChoice editingChoice) { this.editingChoice = editingChoice; } /** * Sets the status bar. * @param bar The JLabel used as the status bar. Can be null. */ public void setStatusBar(final JLabel bar) { statusBar = bar; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/Modifying.java000066400000000000000000000015451321075051700327720ustar00rootroot00000000000000package net.sf.latexdraw.actions; /** * This interface permits to tag with a type actions that modifies the drawing. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @date 08/23/2011 * @since 3.0 */ public interface Modifying { // Nothing to add. This interface is just to add a type to actions that modifies the drawing. } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/NewDrawing.java000066400000000000000000000057371321075051700331210ustar00rootroot00000000000000package net.sf.latexdraw.actions; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.instruments.PreferencesSetter; import net.sf.latexdraw.ui.LFrame; import org.malai.action.ActionsRegistry; import org.malai.swing.action.library.IOAction; import org.malai.undo.UndoCollector; import javax.swing.*; import java.io.File; /** * This action permits to create a new drawing and initialises the application as required.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/09/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class NewDrawing extends IOAction implements Modifying { /** The file chooser that will be used to select the location to save. */ protected JFileChooser fileChooser; /** The instrument used that manage the preferences. */ protected PreferencesSetter prefSetter; File currentFolder; @Override protected void doActionBody() { if(ui.isModified()) switch(SaveDrawing.showAskModificationsDialog(ui)) { case JOptionPane.NO_OPTION: //new newDrawing(); break; case JOptionPane.YES_OPTION: // save + load final File f = SaveDrawing.showDialog(fileChooser, true, ui, file, currentFolder); if(f!=null) { openSaveManager.save(f.getPath(), ui, progressBar, statusWidget); ui.setModified(false); newDrawing(); } break; case JOptionPane.CANCEL_OPTION: // nothing break; default: break; } else newDrawing(); } protected void newDrawing() { ui.reinit(); UndoCollector.INSTANCE.clear(); ActionsRegistry.INSTANCE.clear(); FlyweightThumbnail.clear(); try{ prefSetter.readXMLPreferences(); } catch(final Exception exception){ BadaboomCollector.INSTANCE.add(exception); } } @Override public boolean canDo() { return fileChooser!=null && ui!=null && openSaveManager!=null && prefSetter!=null; } @Override public void flush() { super.flush(); fileChooser = null; } /** * @param fileChooser The file chooser that will be used to select the location to save. * @since 3.0 */ public void setFileChooser(final JFileChooser fileChooser) { this.fileChooser = fileChooser; } /** * @param prefSetter The instrument used that manage the preferences. * @since 3.0 */ public void setPrefSetter(final PreferencesSetter prefSetter) { this.prefSetter = prefSetter; } public void setCurrentFolder(final File currFolder) { currentFolder = currFolder; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/SaveDrawing.java000066400000000000000000000116161321075051700332570ustar00rootroot00000000000000package net.sf.latexdraw.actions; import net.sf.latexdraw.filters.SVGFilter; import net.sf.latexdraw.instruments.PreferencesSetter; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LFrame; import org.malai.swing.action.library.Save; import org.malai.swing.ui.SwingUI; import javax.swing.*; import java.io.File; /** * This action saves the given drawing into an SVG document. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @date 06/09/2011 * @since 3.0 */ public class SaveDrawing extends Save { /** The file chooser that will be used to select the location to save. */ protected JFileChooser fileChooser; /** True: A dialog bow will be always shown to ask the location to save. */ protected boolean saveAs; /** True: the app will be closed after the drawing saved. */ protected boolean saveOnClose; /** The instrument that manages the preferences. */ protected PreferencesSetter prefSetter; File currentFolder; /** * Creates the action. * @since 3.0 */ public SaveDrawing() { super(); saveAs = false; saveOnClose = false; } @Override public boolean canDo() { return ui!=null && openSaveManager!=null && fileChooser!=null; } @Override protected void doActionBody() { if(saveOnClose) if(ui.isModified()) { saveAs = true; switch(showAskModificationsDialog(ui)) { case JOptionPane.NO_OPTION: // exit quit(); break; case JOptionPane.YES_OPTION: // save + exit final File f = showDialog(fileChooser, saveAs, ui, file, currentFolder); if(f!=null) { file = f; super.doActionBody(); quit(); } break; case JOptionPane.CANCEL_OPTION: ok = false; break; default: break; } } else quit(); else { if(file==null) file = showDialog(fileChooser, saveAs, ui, null, currentFolder); if(file==null) ok = false; else super.doActionBody(); } done(); } private void quit() { // Saving the preferences. if(prefSetter!=null) prefSetter.writeXMLPreferences(); System.exit(1); } @Override public void flush() { super.flush(); prefSetter = null; fileChooser = null; } /** * @return -1: cancel, 0: yes, 1: no * @since 3.0 */ protected static int showAskModificationsDialog(final SwingUI ui) { return JOptionPane.showConfirmDialog(ui, LangTool.INSTANCE.getStringActions("Actions.2"), //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"), JOptionPane.YES_NO_CANCEL_OPTION); //$NON-NLS-1$ } /** * Show the export dialog to select a path. * @since 3.0 */ protected static File showDialog(final JFileChooser fileChooser, final boolean saveAs, final SwingUI ui, final File file, final File currentFolder) { File f; if(saveAs || file==null && ui.isModified()) { fileChooser.setCurrentDirectory(currentFolder); f=fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION ? fileChooser.getSelectedFile() : null; } else f = file; if(f==null) return null; if(!f.getPath().toLowerCase().endsWith(SVGFilter.SVG_EXTENSION)) f = new File(f.getPath() + SVGFilter.SVG_EXTENSION); if(f.exists()) { final int replace = JOptionPane.showConfirmDialog(null, LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.173"), //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"), JOptionPane.YES_NO_OPTION); //$NON-NLS-1$ if(replace == JOptionPane.NO_OPTION || replace == JOptionPane.CLOSED_OPTION) return null; } return f; } /** * @param prefSetter The instrument that manages the preferences. * @since 3.0 */ public void setPrefSetter(final PreferencesSetter prefSetter) { this.prefSetter = prefSetter; } /** * @param fileChooser The file chooser that will be used to select the location to save. * @since 3.0 */ public void setFileChooser(final JFileChooser fileChooser) { this.fileChooser = fileChooser; } /** * @param saveAs True: A dialog bow will be always shown to ask the location to save. * @since 3.0 */ public void setSaveAs(final boolean saveAs) { this.saveAs = saveAs; } /** * @param saveOnClose True: the app will be closed after the drawing saved. * @since 3.0 */ public void setSaveOnClose(final boolean saveOnClose) { this.saveOnClose = saveOnClose; } public void setCurrentFolder(final File currFolder) { currentFolder = currFolder; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/SetUnit.java000066400000000000000000000033351321075051700324370ustar00rootroot00000000000000package net.sf.latexdraw.actions; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.ScaleRuler; import net.sf.latexdraw.ui.ScaleRuler.Unit; import org.malai.action.Action; import org.malai.undo.Undoable; /** * This action allows to modify the unit.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/13/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class SetUnit extends Action implements Undoable { /** The new unit to set. */ protected Unit unit; /** The former unit. */ protected Unit oldUnit; @Override public void flush() { super.flush(); unit = null; oldUnit = null; } @Override public void undo() { ScaleRuler.setUnit(oldUnit); } @Override public void redo() { ScaleRuler.setUnit(unit); } @Override public String getUndoName() { return LangTool.INSTANCE.getStringActions("Actions.3"); //$NON-NLS-1$ } @Override public boolean isRegisterable() { return true; } @Override protected void doActionBody() { oldUnit = ScaleRuler.getUnit(); redo(); } @Override public boolean canDo() { return unit!=null; } /** * @param unit The new unit to set. * @since 3.0 */ public void setUnit(final Unit unit) { this.unit = unit; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/ShapeAction.scala000066400000000000000000000021751321075051700334050ustar00rootroot00000000000000package net.sf.latexdraw.actions import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * This trait encapsulates a shape attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 * @param The type of the shape that the action handles. */ trait ShapeAction[T <: IShape] { /** The shape to add. */ var _shape : Option[T] = None /** * Sets the shape to add. * @param shape The shape to add. * @since 3.0 */ def setShape(shape : T) { _shape = Some(shape) } /** * @return The shape to modify. * @since 3.0 */ def shape = _shape } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/ShapesAction.scala000066400000000000000000000026651321075051700335740ustar00rootroot00000000000000package net.sf.latexdraw.actions import java.util.ArrayList import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * This trait encapsulates a set of shapes attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 * @param The type of the shape that the action handles. */ trait ShapesAction { /** The shapes to handle. */ val _shapes : java.util.List[IShape] = new ArrayList[IShape]() /** * Add a shape to the list of shapes to handle. * @param shape The shape to handle. * @since 3.0 */ def addShape(shape : IShape) { if(shape!=null) _shapes.add(shape) } /** * Sets the shape to handle. * @param shape The shape to handle. Can be null. * @since 3.0 */ def setShape(shape : IShape) { _shapes.clear if(shape!=null) _shapes.add(shape) } /** * @return The shapes to handle. * @since 3.0 */ def shapes = _shapes } ShowHideAction.java000066400000000000000000000023311321075051700336300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import org.malai.action.Action; /** * This abstract action modifies the visibility of an object.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/12/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public abstract class ShowHideAction extends Action { /** True: the code panel will be show. Otherwise, it will be hide. */ protected boolean show; /** * Creates the action. * @since 3.0 */ protected ShowHideAction() { super(); } /** * Defines if the code panel must be hide or shown. * @param show True: the code panel will be show. Otherwise, it will be hide. * @since 3.0 */ public void setVisible(final boolean show) { this.show = show; } } ShowHideScaleRuler.java000066400000000000000000000024451321075051700344620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import net.sf.latexdraw.ui.ScaleRuler; /** * This action shows/hides scale rulers.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/12/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class ShowHideScaleRuler extends ShowHideAction { /** The scale ruler to show/hide. */ protected ScaleRuler ruler; @Override public void flush() { super.flush(); ruler = null; } @Override public boolean isRegisterable() { return false; } @Override protected void doActionBody() { ruler.setVisible(show); } @Override public boolean canDo() { return ruler!=null; } /** * @param ruler The scale ruler to show/hide. * @since 3.0 */ public void setRuler(final ScaleRuler ruler) { this.ruler = ruler; } } TemplateAction.scala000066400000000000000000000020401321075051700340300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions import org.malai.swing.widget.MMenu /** * This trait encapsulates the template menu.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ trait TemplateAction { /** The menu that contains the template menu items. */ var _templatesMenu : Option[MMenu] = None /** * @param menu The menu that contains the template menu items. */ def templatesMenu_=(menu : MMenu) { _templatesMenu = Some(menu) } def templatesMenu = _templatesMenu }UpdateTemplates.scala000066400000000000000000000024721321075051700342310ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions import org.malai.action.Action import net.sf.latexdraw.generators.svg.SVGDocumentGenerator /** * This action updates the templates.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class UpdateTemplates extends Action with TemplateAction{ /** Defines if the thumbnails must be updated. */ var _updateThumbnails = false override def isRegisterable = false override def doActionBody() { SVGDocumentGenerator.INSTANCE.updateTemplates(_templatesMenu.get, _updateThumbnails) } override def canDo = _templatesMenu.isDefined /** * @param update Defines if the thumbnails must be updated. */ def updateThumbnails_=(update : Boolean) { _updateThumbnails = update } def updateThumbnails = _updateThumbnails } WritePreferences.java000066400000000000000000000025471321075051700342450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actionspackage net.sf.latexdraw.actions; import net.sf.latexdraw.instruments.PreferencesSetter; import org.malai.action.Action; /** * This action writes the preferences.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 31/05/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class WritePreferences extends Action { /** The setter that sets the preferences. */ protected PreferencesSetter setter; @Override public boolean isRegisterable() { return false; } @Override protected void doActionBody() { setter.writeXMLPreferences(); } @Override public boolean canDo() { return setter!=null; } /** * @param setter The setter that sets the preferences. * @since 3.0 */ public void setSetter(final PreferencesSetter setter) { this.setter = setter; } @Override public void flush() { super.flush(); setter = null; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shape/000077500000000000000000000000001321075051700312755ustar00rootroot00000000000000AddShape.scala000066400000000000000000000030441321075051700336750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.lang.LangTool /** * This action adds a shape to a drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class AddShape extends Action with ShapeAction[IShape] with DrawingAction with Undoable with Modifying { override protected def doActionBody() { _drawing.get.addShape(shape.get) _drawing.get.setModified(true) } override def isRegisterable = true override def getUndoName = LangTool.INSTANCE.getStringOthers("UndoRedoManager.create") //$NON-NLS-1$ override def redo() { doActionBody } override def undo() { _drawing.get.removeShape(shape.get) _drawing.get.setModified(true) } override def canDo = _drawing.isDefined && _shape.isDefined } AlignShapes.scala000066400000000000000000000145111321075051700344230ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import java.awt.geom.Rectangle2D import net.sf.latexdraw.actions.{Modifying, ShapeAction} import net.sf.latexdraw.glib.models.interfaces.shape.{IGroup, IPoint} import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.util.LNumber import org.malai.action.Action import org.malai.mapping.MappingRegistry import org.malai.undo.Undoable import scala.collection.JavaConversions._ import scala.collection.mutable.ListBuffer /** * This enumeration describes the different possible alignment types. */ object AlignmentType extends Enumeration { type AlignmentType = Value val left, right, top, bottom, midHoriz, midVert = Value } import net.sf.latexdraw.actions.shape.AlignmentType._ /** * This action aligns the provided shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-30-03
    * @author Arnaud BLOUIN * @since 3.0 */ class AlignShapes extends Action with ShapeAction[IGroup] with Undoable with Modifying { /** The reference border that must bounds the shapes to align. */ var _border : Rectangle2D = _ /** The views corresponding to the shapes to align. */ val _views = new ListBuffer[IViewShape]() /** The alignment to perform. */ var _alignment : AlignmentType = _ /** The former positions of the shapes to align. Used for undoing. */ val _oldPositions = new ListBuffer[IPoint]() override protected def doActionBody() { var v : IViewShape = null shape.get.getShapes.foreach{sh=> // Because the views have already computed the border of their shape, we get the corresponding views. _views += MappingRegistry.REGISTRY.getTargetFromSource(sh, classOf[IViewShape]) // Saving the old position of the shape for undoing. _oldPositions += sh.getTopLeftPoint } redo } /** * Middle-horizontal aligning the provided shapes. */ protected def alignMidHoriz() { var theMaxY = Double.MinValue var theMinY = Double.MaxValue var middles = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val maxY = view.getBorder.getMaxY val minY = view.getBorder.getMinY if(maxY>theMaxY) theMaxY = maxY if(minY val middle2 = middles(i) if(!LNumber.equalsDouble(middle2, middle)) sh.translate(0, middle-middle2) i+=1 } } /** * Middle-vertical aligning the provided shapes. */ protected def alignMidVert() { var theMaxX = Double.MinValue var theMinX = Double.MaxValue var middles = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val maxX = view.getBorder.getMaxX val minX = view.getBorder.getMinX if(maxX>theMaxX) theMaxX = maxX if(minX val middle2 = middles(i) if(!LNumber.equalsDouble(middle2, middle)) sh.translate(middle-middle2, 0) i+=1 } } /** * Bottom aligning the provided shapes. */ protected def alignBottom() { var theMaxY = Double.MinValue var ys = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val maxY = view.getBorder.getMaxY if(maxY>theMaxY) theMaxY = maxY ys+=maxY } shape.get.getShapes.foreach{sh=> val y = ys(i) if(!LNumber.equalsDouble(y, theMaxY)) sh.translate(0, theMaxY-y) i+=1 } } /** * Top aligning the provided shapes. */ protected def alignTop() { var theMinY = Double.MaxValue var ys = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val minY = view.getBorder.getMinY if(minY val y = ys(i) if(!LNumber.equalsDouble(y, theMinY)) sh.translate(0, theMinY-y) i+=1 } } /** * Right aligning the provided shapes. */ protected def alignRight() { var theMaxX = Double.MinValue var xs = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val maxX = view.getBorder.getMaxX if(maxX>theMaxX) theMaxX = maxX xs+=maxX } shape.get.getShapes.foreach{sh=> val x = xs(i) if(!LNumber.equalsDouble(x, theMaxX)) sh.translate(theMaxX-x, 0) i+=1 } } /** * Left aligning the provided shapes. */ protected def alignLeft() { var theMinX = Double.MaxValue var xs = new ListBuffer[Double]() var i = 0 _views.foreach{view=> val minX = view.getBorder.getMinX if(minX val x = xs(i) if(!LNumber.equalsDouble(x, theMinX)) sh.translate(theMinX-x, 0) i+=1 } } override def canDo = _shape.isDefined && !_shape.get.isEmpty && _border!=null && _alignment!=null override def undo() { var pt : IPoint = null var pos : Int = 0 var oldPt : IPoint = null shape.get.getShapes.foreach{sh=> // Reusing the old position. pt = sh.getTopLeftPoint oldPt = _oldPositions(pos) if(!pt.equals(oldPt)) sh.translate(oldPt.getX-pt.getX, oldPt.getY-pt.getY) pos += 1 } shape.get.setModified(true) } override def redo() { _alignment match { case AlignmentType.left => alignLeft case AlignmentType.right => alignRight case AlignmentType.top => alignTop case AlignmentType.bottom => alignBottom case AlignmentType.midHoriz => alignMidHoriz case AlignmentType.midVert => alignMidVert } shape.get.setModified(true) } /** * Sets the alignment to perform. */ def setAlignment(align:AlignmentType) { _alignment = align } /** * Sets the reference border that must bounds the shapes to align. */ def setBorder(rec:Rectangle2D) { _border = rec } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.30") override def isRegisterable = true override def flush() { super.flush _views.clear _oldPositions.clear } } CopyShapes.scala000066400000000000000000000035441321075051700343070ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import java.util.ArrayList import scala.collection.JavaConversions.asScalaBuffer import org.malai.action.Action import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory /** * This action copies the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class CopyShapes extends Action { /** The selection action. */ var _selection : Option[SelectShapes] = None /** The copied shapes from the selection. */ var copiedShapes : java.util.List[IShape] = new ArrayList[IShape]() /** The number of times that the shapes have been copied. Use to compute the gap while pasting. */ var nbTimeCopied : Int = 0 override protected def doActionBody() { _selection.get.shapes.foreach{shape => copiedShapes.add(ShapeFactory.duplicate(shape))} } override def cancelledBy(action : Action) = action.isInstanceOf[CopyShapes] override def isRegisterable = true override def canDo = _selection.isDefined && !_selection.get.shapes.isEmpty /** * @param selection The selected shapes to copy or cut. */ def setSelection(selection : SelectShapes) { _selection = Some(selection) } def selection = _selection override def flush() { super.flush copiedShapes.clear _selection = None } } CutShapes.scala000066400000000000000000000035751321075051700341340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.bufferAsJavaList import scala.collection.mutable.Buffer import org.malai.undo.Undoable import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.util.LResources /** * This action cuts the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class CutShapes extends CopyShapes with Undoable with Modifying { /** The index of the cut shapes. */ var _positionShapes : Buffer[Int] = _ override def doActionBody() { // Removing the shapes. val selectedShapes = selection.get.shapes val drawingSh = selection.get.drawing.get.getShapes _positionShapes = selectedShapes.map{sh => copiedShapes.add(sh) drawingSh.indexOf(sh) } deleteShapes selection.get.shapes.clear } /** * Delete the shapes from the drawing. * @since 3.0 */ private def deleteShapes() { val dr = _selection.get.drawing.get copiedShapes.foreach{sh => dr.removeShape(sh)} dr.setModified(true) } override def redo() { deleteShapes } override def undo() { val dr = _selection.get.drawing.get for(i <- _positionShapes.indices) dr.addShape(copiedShapes.get(i), _positionShapes.get(i)) dr.setModified(true) } override def getUndoName = LResources.LABEL_CUT } DeleteShapes.scala000066400000000000000000000035701321075051700345760ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.bufferAsJavaList import scala.collection.mutable.Buffer import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapesAction import net.sf.latexdraw.lang.LangTool /** * This action removes shapes from a drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class DeleteShapes extends Action with ShapesAction with DrawingAction with Undoable with Modifying { /** The index of the deleted shapes into the original list. */ var positionShapes : Buffer[Int] = _ def isRegisterable = true protected def doActionBody() = { val dr = _drawing.get val drawingSh = dr.getShapes positionShapes = _shapes.map{sh => val pos = drawingSh.indexOf(sh) dr.removeShape(sh) pos } dr.setModified(true) } override def canDo = _drawing.isDefined && !_shapes.isEmpty override def undo() { val dr = _drawing.get for(i <- positionShapes.length-1 to 0 by -1) dr.addShape(_shapes.get(i), positionShapes(i)) dr.setModified(true) } override def redo() { doActionBody } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.5") } DistributeShapes.scala000066400000000000000000000144631321075051700355150ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.interfaces.shape.IShape import java.awt.geom.Rectangle2D import org.malai.mapping.MappingRegistry import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import scala.collection.JavaConversions._ import scala.collection.mutable.MutableList import scala.collection.mutable.ListBuffer import net.sf.latexdraw.util.LNumber import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.lang.LangTool /** * This enumeration describes the different possible alignment types. */ object DistributionType extends Enumeration { type DistributionType = Value val vertBot, vertTop, vertMid, vertEq, horizLeft, horizRight, horizMid, horizEq = Value def isVertical(distrib:DistributionType) = distrib==vertBot || distrib==vertTop || distrib==vertMid || distrib==vertEq } import DistributionType._ /** * This action distributes the provided shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-31-03
    * @author Arnaud BLOUIN * @since 3.0 */ class DistributeShapes extends Action with ShapeAction[IGroup] with Undoable with Modifying { /** The reference border that must bounds the shapes to align. */ var _border : Rectangle2D = _ /** The views corresponding to the shapes to align. */ val _views = new ListBuffer[IViewShape]() /** The alignment to perform. */ var _distribution : DistributionType = _ /** The former positions of the shapes to align. Used for undoing. */ val _oldPositions = new ListBuffer[IPoint]() override protected def doActionBody() { var v : IViewShape = null shape.get.getShapes.foreach{sh=> // Because the views have already computed the border of their shape, we get the corresponding views. _views += MappingRegistry.REGISTRY.getTargetFromSource(sh, classOf[IViewShape]) // Saving the old position of the shape for undoing. _oldPositions += sh.getTopLeftPoint } redo } override def canDo = _shape.isDefined && !_shape.get.isEmpty && _border!=null && _distribution!=null override def undo() { var pt : IPoint = null var pos : Int = 0 var oldPt : IPoint = null shape.get.getShapes.foreach{sh=> // Reusing the old position. pt = sh.getTopLeftPoint oldPt = _oldPositions(pos) if(!pt.equals(oldPt)) sh.translate(oldPt.getX-pt.getX, oldPt.getY-pt.getY) pos += 1 } shape.get.setModified(true) } /** * Distributes at equal distance between the shapes. */ protected def distributeEq() { var sortedSh= new ListBuffer[IViewShape]() var mins = new ListBuffer[Double]() var maxs = new ListBuffer[Double]() var i : Int = 0 val shapes = shape.get.getShapes _views.foreach{view => val coord = _distribution match { case DistributionType.horizEq => view.getBorder.getMinX case DistributionType.vertEq => view.getBorder.getMinY } i = mins.indexWhere{value=> coord val x = _distribution match { case DistributionType.horizLeft => view.getBorder.getMinX case DistributionType.horizMid => view.getBorder.getCenterX case DistributionType.horizRight => view.getBorder.getMaxX case DistributionType.vertBot => view.getBorder.getMaxY case DistributionType.vertMid => view.getBorder.getCenterY case DistributionType.vertTop => view.getBorder.getMinY } i = centres.indexWhere{value=> x *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 20/12/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class InitTextSetter extends ActivateInstrument { /** The text setter to move. */ protected TextSetter setter; /** The text to set to the setter. */ protected String text; /** The position that takes account of the zoom. */ protected IPoint relativePoint; /** The position that does not taks account of the zoom (for the text field). */ protected IPoint absolutePoint; /** The text (shape) to modify throw the setter. Can be null. */ protected IText textShape; protected IPlot plotShape; @Override public void flush() { super.flush(); plotShape = null; text = null; textShape = null; setter = null; relativePoint = null; absolutePoint = null; } /** * Sets the text shape to modify. * @param textShape The text (shape) to modify throw the setter. Can be null. * @since 3.0 */ public void setTextShape(final IText textShape) { this.textShape = textShape; } /** * Sets the text to display into the text setter. * @param text The text to set. * @since 3.0 */ public void setText(final String text) { this.text = text; } /** * Sets the plot to display into the text setter. * @param shape The plot to set. * @since 3.1 */ public void setPlotShape(final IPlot shape) { plotShape = shape; } /** * @param textSetter the textSetter to set. * @since 3.0 */ public void setTextSetter(final TextSetter textSetter) { setter = textSetter; } @Override public boolean isRegisterable() { return false; } /** * @param pt The position that takes account of the zoom. * @since 3.0 */ public void setRelativePoint(final IPoint pt) { relativePoint = pt; } /** * @param pt The position that does not taks account of the zoom (for the text field). * @since 3.0 */ public void setAbsolutePoint(final IPoint pt) { absolutePoint = pt; } @Override public boolean canDo() { return super.canDo() && GLibUtilities.isValidPoint(absolutePoint) && GLibUtilities.isValidPoint(relativePoint) && setter!=null && (text!=null || textShape!=null || plotShape!=null); } @Override protected void doActionBody() { super.doActionBody(); setter.getTextField().setLocation((int)absolutePoint.getX(), (int)absolutePoint.getY()-setter.getTextField().getHeight()); setter.setRelativePoint(relativePoint); setter.getTextField().setText(text); setter.setText(textShape); setter.setPlot(plotShape); } } InsertPicture.scala000066400000000000000000000036551321075051700350340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import javax.swing.JFileChooser import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.models.interfaces.shape.IPicture /** * This action asks the user to select a picture and, if valid, adds it to a drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class InsertPicture extends AddShape { /** The file chooser used to select the picture to add. */ var _fileChooser : Option[JFileChooser] = None /** Defines if the picture has been successfully loaded. */ var loaded = false override protected def doActionBody() { // Asks the user for the picture to load. if(_fileChooser.get.showOpenDialog(null)==JFileChooser.APPROVE_OPTION) try{ _shape.get.asInstanceOf[IPicture].setPathSource(_fileChooser.get.getSelectedFile.getAbsolutePath) loaded = true }catch { case ex: Throwable => BadaboomCollector.INSTANCE.add(ex) } if(loaded) redo } override def redo() { _drawing.get.addShape(_shape.get) _drawing.get.setModified(true) } override def hadEffect() = super.hadEffect && loaded override def canDo() = super.canDo && _fileChooser.isDefined && _shape.get.isInstanceOf[IPicture] /** * @param fileChooser The file chooser used to select the picture to load. * @since 3.0 */ def setFileChooser(fileChooser : JFileChooser) { _fileChooser = Some(fileChooser) } }JoinShapes.scala000066400000000000000000000041341321075051700342700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import net.sf.latexdraw.actions.{DrawingAction, Modifying, ShapesAction} import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.lang.LangTool import org.malai.action.Action import org.malai.undo.Undoable import scala.collection.JavaConversions.asScalaBuffer /** * This action joins shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class JoinShapes extends Action with ShapesAction with DrawingAction with Undoable with Modifying { /** The added group of shapes. */ val addedGroup = ShapeFactory.createGroup() override protected def doActionBody() { joinShapes } override def canDo = !_shapes.isEmpty && _drawing.isDefined private def joinShapes() { val dr = _drawing.get val drawingSh = dr.getShapes // creating a map from the shapes to join and their index val map = _shapes.map{sh => (drawingSh.indexOf(sh), sh)}.toMap map.keySet.toIndexedSeq.sorted.map{index => map.get(index).get}.foreach{sh => dr.removeShape(sh) addedGroup.addShape(sh) } dr.addShape(addedGroup) dr.setModified(true) } override def undo() { val dr = _drawing.get val drawingSh = dr.getShapes val map = _shapes.map{sh => (sh, drawingSh.indexOf(sh))}.toMap dr.removeShape(addedGroup) addedGroup.getShapes.foreach{sh => dr.addShape(sh, map.get(sh).get)} addedGroup.clear dr.setModified(true) } override def redo() { joinShapes } override def getUndoName = LangTool.INSTANCE.getStringOthers("UndoRedoManager.join") override def isRegisterable = true } MirrorShapes.scala000066400000000000000000000034021321075051700346400ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.ShapesAction import org.malai.undo.Undoable import org.malai.action.Action import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.lang.LangTool /** * This action mirrors a shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-03-07
    * @author Arnaud BLOUIN * @since 3.0 */ class MirrorShapes extends Action with ShapeAction[IShape] with Undoable with Modifying { /** If true, the mirroring is horizontal. */ var _horizontally = true override protected def doActionBody() { val sh = _shape.get if(_horizontally) sh.mirrorHorizontal(sh.getGravityCentre) else sh.mirrorVertical(sh.getGravityCentre) sh.setModified(true) } override def canDo = _shape.isDefined override def undo() { doActionBody() } override def redo() { doActionBody() } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.7") override def isRegisterable = true /** * If true, the mirroring is horizontal. Otherwise, vertical. */ def setHorizontally(horiz:Boolean) { _horizontally = horiz } }ModifyShapeProperty.java000066400000000000000000000130301321075051700360330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape; import java.util.List; import net.sf.latexdraw.actions.Modifying; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.prop.IScalable; import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp; import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import org.malai.undo.Undoable; /** * This action modifies a shape property of the given shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/01/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ModifyShapeProperty extends ShapePropertyAction implements Undoable, Modifying { /** The shape to modify. */ protected IGroup shapes; /** The old value of the property. */ protected List oldValue; @Override public void flush() { super.flush(); if(shapes!=null) { shapes.clear(); shapes = null; } if(oldValue!=null) { oldValue.clear(); oldValue = null; } } @Override public boolean canDo() { return super.canDo() && shapes!=null; } @Override public void undo() { property.setPropertyValueList(shapes, oldValue); shapes.setModified(true); } @Override public void redo() { applyValue(value); } @Override public String getUndoName() { return property==null ? "" : property.getMessage(); //$NON-NLS-1$ } @Override public boolean isRegisterable() { return true; } @Override protected void applyValue(final Object obj) { property.setPropertyValue(shapes, obj); shapes.setModified(true); } @Override protected void doActionBody() { if(oldValue==null) oldValue = property.getPropertyValues(shapes); applyValue(value); } /** * Sets the group of shapes to modify. * @param group The group of shapes to modify. * @since 3.0 */ public void setGroup(final IGroup group) { this.shapes = group; } @Override protected boolean isPropertySupported() { if(shapes!=null && super.isPropertySupported()) switch(property) { case SHOW_POINTS: return shapes.isShowPtsable(); case ARROW_BRACKET_NUM: case ARROW_DOT_SIZE_DIM: case ARROW_DOT_SIZE_NUM: case ARROW_R_BRACKET_NUM: case ARROW_SIZE_DIM: case ARROW_SIZE_NUM: case ARROW_T_BAR_SIZE_DIM: case ARROW_T_BAR_SIZE_NUM: case ARROW_INSET: case ARROW_LENGTH: case ARROW1_STYLE: case ARROW2_STYLE: return shapes.isTypeOf(IArrowableShape.class); case BORDER_POS: return shapes.isBordersMovable(); case COLOUR_FILLING: return shapes.isFillable(); case COLOUR_GRADIENT_END: case COLOUR_GRADIENT_START: case LINE_STYLE: return shapes.isLineStylable(); case LINE_THICKNESS: return shapes.isThicknessable(); case DBLE_BORDERS_SIZE: case DBLE_BORDERS: case COLOUR_DBLE_BORD: return shapes.isDbleBorderable(); case SHADOW_ANGLE: case SHADOW_SIZE: case COLOUR_SHADOW: case SHADOW: return shapes.isShadowable(); case GRAD_ANGLE: case GRAD_MID_POINT: case HATCHINGS_ANGLE: case HATCHINGS_SEP: case HATCHINGS_WIDTH: case COLOUR_HATCHINGS: case FILLING_STYLE: return shapes.isInteriorStylable(); case GRID_START: case GRID_END: case GRID_LABEL_POSITION_Y: case GRID_LABEL_POSITION_X: case GRID_SIZE_LABEL: case GRID_ORIGIN: return shapes.isTypeOf(IStdGridProp.class); case ARC_END_ANGLE: case ARC_START_ANGLE: case ARC_STYLE: return shapes.isTypeOf(IArcProp.class); case ROUND_CORNER_VALUE: return shapes.isTypeOf(ILineArcProp.class); case DOT_SIZE: case DOT_FILLING_COL: case DOT_STYLE: return shapes.isTypeOf(IDotProp.class); case TEXT: case TEXT_POSITION: return shapes.isTypeOf(ITextProp.class); case COLOUR_LINE: return true; case AXES_TICKS_STYLE: // case AXES_TICKS_SIZE: case AXES_TICKS_SHOW: case AXES_LABELS_INCR: case AXES_LABELS_SHOW: case AXES_SHOW_ORIGIN: case AXES_LABELS_DIST: case AXES_STYLE: return shapes.isTypeOf(IAxesProp.class); case GRID_SUBGRID_COLOUR: case GRID_SUBGRID_WIDTH: case GRID_WIDTH: case GRID_DOTS: case GRID_SUBGRID_DOTS: case GRID_SUBGRID_DIV: case GRID_LABELS_COLOUR: return shapes.isTypeOf(IGridProp.class); case FREEHAND_INTERVAL: case FREEHAND_OPEN: case FREEHAND_STYLE : return shapes.isTypeOf(IFreeHandProp.class); case PLOT_EQ: case PLOT_STYLE: case PLOT_POLAR: case PLOT_NB_PTS: case PLOT_MAX_X: case PLOT_MIN_X: return shapes.isTypeOf(IPlotProp.class); case X_SCALE: case Y_SCALE: return shapes.isTypeOf(IScalable.class); } return false; } } MoveBackForegroundShapes.scala000066400000000000000000000063041321075051700371140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import net.sf.latexdraw.actions.{DrawingAction, Modifying, ShapeAction} import net.sf.latexdraw.glib.models.interfaces.shape.{IGroup, IShape} import net.sf.latexdraw.lang.LangTool import org.malai.action.Action import org.malai.undo.Undoable import scala.collection.JavaConversions._ import scala.collection.mutable.Buffer /** * This action puts in background / foreground shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-04-21
    * @author Arnaud BLOUIN * @since 3.0 */ class MoveBackForegroundShapes extends Action with ShapeAction[IGroup] with DrawingAction with Undoable with Modifying { /** Defines whether the shapes must be placed in the foreground. */ var foreground = false /** The former position of the shapes. */ var formerId : Array[Int] = _ /** The shapes sorted by their position. */ var sortedSh : Buffer[IShape] = _ override protected def doActionBody() { if(foreground) moveInForeground else moveInBackground } /** Puts the shapes in the foreground. */ def moveInForeground() { val size = _shape.get.size formerId = Array.ofDim[Int](size) var sh : IShape = null val drawing = _drawing.get val drawingShapes = drawing.getShapes sortedSh = _shape.get.getShapes.sortBy(drawingShapes.indexOf(_)) for(i <- 0 until size) { sh = sortedSh(i) formerId(i) = drawingShapes.indexOf(sh) drawing.removeShape(sh) drawing.addShape(sh) } drawing.setModified(true) } /** Puts the shapes in the background. */ def moveInBackground() { val size = _shape.get.size formerId = Array.ofDim[Int](size) var sh : IShape = null val drawing = _drawing.get val drawingShapes = drawing.getShapes sortedSh = _shape.get.getShapes.sortBy(drawingShapes.indexOf(_)) for(i <- size-1 to 0 by -1) { sh = sortedSh(i) formerId(i) = drawingShapes.indexOf(sh) drawing.removeShape(sh) drawing.addShape(sh, 0) } drawing.setModified(true) } override def canDo = _shape.isDefined && !_shape.get.isEmpty && _drawing.isDefined override def undo() { val drawing = _drawing.get if(foreground) { var i = formerId.length-1 sortedSh.reverse.foreach{sh => drawing.removeShape(sh) drawing.addShape(sh, formerId(i)) i -= 1 } } else { var i = 0 sortedSh.foreach{sh => drawing.removeShape(sh) drawing.addShape(sh, formerId(i)) i += 1 } } drawing.setModified(true) } override def redo() { doActionBody() } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.8") override def isRegisterable = true /** Defines whether the shapes must be placed in the foreground. */ def setIsForeground(foreground:Boolean) { this.foreground = foreground } } MoveCtrlPoint.java000066400000000000000000000056521321075051700346360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IControlPointShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.lang.LangTool; import org.malai.undo.Undoable; /** * This action moves control points.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/15/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class MoveCtrlPoint extends MovePoint implements Undoable { /** The control point shape to modify. */ protected IControlPointShape shape; /** True: it is a first control point which is moved. */ protected boolean isFirstCtrlPt; @Override protected void doActionBody() { final IPoint pt = getPoint(); tx += newCoord.getX() - pt.getX(); ty += newCoord.getY() - pt.getY(); redo(); } /** * @return The first or second control point moved. */ protected IPoint getPoint() { return isFirstCtrlPt ? shape.getFirstCtrlPtAt(indexPt) : shape.getSecondCtrlPtAt(indexPt); } @Override public void flush() { super.flush(); shape = null; } @Override public boolean canDo() { return super.canDo() && shape!=null && indexPt *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/15/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public abstract class MovePoint extends Action { /** The index of the point to move. */ protected int indexPt; /** The new coordinates of the point to move. */ protected IPoint newCoord; /** The X-translation factor performed by the action. */ protected double tx; /** The Y-translation factor performed by the action. */ protected double ty; /** * Creates the action. * @since 3.0 */ protected MovePoint() { super(); tx = 0; ty = 0; } @Override public boolean canDo() { return indexPt>=0 && GLibUtilities.isValidPoint(newCoord); } @Override public void flush() { super.flush(); newCoord = null; } @Override public boolean hadEffect() { return super.hadEffect() && (!LNumber.equalsDouble(tx, 0.) || !LNumber.equalsDouble(ty, 0.)); } @Override public boolean isRegisterable() { return true; } /** * @param indexPt The index of the point to move. * @since 3.0 */ public void setIndexPt(final int indexPt) { this.indexPt = indexPt; } /** * @param newCoord The new coordinates of the point to move. * @since 3.0 */ public void setNewCoord(final IPoint newCoord) { this.newCoord = newCoord; } } MovePointShape.java000066400000000000000000000036751321075051700347750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.lang.LangTool; import org.malai.undo.Undoable; /** * This action moves points of IModifiablePointsShape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/15/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class MovePointShape extends MovePoint implements Undoable { /** The shape to modify. */ protected IModifiablePointsShape shape; @Override protected void doActionBody() { final IPoint pt = shape.getPtAt(indexPt); tx += newCoord.getX() - pt.getX(); ty += newCoord.getY() - pt.getY(); redo(); } @Override public boolean canDo() { return super.canDo() && shape!=null && indexPt *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class PasteShapes extends Action with DrawingAction with Undoable with Modifying { /** The cut or copy action. */ var _copy : CopyShapes = _ /** The magnetic grid to use. */ var _grid : LMagneticGrid = _ var pastedShapes : List[IShape] = Nil override def canDo = _copy!=null && _grid!=null && _drawing.isDefined override def isRegisterable = true override def doActionBody() { val dr = _drawing.get // While pasting cut shapes, the first paste must be at the same position that the original shapes. // But for pasting after just copying, a initial gap must be used. if(!_copy.isInstanceOf[CutShapes]) _copy.nbTimeCopied+=1 val gapPaste = if(_grid.isMagnetic) _grid.getGridSpacing else 10 val gap = _copy.nbTimeCopied*gapPaste _copy.copiedShapes.foreach{shape => val sh = ShapeFactory.duplicate(shape) pastedShapes = pastedShapes :+ sh sh.translate(gap, gap) dr.addShape(sh) } if(_copy.isInstanceOf[CutShapes]) _copy.nbTimeCopied+=1 dr.setModified(true) } override def undo() { var i = 0 val nbShapes = _copy.copiedShapes.size val dr = _drawing.get while(i dr.addShape(sh)} if(_copy.isInstanceOf[CutShapes]) _copy.nbTimeCopied+=1 dr.setModified(true) } override def getUndoName = LResources.LABEL_PASTE override def followingActions = { val list = new ArrayList[Action] val selectAction = new SelectShapes selectAction.setDrawing(_drawing.get) pastedShapes.foreach{sh => selectAction.addShape(sh)} list.add(selectAction) list } /** * @param copy the copy to set. */ def setCopy(copy : CopyShapes) { _copy = copy } def copy = _copy /** Sets the magnetic grisd to use. */ def setGrid(grid:LMagneticGrid) { _grid = grid } } RotateShapes.scala000066400000000000000000000051371321075051700346330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.lang.LangTool /** * This action increments to rotation angle of shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class RotateShapes extends Action with ShapeAction[IShape] with Undoable with Modifying { /** The rotation angle to apply. */ var _rotationAngle : Double = Double.NaN /** The gravity centre used for the rotation. */ var _gc : Option[IPoint] = None /** The last increment performed on shapes. Used to execute several times the action. */ var lastRotationAngle : Double = 0.0 override def canDo = _shape.isDefined && _gc.isDefined && GLibUtilities.isValidCoordinate(_rotationAngle) && GLibUtilities.isValidPoint(_gc.get) override def isRegisterable = true override def doActionBody() { rotateShapes(_rotationAngle-lastRotationAngle) lastRotationAngle = _rotationAngle } /** * Rotates the shape. * @param angleIncrement The increment to add to the rotation angle of the shape. */ private def rotateShapes(angleIncrement : Double) { _shape.get.addToRotationAngle(_gc.get, angleIncrement) _shape.get.setModified(true) } override def undo() { rotateShapes(-_rotationAngle) } override def redo() { rotateShapes(_rotationAngle) } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.31") /** * @param rotationAngle The rotation angle to apply. */ def setRotationAngle(rotationAngle : Double) { _rotationAngle = rotationAngle } def rotationAngle = _rotationAngle /** * @param gc The gravity centre used for the rotation. */ def setGravityCentre(gc : IPoint) { if(gc!=null) _gc = Some(gc) else _gc = None } def gc = _gc } ScaleShapes.scala000066400000000000000000000112161321075051700344170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import java.awt.geom.Rectangle2D import net.sf.latexdraw.actions.{DrawingAction, Modifying, ShapeAction} import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position import net.sf.latexdraw.glib.models.interfaces.shape.{IGroup, IPoint} import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.util.LNumber import org.malai.action.Action import org.malai.undo.Undoable /** * This action scales a shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-03-07
    * @author Arnaud BLOUIN * @since 3.0 */ class ScaleShapes extends Action with ShapeAction[IGroup] with DrawingAction with Undoable with Modifying { /** The direction of the scaling. */ var _refPosition : Option[Position] = None /** The new X position used to compute the scale factor. */ var _newX : Double = Double.NaN /** The new Y position used to compute the scale factor. */ var _newY : Double = Double.NaN /** The bound of the selected shapes used to perform the scaling. */ val bound : Rectangle2D = new Rectangle2D.Double() /** The old width of the selection. */ var oldWidth : Double = Double.NaN /** The old height of the selection. */ var oldHeight : Double = Double.NaN var doneOnce = false override def isRegisterable = hadEffect override def hadEffect = isDone && (!LNumber.equalsDouble(oldWidth, bound.getWidth) || !LNumber.equalsDouble(oldHeight, bound.getHeight)) override def canDo = _drawing.isDefined && _shape.isDefined && _refPosition.isDefined && isValidScales private def isValidScales = { _refPosition.get match { case Position.EAST => GLibUtilities.isValidCoordinate(_newX) && scaledWidth(_newX)>1.0 case Position.WEST => GLibUtilities.isValidCoordinate(_newX) && scaledWidth(_newX)>1.0 case Position.NORTH => GLibUtilities.isValidCoordinate(_newY) && scaledHeight(_newY)>1.0 case Position.SOUTH => GLibUtilities.isValidCoordinate(_newY) && scaledHeight(_newY)>1.0 case _ => GLibUtilities.isValidCoordinate(_newX) && GLibUtilities.isValidCoordinate(_newY) && scaledHeight(_newY)>1.0 && scaledWidth(_newX)>1.0 } } protected def doActionBody() { if(oldWidth.isNaN) { val br = _shape.get.getBottomRightPoint val tl = _shape.get.getTopLeftPoint oldWidth = br.getX - tl.getX oldHeight = br.getY - tl.getY updateBound(tl, br) } redo() } private def updateBound(tl : IPoint, br : IPoint) { bound.setFrameFromDiagonal(tl.getX, tl.getY, br.getX, br.getY) } override def undo() { val sh = _shape.get sh.scale(oldWidth, oldHeight, _refPosition.get, bound) sh.setModified(true) _drawing.get.setModified(true) updateBound(sh.getTopLeftPoint, sh.getBottomRightPoint) } override def setShape(shape : IGroup) { super.setShape(shape) if(shape!=null) updateBound(shape.getTopLeftPoint, shape.getBottomRightPoint) } private def scaledHeight(y:Double) : Double = { _refPosition.get match { case ref if ref.isSouth => bound.getHeight + bound.getY - y case ref if ref.isNorth => bound.getHeight + y - bound.getMaxY case _ => 0.0 } } private def scaledWidth(x:Double) : Double = { _refPosition.get match { case ref if ref.isWest => bound.getWidth + x - bound.getMaxX case ref if ref.isEast => bound.getWidth + bound.getX - x case _ => 0.0 } } override def redo() { val sh = _shape.get sh.scale(scaledWidth(_newX), scaledHeight(_newY), _refPosition.get, bound) sh.setModified(true) _drawing.get.setModified(true) updateBound(sh.getTopLeftPoint, sh.getBottomRightPoint) } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.11") def refPosition = _refPosition /** * @param refPosition The reference position of the scaling. */ def refPosition_=(refPosition : Position) { _refPosition = Some(refPosition) } def newX = _newX /** * @param newX The new X position used to compute the scale factor. */ def newX_=(newX : Double) { if(scaledWidth(newX)>1) _newX = newX } def newY = _newY /** * @param newY The new Y position used to compute the scale factor. */ def newY_=(newY : Double) { if(scaledHeight(newY)>1) _newY = newY } } SelectShapes.scala000066400000000000000000000030701321075051700346060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import scala.collection.JavaConversions.asScalaBuffer import org.malai.action.Action import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapesAction /** * This action allows to (un-)select shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class SelectShapes extends Action with ShapesAction with DrawingAction with Modifying { override def isRegisterable = true override def doActionBody() { val selection = _drawing.get.getSelection if(_shapes.isEmpty) selection.clear else { for(i <- selection.size-1 to 0 by -1) if(!_shapes.contains(selection.getShapeAt(i))) selection.removeShape(i) for(sh <- _shapes) if(!selection.contains(sh)) selection.addShape(sh) } } override def cancelledBy(action : Action) = action.isInstanceOf[SelectShapes] || action.isInstanceOf[CutShapes] || action.isInstanceOf[DeleteShapes] def canDo = _drawing.isDefined } SeparateShapes.scala000066400000000000000000000037631321075051700351440ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import scala.collection.JavaConversions.asScalaBuffer import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.lang.LangTool /** * This action separates joined shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class SeparateShapes extends Action with ShapeAction[IGroup] with DrawingAction with Modifying with Undoable { override def canDo = _drawing.isDefined && _shape.isDefined && !_shape.get.isEmpty override protected def doActionBody() { val dr = _drawing.get val position = dr.getShapes.indexOf(_shape.get) val insertPos = if(position>=(dr.size-1)) -1 else position dr.removeShape(position) _shape.get.getShapes.foreach{sh => dr.addShape(sh, insertPos)} dr.setModified(true) } override def undo() { val dr = _drawing.get val position = dr.getShapes.indexOf(_shape.get.getShapeAt(0)) val addPosition = if(position>=dr.size) -1 else position _shape.get.getShapes.foreach{_ => dr.removeShape(position)} dr.addShape(_shape.get, addPosition) dr.setModified(true) } override def redo() { doActionBody() } override def getUndoName = LangTool.INSTANCE.getStringOthers("UndoRedoManager.seperate") override def isRegisterable = true } ShapeProperties.java000066400000000000000000001764121321075051700352110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape; import java.awt.Color; import java.util.Collections; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp.FreeHandType; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.lang.LangTool; /** * Defines shape properties.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/19/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public enum ShapeProperties { /** Plot style. **/ PLOT_STYLE { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setPlotStyle((IPlotProp.PlotStyle)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setPlotStyleList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getPlotStyleList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPlotProp.PlotStyle; } }, /** Polar or cartesian coordinates. **/ PLOT_POLAR { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setPolar((Boolean)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setPlotPolarList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getPlotPolarList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } }, /** The equation of plots. **/ PLOT_EQ { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setPlotEquation((String)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setPlotEquationList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getPlotEquationList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof String; } }, /** Y-scale. **/ Y_SCALE { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setYScale((Double)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setYScaleList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getYScaleList();} @Override public String getMessage() { return "shape scale"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** X-scale. **/ X_SCALE { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setXScale((Double)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setXScaleList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getXScaleList();} @Override public String getMessage() { return "shape scale"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The max-x of a plot. **/ PLOT_MAX_X { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setPlotMaxX((Double)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setPlotMaxXList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getPlotMaxXList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The min-x of a plot. **/ PLOT_MIN_X { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setPlotMinX((Double)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setPlotMinXList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getPlotMinXList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The number of plotted points. **/ PLOT_NB_PTS { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setNbPlottedPoints((Integer)value);} @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setNbPlottedPointsList((List)values);} @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getNbPlottedPointsList();} @Override public String getMessage() { return "plot's parameters"; } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } }, /** Show/Hide the origin of the axes. */ SHOW_POINTS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.12"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getShowPointsList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setShowPts((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setShowPointsList((List)values); } }, /** Show/Hide the origin of the axes. */ AXES_SHOW_ORIGIN { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesShowOriginList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setShowOrigin((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesShowOriginList((List)values); } }, /** The increment of the axes' labels. */ AXES_LABELS_DIST { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPoint; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesDistLabelsList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDistLabels((IPoint)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesDistLabelsList((List)values); } }, /** The increment of the axes' labels. */ AXES_LABELS_INCR { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPoint; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesIncrementsList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setIncrement((IPoint)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesIncrementsList((List)values); } }, /** How the labels of axes are displayed. */ AXES_LABELS_SHOW { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof PlottingStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesLabelsDisplayedList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setLabelsDisplayed((PlottingStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesLabelsDisplayedList((List)values); } }, /** How the ticks of axes are displayed. */ AXES_TICKS_SHOW { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof PlottingStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesTicksDisplayedList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setTicksDisplayed((PlottingStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesTicksDisplayedList((List)values); } }, /** The width of the sub-grids. */ GRID_SUBGRID_WIDTH { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getSubGridWidthList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setSubGridWidth((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setSubGridWidthList((List)values); } }, /** Defines if the free hand shapes are open. */ FREEHAND_OPEN { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.15"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getFreeHandOpenList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setOpen((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setFreeHandOpenList((List)values); } }, /** The interval between the points of free hand shapes. */ FREEHAND_INTERVAL { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.15"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getFreeHandIntervalList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setInterval((Integer)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setFreeHandIntervalList((List)values); } }, /** The division the sub-lines of grids. */ GRID_SUBGRID_DIV { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getSubGridDivList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setSubGridDiv((Integer)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setSubGridDivList((List)values); } }, /** The number of dots composing the sub-lines of grids. */ GRID_SUBGRID_DOTS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getSubGridDotsList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setSubGridDots((Integer)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setSubGridDotsList((List)values); } }, /** The number of dots composing the main lines of grids. */ GRID_DOTS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridDotsList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGridDots((Integer)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridDotsList((List)values); } }, /** The width of the grids. */ GRID_WIDTH { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridWidthList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGridWidth((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridWidthList((List)values); } }, // /** The size of the ticks of axes. */ // AXES_TICKS_SIZE { // @Override // public String getMessage() { // return "axe's parameters"; // } // // @Override // public boolean isValueValid(final Object obj) { // return obj instanceof Double; // } // // @Override // public List getPropertyValues(final IGroup group) { // return group==null ? Collections.EMPTY_LIST : group.getAxesTicksSizeList(); // } // // @Override // public void setPropertyValue(final IGroup group, final Object value) { // if(group!=null && isValueValid(value)) // group.setTicksSize((Double)value); // } // // @SuppressWarnings("unchecked") // @Override // public void setPropertyValueList(final IGroup group, final List values) { // if(group!=null) // group.setAxesTicksSizeList((List)values); // } // }, /** The style of the ticks of axes. */ AXES_TICKS_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof TicksStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesTicksStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setTicksStyle((TicksStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesTicksStyleList((List)values); } }, /** The style of axes. */ FREEHAND_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.15"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof FreeHandType; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getFreeHandTypeList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setType((FreeHandType)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setFreeHandTypeList((List)values); } }, /** The style of axes. */ AXES_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.13"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof AxesStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAxesStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setAxesStyle((AxesStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAxesStyleList((List)values); } }, /** The X-coordinate of the grid's labels. */ GRID_LABEL_POSITION_X { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridYLabelWestList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setYLabelWest((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridYLabelWestList((List)values); } }, /** The Y-coordinate of the grid's labels. */ GRID_LABEL_POSITION_Y { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridXLabelSouthList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setXLabelSouth((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridXLabelSouthList((List)values); } }, /** The size of the labels of grids. */ GRID_SIZE_LABEL { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridLabelSizeList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setLabelsSize((Integer)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridLabelSizeList((List)values); } }, /** The t bar num of arrows. */ ARROW_T_BAR_SIZE_DIM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setTBarSizeDim((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setTBarSizeDimList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getTBarSizeDimList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The t bar num of arrows. */ ARROW_T_BAR_SIZE_NUM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setTBarSizeNum((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setTBarSizeNumList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getTBarSizeNumList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The dot size dim of arrows. */ ARROW_DOT_SIZE_NUM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setDotSizeNum((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDotSizeNumList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDotSizeNumList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The dot size dim of arrows. */ ARROW_DOT_SIZE_DIM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setDotSizeDim((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDotSizeDimList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDotSizeDimList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The bracket num of arrows. */ ARROW_BRACKET_NUM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setBracketNum((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setBracketNumList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getBracketNumList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The round bracket num of arrows. */ ARROW_R_BRACKET_NUM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setRBracketNum((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setRBracketNumList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getRBracketNumList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The size num of arrows. */ ARROW_SIZE_NUM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setArrowSizeNum((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowSizeNumList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getArrowSizeNumList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The size dim of arrows. */ ARROW_SIZE_DIM { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setArrowSizeDim((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowSizeDimList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getArrowSizeDimList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, ARROW_LENGTH { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setArrowLength((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowLengthList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getArrowLengthList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** The inset of arrows. */ ARROW_INSET { @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null) group.setArrowInset((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowInsetList((List)values); } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getArrowInsetList(); } @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } }, /** Modification of the starting position of grids. */ GRID_END { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPoint; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridEndList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) { final IPoint pt = (IPoint)value; group.setGridEnd(pt.getX(), pt.getY()); } } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridEndList((List)values); } }, /** Modification of the starting position of grids. */ GRID_ORIGIN { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPoint; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridOriginList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) { final IPoint pt = (IPoint)value; group.setOrigin(pt.getX(), pt.getY()); } } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridOriginList((List)values); } }, /** Modification of the starting position of grids. */ GRID_START { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof IPoint; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridStartList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) { final IPoint pt = (IPoint)value; group.setGridStart(pt.getX(), pt.getY()); } } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridStartList((List)values); } }, /** Modification of the start angle of arcs. */ ARC_START_ANGLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.17"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAngleStartList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setAngleStart((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAngleStartList((List)values); } }, /** Modification of the end angle of arcs. */ ARC_END_ANGLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.17"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getAngleEndList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setAngleEnd((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setAngleEndList((List)values); } }, /** Modification of the style of arcs. */ ARC_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.17"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof ArcStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getArcStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setArcStyle((ArcStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArcStyleList((List)values); } }, /** Defines if the shape has a second arrow. */ ARROW2_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof ArrowStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() :group.getArrowStyleList(-1); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setArrowStyle((ArrowStyle)value, -1); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowStyleList((List)values, -1); } }, /** Defines if the shape has a first arrow. */ ARROW1_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.16"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof ArrowStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() :group.getArrowStyleList(0); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setArrowStyle((ArrowStyle)value, 0); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setArrowStyleList((List)values, 0); } }, /** Modification of the position of texts. */ TEXT_POSITION { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.18"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof TextPosition; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getTextPositionList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setTextPosition((TextPosition)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setTextPositionList((List)values); } }, /** Modification of the text. */ TEXT { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.18"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof String; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getTextList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setText((String)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setTextList((List)values); } }, /** Modification of the hatchings angle of shapes. */ HATCHINGS_ANGLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.19"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getHatchingsAngleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHatchingsAngle((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHatchingsAngleList((List)values); } }, /** Modification of the hatchings width a shape. */ HATCHINGS_WIDTH { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.19"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getHatchingsWidthList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHatchingsWidth((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHatchingsWidthList((List)values); } }, /** Modification of the hatching spacing a shape. */ HATCHINGS_SEP { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.19"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getHatchingsSepList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHatchingsSep((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHatchingsSepList((List)values); } }, /** Modification of the gradient angle a shape. */ GRAD_ANGLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.20"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGradAngleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGradAngle((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGradAngleList((List)values); } }, /** Modification of the middle point of the gradient a shape. */ GRAD_MID_POINT { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.20"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGradMidPtList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGradMidPt((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGradMidPtList((List)values); } }, /** Modification of the round corner value of a shape. */ ROUND_CORNER_VALUE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.21"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getLineArcList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setLineArc((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setLineArcList((List)values); } }, /** Modification of the colour of the labels of a grid. */ GRID_SUBGRID_COLOUR { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getSubGridColourList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setSubGridColour((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setSubGridColourList((List)values); } }, /** Modification of the colour of the labels of a grid. */ GRID_LABELS_COLOUR { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.14"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGridLabelsColourList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGridLabelsColour((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGridLabelsColourList((List)values); } }, /** Modification of the colour of the filling of a shape. */ COLOUR_FILLING { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.21"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getFillingColList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setFillingCol((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setFillingColList((List)values); } }, /** Modification of the colour of the borders of a shape. */ COLOUR_LINE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.23"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getLineColourList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setLineColour((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setLineColourList((List)values); } }, /** Modification of the colour of the hatchings of a shape. */ COLOUR_HATCHINGS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.19"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getHatchingsColList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHatchingsCol((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHatchingsColList((List)values); } }, /** Defines if a shape must have double borders. */ DBLE_BORDERS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.24"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.hasDbleBordList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHasDbleBord((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHasDbleBordList((List)values); } }, /** Modification of the size of the double borders of a shape. */ DBLE_BORDERS_SIZE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.24"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDbleBordSepList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDbleBordSep((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDbleBordSepList((List)values); } }, /** Modification of the colour of the double borders of a shape. */ COLOUR_DBLE_BORD { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.24"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDbleBordColList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDbleBordCol((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDbleBordColList((List)values); } }, /** Defines if a shape must have a shadow. */ SHADOW { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.25"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Boolean; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.hasShadowList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setHasShadow((Boolean)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setHasShadowList((List)values); } }, /** Modification of the size of the shadow of a shape. */ SHADOW_SIZE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.25"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getShadowSizeList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setShadowSize((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setShadowSizeList((List)values); } }, /** Modification of the angle of the shadow of a shape. */ SHADOW_ANGLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.25"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Double; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getShadowAngleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setShadowAngle((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setShadowAngleList((List)values); } }, /** Modification of colour of the shadow of a shape. */ COLOUR_SHADOW { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.25"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getShadowColList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setShadowCol((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setShadowColList((List)values); } }, /** Modification of the colour of the start gradient of a shape. */ COLOUR_GRADIENT_START { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.20"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGradColStartList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGradColStart((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGradColStartList((List)values); } }, /** Modification of the colour of the end gradient of a shape. */ COLOUR_GRADIENT_END { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.20"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getGradColEndList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setGradColEnd((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setGradColEndList((List)values); } }, /** Modification of the thickness of the borders of a shape. */ LINE_THICKNESS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.26"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer || obj instanceof Double || obj instanceof Float; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getThicknessList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setThickness((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setThicknessList((List)values); } }, /** Modification of the filling style of a shape. */ FILLING_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.22"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof FillingStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getFillingStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setFillingStyle((FillingStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setFillingStyleList((List)values); } }, /** Modification of the border position of a shape. */ BORDER_POS { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.27"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof BorderPos; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getBordersPositionList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setBordersPosition((BorderPos)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setBordersPositionList((List)values); } }, /** Modification of the line style of a shape. */ LINE_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.28"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof LineStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getLineStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setLineStyle((LineStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setLineStyleList((List)values); } }, /** Modification of the filling colour of a dot. */ DOT_FILLING_COL { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.29"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Color; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDotFillingColList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDotFillingCol((Color)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDotFillingColList((List)values); } }, /** Modification of the style of a dot. */ DOT_STYLE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.29"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof DotStyle; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDotStyleList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDotStyle((DotStyle)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDotStyleList((List)values); } }, /** Modification of the size of dots. */ DOT_SIZE { @Override public String getMessage() { return LangTool.INSTANCE.getStringActions("Actions.29"); //$NON-NLS-1$ } @Override public boolean isValueValid(final Object obj) { return obj instanceof Integer || obj instanceof Double || obj instanceof Float; } @Override public List getPropertyValues(final IGroup group) { return group==null ? Collections.emptyList() : group.getDotSizeList(); } @Override public void setPropertyValue(final IGroup group, final Object value) { if(group!=null && isValueValid(value)) group.setDiametre((Double)value); } @SuppressWarnings("unchecked") @Override public void setPropertyValueList(final IGroup group, final List values) { if(group!=null) group.setDotSizeList((List)values); } }; /** * @param group The group to test. * @return True if the given group supports the calling property. * @since 3.0 */ public boolean isPropertySupported(final IGroup group) { return group!=null; } /** * Sets the given value of the property to the given group. * @param group The group to modify. * @param value The new value of the property to set. * @since 3.0 */ public abstract void setPropertyValue(final IGroup group, final Object value); /** * Sets the given values of the property to the given group. The size of the list * must equals the number of shapes of the group. If a shape of the group must not be set, * its corresponding value in the list must be null. * @param group The group to modify. * @param values The set of new values of the property to set. * @since 3.0 */ public abstract void setPropertyValueList(final IGroup group, final List values); /** * @param group The group to explore. * @return The list of property values of the shapes of the given group. * @since 3.0 */ public abstract List getPropertyValues(final IGroup group); /** * @return The title of the properties. * @since 3.0 */ public abstract String getMessage(); /** * @param obj The new value to test. * @return True if the given value can be set to the shape property. * @since 3.0 */ public abstract boolean isValueValid(final Object obj); } ShapePropertyAction.java000066400000000000000000000030531321075051700360250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape; import org.malai.action.library.ModifyValue; /** * This action modifies a shape property of an object.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/01/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public abstract class ShapePropertyAction extends ModifyValue { /** The property to set. */ protected ShapeProperties property; /** * Creates and initialises the action. * @since 3.0 */ protected ShapePropertyAction() { super(); } @Override public void flush() { super.flush(); property = null; } @Override protected boolean isValueMatchesProperty() { return isPropertySupported() && property.isValueValid(value); } /** * @return True if the property to modify is supported. * @since 3.0 */ protected boolean isPropertySupported() { return property!=null; } /** * Defines the property to modify * @param property The property to modify. * @since 3.0 */ public void setProperty(final ShapeProperties property) { this.property = property; } } TranslateShapes.scala000066400000000000000000000054161321075051700353320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.DrawingAction import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.util.LNumber import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.lang.LangTool /** * This action translates shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @since 3.0 */ class TranslateShapes extends Action with ShapeAction[IGroup] with DrawingAction with Undoable with Modifying { /** The x vector translation. */ var _tx : Double = 0.0 /** The y vector translation. */ var _ty : Double = 0.0 /** The x vector translation that has been already performed. This attribute is needed since * this action can be executed several times. */ var performedTx : Double = 0.0 /** The y vector translation that has been already performed. This attribute is needed since * this action can be executed several times. */ var performedTy : Double = 0.0 override def isRegisterable = hadEffect override def hadEffect() = !LNumber.equalsDouble(performedTx, 0.0) || !LNumber.equalsDouble(performedTy, 0.0) protected def doActionBody() { if(!LNumber.equalsDouble(_tx - performedTx, 0.0) || !LNumber.equalsDouble(_ty - performedTy, 0.0)) { _shape.get.translate(_tx-performedTx, _ty-performedTy) _shape.get.setModified(true) _drawing.get.setModified(true) performedTx = _tx performedTy = _ty } } override def canDo = _drawing.isDefined && _shape.isDefined && !_shape.get.isEmpty && GLibUtilities.isValidPoint(_tx, _ty) override def undo() { _shape.get.translate(-_tx, -_ty) _shape.get.setModified(true) _drawing.get.setModified(true) } override def redo() { _shape.get.translate(_tx, _ty) _shape.get.setModified(true) _drawing.get.setModified(true) } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.32") /** * @param tx The x vector translation. */ def setTx(tx : Double) { _tx = tx } /** * @param ty The y vector translation. */ def setTy(ty : Double) { _ty = ty } } UpdateToGrid.scala000066400000000000000000000050601321075051700345570ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/actions/shapepackage net.sf.latexdraw.actions.shape import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.bufferAsJavaList import scala.collection.mutable.Buffer import scala.collection.mutable.ListBuffer import org.malai.action.Action import org.malai.undo.Undoable import net.sf.latexdraw.actions.Modifying import net.sf.latexdraw.actions.ShapeAction import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.ui.LMagneticGrid import net.sf.latexdraw.lang.LangTool /** * This action updates the given shapes to magnetic grid if activated.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-07-24
    * @author Arnaud BLOUIN * @since 3.0 */ class UpdateToGrid extends Action with ShapeAction[IGroup] with Undoable with Modifying { /** The magnetic grid to use. */ var _grid : LMagneticGrid = null val _listPts : Buffer[Buffer[IPoint]] = new ListBuffer[Buffer[IPoint]]() protected def doActionBody() { var list : Buffer[IPoint] = null shape.get.getShapes.foreach{sh=> list = new ListBuffer[IPoint] _listPts.add(list) sh.getPoints.foreach(pt=> list.add(ShapeFactory.createPoint(pt))) } redo } override def canDo = _shape!=null && _grid!=null override def undo() { var i = 0 var j = 0 shape.get.getShapes.foreach{sh=> j=0 sh.getPoints.foreach{pt=> pt.setPoint(_listPts.get(i).get(j).getX, _listPts.get(i).get(j).getY); j=j+1} i=i+1 sh.setModified(true) } } override def redo() { var i = 0 var j = 0 shape.get.getShapes.foreach{sh=> j=0 sh.getPoints.foreach{pt=> pt.setPoint(_grid.getTransformedPointToGrid(pt.toPoint2D)); j=j+1} i=i+1 sh.setModified(true) } } override def flush() { super.flush _listPts.clear } override def getUndoName = LangTool.INSTANCE.getStringActions("Actions.33") override def isRegisterable = hadEffect /** Sets the magnetic grid to use. */ def setGrid(grid:LMagneticGrid) { _grid = grid } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/badaboom/000077500000000000000000000000001321075051700303015ustar00rootroot00000000000000BadaboomCollector.java000066400000000000000000000056041321075051700344450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/badaboompackage net.sf.latexdraw.badaboom; import java.lang.Thread.UncaughtExceptionHandler; import java.util.ArrayList; import java.util.List; import org.malai.error.ErrorCatcher; import org.malai.error.ErrorNotifier; /** * Defines an error collector.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/18/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public final class BadaboomCollector extends ArrayList implements UncaughtExceptionHandler, ErrorNotifier { private static final long serialVersionUID = 1L; /** The singleton. */ public static final BadaboomCollector INSTANCE = new BadaboomCollector(); /** Contains objects that want to be aware of the manager activities. */ private final List handlers; /** * Creates an empty collector. */ private BadaboomCollector() { super(); handlers = new ArrayList<>(); ErrorCatcher.INSTANCE.setNotifier(this); } /** * Adds a handler to the manager. * @param handler The handler to add. Must not be null. * @since 3.0 */ public void addHandler(final BadaboomHandler handler) { if(handler!=null) { synchronized(handlers){ handlers.add(handler); } // If there is events, the hander is notified. synchronized(INSTANCE){ handler.notifyEvents(); } } } /** * Notifies the handlers that an event occurred. * @since 3.0 */ private void notifyHandlers(final Throwable error) { synchronized(handlers){ for(final BadaboomHandler handler : handlers) handler.notifyEvent(error); } } @Override public void clear() { super.clear(); synchronized(handlers){ handlers.forEach(handler -> handler.notifyEvents()); } } @Override public boolean add(final Throwable ex) { synchronized(INSTANCE){ if(ex==null || !super.add(ex)) return false; } notifyHandlers(ex); return true; } @Override public Throwable set(final int pos, final Throwable ex) { synchronized(INSTANCE){ if(ex==null || super.set(pos, ex)==null) return null; } notifyHandlers(ex); return ex; } @Override public void add(final int index, final Throwable ex) { synchronized(INSTANCE){ if(ex!=null) { super.add(index, ex); notifyHandlers(ex); } } } @Override public void uncaughtException(final Thread t, final Throwable e) { add(e); } @Override public void onMalaiException(final Exception exception) { add(exception); } } BadaboomHandler.java000066400000000000000000000021741321075051700340730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/badaboompackage net.sf.latexdraw.badaboom; /** * Defines a 'Bordel !' handler. A object that wants to be aware of the * Activities of a 'bordel' manager must implement this interface.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/19/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface BadaboomHandler { /** * Actions to do when an exception is received by the manager. * @param e The received exception. * @since 3.0 */ void notifyEvent(final Throwable e); /** * Actions to do when exceptions are received or cleaned by the manager. * @since 3.0 */ void notifyEvents(); } BadaboomManager.java000066400000000000000000000114471321075051700340730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/badaboompackage net.sf.latexdraw.badaboom; import java.awt.BorderLayout; import java.awt.Desktop; import java.awt.Dimension; import java.awt.Toolkit; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.stream.Collectors; import java.util.stream.IntStream; import javax.swing.BoxLayout; import javax.swing.DefaultListSelectionModel; import javax.swing.JButton; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import net.sf.latexdraw.util.VersionChecker; /** * Defines a frame that shows exceptions.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/18/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public class BadaboomManager extends JFrame { private static final long serialVersionUID = 1L; /** Contains the description of the selected exception. */ private final JEditorPane description; /** The table that sums up the gathered exceptions. */ private final JTable table; private final JButton email; private final JButton clear; /** * Creates an initialises an exception manager. */ public BadaboomManager() { super(); description = new JEditorPane(); final JScrollPane scrollerDesc = new JScrollPane(); final JScrollPane scrollerTable = new JScrollPane(); final JPanel panel = new JPanel(); final JPanel actionPanel = new JPanel(); final BadaboomTableModel model = new BadaboomTableModel(); table = new JTable(model); final Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); table.getSelectionModel().addListSelectionListener(evt -> { final int index = evt!=null && evt.getSource() instanceof DefaultListSelectionModel ? ((DefaultListSelectionModel)evt.getSource()).getMinSelectionIndex() : -1; final JEditorPane desc = description; if(index<0 || index>=BadaboomCollector.INSTANCE.size()) desc.setText("");//$NON-NLS-1$ else { desc.setText(errorToString(BadaboomCollector.INSTANCE.get(index), false)); desc.setCaretPosition(0); } }); clear = new JButton("Clear"); email = new JButton("Send by email"); actionPanel.add(clear); actionPanel.add(email); clear.addActionListener(evt -> { BadaboomCollector.INSTANCE.clear(); description.setText(""); table.revalidate(); email.setEnabled(false); }); email.addActionListener(evt -> { if(Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.MAIL)) { String text = VersionChecker.VERSION + "\n" + BadaboomCollector.INSTANCE.stream().map(ex -> errorToString(ex, true)).collect(Collectors.joining("\n\n")); try { URI mailto = new URI("mailto:arno_b@users.sf.net?subject=LaTeXDraw%20Logs&body=" + URLEncoder.encode(text, "UTF-8").replace("+", "%20")); Desktop.getDesktop().mail(mailto); }catch(final IOException | URISyntaxException ex) { BadaboomCollector.INSTANCE.add(ex); } } }); panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS)); description.setEditable(false); scrollerDesc.getViewport().add(description); scrollerTable.getViewport().add(table); panel.add(scrollerDesc); panel.add(scrollerTable); getContentPane().setLayout(new BorderLayout()); getContentPane().add(actionPanel, BorderLayout.NORTH); getContentPane().add(panel, BorderLayout.CENTER); setResizable(true); scrollerDesc.setPreferredSize(new Dimension(800, 350)); scrollerDesc.setMinimumSize(new Dimension(800, 350)); scrollerTable.setPreferredSize(new Dimension(800, 200)); pack(); setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2); } private String errorToString(final Throwable ex, final boolean withLimit) { final StackTraceElement[] stackTrace = ex.getStackTrace(); return ex.toString() + "\n" + IntStream.range(0, withLimit ? Math.min(7, stackTrace.length) : stackTrace.length). mapToObj(i -> stackTrace[i].toString()).collect(Collectors.joining("\n")); } @Override public void setVisible(final boolean visible) { super.setVisible(visible); if(visible) { table.revalidate(); clear.setEnabled(!BadaboomCollector.INSTANCE.isEmpty()); email.setEnabled(clear.isEnabled() && Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.MAIL)); } } } BadaboomTableModel.java000066400000000000000000000037371321075051700345340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/badaboompackage net.sf.latexdraw.badaboom; import javax.swing.table.AbstractTableModel; /** * Defines a table model for the 'Bordel !' manager.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/18/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public class BadaboomTableModel extends AbstractTableModel { private static final long serialVersionUID = 1L; protected static final String NAME_COL1 = "Name"; //$NON-NLS-1$ protected static final String NAME_COL2 = "Message"; //$NON-NLS-1$ protected static final String NAME_COL3 = "Location"; //$NON-NLS-1$ @Override public String getColumnName(final int column) { switch(column) { case 0: return NAME_COL1; case 1: return NAME_COL2; case 2: return NAME_COL3; default: return "";//$NON-NLS-1$ } } @Override public int getColumnCount() { return 3; } @Override public int getRowCount() { return BadaboomCollector.INSTANCE.size(); } @Override public String getValueAt(final int rowIndex, final int columnIndex) { if(rowIndex<0 || rowIndex>=BadaboomCollector.INSTANCE.size()) return null; switch(columnIndex) { case 0: return BadaboomCollector.INSTANCE.get(rowIndex).toString(); case 1: return BadaboomCollector.INSTANCE.get(rowIndex).getMessage(); case 2: final StackTraceElement[] stack = BadaboomCollector.INSTANCE.get(rowIndex).getStackTrace(); return stack!=null && stack.length>0 ? stack[0].toString() : null; default: return null; } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/000077500000000000000000000000001321075051700302055ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/BMPFilter.java000077500000000000000000000022551321075051700326430ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for bmp files (*.bmp)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/24/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class BMPFilter extends FileFilter { /** The name of the extension of bmp file*/ public static final String BMP_EXTENSION = ".bmp";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(BMP_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + BMP_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/EPSFilter.java000066400000000000000000000021761321075051700326530ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for eps documents (*.eps)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/20/12
    * @author Arnaud BLOUIN * @version 3.0 */ public class EPSFilter extends FileFilter { public static final String EPS_EXTENSION = ".eps";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(EPS_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + EPS_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/GIFFilter.java000077500000000000000000000022631321075051700326310ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for gif files (*.gif)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/24/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class GIFFilter extends FileFilter { /** The name of the extension of GIF file */ public static final String GIF_EXTENSION = ".gif";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(GIF_EXTENSION) || file.isDirectory()); } @Override public String getDescription() { return "*" + GIF_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/JPGFilter.java000077500000000000000000000022551321075051700326450ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for jpg files (*.jpg)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/24/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class JPGFilter extends FileFilter { /** The name of the extension of jpg file */ public static final String JPG_EXTENSION = ".jpg";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(JPG_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + JPG_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/PDFFilter.java000066400000000000000000000022161321075051700326300ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for pdf documents (*.pdf)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/08/08
    * @author Arnaud BLOUIN * @version 3.0 * @since 2.0.3 */ public class PDFFilter extends FileFilter { public static final String PDF_EXTENSION = ".pdf";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(PDF_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + PDF_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/PNGFilter.java000077500000000000000000000022561321075051700326520ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class defines a filter for png files (*.png)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/24/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class PNGFilter extends FileFilter { /** The name of the extension of png file */ public static final String PNG_EXTENSION = ".png";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(PNG_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + PNG_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/PictureFilter.java000066400000000000000000000025051321075051700336330ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; import net.sf.latexdraw.lang.LangTool; /** * This class defines a filter for pictures.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 20/01/12
    * @author Arnaud BLOUIN * @version 3.0 */ public class PictureFilter extends FileFilter { @Override public boolean accept(final File file) { final boolean accept; if(file==null) accept = false; else { final String name = file.getName(); accept = file.isDirectory() || name.endsWith(PNGFilter.PNG_EXTENSION) || name.endsWith(BMPFilter.BMP_EXTENSION) || name.endsWith(GIFFilter.GIF_EXTENSION); } return accept; } @Override public String getDescription() { return LangTool.INSTANCE.getStringDialogFrame("Filter.1"); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/SVGFilter.java000066400000000000000000000022131321075051700326530ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class define a filter for SVG files (*.svg).
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/06/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 2.0.0 */ public class SVGFilter extends FileFilter { public static final String SVG_EXTENSION = ".svg";//$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(SVG_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + SVG_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/filters/TeXFilter.java000077500000000000000000000022611321075051700327220ustar00rootroot00000000000000package net.sf.latexdraw.filters; import java.io.File; import javax.swing.filechooser.FileFilter; /** * This class define a filter for TeX files (*.tex)
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/20/06
    * @author Arnaud BLOUIN * @version 3.0 */ public class TeXFilter extends FileFilter { /** The name of the extension of TeX file*/ public static final String TEX_EXTENSION = ".tex"; //$NON-NLS-1$ @Override public boolean accept(final File file) { return file!=null && (file.getName().endsWith(TEX_EXTENSION)|| file.isDirectory()); } @Override public String getDescription() { return "*" + TEX_EXTENSION; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/000077500000000000000000000000001321075051700307065ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svg/000077500000000000000000000000001321075051700315055ustar00rootroot00000000000000CSSStylesGenerator.java000066400000000000000000000040771321075051700360040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.svg.CSSStyleList; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDefsElement; /** * Defines method to get/set CSS style from/to a LaTeXDraw shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ final class CSSStylesGenerator { /** The singleton. */ public static final CSSStylesGenerator INSTANCE = new CSSStylesGenerator(); private CSSStylesGenerator() { super(); } /** * Sets the CSS styles of the given list to the given LaTeXDraw shape. * @param shape 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 void setCSSStyles(final IShape shape, final CSSStyleList styles, final SVGDefsElement defs) { if(shape==null || styles==null) return ; LShapeSVGGenerator.setThickness(shape, styles.getCSSValue(SVGAttributes.SVG_STROKE_WIDTH), styles.getCSSValue(SVGAttributes.SVG_STROKE)); LShapeSVGGenerator.setLineColour(shape, styles.getCSSValue(SVGAttributes.SVG_STROKE), styles.getCSSValue(SVGAttributes.SVG_STROKE_OPACITY)); LShapeSVGGenerator.setDashedDotted(shape, styles.getCSSValue(SVGAttributes.SVG_STROKE_DASHARRAY), styles.getCSSValue(SVGAttributes.SVG_STROKE_LINECAP)); LShapeSVGGenerator.setFill(shape, styles.getCSSValue(SVGAttributes.SVG_FILL), styles.getCSSValue(SVGAttributes.SVG_FILL_OPACITY), defs); } } IShapeSVGFactory.java000066400000000000000000000151241321075051700353550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.svg.*; import net.sf.latexdraw.util.LNamespace; /** * Creates IShape instances according to the given SVG element.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/21/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class IShapeSVGFactory { /** The singleton. */ public static final IShapeSVGFactory INSTANCE = new IShapeSVGFactory(); private IShapeSVGFactory() { super(); } /** * Creates a IShape instance using the given SVGElement. * @param elt The SVGElement to parse. * @return The created IShape instance or null. * @since 3.0 */ public IShape createShape(final SVGElement elt) { return createShape(elt, true); } /** * Creates a IShape instance using the given SVGElement. * @param elt The SVGElement to parse. * @param withTransformations True: the set of transformations that concerned the given SVG element will be applied to the shape. * @return The created IShape instance or null. * @since 3.0 */ public IShape createShape(final SVGElement elt, final boolean withTransformations) { if(elt==null || !elt.enableRendering()) return null; try { if(elt instanceof SVGRectElement) return new LRectangleSVGGenerator((SVGRectElement)elt).getShape(); else if(elt instanceof SVGEllipseElement) return new LEllipseSVGGenerator((SVGEllipseElement)elt).getShape(); else if(elt instanceof SVGCircleElement) return new LCircleSVGGenerator((SVGCircleElement)elt).getShape(); else if(elt instanceof SVGPolygonElement) return new LPolygonSVGGenerator((SVGPolygonElement)elt).getShape(); else if(elt instanceof SVGPolyLineElement) return new LPolylinesSVGGenerator((SVGPolyLineElement)elt).getShape(); else if(elt instanceof SVGImageElement) return new LPictureSVGGenerator((SVGImageElement)elt).getShape(); else if(elt instanceof SVGLineElement) return new LPolylinesSVGGenerator((SVGLineElement)elt).getShape(); else if(elt instanceof SVGTextElement) return new LTextSVGGenerator((SVGTextElement)elt).getShape(); else if(elt instanceof SVGPathElement) { final SVGPathElement p = (SVGPathElement)elt; if(p.isPolygon()) return new LPolygonSVGGenerator((SVGPathElement)elt).getShape(); if(p.isLines() || p.isLine()) return new LPolylinesSVGGenerator((SVGPathElement)elt).getShape(); if(p.isBezierCurve()) { return new LBezierCurveSVGGenerator((SVGPathElement)elt).getShape(); } } else if(elt instanceof SVGGElement) {// If we have a group of shapes or a latexdraw shape. final String ltdPref = elt.lookupPrefixUsable(LNamespace.LATEXDRAW_NAMESPACE_URI); final String type = elt.getAttribute(ltdPref+LNamespace.XML_TYPE); // If we have a group of shapes. if(type==null || type.isEmpty() || LNamespace.XML_TYPE_GROUP.equals(type)) { switch(elt.getChildNodes().getLength()) { case 0: return null; case 1: return createShape((SVGElement)elt.getChildNodes().item(0)); default: return new LGroupSVGGenerator((SVGGElement)elt, withTransformations).getShape(); } } // Otherwise, it should be a latexdraw shape saved in an SVG document. switch(type) { case LPlotSVGGenerator.XML_TYPE_PLOT: return new LPlotSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_RECT: return new LRectangleSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_ELLIPSE: return new LEllipseSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_CIRCLE: return new LCircleSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_POLYGON: return new LPolygonSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_SQUARE: return new LSquareSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_TRIANGLE: return new LTriangleSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_RHOMBUS: return new LRhombusSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_JOINED_LINES: return new LPolylinesSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_FREEHAND: return new LFreeHandSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_LINE: return new LPolylinesSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_BEZIER_CURVE: return new LBezierCurveSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_GRID: return new LGridSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_AXE: return new LAxeSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_TEXT: return new LTextSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_GROUP: return new LGroupSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_DOT: return new LDotSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_ARC: return new LCircleArcSVGGenerator((SVGGElement) elt, withTransformations).getShape(); case LNamespace.XML_TYPE_PICTURE: return new LPictureSVGGenerator((SVGGElement) elt, withTransformations).getShape(); } } } catch(final Exception ex) { BadaboomCollector.INSTANCE.add(ex); } return null; } } LArrowSVGGenerator.java000066400000000000000000000474101321075051700357340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.util.Objects; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.parsers.svg.CSSColors; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGCircleElement; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGMarkerElement; import net.sf.latexdraw.parsers.svg.SVGNodeList; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegClosePath; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLineto; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLinetoVertical; import net.sf.latexdraw.parsers.svg.path.SVGPathSegList; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LNumber; /** * Defines an SVG generator for arrows.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LArrowSVGGenerator { /** The arrowhead generated or used to generate the SVG-arrow. */ protected IArrow arrow; /** * Creates an SVG arrow generator. * @param arr The arrow. Must not be null. */ protected LArrowSVGGenerator(final IArrow arr) { super(); arrow = Objects.requireNonNull(arr); } /** * Initialises the arrow using an SVGMarkerElement. * @param elt The SVGMarkerElement uses to initialise the arrow. * @param owner The figure the has the arrow. * @since 2.0.0 */ protected void setArrow(final SVGMarkerElement elt, final IShape owner, final String svgMarker) { 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, svgMarker); } /** * Initialises the arrowhead using a circle arrow. * @param circle The circle element. * @param elt The arrowhead element. * @param owner The shape that has the arrow. * @since 2.0.0 */ protected void setArrow(final SVGCircleElement circle, final SVGMarkerElement elt, final IShape owner) { final double radius = circle.getR(); final String dotSizeNumStr = circle.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_DOT_SIZE_NUM); final double dotSizeDim; double dotSizeNum; final double lineWidth = owner.hasDbleBord() ? owner.getDbleBordSep() + 2.*owner.getThickness() : owner.getThickness(); if(dotSizeNumStr==null) dotSizeNum = 1.; else try { dotSizeNum = Double.parseDouble(dotSizeNumStr); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); dotSizeNum = 1.; } if(circle.getStroke()==null) { arrow.setArrowStyle(LNumber.equalsDouble(elt.getRefX(), 0.) ? ArrowStyle.DISK_END : ArrowStyle.DISK_IN); dotSizeDim = radius*lineWidth*2.-dotSizeNum*lineWidth; } else { arrow.setArrowStyle(LNumber.equalsDouble(elt.getRefX(), 0.) ? ArrowStyle.CIRCLE_END : ArrowStyle.CIRCLE_IN); dotSizeDim = (radius*lineWidth+lineWidth/2.)*2.-dotSizeNum*lineWidth; } if(LNumber.equalsDouble(dotSizeDim,0.0)) arrow.setArrowStyle(ArrowStyle.ROUND_IN); else { arrow.setDotSizeDim(dotSizeDim); arrow.setDotSizeNum(dotSizeNum); } } private void setArrowBarBracket(final SVGPathElement path, final SVGPathSegMoveto m, final double lineWidth, final SVGPathSeg seg, final SVGMarkerElement elt, final SVGPathSegList list, final String svgMarker) { final String tbarNumStr = path.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_TBAR_SIZE_NUM); double tbarNum; double y = Math.abs(m.getY()); final boolean isStartArrow = SVGAttributes.SVG_MARKER_START.equals(svgMarker); if(tbarNumStr==null) tbarNum = 1.; else try { tbarNum = Double.parseDouble(tbarNumStr); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); tbarNum = 1.; } arrow.setTBarSizeNum(tbarNum); arrow.setTBarSizeDim(y*lineWidth*2. - tbarNum*lineWidth); if(seg instanceof SVGPathSegLineto && LNumber.equalsDouble(((SVGPathSegLineto)seg).getX(), m.getX()) || seg instanceof SVGPathSegLinetoVertical) arrow.setArrowStyle(LNumber.equalsDouble(m.getX(),0.) ? ArrowStyle.BAR_IN : ArrowStyle.BAR_END); else if(seg instanceof SVGPathSegCurvetoCubic) { final double width = (arrow.getTBarSizeDim() + arrow.getTBarSizeNum()*lineWidth)/lineWidth; final double rBrack = (Math.abs(m.getX())-0.5)/width; arrow.setArrowStyle(LNumber.equalsDouble(Math.abs(m.getX()), 0.5) ? ArrowStyle.RIGHT_ROUND_BRACKET : ArrowStyle.LEFT_ROUND_BRACKET); if(!isStartArrow) arrow.setArrowStyle(arrow.getArrowStyle().getOppositeArrowStyle()); arrow.setRBracketNum(rBrack); } else // It may be a bracket. if(list.size()==4 && seg instanceof SVGPathSegLineto && list.get(2) instanceof SVGPathSegLineto && list.get(3) instanceof SVGPathSegLineto) { final double lgth = Math.abs(m.getX()-((SVGPathSegLineto)seg).getX()); y += m.getY() > 0. ? -0.5 : 0.5; arrow.setTBarSizeDim(y*lineWidth*2. - tbarNum*lineWidth); arrow.setBracketNum((lgth-0.5)*lineWidth/(arrow.getTBarSizeDim()/IShape.PPC + arrow.getTBarSizeNum()*lineWidth)); arrow.setArrowStyle(elt.getRefX()>0.? ArrowStyle.RIGHT_SQUARE_BRACKET : ArrowStyle.LEFT_SQUARE_BRACKET); } } private void setArrowArrow(final SVGPathElement path, final SVGPathSegMoveto m, final double lineWidth, final SVGPathSeg seg, final SVGPathSegList list, final String svgMarker) { if(!(seg instanceof SVGPathSegLineto && list.get(2) instanceof SVGPathSegLineto && list.get(3) instanceof SVGPathSegLineto && list.get(4) instanceof SVGPathSegClosePath)) return ; final String arrNumStr = path.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_SIZE_NUM); double arrNum; final double arrDim; final double lgth = Math.abs(((SVGPathSegLineto)seg).getX() - m.getX()); final boolean moveIs0 = LNumber.equalsDouble(m.getX(),0.) && LNumber.equalsDouble(m.getY(),0.); final boolean isStartArrow = SVGAttributes.SVG_MARKER_START.equals(svgMarker); if(arrNumStr==null) arrNum = 1.; else try { arrNum = Double.parseDouble(arrNumStr); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); arrNum = 1.; } if(list.size()==10) arrow.setArrowStyle(moveIs0 ? ArrowStyle.LEFT_DBLE_ARROW : ArrowStyle.RIGHT_DBLE_ARROW); else arrow.setArrowStyle(moveIs0 ? ArrowStyle.LEFT_ARROW : ArrowStyle.RIGHT_ARROW); if(!isStartArrow) arrow.setArrowStyle(arrow.getArrowStyle().getOppositeArrowStyle()); arrDim = lineWidth*(((SVGPathSegLineto)seg).getY()*2. - arrNum); arrow.setArrowLength(lgth/((arrNum*lineWidth + arrDim)/lineWidth)); arrow.setArrowSizeDim(arrDim); arrow.setArrowSizeNum(arrNum); arrow.setArrowInset(Math.abs(((SVGPathSegLineto)seg).getX()-((SVGPathSegLineto)list.get(2)).getX())/lgth); } /** * Initialises the arrowhead using a path arrow. * @param path The path element. * @param elt The arrowhead element. * @param owner The shape that has the arrow. * @since 2.0.0 */ protected void setArrow(final SVGPathElement path, final SVGMarkerElement elt, final IShape owner, final String svgMarker) { final SVGPathSegList list = path.getSegList(); final SVGPathSegMoveto m = (SVGPathSegMoveto)list.get(0); final double lineWidth = owner.hasDbleBord() ? owner.getDbleBordSep() + 2.*owner.getThickness() : owner.getThickness(); if(list.size()==2 || list.size()==4) // It may be a bar or a bracket setArrowBarBracket(path, m, lineWidth, list.get(1), elt, list, svgMarker); else if(list.size()==5 || list.size()==10)// It may be an arrow or a double arrow setArrowArrow(path, m, lineWidth, list.get(1), list, svgMarker); } private double toSVGCircle(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGElement circle = new SVGCircleElement(doc); final double r = (arrow.getDotSizeDim()+arrow.getDotSizeNum()*lineWidth)/2.-lineWidth/2.; circle.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_DOT_SIZE_NUM, String.valueOf(arrow.getDotSizeNum())); circle.setAttribute(SVGAttributes.SVG_R, String.valueOf(r/lineWidth)); circle.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(shape.getFillingCol(), true)); circle.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); circle.setStrokeWidth(1); marker.appendChild(circle); return arrow.getArrowStyle()==ArrowStyle.CIRCLE_IN ? lineWidth*(arrow.isLeftArrow() ? -1. : 1.) : 0.; } private double toSVGDisk(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGElement circle = new SVGCircleElement(doc); final double r = (arrow.getDotSizeDim()+arrow.getDotSizeNum()*lineWidth)/2.; circle.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_DOT_SIZE_NUM, String.valueOf(arrow.getDotSizeNum())); circle.setAttribute(SVGAttributes.SVG_R, String.valueOf(r/lineWidth)); circle.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); marker.appendChild(circle); return arrow.getArrowStyle()==ArrowStyle.DISK_IN ? lineWidth * (arrow.isLeftArrow() ? -1. : 1.) : 0.; } private void toSVGBar(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGPathElement bar = new SVGPathElement(doc); final double width = arrow.getTBarSizeDim() + arrow.getTBarSizeNum()*lineWidth; final SVGPathSegList path = new SVGPathSegList(); final double x = arrow.getArrowStyle()==ArrowStyle.BAR_IN ? arrow.isLeftArrow() ? 0.5 : -0.5 : 0.; bar.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_TBAR_SIZE_NUM, String.valueOf(arrow.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.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); bar.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE); bar.setPathData(path); bar.setStrokeWidth(1.); marker.appendChild(bar); } private double toSVGSquareBracket(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGPathElement bar = new SVGPathElement(doc); final double width = arrow.getTBarSizeDim() + arrow.getTBarSizeNum()*lineWidth; final SVGPathSegList path = new SVGPathSegList(); final double lgth = arrow.getBracketNum()*(arrow.getTBarSizeDim()/IShape.PPC + arrow.getTBarSizeNum()*lineWidth)/lineWidth; final boolean isInverted = arrow.isInverted();//FIXME shape.PPC final double gapPostion; if(arrow.getArrowStyle()==ArrowStyle.LEFT_SQUARE_BRACKET) { final double 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 { final double 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(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_TBAR_SIZE_NUM, String.valueOf(arrow.getTBarSizeNum())); bar.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); bar.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE); bar.setPathData(path); bar.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1"); //$NON-NLS-1$ return gapPostion; } private void toSVGArrow(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGElement arrowSVG = new SVGPathElement(doc); final double width = (arrow.getArrowSizeNum()*lineWidth + arrow.getArrowSizeDim())/lineWidth; double length = arrow.getArrowLength()*width; double inset = arrow.getArrowInset()*length; final SVGPathSegList path = new SVGPathSegList(); if(arrow.getArrowStyle()==ArrowStyle.LEFT_ARROW) { length *= -1.; inset *= -1.; } final double lgth2 = arrow.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()); marker.appendChild(arrowSVG); arrowSVG.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_SIZE_NUM, String.valueOf(arrow.getArrowSizeNum())); arrowSVG.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); arrowSVG.setAttribute(SVGAttributes.SVG_D, path.toString()); } private void toSVGRoundBracket(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGPathElement rbracket = new SVGPathElement(doc); final double width = (arrow.getTBarSizeDim() + arrow.getTBarSizeNum()*lineWidth)/lineWidth; double lgth = arrow.getRBracketNum()*width; final SVGPathSegList path = new SVGPathSegList(); double gap = 0.5; if(arrow.getArrowStyle()==ArrowStyle.LEFT_ROUND_BRACKET) { lgth *= -1.; gap *= -1.; } final double lgth2 = arrow.isInverted() ? lgth : 0.; path.add(new SVGPathSegMoveto(-lgth+lgth2-gap, width/2., false)); path.add(new SVGPathSegCurvetoCubic(-lgth+lgth2-gap, -width/2., 0., width/2., 0., -width/2., false)); marker.appendChild(rbracket); rbracket.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); rbracket.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE); rbracket.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_TBAR_SIZE_NUM, String.valueOf(arrow.getTBarSizeNum())); rbracket.setPathData(path); rbracket.setStrokeWidth(1); } private void toSVGDoubleArrow(final SVGDocument doc, final double lineWidth, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGElement arrowSVG = new SVGPathElement(doc); final double width = (arrow.getArrowSizeNum()*lineWidth + arrow.getArrowSizeDim())/lineWidth; double length = arrow.getArrowLength()*width; double inset = arrow.getArrowInset()*length; final SVGPathSegList path = new SVGPathSegList(); if(arrow.getArrowStyle()==ArrowStyle.LEFT_DBLE_ARROW) { inset *= -1.; length *= -1.; } final double lgth2 = arrow.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(arrowSVG); arrowSVG.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ARROW_SIZE_NUM, String.valueOf(arrow.getArrowSizeNum())); arrowSVG.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); arrowSVG.setAttribute(SVGAttributes.SVG_D, path.toString()); } private void toSVGRoundIn(final SVGDocument doc, final boolean isShadow, final SVGElement marker) { final IShape shape = arrow.getShape(); final SVGElement circle = new SVGCircleElement(doc); circle.setAttribute(SVGAttributes.SVG_R, "0.5"); //$NON-NLS-1$ circle.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(isShadow ? shape.getShadowCol() : shape.getLineColour(), true)); marker.appendChild(circle); } /** * Return the SVG tree of the arrowhead or null if this arrowhead has no style. * @param doc The document used to create elements. * @param isShadow True: this operation is call to create the SVG shadow of the shape. * @return The SVG tree of the arrowhead or null if doc is null. * @since 2.0.0 */ public SVGElement toSVG(final SVGDocument doc, final boolean isShadow) { if(doc==null || !arrow.hasStyle()) return null; final ArrowStyle arrowStyle = arrow.getArrowStyle(); final SVGElement marker = new SVGMarkerElement(doc); final double lineWidth = arrow.getShape().getFullThickness(); double gapPostion = 0.; if(arrowStyle==ArrowStyle.CIRCLE_END || arrowStyle==ArrowStyle.CIRCLE_IN) gapPostion = toSVGCircle(doc, lineWidth, isShadow, marker); else if(arrowStyle==ArrowStyle.DISK_END || arrowStyle==ArrowStyle.DISK_IN) gapPostion = toSVGDisk(doc, lineWidth, isShadow, marker); else if(arrowStyle.isBar()) toSVGBar(doc, lineWidth, isShadow, marker); else if(arrowStyle.isSquareBracket()) toSVGSquareBracket(doc, lineWidth, isShadow, marker); else if(arrowStyle==ArrowStyle.RIGHT_ARROW || arrowStyle==ArrowStyle.LEFT_ARROW) toSVGArrow(doc, lineWidth, isShadow, marker); else if(arrowStyle.isRoundBracket()) toSVGRoundBracket(doc, lineWidth, isShadow, marker); else if(arrowStyle==ArrowStyle.LEFT_DBLE_ARROW || arrowStyle==ArrowStyle.RIGHT_DBLE_ARROW) toSVGDoubleArrow(doc, lineWidth, isShadow, marker); else if(arrowStyle==ArrowStyle.ROUND_IN) toSVGRoundIn(doc, isShadow, marker); if(!LNumber.equalsDouble(gapPostion,0.)) 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; } } LAxeSVGGenerator.java000066400000000000000000001031421321075051700353520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.awt.geom.Point2D; import java.util.List; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGNodeList; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for an shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LAxeSVGGenerator extends LShapeSVGGenerator { protected LAxeSVGGenerator(final IAxes shape) { super(shape); } /** * 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 */ protected LAxeSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createAxes(ShapeFactory.createPoint())); if(elt==null) throw new IllegalArgumentException(); setSVGParameters(elt); List values; final String pref = LNamespace.LATEXDRAW_NAMESPACE+':'; final String str; shape.setShowOrigin(Boolean.parseBoolean(elt.getAttribute(pref+LNamespace.XML_AXE_SHOW_ORIGIN))); shape.setAxesStyle(AxesStyle.getStyle(elt.getAttribute(pref+LNamespace.XML_STYLE))); shape.setTicksDisplayed(PlottingStyle.getStyle(elt.getAttribute(pref+LNamespace.XML_AXE_SHOW_TICKS))); shape.setTicksStyle(TicksStyle.getStyle(elt.getAttribute(pref+LNamespace.XML_AXE_TICKS_STYLE))); shape.setLabelsDisplayed(PlottingStyle.getStyle(elt.getAttribute(pref+LNamespace.XML_AXE_LABELS_STYLE))); str = elt.getAttribute(pref+LNamespace.XML_AXE_TICKS_SIZE); if(str!=null) try{ shape.setTicksSize(Double.parseDouble(str)); } catch(final NumberFormatException e) { /* */ } values = SVGPointsParser.getPoints(elt.getAttribute(pref+LNamespace.XML_GRID_END)); if(values!=null && !values.isEmpty()) { shape.setGridEndX((int)values.get(0).getX()); shape.setGridEndY((int)values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(pref+LNamespace.XML_GRID_START)); if(values!=null && !values.isEmpty()) { shape.setGridStartX((int)values.get(0).getX()); shape.setGridStartY((int)values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(pref+LNamespace.XML_GRID_ORIGIN)); if(values!=null && !values.isEmpty()) { shape.setOriginX((int)values.get(0).getX()); shape.setOriginY((int)values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(pref+LNamespace.XML_AXE_INCREMENT)); if(values!=null && !values.isEmpty()) { shape.setIncrementX(values.get(0).getX()); shape.setIncrementY(values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(pref+LNamespace.XML_AXE_DIST_LABELS)); if(values!=null && !values.isEmpty()) { shape.setDistLabelsX(values.get(0).getX()); shape.setDistLabelsY(values.get(0).getY()); } /* Looking for the two axe in order to get the position of the axes. */ final SVGNodeList nl = elt.getChildren(SVGElements.SVG_G); int i=0; final int size = nl.getLength(); SVGGElement l1=null; SVGGElement l2=null; SVGElement element; while((l1==null || l2==null) && i0 || gridEndy>0) { final double positionx = shape.getPosition().getX(); final double positiony = shape.getPosition().getY(); final double xMax = positionx+gridEndx*IShape.PPC; final double yMax = positiony-gridEndy*IShape.PPC; final IPoint pos = ShapeFactory.createPoint(positionx, gridEndy>0 ? yMax : positiony); final IRectangle r= ShapeFactory.createRectangle(pos, Math.abs(pos.getX()-(gridEndx>0 ? xMax : positionx)), Math.abs(pos.getY()-positiony)); r.setBordersPosition(BorderPos.MID); r.setLineColour(shape.getLineColour()); r.setLineStyle(shape.getLineStyle()); r.setThickness(shape.getThickness()); elt.appendChild(new LRectangleSVGGenerator(r).toSVG(document)); } } private void createSVGAxe(final SVGElement elt, final SVGDocument document) { switch(shape.getAxesStyle()) { case AXES: createArrows(elt, document); break; case FRAME: createFrame(elt, document); break; case NONE: break; } // double minX, maxX, minY, maxY, maxX3, minX3, maxY3, minY3; // IPoint increment = shape.getIncrement(); // IPoint gridEnd = shape.getGridEnd(); // IPoint gridStart = shape.getGridStart(); // IPoint position = shape.getPosition(); // IPoint origin = shape.getOrigin(); // double gridEndx = gridEnd.getX(); // double gridEndy = gridEnd.getY(); // double positionx = position.getX(); // double positiony = position.getY(); // double incrementx = increment.getX(); // double incrementy = increment.getY(); // double originx = origin.getX(); // double originy = origin.getY(); // double gridStartx = gridStart.getX(); // double gridStarty = gridStart.getY(); // double distLabelsX = shape.getDistLabelsX(); // double distLabelsY = shape.getDistLabelsY(); // double gapX = distLabelsX==0. ? IShape.PPC : (distLabelsX/incrementx)*IShape.PPC, i; // double gapY = distLabelsY==0. ? IShape.PPC : (distLabelsY/incrementy)*IShape.PPC; // double rotationAngle = shape.getRotationAngle(); // double lgth; // TicksStyle ticksStyle = shape.getTicksStyle(); // AxesStyle axesStyle = shape.getAxesStyle(); // PlottingStyle ticksDisplayed = shape.getTicksDisplayed(); // PlottingStyle labelsDisplayed = shape.getLabelsDisplayed(); // double ticksSize = shape.getTicksSize(); // boolean isYLabelWest = shape.isYLabelWest(); // boolean isXLabelSouth = shape.isXLabelSouth(); // boolean showOrigin = shape.isShowOrigin(); // FontMetrics fontMetrics = shape.getFontMetrics(); // Font font = shape.getFont(); // IArrow arrowHead1 = shape.getArrowAt(0); // IArrow arrowHead2 = shape.getArrowAt(1); // boolean ticksBot = ticksStyle.equals(TicksStyle.BOTTOM) || ticksStyle.equals(TicksStyle.FULL); // double thickness = shape.getThickness(); // int j; // // elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_AXE); // elt.setAttribute(SVGAttributes.SVG_ID, getSVGID()); // // if(gridEndx0 ? 0 : minX3; // maxX3 = maxX<0 ? 0 : maxX3; // minY3 = minY>0 ? 0 : minY3; // maxY3 = maxY<0 ? 0 : maxY3; // // switch(axesStyle) // { // case AXES: // // boolean arrowOk = (float)minX!=(float)maxX || (float)maxX!=(float)minY || (float)minY!=(float)maxY; // LLines xLine = new LLines(new LPoint(positionx+gridStartx*IShape.PPC, position.getY()), // new LPoint(positionx+gridEndx*IShape.PPC, position.getY()), true); // LLines yLine = new LLines(new LPoint(positionx, position.getY()-gridEnd.getY()*IShape.PPC), // new LPoint(positionx, position.getY()-gridStart.getY()*IShape.PPC), true); // // xLine.setLineColour(shape.getLineColour()); // xLine.setLineStyle(shape.getLineStyle()); // xLine.setThickness(thickness); // yLine.setLineColour(shape.getLineColour()); // yLine.setLineStyle(shape.getLineStyle()); // yLine.setThickness(thickness); // // if(!arrowHead1.getArrowStyle().getPSTToken().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk) { // String arrowStyle = arrowHead1.getArrowStyle().getPSTToken(); // 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().getPSTToken(); // // 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().getPSTToken().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk) { // String arrowStyle = arrowHead2.getArrowStyle().getPSTToken(); // 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().getPSTToken(); // // 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 FRAME: // if(gridEndx>0 || gridEndy>0) { // double xMax = positionx+gridEndx*IShape.PPC; // double yMax = positiony-gridEndy*IShape.PPC; // IPoint pos = new LPoint(positionx, gridEndy>0?yMax:positiony); // // IRectangle r = new LRectangle(pos, Math.abs(pos.getX()-(gridEndx>0?xMax:positionx)), // Math.abs(pos.getY()-positiony), false); // // r.setBordersPosition(BorderPos.MID); // r.setLineColour(shape.getLineColour()); // r.setLineStyle(shape.getLineStyle()); // r.setThickness((float)thickness); // elt.appendChild(new LRectangleSVGGenerator(r).toSVG(document)); // } // break; // } // // double endX = distLabelsX!=0. ? maxX3 : maxX3/incrementx; // double endY = distLabelsY!=0. ? maxY3 : maxY3/increment.getY(); // double startX = distLabelsX!=0. ? minX3 : minX3/incrementx; // double startY = distLabelsY!=0. ? minY3 : minY3/increment.getY(); // // if(!ticksDisplayed.equals(PlottingStyle.NONE))// We draw the ticks // { // if(ticksStyle.equals(TicksStyle.FULL) || (ticksStyle.equals(TicksStyle.TOP) && maxY>0) || // (ticksStyle.equals(TicksStyle.BOTTOM) && maxY<=0)) // if(ticksDisplayed.equals(PlottingStyle.X) || ticksDisplayed.equals(PlottingStyle.ALL)) { // SVGElement ticksX = new SVGGElement(document); // Line l = new LLine(false); // l.setThickness((float)thickness); // l.setLinesColor(shape.getLineColour()); // // for(j=1; j<=endX; j++) // try{ ticksX.appendChild(new SVGLineElement(positionx+j*gapX*incrementx, positiony, // positionx+j*gapX*incrementx, positiony-ticksSize-thickness/2., document)); } // catch(MalformedSVGDocument e) { /* */ } // // for(j=-1; j>=startX; j--) // try{ ticksX.appendChild(new SVGLineElement(positionx+j*gapX*incrementx, positiony, // positionx+j*gapX*incrementx, positiony-ticksSize-thickness/2., document)); } // catch(MalformedSVGDocument e) { /* */ } // // elt.appendChild(ticksX); // } // // if(ticksStyle.equals(TicksStyle.FULL) || (ticksStyle.equals(TicksStyle.TOP) && maxX>0) || // (ticksStyle.equals(TicksStyle.BOTTOM) && maxX<=0)) // if(ticksDisplayed.equals(PlottingStyle.Y) || ticksDisplayed.equals(PlottingStyle.ALL)) { // SVGElement ticksY = new SVGGElement(document); // // for(j=1; j<=endY; j++) // try{ ticksY.appendChild(new SVGLineElement(positionx, positiony-j*gapY*increment.getY(), // positionx+ticksSize+thickness/2., positiony-j*gapY*increment.getY(), document)); } // catch(MalformedSVGDocument e) { /* */ } // // for(j=-1; j>=startY; j--) // try{ ticksY.appendChild(new SVGLineElement(positionx, positiony-j*gapY*increment.getY(), // positionx+ticksSize+thickness/2., positiony-j*gapY*increment.getY(), document)); } // catch(MalformedSVGDocument e) { /* */ } // // elt.appendChild(ticksY); // } // // if(ticksStyle.equals(TicksStyle.FULL) || (ticksStyle.equals(TicksStyle.BOTTOM) && maxY>0) || // (ticksStyle.equals(TicksStyle.TOP) && maxY<=0)) // if(ticksDisplayed.equals(PlottingStyle.X) || ticksDisplayed.equals(PlottingStyle.ALL)) { // SVGElement ticksX = new SVGGElement(document); // // for(j=1; j<=endX; j++) // try{ ticksX.appendChild(new SVGLineElement(positionx+j*gapX*incrementx, positiony, // positionx+j*gapX*incrementx, positiony+ticksSize+thickness/2., document)); } // catch(MalformedSVGDocument e) { /* */ } // // for(j=-1; j>=startX; j--) // try{ ticksX.appendChild(new SVGLineElement(positionx+j*gapX*incrementx, positiony, // positionx+j*gapX*incrementx, positiony+ticksSize+thickness/2., document)); } // catch(MalformedSVGDocument e) { /* */ } // // elt.appendChild(ticksX); // } // // if(ticksStyle.equals(TicksStyle.FULL) || (ticksStyle.equals(TicksStyle.BOTTOM) && maxX>0) || // (ticksStyle.equals(TicksStyle.TOP) && maxX<=0)) // if(ticksDisplayed.equals(PlottingStyle.Y) || ticksDisplayed.equals(PlottingStyle.ALL)) { // SVGElement ticksY = new SVGGElement(document); // // for(j=1; j<=endY; j++) // try{ ticksY.appendChild(new SVGLineElement(positionx, positiony-j*gapY*increment.getY(), // positionx-ticksSize-thickness/2., positiony-j*gapY*increment.getY(), document)); } // catch(MalformedSVGDocument e) { /* */ } // // for(j=-1; j>=startY; j--) // try{ ticksY.appendChild(new SVGLineElement(positionx, positiony-j*gapY*increment.getY(), // positionx-ticksSize-thickness/2., positiony-j*gapY*increment.getY(), document)); } // catch(MalformedSVGDocument e) { /* */ } // // elt.appendChild(ticksY); // } // } // // if(labelsDisplayed.equals(PlottingStyle.ALL) || labelsDisplayed.equals(PlottingStyle.X)) // {// We show the labels on the X-shape. // float height = fontMetrics.getAscent(); // double gap = ((ticksDisplayed.equals(PlottingStyle.ALL) || // ticksDisplayed.equals(PlottingStyle.X))&& // ((isXLabelSouth && (ticksStyle.equals(TicksStyle.BOTTOM) || ticksStyle.equals(TicksStyle.FULL))) || // (!isXLabelSouth && (ticksStyle.equals(TicksStyle.TOP) || ticksStyle.equals(TicksStyle.FULL))))? // ticksSize:0)+thickness/2.+IAxes.GAP_LABEL; // double sep = maxY<=0 || !isXLabelSouth? -gap-IAxes.GAP_LABEL : gap+height; // String str; // // if(((isXLabelSouth && gridStarty>=0) || (!isXLabelSouth && // gridEndy<=0)) && (gridStartx!=gridEndx || gridStartx!=0) && gridStarty<=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)(positionx-fontMetrics.stringWidth(String.valueOf((int)originx))/2.))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+sep))); // text.setTextContent(String.valueOf((int)originx)); // 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=incrementx, j=1; j<=endX; i+=incrementx, j++) { // text = new SVGTextElement(document); // str = (((int)incrementx)==incrementx?String.valueOf((int)(i+originx)) : String.valueOf(i+originx)); // text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(positionx+j*gapX*incrementx-fontMetrics.stringWidth(str)/2.))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+sep))); // text.setTextContent(str); // texts.appendChild(text); // } // // for(i=-incrementx, j=-1; j>=startX; i-=incrementx, j--) { // text = new SVGTextElement(document); // str = (((int)incrementx)==incrementx?String.valueOf((int)(i+originx)) : String.valueOf(i+originx)); // text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(positionx+j*gapX*incrementx-fontMetrics.stringWidth(str)/2.))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+sep))); // text.setTextContent(str); // texts.appendChild(text); // } // // elt.appendChild(texts); // } // // if(labelsDisplayed.equals(PlottingStyle.ALL) || labelsDisplayed.equals(PlottingStyle.Y)) // {// We show the labels on the Y-shape. // float height = fontMetrics.getAscent(); // String str; // // if(maxX>0 && isYLabelWest) // { // double gap = (ticksBot && (ticksDisplayed.equals(PlottingStyle.ALL) || // ticksDisplayed.equals(PlottingStyle.Y))?ticksSize:0)+thickness/2.; // // if(gridStartx==0 && (gridStarty!=gridEndy || gridStarty!=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)(positionx-gap-fontMetrics.stringWidth( // String.valueOf((int)originy))-IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+height/2.))); // text.setTextContent(String.valueOf((int)originy)); // 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+originy)):String.valueOf(i+originy); // text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(positionx-gap-fontMetrics.stringWidth(str)-IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+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+originy)):String.valueOf(i+originy); // text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(positionx-gap-fontMetrics.stringWidth(str)-IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+height/2.-j*gapY*increment.getY()))); // text.setTextContent(str); // texts.appendChild(text); // } // // elt.appendChild(texts); // } // else // { // double gap = ((!ticksBot || ticksStyle.equals(TicksStyle.FULL)) && (ticksDisplayed.equals(PlottingStyle.ALL) || // ticksDisplayed.equals(PlottingStyle.Y))?ticksSize:0)+thickness/2.; // // if((!isYLabelWest && gridEndx<=0) || (isYLabelWest && gridStartx>=0) && (gridStarty!=gridEndy || gridStarty!=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)(positionx+gap+IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+height/2.))); // text.setTextContent(String.valueOf((int)originy)); // 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)(positionx+gap+IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+height/2.-j*gapY*increment.getY()))); // text.setTextContent(((int)increment.getY())==increment.getY()?String.valueOf((int)(i+originy)):String.valueOf(i+originy)); // 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)(positionx+gap+IAxes.GAP_LABEL))); // text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(positiony+height/2.-j*gapY*increment.getY()))); // text.setTextContent(((int)increment.getY())==increment.getY()?String.valueOf((int)(i+originy)):String.valueOf(i+originy)); // texts.appendChild(text); // } // // elt.appendChild(texts); // } // } // // if(rotationAngle%(Math.PI*2)!=0) // setSVGRotationAttribute(elt); } } LBezierCurveSVGGenerator.java000066400000000000000000000274441321075051700370740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.*; import net.sf.latexdraw.parsers.svg.path.*; import net.sf.latexdraw.util.LNamespace; import java.awt.*; import java.awt.geom.Point2D; /** * Defines a SVG generator for a Bézier curve.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LBezierCurveSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG bezier curve. * @param bc The bezier curve used for the generation. * @throws IllegalArgumentException If bc is null. * @since 2.0 */ protected LBezierCurveSVGGenerator(final IBezierCurve bc){ super(bc); } /** * Creates a Bézier curve from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LBezierCurveSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createBezierCurve()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGPathElement)) throw new IllegalArgumentException(); final SVGPathElement main = (SVGPathElement)elt2; setPath(main.getSegList()); setSVGParameters(main); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); final IArrow arrow1 = shape.getArrowAt(0); final IArrow arrow2 = shape.getArrowAt(-1); setSVGArrow(arrow1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main, SVGAttributes.SVG_MARKER_START); setSVGArrow(arrow2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main, SVGAttributes.SVG_MARKER_END); homogeniseArrows(arrow1, arrow2); shape.setShowPts(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHOW_PTS)!=null); if(withTransformation) applyTransformations(elt); } protected LBezierCurveSVGGenerator(final SVGPathElement path) { this(ShapeFactory.createBezierCurve()); setPath(path.getSegList()); setSVGParameters(path); applyTransformations(path); } /** * 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(final SVGPathSegList list) { if(list==null || list.size()<2 || !(list.get(0) instanceof SVGPathSegMoveto)) throw new IllegalArgumentException(); final SVGPathSegMoveto m = (SVGPathSegMoveto)list.get(0); CtrlPointsSeg c; int i=1; final int size = list.size(); Point2D pt = new Point2D.Double();// Creating a point to support when the first path element is relative. pt = m.getPoint(pt); shape.addPoint(ShapeFactory.createPoint(pt)); if(size>1 && list.get(1) instanceof CtrlPointsSeg) {// We set the control point of the first point. c = (CtrlPointsSeg)list.get(1); shape.getFirstCtrlPtAt(-1).setPoint(ShapeFactory.createPoint(c.getCtrl1(pt))); } while(i2 && shape.getPtAt(-1).equals(shape.getPtAt(0), 0.00001)) {// We set the shape as closed shape.removePoint(-1); shape.setIsClosed(true); } else if(i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LCircleArcSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG arc. * @param shape The arc shape used for the generation. * @throws IllegalArgumentException If arc is null. * @since 2.0 */ protected LCircleArcSVGGenerator(final ICircleArc shape) { super(shape); } /** * 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 */ protected LCircleArcSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createCircleArc()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); final IArrow arr1 = shape.getArrowAt(0); final IArrow arr2 = shape.getArrowAt(-1); if(elt==null || !(elt2 instanceof SVGPathElement)) throw new IllegalArgumentException(); final SVGPathElement main = (SVGPathElement)elt2; final SVGPathSegList l = main.getSegList(); final double sx; final double sy; if(l.size()<2 && !(l.get(0) instanceof SVGPathSegMoveto) && !(l.get(1) instanceof SVGPathSegArc)) throw new IllegalArgumentException(); sx = ((SVGPathSegMoveto)l.get(0)).getX(); sy = ((SVGPathSegMoveto)l.get(0)).getY(); final Arc2D arc = ((SVGPathSegArc)l.get(1)).getArc2D(sx, sy); double angle = Math.toRadians(arc.getAngleStart())%(Math.PI*2); shape.setAngleStart(angle); angle = Math.toRadians(arc.getAngleExtent()+arc.getAngleStart())%(Math.PI*2); shape.setAngleEnd(angle); shape.setPosition(arc.getMinX(), arc.getMaxY()); shape.setWidth(arc.getMaxX()-arc.getMinX()); if(l.size()>2) if(l.get(2) instanceof SVGPathSegClosePath) shape.setArcStyle(ArcStyle.CHORD); else if(l.size()==4 && l.get(2) instanceof SVGPathSegLineto && l.get(3) instanceof SVGPathSegClosePath) shape.setArcStyle(ArcStyle.WEDGE); shape.setShowPts(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHOW_PTS)!=null); setSVGParameters(main); setSVGArrow(arr1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main, SVGAttributes.SVG_MARKER_START); setSVGArrow(arr2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main, SVGAttributes.SVG_MARKER_END); homogeniseArrows(arr1, arr2); setSVGLatexdrawParameters(elt); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null || doc.getFirstChild().getDefs()==null) return null; final SVGDefsElement defs = doc.getFirstChild().getDefs(); final double rotationAngle = shape.getRotationAngle(); final double startAngle = shape.getAngleStart()%(2.*Math.PI); final double endAngle = shape.getAngleEnd()%(2.*Math.PI); final ArcStyle type = shape.getArcStyle(); final SVGElement root = new SVGGElement(doc); final IPoint start = shape.getStartPoint(); final IPoint end = shape.getEndPoint(); final double radius = shape.getWidth()/2.0; final boolean largeArcFlag = Math.abs(endAngle-startAngle)>=Math.PI; final boolean sweepFlag = startAngle>=endAngle; final SVGPathSegList path = new SVGPathSegList(); SVGElement elt; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_ARC); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); path.add(new SVGPathSegMoveto(start.getX(), start.getY(), false)); path.add(new SVGPathSegArc(end.getX(), end.getY(), radius, radius, 0, largeArcFlag, sweepFlag, false)); if(type==ArcStyle.CHORD) path.add(new SVGPathSegClosePath()); else if(type==ArcStyle.WEDGE) { final IPoint gravityCenter = shape.getGravityCentre(); path.add(new SVGPathSegLineto(gravityCenter.getX(), gravityCenter.getY(), false)); path.add(new SVGPathSegClosePath()); } if(shape.hasShadow()) { final SVGElement shad = new SVGPathElement(doc); shad.setAttribute(SVGAttributes.SVG_D, path.toString()); setSVGShadowAttributes(shad, true); root.appendChild(shad); setSVGArrow(shape, shad, 0, true, doc, defs); setSVGArrow(shape, shad, 1, true, doc, defs); } // The background of the borders must be filled is there is a shadow. if(shape.hasShadow() && shape.getLineStyle()!=LineStyle.NONE) { 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); if(shape.hasDbleBord()) { final SVGElement dble = new SVGPathElement(doc); dble.setAttribute(SVGAttributes.SVG_D, path.toString()); setSVGDoubleBordersAttributes(dble); root.appendChild(dble); } setSVGRotationAttribute(root); setSVGAttributes(doc, elt, true); elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE +':'+ LNamespace.XML_ROTATION, String.valueOf(rotationAngle)); setSVGArrow(shape, elt, 0, false, doc, defs); setSVGArrow(shape, elt, 1, false, doc, defs); if(shape.isShowPts()) 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(final SVGDocument doc) { if(!shape.isShowPts() || doc==null) return null; final SVGGElement showPts = new SVGGElement(doc); final double thickness = shape.getThickness()/2.; showPts.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_SHOW_PTS); showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(), shape.getStartPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0)); showPts.appendChild(getShowPointsLine(doc, thickness, shape.getLineColour(), shape.getGravityCentre(), shape.getEndPoint(), shape.getDashSepBlack(), shape.getDashSepWhite(), false, 1, 0)); return showPts; } } LCircleSVGGenerator.java000066400000000000000000000113121321075051700360330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGCircleElement; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a circle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LCircleSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG circle. * @param circle The circle shape used for the generation. * @throws IllegalArgumentException If circle is null. * @since 2.0 */ protected LCircleSVGGenerator(final ICircle circle) { super(circle); } /** * Creates a circle from an SVG circle element. * @param elt The source element. * @since 2.0.0 */ protected LCircleSVGGenerator(final SVGCircleElement elt) { this(ShapeFactory.createCircle()); setSVGParameters(elt); setCircleParameters(elt, 0.); applyTransformations(elt); } /** * Creates a circle from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LCircleSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createCircle()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGCircleElement)) throw new IllegalArgumentException(); setSVGLatexdrawParameters(elt); setSVGParameters(elt2); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); setCircleParameters((SVGCircleElement)elt2, getPositionGap()); if(withTransformation) applyTransformations(elt); } /** * Sets the circle parameters. * @param circleElt The source SVG circle element. * @param gap The gap used to define the latexdraw circle. * @since 3.0 */ protected void setCircleParameters(final SVGCircleElement circleElt, final double gap) { final double radius = circleElt.getR()-gap/2.; shape.setWidth(radius*2.); shape.setPosition(circleElt.getCx()-radius, circleElt.getCy()+radius); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null || doc.getFirstChild().getDefs()==null) return null; final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double tlx = tl.getX(); final double tly = tl.getY(); final double brx = br.getX(); final double bry = br.getY(); SVGElement elt; final SVGElement shad; final SVGElement dblBord; final SVGElement root = new SVGGElement(doc); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_CIRCLE); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); final double gap = getPositionGap(); if(shape.hasShadow()) { shad = new SVGCircleElement((brx+tlx)/2., (bry+tly)/2., (brx-tlx+gap)/2., doc); setSVGShadowAttributes(shad, true); root.appendChild(shad); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE)){ // The background of the borders must be filled is there is a shadow. elt = new SVGCircleElement((brx+tlx)/2., (bry+tly)/2., (brx-tlx+gap)/2., doc); setSVGBorderBackground(elt, root); } elt = new SVGCircleElement((brx+tlx)/2., (bry+tly)/2., (brx-tlx+gap)/2., doc);// FIXME Should use prototype design pattern to reduce re-creation. root.appendChild(elt); if(shape.hasDbleBord()) { dblBord = new SVGCircleElement((brx+tlx)/2., (bry+tly)/2., (brx-tlx+gap)/2., doc); setSVGDoubleBordersAttributes(dblBord); root.appendChild(dblBord); } setSVGAttributes(doc, elt, true); setSVGRotationAttribute(root); return root; } } LDotSVGGenerator.java000066400000000000000000000106551321075051700353710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.awt.geom.Point2D; import java.util.List; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewDot; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import net.sf.latexdraw.parsers.svg.CSSColors; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.parsers.Graphics2D2SVG; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import net.sf.latexdraw.util.LNamespace; import org.malai.mapping.MappingRegistry; /** * Defines a SVG generator for a dot.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LDotSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG dot. * @param dot The dot used for the generation. * @throws IllegalArgumentException If dot is null. */ protected LDotSVGGenerator(final IDot dot) { super(dot); } /** * Creates a dot from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LDotSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createDot(ShapeFactory.createPoint())); if(elt==null) throw new IllegalArgumentException(); String v = elt.getAttribute(elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_SIZE); final SVGElement main = getLaTeXDrawElement(elt, null); try { shape.setDotStyle(DotStyle.getStyle(elt.getAttribute(elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_DOT_SHAPE))); } catch(final IllegalArgumentException e) { BadaboomCollector.INSTANCE.add(e); } if(v!=null) try { shape.setDiametre(Double.parseDouble(v)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } v = elt.getAttribute(elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_POSITION); final List pos = SVGPointsParser.getPoints(v); if(pos!=null && !pos.isEmpty()) shape.setPosition(pos.get(0).getX(), pos.get(0).getY()); setSVGLatexdrawParameters(elt); setSVGParameters(main); if(withTransformation) applyTransformations(elt); if(!shape.isFillable() && shape.isFilled()) shape.setLineColour(CSSColors.INSTANCE.getRGBColour(main.getFill())); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null) return null; final Graphics2D2SVG graphics = new Graphics2D2SVG(doc); final SVGElement root; final boolean viewCreated; // Instead of creating a view, its is gathered from the Java view of the application. IViewShape view = MappingRegistry.REGISTRY.getTargetFromSource(shape, IViewDot.class); if(view==null) { view = View2DTK.getFactory().createView(shape); viewCreated = true; } else viewCreated = false; view.paint(graphics, null); root = graphics.getElement(); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_DOT); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_SIZE, String.valueOf(shape.getDiametre())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_DOT_SHAPE, shape.getDotStyle().getPSTToken()); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION, shape.getPosition().getX() + " " + shape.getPosition().getY()); //$NON-NLS-1$ graphics.dispose(); if(viewCreated) view.flush(); return root; } } LEllipseSVGGenerator.java000066400000000000000000000114631321075051700362360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGEllipseElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for an ellipse.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LEllipseSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG ellipse. * @param ellipse The ellipse shape used for the generation. * @throws IllegalArgumentException If ellipse is null. * @since 2.0 */ protected LEllipseSVGGenerator(final IEllipse ellipse) { super(ellipse); } /** * Creates an ellipse from an SVG ellipse element. * @param elt The source element. * @since 2.0.0 */ protected LEllipseSVGGenerator(final SVGEllipseElement elt) { this(ShapeFactory.createEllipse()); setSVGParameters(elt); setEllipseParameters(elt, 0.); applyTransformations(elt); } /** * Creates an ellipse from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LEllipseSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createEllipse()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGEllipseElement)) throw new IllegalArgumentException(); setSVGLatexdrawParameters(elt); setSVGParameters(elt2); setEllipseParameters((SVGEllipseElement)elt2, getPositionGap()); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } /** * Sets the ellipse parameters. * @param ellipseElt The source SVG ellipse element. * @param gap The gap used to define the latexdraw ellipse. * @since 3.0 */ protected void setEllipseParameters(final SVGEllipseElement ellipseElt, final double gap) { final double width = 2.*ellipseElt.getRx()-gap; final double height = 2.*ellipseElt.getRy()-gap; shape.setPosition(ellipseElt.getCx()-width/2., ellipseElt.getCy()+height/2.); shape.setWidth(width); shape.setHeight(height); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null || doc.getFirstChild().getDefs()==null) throw new IllegalArgumentException(); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double tlx = tl.getX(); final double tly = tl.getY(); final double brx = br.getX(); final double bry = br.getY(); SVGElement elt; final SVGElement root = new SVGGElement(doc); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_ELLIPSE); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); final double gap = getPositionGap(); final double width = Math.max(1., (brx-tlx+gap)/2.); final double height = Math.max(1., (bry-tly+gap)/2.); final double x = (brx+tlx)/2.; final double y = (bry+tly)/2.; if(shape.hasShadow()) { elt = new SVGEllipseElement(x, y, width, height, doc); setSVGShadowAttributes(elt, true); root.appendChild(elt); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE)) { // The background of the borders must be filled is there is a shadow. elt = new SVGEllipseElement(x, y, width, height, doc); setSVGBorderBackground(elt, root); } elt = new SVGEllipseElement(x, y, width, height, doc); setSVGAttributes(doc, elt, true); root.appendChild(elt); if(shape.hasDbleBord()) { elt = new SVGEllipseElement(x, y, width, height, doc); setSVGDoubleBordersAttributes(elt); root.appendChild(elt); } setSVGRotationAttribute(root); return root; } } LFreeHandSVGGenerator.java000066400000000000000000000204431321075051700363130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.awt.geom.Point2D; import java.util.List; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp.FreeHandType; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import net.sf.latexdraw.parsers.svg.path.SVGPathSegClosePath; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLineto; import net.sf.latexdraw.parsers.svg.path.SVGPathSegList; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a free hand drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LFreeHandSVGGenerator extends LShapeSVGGenerator { protected LFreeHandSVGGenerator(final IFreehand fh) { super(fh); } protected LFreeHandSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createFreeHand()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || elt2==null || !(elt2 instanceof SVGPathElement)) throw new IllegalArgumentException(); final SVGPathElement main = (SVGPathElement)elt2; String v = elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_INTERVAL); if(v!=null) try{ shape.setInterval(Double.valueOf(v).intValue()); } catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } final List pts = SVGPointsParser.getPoints(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POINTS)); if(pts==null) throw new IllegalArgumentException(); for(final Point2D pt : pts) shape.addPoint(ShapeFactory.createPoint(pt.getX(), pt.getY())); setSVGLatexdrawParameters(elt); setSVGParameters(main); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); v = elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ROTATION); if(v!=null) try{ shape.setRotationAngle(Double.valueOf(v)); } catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } try{ FreeHandType type = FreeHandType.getType(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_PATH_TYPE)); if(type==null) { final int val = Double.valueOf(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_PATH_TYPE)).intValue(); type = val==0 ? FreeHandType.LINES : FreeHandType.CURVES; } shape.setType(type); } catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } if(withTransformation) applyTransformations(elt); } /** * Fills the given SVG path with elements corresponding to the Freehand curved path. * @since 3.0 */ protected void getPathCurves(final SVGPathSegList path) { double prevx = shape.getPtAt(-1).getX(); double prevy = shape.getPtAt(-1).getY(); double curx = shape.getPtAt(0).getX(); double cury = shape.getPtAt(0).getY(); double midx = (curx + prevx) / 2.; double midy = (cury + prevy) / 2.; int i; final int size = shape.getNbPoints(); final int interval = shape.getInterval(); path.add(new SVGPathSegMoveto(curx, cury, false)); if(size>interval) { prevx = curx; prevy = cury; curx = shape.getPtAt(interval).getX(); cury = shape.getPtAt(interval).getY(); midx = (curx + prevx) / 2.; midy = (cury + prevy) / 2.; path.add(new SVGPathSegLineto(midx, midy, false)); } for(i=interval*2; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LGridSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG grids. * @param grid The grid used for the generation. * @throws IllegalArgumentException If grid is null. */ protected LGridSVGGenerator(final IGrid grid) { super(grid); } /** * Creates a grid from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LGridSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createGrid(ShapeFactory.createPoint())); if(elt==null) throw new IllegalArgumentException(); final String prefix = LNamespace.LATEXDRAW_NAMESPACE+':'; setDimensionGridElement(elt, prefix); SVGElement gridElt = getLaTeXDrawElement(elt, LNamespace.XML_TYPE_GRID_SUB); if(gridElt!=null) setSubGridElement(gridElt, prefix); gridElt = getLaTeXDrawElement(elt, LNamespace.XML_TYPE_GRID); if(gridElt!=null) setMainGridElement(gridElt, prefix); final String unit = elt.getAttribute(prefix+LNamespace.XML_GRID_UNIT); if(unit!=null) try { shape.setUnit(Double.parseDouble(unit)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } setLabelGridElement(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_TEXT)); if(withTransformation) applyTransformations(elt); } /** * Sets the dimensions of a grid from an SVGGElement. */ private void setDimensionGridElement(final SVGGElement elt, final String prefix) { List values; shape.setLineColour(elt.getStroke()); values = SVGPointsParser.getPoints(elt.getAttribute(prefix+LNamespace.XML_GRID_END)); if(values!=null && !values.isEmpty()) { shape.setGridEndX(values.get(0).getX()); shape.setGridEndY(values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(prefix+LNamespace.XML_GRID_START)); if(values!=null && !values.isEmpty()) { shape.setGridStartX(values.get(0).getX()); shape.setGridStartY(values.get(0).getY()); } values = SVGPointsParser.getPoints(elt.getAttribute(prefix+LNamespace.XML_GRID_ORIGIN)); if(values!=null && !values.isEmpty()) { shape.setOriginX(values.get(0).getX()); shape.setOriginY(values.get(0).getY()); } String v = elt.getAttribute(prefix+LNamespace.XML_GRID_X_SOUTH); if(v!=null) shape.setXLabelSouth(Boolean.parseBoolean(v)); v = elt.getAttribute(prefix+LNamespace.XML_GRID_Y_WEST); if(v!=null) shape.setYLabelWest(Boolean.parseBoolean(v)); } /** * Sets the label properties of a grid from an SVGElement. */ private void setLabelGridElement(final SVGElement labelElt) { if(labelElt==null) shape.setLabelsSize(0); else { final String val = labelElt.getAttribute(labelElt.getUsablePrefix()+SVGAttributes.SVG_FONT_SIZE); if(val!=null) try { shape.setLabelsSize((int)Double.parseDouble(val)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } shape.setGridLabelsColour(labelElt.getStroke()); } } /** * Sets the main grid properties of a grid from an SVGElement. */ private void setMainGridElement(final SVGElement mainGridElt, final String prefix) { boolean isGridDotted = false; String val = mainGridElt.getAttribute(prefix+LNamespace.XML_GRID_DOTS); if(val!=null) try { shape.setGridDots((int)Double.parseDouble(val)); isGridDotted = shape.getGridDots()>0; } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } val = mainGridElt.getAttribute(prefix+LNamespace.XML_GRID_WIDTH); if(isGridDotted) shape.setLineColour(CSSColors.INSTANCE.getRGBColour(mainGridElt.getFill())); else shape.setLineColour(mainGridElt.getStroke()); if(val==null) { final double st = mainGridElt.getStrokeWidth(); if(!Double.isNaN(st)) shape.setGridWidth(st); } else try{ shape.setGridWidth(Double.parseDouble(val)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } } /** * Sets the sub-grid properties of a grid from an SVGElement. */ private void setSubGridElement(final SVGElement subGridElt, final String prefix) { boolean isGridDotted = false; String val = subGridElt.getAttribute(prefix+LNamespace.XML_GRID_DOTS); if(val!=null) try { shape.setSubGridDots((int)Double.parseDouble(val)); isGridDotted = shape.getSubGridDots()>0; } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } val = subGridElt.getAttribute(prefix+LNamespace.XML_GRID_SUB_DIV); if(val!=null) try{ shape.setSubGridDiv((int)Double.parseDouble(val)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } val = subGridElt.getAttribute(prefix+LNamespace.XML_GRID_WIDTH); if(isGridDotted) shape.setSubGridColour(CSSColors.INSTANCE.getRGBColour(subGridElt.getFill())); else shape.setSubGridColour(subGridElt.getStroke()); if(val==null) { final double st = subGridElt.getStrokeWidth(); if(!Double.isNaN(st)) shape.setSubGridWidth(st); } else try{ shape.setSubGridWidth(Double.parseDouble(val)); } catch(final NumberFormatException e) { BadaboomCollector.INSTANCE.add(e); } } /** * Creates the SVG element corresponding to the sub dotted part of the grid. */ private void createSVGSubGridDots(final SVGDocument document, final SVGElement elt, final String prefix, final double subGridDiv, final double unit, final double xSubStep, final double ySubStep, final double minX, final double maxX, final double minY, final double maxY, final int subGridDots, final double subGridWidth, final double tlx, final double tly, final double brx, final double bry, final Color subGridColour) { final double dotStep = unit*IShape.PPC/(subGridDots*subGridDiv); final double nbX = (maxX-minX)*subGridDiv; final double nbY = (maxY-minY)*subGridDiv; final SVGElement subgridDots = new SVGGElement(document); SVGElement dot; subgridDots.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(subGridColour, true)); subgridDots.setAttribute(prefix+LNamespace.XML_TYPE, LNamespace.XML_TYPE_GRID_SUB); subgridDots.setAttribute(prefix+LNamespace.XML_GRID_DOTS, String.valueOf(subGridDots)); subgridDots.setAttribute(prefix+LNamespace.XML_GRID_SUB_DIV, String.valueOf(subGridDots)); subgridDots.setAttribute(prefix+LNamespace.XML_GRID_WIDTH, String.valueOf(subGridWidth)); for(double i=0, n=tlx; i=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=tly + (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); } /** * Creates the SVG element corresponding to the grid. */ protected void createSVGGrid(final SVGElement elt, final SVGDocument document) { if(elt==null || document==null) return ; // Initialisation of the parameters. final String prefix = LNamespace.LATEXDRAW_NAMESPACE+':'; final double unit = shape.getUnit(); final int subGridDiv= shape.getSubGridDiv(); double xStep = IShape.PPC*unit; final double xSubStep; double yStep = IShape.PPC*unit; final double ySubStep; xStep *= shape.getGridEndX()0) createSVGSubGridDots(document, elt, prefix, subGridDiv, unit, xSubStep, ySubStep, minX, maxX, minY, maxY, subGridDots, shape.getSubGridWidth(), tlx, tly, brx, bry, subGridColor); else if(subGridDiv>1) createSVGSubGridDiv(document, elt, prefix, subGridDiv, xSubStep, ySubStep, minX, maxX, minY, maxY, subGridDots, shape.getSubGridWidth(), tlx, tly, brx, bry, subGridColor, posX, posY, xStep, yStep); if(shape.getGridDots()>0) createSVGGridDots(document, elt, prefix, absStep, minX, maxX, minY, maxY, tlx, tly, brx, bry, unit, posX, posY, xStep, yStep, gridWidth, linesColor); else createSVGGridDiv(document, elt, prefix, minX, maxX, minY, maxY, tlx, tly, brx, bry, posX, posY, xStep, yStep, gridWidth, linesColor); if(shape.getLabelsSize()>0) createSVGGridLabels(document, elt, prefix, minX, maxX, minY, maxY, tlx, tly, xStep, yStep, gridWidth, absStep); if(LNumber.equalsDouble(shape.getRotationAngle()%(Math.PI*2), 0.)) setSVGRotationAttribute(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null) return null; final String prefix = LNamespace.LATEXDRAW_NAMESPACE+':'; final SVGElement root = new SVGGElement(doc); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); root.setAttribute(prefix+LNamespace.XML_TYPE, LNamespace.XML_TYPE_GRID); root.setAttribute(prefix+LNamespace.XML_GRID_X_SOUTH, String.valueOf(shape.isXLabelSouth())); root.setAttribute(prefix+LNamespace.XML_GRID_Y_WEST, String.valueOf(shape.isYLabelWest())); root.setAttribute(prefix+LNamespace.XML_GRID_UNIT, String.valueOf(shape.getUnit())); root.setAttribute(prefix+LNamespace.XML_GRID_END, shape.getGridEndX() + " " + shape.getGridEndY());//$NON-NLS-1$ root.setAttribute(prefix+LNamespace.XML_GRID_START, shape.getGridStartX() + " " + shape.getGridStartY());//$NON-NLS-1$ root.setAttribute(prefix+LNamespace.XML_GRID_ORIGIN, shape.getOriginX() + " " + shape.getOriginY());//$NON-NLS-1$ createSVGGrid(root, doc); setSVGRotationAttribute(root); return root; } } LGroupSVGGenerator.java000066400000000000000000000056451321075051700357420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.util.List; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.util.LNamespace; import org.w3c.dom.NodeList; /** * Defines a SVG generator for a group of shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LGroupSVGGenerator extends LShapeSVGGenerator { /** * Creates an SVG generator from IGroup instance. * @param group The group of shapes that will be converted. * @since 3.0 */ protected LGroupSVGGenerator(final IGroup group) { super(group); } /** * Creates an SVG generator from an SVGGElement that should corresponds to a * group of latexdraw shapes. * @param elt The group of latexdraw shapes in the SVG format supplemented with latexdraw * information. * @param withTransformation True: the set of transformations that concerned the given SVG element will be applied to the shape. * @throws IllegalArgumentException If the given SVGGElement is null or not valid. * @since 3.0 */ LGroupSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createGroup()); if(elt==null) throw new IllegalArgumentException(); final NodeList nodeList = elt.getChildNodes(); IShape sh; if(nodeList.getLength()<2) throw new IllegalArgumentException(); for(int i=0, size=nodeList.getLength(); i shapes = shape.getShapes(); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_GROUP); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); for(final IShape f : shapes) root.appendChild(SVGShapesFactory.INSTANCE.createSVGElement(f, doc)); return root; } return null; } } LModifiablePointsGenerator.java000066400000000000000000000056701321075051700375140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.parsers.svg.AbstractPointsElement; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegClosePath; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLineto; import net.sf.latexdraw.parsers.svg.path.SVGPathSegList; import java.awt.geom.Point2D; import java.util.List; /** * Defines an SVG generator for shapes composed of points.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ abstract class LModifiablePointsGenerator extends LShapeSVGGenerator { /** * Creates a generator for IModifiablePointsShape. * @param modShape The source shape used to generate the SVG element. */ protected LModifiablePointsGenerator(final S modShape) { super(modShape); } /** * Sets the latexdraw polygon using the given SVG element that contains points. * @param ape The source SVG element used to define the latexdraw shape. * @since 3.0 */ protected void setSVGModifiablePointsParameters(final AbstractPointsElement ape) { setSVGParameters(ape); final List ptsPol = ape.getPoints2D(); if(ptsPol==null) throw new IllegalArgumentException(); for(final Point2D pt : ptsPol) shape.addPoint(ShapeFactory.createPoint(pt.getX(), pt.getY())); } /** * Sets the points of the modifiable points shape using the given SVG element. * @param elt The SVG element that contains the points to set. * @since 3.0 */ protected void initModifiablePointsShape(final SVGPathElement elt) { final SVGPathSegList segs = elt.getSegList(); SVGPathSeg seg; final int size = segs.get(segs.size()-1) instanceof SVGPathSegClosePath ? segs.size()-1 : segs.size(); int i; Point2D pt = new Point2D.Double();// Creating a point to support when the first path element is relative. for(i=0; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LPictureSVGGenerator extends LShapeSVGGenerator { protected LPictureSVGGenerator(final IPicture shape) { super(shape); } /** * Creates a picture from a SVGImage element. * @param elt The source element. * @throws IOException If a problem while reading/writing pictures occurs. * @since 2.0.0 */ protected LPictureSVGGenerator(final SVGImageElement elt) throws IOException { this(ShapeFactory.createPicture(ShapeFactory.createPoint())); shape.setPathSource(elt.getURI()); shape.getPosition().setPoint(elt.getX(), elt.getY()); applyTransformations(elt); } /** * Creates a picture from a latexdraw-SVG element. * @param elt The source element. * @throws IOException If a problem while reading/writing pictures occurs. * @since 2.0.0 */ protected LPictureSVGGenerator(final SVGGElement elt, final boolean withTransformation) throws IOException { this(ShapeFactory.createPicture(ShapeFactory.createPoint())); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGImageElement)) throw new IllegalArgumentException(); final SVGImageElement main = (SVGImageElement)elt2; shape.setPathSource(main.getURI()); shape.setPosition(main.getX(), main.getY()); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc == null) return null; final SVGElement root = new SVGGElement(doc); final SVGElement img; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_PICTURE); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); img = new SVGImageElement(doc, shape.getPathSource()); img.setAttribute(SVGAttributes.SVG_X, String.valueOf(shape.getPosition().getX())); img.setAttribute(SVGAttributes.SVG_Y, String.valueOf(shape.getPosition().getY())); img.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf(shape.getImage().getHeight(null))); img.setAttribute(SVGAttributes.SVG_WIDTH, String.valueOf(shape.getImage().getWidth(null))); setSVGRotationAttribute(root); root.appendChild(img); return root; } } LPlotSVGGenerator.java000066400000000000000000000241641321075051700355610ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp.PlotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.PlotViewHelper; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a plotted functions.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2014-11-20
    * @author Arnaud BLOUIN */ class LPlotSVGGenerator extends LShapeSVGGenerator { static final String XML_TYPE_PLOT = "plot"; //$NON-NLS-1$ static final String XML_NB_POINTS = "nbpts"; //$NON-NLS-1$ static final String XML_EQ = "eq"; //$NON-NLS-1$ static final String XML_MIN = "min"; //$NON-NLS-1$ static final String XML_MAX = "max"; //$NON-NLS-1$ static final String XML_XSCALE = "xscale"; //$NON-NLS-1$ static final String XML_YSCALE = "yscale"; //$NON-NLS-1$ static final String XML_POLAR = "polar"; //$NON-NLS-1$ static final String XML_STYLE = "plotstyle"; //$NON-NLS-1$ protected LPlotSVGGenerator(final IPlot plot){ super(plot); } /** * Creates a Bézier curve from a latexdraw-SVG element. * @param elt The source element. */ protected LPlotSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createPlot(ShapeFactory.createPoint(), 1, 5, "x", false)); setSVGParameters(elt); shape.setPlotEquation(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + XML_EQ)); shape.setPlotStyle(PlotStyle.getPlotStyle(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + XML_STYLE))); try { shape.setPlotMinX(Double.valueOf(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + XML_MIN)));} catch(NumberFormatException | NullPointerException ex) { BadaboomCollector.INSTANCE.add(ex); } try { shape.setPlotMaxX(Double.valueOf(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + XML_MAX)));} catch(NumberFormatException | NullPointerException ex) { BadaboomCollector.INSTANCE.add(ex); } // Repetition just to assure the setting of these values because of the minX0 && elt.getChildNodes().item(0) instanceof SVGElement) { IShape sh = IShapeSVGFactory.INSTANCE.createShape((SVGElement)elt.getChildNodes().item(0)); if(sh instanceof IDot) { IDot dot = (IDot)sh; shape.setDiametre(dot.getDiametre()); shape.setDotStyle(dot.getDotStyle()); shape.setLineColour(dot.getLineColour()); if(dot.isFillable()) shape.setDotFillingCol(dot.getDotFillingCol()); } } setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null || doc.getFirstChild().getDefs()==null) return null; final SVGElement root = new SVGGElement(doc); final double minX = shape.getPlotMinX(); final double maxX = shape.getPlotMaxX(); final double step = shape.getPlottingStep(); final double posX = shape.getPosition().getX(); final double posY = shape.getPosition().getY(); if(shape.hasShadow()) { final SVGGElement shad = new SVGGElement(doc); switch(shape.getPlotStyle()) { case LINE: toSVGLine(shad, doc, posX, posY, minX, maxX, step); break; case CURVE: toSVGCurve(shad, doc, posX, posY, minX, maxX, step); break; case ECURVE: toSVGCurve(shad, doc, posX, posY, minX+step, maxX-step, step); break; case CCURVE: toSVGCurve(shad, doc, posX, posY, minX, maxX, step); break; case DOTS: toSVGDots(shad, doc, posX, posY, minX, maxX, step); break; case POLYGON: toSVGPolygon(shad, doc, posX, posY, minX, maxX, step); break; } setSVGShadowAttributes(shad, false); root.appendChild(shad); } if(shape.hasDbleBord()) { final SVGGElement dble = new SVGGElement(doc); switch(shape.getPlotStyle()) { case LINE: toSVGLine(dble, doc, posX, posY, minX, maxX, step); break; case CURVE: toSVGCurve(dble, doc, posX, posY, minX, maxX, step); break; case ECURVE: toSVGCurve(dble, doc, posX, posY, minX+step, maxX-step, step); break; case CCURVE: toSVGCurve(dble, doc, posX, posY, minX, maxX, step); break; case DOTS: toSVGDots(dble, doc, posX, posY, minX, maxX, step); break; case POLYGON: toSVGPolygon(dble, doc, posX, posY, minX, maxX, step); break; } setSVGDoubleBordersAttributes(dble); root.appendChild(dble); } switch(shape.getPlotStyle()) { case LINE: toSVGLine(root, doc, posX, posY, minX, maxX, step); break; case CURVE: toSVGCurve(root, doc, posX, posY, minX, maxX, step); break; case ECURVE: toSVGCurve(root, doc, posX, posY, minX+step, maxX-step, step); break; case CCURVE: toSVGCurve(root, doc, posX, posY, minX, maxX, step); break; case DOTS: toSVGDots(root, doc, posX, posY, minX, maxX, step); break; case POLYGON: toSVGPolygon(root, doc, posX, posY, minX, maxX, step); break; } root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, XML_TYPE_PLOT); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_POLAR, Boolean.toString(shape.isPolar())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_EQ, shape.getPlotEquation()); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_STYLE, shape.getPlotStyle().getPSTToken()); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_MIN, Double.toString(shape.getPlotMinX())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_MAX, Double.toString(shape.getPlotMaxX())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_NB_POINTS, Integer.toString(shape.getNbPlottedPoints())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_XSCALE, Double.toString(shape.getXScale())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+XML_YSCALE, Double.toString(shape.getYScale())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION_X, Double.toString(shape.getX())); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION_Y, Double.toString(shape.getY())); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); setSVGAttributes(doc, root, true); return root; } private void toSVGDots(final SVGElement elt, final SVGDocument doc, final double posX, final double posY, final double minX, final double maxX, final double step) { for(final IDot dot : PlotViewHelper.INSTANCE.updatePoints(shape, posX, posY, minX, maxX, step)) elt.appendChild(SVGShapesFactory.INSTANCE.createSVGElement(dot, doc)); } private void toSVGPolygon(final SVGElement elt, final SVGDocument doc, final double posX, final double posY, final double minX, final double maxX, final double step) { elt.appendChild(SVGShapesFactory.INSTANCE.createSVGElement(PlotViewHelper.INSTANCE.updatePolygon(shape, posX, posY, minX, maxX, step), doc)); } private void toSVGLine(final SVGElement elt, final SVGDocument doc, final double posX, final double posY, final double minX, final double maxX, final double step) { elt.appendChild(SVGShapesFactory.INSTANCE.createSVGElement(PlotViewHelper.INSTANCE.updateLine(shape, posX, posY, minX, maxX, step), doc)); } private void toSVGCurve(final SVGElement elt, final SVGDocument doc, final double posX, final double posY, final double minX, final double maxX, final double step) { elt.appendChild(SVGShapesFactory.INSTANCE.createSVGElement(PlotViewHelper.INSTANCE.updateCurve(shape, posX, posY, minX, maxX, step), doc)); } } LPolygonSVGGenerator.java000066400000000000000000000120201321075051700362560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.text.ParseException; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.SVGPolygonElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a polygon.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LPolygonSVGGenerator extends LModifiablePointsGenerator { /** * Creates a generator for IPolygon. * @param polygon The source polygon used to generate the SVG element. */ protected LPolygonSVGGenerator(final IPolygon polygon) { super(polygon); } /** * Creates a latexdraw shape from the given SVG element. * @param elt The source SVG element. * @throws IllegalArgumentException If the given SVG element is not valid. * @since 3.0 */ protected LPolygonSVGGenerator(final SVGPathElement elt) { super(ShapeFactory.createPolygon()); if(elt==null) throw new IllegalArgumentException(); initModifiablePointsShape(elt); } /** * Creates a polygon from an SVG polygon element. * @param elt The source element. * @since 2.0.0 */ protected LPolygonSVGGenerator(final SVGPolygonElement elt) { this(ShapeFactory.createPolygon()); setSVGModifiablePointsParameters(elt); applyTransformations(elt); } /** * Creates a polygon from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LPolygonSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createPolygon()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGPolygonElement)) throw new IllegalArgumentException(); final SVGPolygonElement main = (SVGPolygonElement)elt2; setSVGLatexdrawParameters(elt); setSVGModifiablePointsParameters(main); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null) throw new IllegalArgumentException(); final SVGElement root = new SVGGElement(doc); SVGPolygonElement elt; final StringBuilder pointsBuilder = new StringBuilder(); root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_POLYGON); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); for(final IPoint pt : shape.getPoints()) pointsBuilder.append(pt.getX()).append(',').append(pt.getY()).append(' '); final String points = pointsBuilder.toString(); if(shape.hasShadow()) { final SVGPolygonElement shad = new SVGPolygonElement(doc); try { shad.setPoints(points); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGShadowAttributes(shad, true); root.appendChild(shad); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE)) { // The background of the borders must be filled is there is a shadow. elt = new SVGPolygonElement(doc); try { elt.setPoints(points); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGBorderBackground(elt, root); } elt = new SVGPolygonElement(doc); try { elt.setPoints(points); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } root.appendChild(elt); setSVGAttributes(doc, elt, true); elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE +':'+ LNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle())); if(shape.hasDbleBord()) { final SVGPolygonElement dblBord = new SVGPolygonElement(doc); try { dblBord.setPoints(points); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGDoubleBordersAttributes(dblBord); root.appendChild(dblBord); } return root; } } LPolylinesSVGGenerator.java000066400000000000000000000137431321075051700366220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.*; import net.sf.latexdraw.util.LNamespace; import java.text.ParseException; import java.util.List; /** * Defines a SVG generator for some joined lines.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LPolylinesSVGGenerator extends LModifiablePointsGenerator { /** * Creates a generator for IPolyline. * @param polyline The source polyline used to generate the SVG element. */ protected LPolylinesSVGGenerator(final IPolyline polyline) { super(polyline); } /** * Creates some lines using a SVG path. * @param elt The SVG path. */ protected LPolylinesSVGGenerator(final SVGPathElement elt) { super(ShapeFactory.createPolyline()); if(elt==null || (!elt.isLines() && !elt.isLine())) throw new IllegalArgumentException(); initModifiablePointsShape(elt); setSVGParameters(elt); } /** * Creates some joined-lines from an SVG polyline element. * @param elt The source element. * @since 2.0.0 */ protected LPolylinesSVGGenerator(final SVGPolyLineElement elt) { this(ShapeFactory.createPolyline()); setSVGModifiablePointsParameters(elt); setSVGParameters(elt); applyTransformations(elt); } /** * Creates a line from an SVG line element. * @param elt The source element. * @since 2.0.0 */ protected LPolylinesSVGGenerator(final SVGLineElement elt) { this(ShapeFactory.createPolyline()); setSVGParameters(elt); applyTransformations(elt); } /** * Creates some joined-lines from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LPolylinesSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createPolyline()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGPolyLineElement) && !(elt2 instanceof SVGLineElement)) throw new IllegalArgumentException(); if(elt2 instanceof SVGPolyLineElement) { setSVGModifiablePointsParameters((SVGPolyLineElement)elt2); }else { final SVGLineElement lineElt = (SVGLineElement)elt2; shape.addPoint(ShapeFactory.createPoint(lineElt.getX1(), lineElt.getY1())); shape.addPoint(ShapeFactory.createPoint(lineElt.getX2(), lineElt.getY2())); } setSVGParameters(elt2); setSVGLatexdrawParameters(elt); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); final IArrow arrow1 = shape.getArrowAt(0); final IArrow arrow2 = shape.getArrowAt(-1); setSVGArrow(arrow1, elt2.getAttribute(elt2.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), elt2, SVGAttributes.SVG_MARKER_START); setSVGArrow(arrow2, elt2.getAttribute(elt2.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), elt2, SVGAttributes.SVG_MARKER_END); homogeniseArrows(arrow1, arrow2); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null) return null; final SVGElement root = new SVGGElement(doc); final SVGDefsElement defs = doc.getFirstChild().getDefs(); final StringBuilder points = new StringBuilder(); final List pts = shape.getPoints(); SVGPolyLineElement elt; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_JOINED_LINES); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); for(final IPoint pt : pts) points.append(pt.getX()).append(',').append(pt.getY()).append(' '); final String pointsStr = points.toString(); if(shape.hasShadow()) { final SVGPolyLineElement shad = new SVGPolyLineElement(doc); try { shad.setPoints(pointsStr); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGShadowAttributes(shad, false); root.appendChild(shad); setSVGArrow(shape, shad, 0, true, doc, defs); setSVGArrow(shape, shad, 1, true, doc, defs); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE) && shape.isFilled()) { // The background of the borders must be filled is there is a shadow. elt = new SVGPolyLineElement(doc); try { elt.setPoints(pointsStr); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGBorderBackground(elt, root); } elt = new SVGPolyLineElement(doc); try { elt.setPoints(pointsStr); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } root.appendChild(elt); if(shape.hasDbleBord()) { final SVGPolyLineElement dblBord = new SVGPolyLineElement(doc); try { dblBord.setPoints(pointsStr); }catch(final ParseException ex) { BadaboomCollector.INSTANCE.add(ex); } setSVGDoubleBordersAttributes(dblBord); root.appendChild(dblBord); } setSVGAttributes(doc, elt, false); elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle())); setSVGArrow(shape, elt, 0, false, doc, defs); setSVGArrow(shape, elt, shape.getNbArrows()-1, false, doc, defs); return root; } } LRectangleSVGGenerator.java000066400000000000000000000137641321075051700365530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import static java.lang.Math.min; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGRectElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a rectangle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LRectangleSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG rectangle. * @param rect The rectangle shape used for the generation. * @throws IllegalArgumentException If rect is null. * @since 2.0 */ protected LRectangleSVGGenerator(final IRectangle rect) { super(rect); } /** * Creates a rectangle from an SVG rect element. * @param elt The source element. * @throws IllegalArgumentException If the given element is null. * @since 2.0.0 */ protected LRectangleSVGGenerator(final SVGRectElement elt) { this(ShapeFactory.createRectangle()); setSVGRectParameters(elt); applyTransformations(elt); } /** * Creates a rectangle from a latexdraw-SVG element. * @param elt The source element. * @throws IllegalArgumentException If the given element is null or not valid. * @since 2.0.0 */ protected LRectangleSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createRectangle()); initRectangle(elt, withTransformation); } /** * Initialises the rectangle using an SVGGElement provided by a latexdraw SVG document. * @param elt The source element. * @throws IllegalArgumentException If the given element is null or not valid. * @since 3.0 */ protected void initRectangle(final SVGGElement elt, final boolean withTransformation) { final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGRectElement)) throw new IllegalArgumentException(); setSVGLatexdrawParameters(elt); setSVGRectParameters((SVGRectElement)elt2); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } /** * Sets the parameters of the latexdraw rectangle using the given SVG rectangle. * @param elt The SVG rectangle used to set the latexdraw rectangle. * @since 2.0 */ protected void setSVGRectParameters(final SVGRectElement elt) { if(elt==null) return ; setSVGParameters(elt); final double rx = elt.getRx(); final double gap= getPositionGap(); shape.setPosition(elt.getX()+gap/2., elt.getY()+elt.getHeight()-gap/2.); shape.setWidth(elt.getWidth()-gap); shape.setHeight(elt.getHeight()-gap); shape.setLineArc(2.*rx/(min(shape.getHeight(), shape.getWidth())- (shape.hasDbleBord() ? shape.getDbleBordSep()+shape.getThickness() : 0.))); } @Override public SVGElement toSVG(final SVGDocument document) { if(document==null || document.getFirstChild().getDefs()==null) throw new IllegalArgumentException(); final double gap = getPositionGap(); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); SVGElement elt; final SVGElement root = new SVGGElement(document); final double width = Math.max(1, br.getX()-tl.getX()+gap); final double height = Math.max(1., br.getY()-tl.getY()+gap); final double x = tl.getX()-gap/2.; final double y = tl.getY()-gap/2.; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_RECT); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); if(shape.hasShadow()) { elt = new SVGRectElement(x, y, width, height, document); setSVGShadowAttributes(elt, true); root.appendChild(elt); setSVGRoundCorner(elt); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE)) { // The background of the borders must be filled is there is a shadow. elt = new SVGRectElement(x, y, width, height, document); setSVGBorderBackground(elt, root); setSVGRoundCorner(elt); } elt = new SVGRectElement(x, y, width, height, document); root.appendChild(elt); setSVGAttributes(document, elt, true); setSVGRoundCorner(elt); if(shape.hasDbleBord()) { elt = new SVGRectElement(x, y, width, height, 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(final SVGElement elt) { if(elt==null) return ; if(shape.isRoundCorner()) { final double add = shape.isDbleBorderable() ? shape.getDbleBordSep() + shape.getThickness() : 0.; final double value = 0.5*(min(shape.getWidth(), shape.getHeight())-add)*shape.getLineArc(); elt.setAttribute(SVGAttributes.SVG_RX, String.valueOf(value)); } } } LRhombusSVGGenerator.java000066400000000000000000000124261321075051700362600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.awt.geom.Point2D; import java.util.List; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGPolygonElement; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import net.sf.latexdraw.util.LNamespace; /** * Defines an SVG generator for a polygon.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LRhombusSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG rhombus. * @param rhombus The rhombus used for the generation. * @throws IllegalArgumentException If the given rhombus is null. * @since 2.0 */ protected LRhombusSVGGenerator(final IRhombus rhombus) { super(rhombus); } /** * Creates a rhombus from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LRhombusSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createRhombus()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGPolygonElement)) throw new IllegalArgumentException(); final SVGPolygonElement main = (SVGPolygonElement)elt2; setSVGLatexdrawParameters(elt); setSVGParameters(main); final List ptsPol = SVGPointsParser.getPoints(elt.getAttribute( elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_POINTS)); if(ptsPol==null || ptsPol.size()!=4) throw new IllegalArgumentException(); shape.getPtAt(0).setPoint2D(ptsPol.get(0)); shape.getPtAt(1).setPoint2D(ptsPol.get(1)); shape.getPtAt(2).setPoint2D(ptsPol.get(2)); shape.getPtAt(3).setPoint2D(ptsPol.get(3)); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null) return null; final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final IPoint gc = shape.getGravityCentre(); final IPoint p1 = ShapeFactory.createPoint((tl.getX()+br.getX())/2., tl.getY()); final IPoint p2 = ShapeFactory.createPoint(br.getX(), (tl.getY()+br.getY())/2.); final IPoint p3 = ShapeFactory.createPoint((tl.getX()+br.getX())/2., br.getY()); final SVGElement root = new SVGGElement(doc); SVGElement elt; final double gap = getPositionGap()/2.; final double cornerGap1 = GLibUtilities.getCornerGap(gc, p1, p2, gap); double cornerGap2 = GLibUtilities.getCornerGap(gc, p2, p3, gap); if(p2.getX() *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/30/10
    * @author Arnaud BLOUIN * @version 3.0 */ abstract class LShapeSVGGenerator { /** The shape model use for the generation. */ protected S shape; /** The beginning of the token used to declare a URL in an SVG document. */ protected static final String SVG_URL_TOKEN_BEGIN = "url(#"; //$NON-NLS-1$ /** * Creates the SVG generator. * @param sh The shape used for the generation. * @throws IllegalArgumentException If the given shape is null. * @since 2.0 */ protected LShapeSVGGenerator(final S sh) { super(); if (sh == null) throw new IllegalArgumentException(); shape = sh; } /** * @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.getId(); //$NON-NLS-1$ } /** * 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(final SVGElement elt) { if(elt==null) return ; // The list of the transformations that are applied on the element. final SVGTransformList tl = elt.getWholeTransform(); for(int i = tl.size()-1; i>=0; i--) applyTransformation(tl.get(i)); } /** * Applies an SVG transformation on the shape. * @param t The SVG transformation to apply. * @since 2.0.0 */ public void applyTransformation(final SVGTransform t) { if(t!=null) switch(t.getType()) { case SVGTransform.SVG_TRANSFORM_ROTATE: getShape().rotate(ShapeFactory.createPoint(t.getMatrix().getE(), t.getMatrix().getF()), Math.toRadians(t.getRotationAngle())); break; case SVGTransform.SVG_TRANSFORM_SCALE: break; case SVGTransform.SVG_TRANSFORM_TRANSLATE: getShape().translate(t.getTX(), t.getTY()); break; default: BadaboomCollector.INSTANCE.add(new IllegalArgumentException("Bad transformation type: " + t.getType())); //$NON-NLS-1$ } } /** * 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(final IArrow ah1, final IArrow ah2) { if(ah1==null || ah2==null) return ; homogeniseArrowFrom(ah1, ah2); homogeniseArrowFrom(ah2, ah1); } //FIXME scala trait protected static void setSVGArrow(final IArrowableShape shape, final SVGElement parent, final int arrowPos, final boolean isShadow, final SVGDocument doc, final SVGDefsElement defs) { final IArrow arrow = shape.getArrowAt(arrowPos); if(arrow.getArrowStyle()!=ArrowStyle.NONE) { final String arrowName = "arrow" + arrowPos + (isShadow ? "Shad-" : "-") + shape.getId(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ final SVGElement arrowSVG = new LArrowSVGGenerator(arrow).toSVG(doc, isShadow); arrowSVG.setAttribute(SVGAttributes.SVG_ID, arrowName); defs.appendChild(arrowSVG); parent.setAttribute(arrowPos==0 ? SVGAttributes.SVG_MARKER_START : SVGAttributes.SVG_MARKER_END, SVG_URL_TOKEN_BEGIN + arrowName + ')'); } } /** * Copies the parameters of the first arrow to the second arrow (only * the parameters of the current style are copied). * @see #homogeniseArrows(IArrow, IArrow) * @param source The arrow that will be copied. * @param target The arrow that will be set. * @since 2.0.0 */ protected void homogeniseArrowFrom(final IArrow source, final IArrow target) { if(source==null || target==null) return ; final ArrowStyle style = source.getArrowStyle(); if(style!=null && style!=ArrowStyle.NONE) if(style.isBar()) { target.setTBarSizeDim(source.getTBarSizeDim()); target.setTBarSizeNum(source.getTBarSizeNum()); } else if(style.isArrow()) { target.setArrowInset(source.getArrowInset()); target.setArrowLength(source.getArrowLength()); target.setArrowSizeDim(source.getArrowSizeDim()); target.setArrowSizeNum(source.getArrowSizeNum()); } else if(style.isRoundBracket()) { target.setRBracketNum(source.getRBracketNum()); target.setTBarSizeDim(source.getTBarSizeDim()); target.setTBarSizeNum(source.getTBarSizeNum()); } else if(style.isSquareBracket()) { target.setBracketNum(source.getBracketNum()); target.setTBarSizeDim(source.getTBarSizeDim()); target.setTBarSizeNum(source.getTBarSizeNum()); } else { 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(final SVGElement elt) { if(elt==null || !shape.isShadowable()) return ; if(shape.isFillable()) { final String fill = elt.getFill(); if(fill!=null && !fill.equals(SVGAttributes.SVG_VALUE_NONE) && !fill.startsWith(SVG_URL_TOKEN_BEGIN)) shape.setShadowCol(CSSColors.INSTANCE.getRGBColour(fill)); }else { final Color strok = elt.getStroke(); if(strok!=null) shape.setShadowCol(strok); } final SVGTransformList tl = elt.getTransform(); SVGTransform t; double tx; double ty; boolean sSize = false; boolean sAngle = false; for(int i=0, size=tl.size(); i0. ? -Math.PI/2. : Math.PI/2.; else { angle = Math.acos(gravityCenter.distance(gravityCenter.getX()+tx+shSize, gravityCenter.getY())/ gravityCenter.distance(gravityCenter.getX()+tx+shSize, gravityCenter.getY()+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(final SVGElement elt) { if(elt==null) return ; shape.setDbleBordSep(elt.getStrokeWidth()); shape.setDbleBordCol(elt.getStroke()); shape.setThickness((shape.getThickness()-shape.getDbleBordSep())/2.); shape.setHasDbleBord(true); } protected void setSVGLatexdrawParameters(final SVGElement elt) { if(elt==null) return ; if(shape.isBordersMovable()) { final String bp = elt.getAttribute(elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_BORDERS_POS); if(bp!=null) shape.setBordersPosition(BorderPos.getStyle(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(final SVGElement elt) { if(elt==null) return ; if(shape.isThicknessable()) shape.setThickness(elt.getStrokeWidth()); if(shape.isBordersMovable()) { final String bp = elt.getAttribute(elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_BORDERS_POS); if(bp!=null) shape.setBordersPosition(BorderPos.getStyle(bp)); } shape.setLineColour(elt.getStroke()); final String opacityStr = elt.getSVGAttribute(SVGAttributes.SVG_STROKE_OPACITY, null); final Color lineCol = shape.getLineColour(); if(opacityStr!=null) try { shape.setLineColour(new Color(lineCol.getRed(), lineCol.getGreen(), lineCol.getBlue(), (int)(Double.valueOf(opacityStr)*255.0)));} catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } if(shape.isLineStylable()) LShapeSVGGenerator.setDashedDotted(shape, elt.getStrokeDasharray(), elt.getStrokeLinecap()); if(shape.isFillable()) LShapeSVGGenerator.setFill(shape, elt.getFill(), elt.getSVGAttribute(SVGAttributes.SVG_FILL_OPACITY, null), elt.getSVGRoot().getDefs()); CSSStylesGenerator.INSTANCE.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(final IArrow ah, final String arrowID, final SVGElement elt, final String svgMarker) { if(ah==null || arrowID==null || elt==null) return ; final LArrowSVGGenerator arrGen = new LArrowSVGGenerator(ah); arrGen.setArrow((SVGMarkerElement)elt.getDef(new URIReferenceParser(arrowID).getURI()), getShape(), svgMarker); } /** * @param elt The source g 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(final SVGGElement elt, final String type) { if(elt==null) return null; final NodeList nl = elt.getChildNodes(); int i = 0; final int size = nl.getLength(); Node ltdElt = null; Node n; final String bis = elt.lookupPrefixUsable(LNamespace.LATEXDRAW_NAMESPACE_URI); if(type==null) while(iPI || shape.getGradMidPt()<0 && shape.getGradMidPt()>-PI? 1-shape.getGradMidPt() : shape.getGradMidPt(); grad.setAttribute(SVGAttributes.SVG_ID, id); if(!LNumber.equalsDouble(shape.getGradAngle()%(2*PI), PI/2.)) { final Point2D.Float p1 = new Point2D.Float(); final 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); } // Setting the middle point of the gradient and its colours. if(!LNumber.equalsDouble(gradMidPt, 0.)) { stop = new SVGStopElement(doc); stop.setAttribute(SVGAttributes.SVG_OFFSET, "0");//$NON-NLS-1$ stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.INSTANCE.getColorName(shape.getGradColStart(), true)); grad.appendChild(stop); } stop = new SVGStopElement(doc); stop.setAttribute(SVGAttributes.SVG_OFFSET, String.valueOf(gradMidPt)); stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.INSTANCE.getColorName(shape.getGradColEnd(), true)); grad.appendChild(stop); if(!LNumber.equalsDouble(gradMidPt, 1.)) { stop = new SVGStopElement(doc); stop.setAttribute(SVGAttributes.SVG_OFFSET, "1");//$NON-NLS-1$ stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.INSTANCE.getColorName(shape.getGradColStart(), true)); grad.appendChild(stop); } defs.appendChild(grad); root.setAttribute(SVGAttributes.SVG_FILL, SVG_URL_TOKEN_BEGIN + id + ')'); } else { // Setting the hatchings. if(shape.hasHatchings()) { final String id = SVGElements.SVG_PATTERN + shape.getId(); final SVGPatternElement hatch = new SVGPatternElement(doc); final SVGGElement gPath = new SVGGElement(doc); final IPoint max = shape.getFullBottomRightPoint(); final SVGPathElement path = new SVGPathElement(doc); root.setAttribute(SVGAttributes.SVG_FILL, SVG_URL_TOKEN_BEGIN + id + ')'); hatch.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, shape.getFillingStyle().getLatexToken()); hatch.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_ROTATION, String.valueOf(shape.getHatchingsAngle())); hatch.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_SIZE, String.valueOf(shape.getHatchingsSep())); hatch.setAttribute(SVGAttributes.SVG_PATTERN_UNITS, SVGAttributes.SVG_UNITS_VALUE_USR); hatch.setAttribute(SVGAttributes.SVG_ID, id); hatch.setAttribute(SVGAttributes.SVG_X, "0"); //$NON-NLS-1$ hatch.setAttribute(SVGAttributes.SVG_Y, "0"); //$NON-NLS-1$ hatch.setAttribute(SVGAttributes.SVG_WIDTH, String.valueOf((int)max.getX())); hatch.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf((int)max.getY())); gPath.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.INSTANCE.getColorName(shape.getHatchingsCol(), true)); gPath.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(shape.getHatchingsWidth())); gPath.setAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, SVGAttributes.SVG_VALUE_NONE); path.setAttribute(SVGAttributes.SVG_D, getSVGHatchingsPath().toString()); gPath.appendChild(path); // Several shapes having hatching must have their shadow filled. if(shape.isFilled() || shape.hasShadow() && shadowFills) { final SVGRectElement fill = new SVGRectElement(doc); fill.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(shape.getFillingCol(), true)); fill.setAttribute(SVGAttributes.SVG_STROKE, SVGAttributes.SVG_VALUE_NONE); fill.setAttribute(SVGAttributes.SVG_WIDTH, String.valueOf((int)max.getX())); fill.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf((int)max.getY())); hatch.appendChild(fill); } defs.appendChild(hatch); hatch.appendChild(gPath); } }//else if(shape.isLineStylable()) LShapeSVGGenerator.setDashedDotted(root, shape.getDashSepBlack(), shape.getDashSepWhite(), shape.getDotSep(), shape.getLineStyle().getLatexToken(), shape.hasDbleBord(), shape.getThickness(), shape.getDbleBordSep()); } /** * @return The path of the hatchings of the shape. * @since 2.0.0 */ public SVGPathSegList getSVGHatchingsPath() { final SVGPathSegList path = new SVGPathSegList(); if(!shape.hasHatchings()) return path; final String hatchingStyle = shape.getFillingStyle().getLatexToken(); final double hatchingAngle = shape.getHatchingsAngle(); final IRectangle bound = ShapeFactory.createRectangle(shape.getFullTopLeftPoint(), shape.getFullBottomRightPoint()); switch(hatchingStyle) { case PSTricksConstants.TOKEN_FILL_VLINES: case PSTricksConstants.TOKEN_FILL_VLINES_F: getSVGHatchingsPath2(path, hatchingAngle, bound); break; case PSTricksConstants.TOKEN_FILL_HLINES: case PSTricksConstants.TOKEN_FILL_HLINES_F: getSVGHatchingsPath2(path, hatchingAngle > 0 ? hatchingAngle - Math.PI / 2. : hatchingAngle + Math.PI / 2., bound); break; case PSTricksConstants.TOKEN_FILL_CROSSHATCH: case PSTricksConstants.TOKEN_FILL_CROSSHATCH_F: getSVGHatchingsPath2(path, hatchingAngle, bound); getSVGHatchingsPath2(path, hatchingAngle > 0 ? hatchingAngle - Math.PI / 2. : hatchingAngle + Math.PI / 2., bound); break; } return path; } /** * @see LShapeSVGGenerator#getSVGHatchingsPath() */ private void getSVGHatchingsPath2(final SVGPathSegList path, final double hAngle, final IRectangle bound) { if(path==null || bound==null) return; double angle2 = hAngle%(Math.PI*2.); final double halphPI = Math.PI/2.; final double hatchingWidth = shape.getHatchingsWidth(); final double hatchingSep = shape.getHatchingsSep(); final IPoint nw = bound.getTopLeftPoint(); final IPoint se = bound.getBottomRightPoint(); final double nwx = nw.getX(); final double nwy = nw.getY(); final double sex = se.getX(); final double sey = se.getY(); // Computing the angle. if(angle2>0.) { if(angle2>3.*halphPI) angle2 -= Math.PI * 2.; else if(angle2>halphPI) angle2 -= Math.PI; } else if(angle2<-3.*halphPI) angle2 += Math.PI * 2.; else if(angle2<-halphPI) angle2 += Math.PI; final double val = hatchingWidth+hatchingSep; if(LNumber.equalsDouble(angle2, 0.)) // Drawing the hatchings vertically. for(double x = nwx; x0.) { y1 = nwy; maxX = sex + (sey-(nwy<0?nwy:0)) * Math.tan(angle2); } else { y1 = sey; maxX = sex - sey * Math.tan(angle2); } x1 = nwx; x2 = x1; y2 = y1; if(incX<0. || LNumber.equalsDouble(incX, 0.)) 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(final Point2D.Float p1, final Point2D.Float p2, final boolean ignoreMidPt) { if(p1==null || p2==null) throw new IllegalArgumentException(); try { final IPoint nw = shape.getTopLeftPoint(); final IPoint se = shape.getBottomRightPoint(); final double nwx = nw.getX(); final double nwy = nw.getY(); final double sex = se.getX(); final double sey = se.getY(); IPoint pt1 = ShapeFactory.createPoint((nwx+sex)/2., nwy); IPoint pt2 = ShapeFactory.createPoint((nwx+sex)/2., sey); double angle = shape.getGradAngle()%(2*PI); double gradMidPt = shape.getGradMidPt(); // Transforming the negative angle in a positive angle. if(angle<0.) angle = 2*PI + angle; if(angle>PI || LNumber.equalsDouble(angle, PI)) { gradMidPt = 1 - shape.getGradMidPt(); angle -= PI; } if (LNumber.equalsDouble(angle, 0.)) { // The gradient is vertical. if (!ignoreMidPt && gradMidPt < 0.5) pt1.setY(pt2.getY() - Point2D.distance(pt2.getX(), pt2.getY(), (nwx + sex) / 2., se.getY())); pt2.setY(nwy + (sey - nwy) * (ignoreMidPt ? 1 : gradMidPt)); } else { if (LNumber.equalsDouble(angle % (PI / 2.), 0.)) { // The gradient is horizontal. pt1 = ShapeFactory.createPoint(nwx, (nwy + sey) / 2.); pt2 = ShapeFactory.createPoint(sex, (nwy + sey) / 2.); if (!ignoreMidPt && gradMidPt < 0.5) pt1.setX(pt2.getX() - Point2D.distance(pt2.getX(), pt2.getY(), sex, (nwy + sey) / 2.)); pt2.setX(nwx + (sex - nwx) * (ignoreMidPt ? 1 : gradMidPt)); } else { final IPoint cg = shape.getGravityCentre(); final ILine l2; final ILine l; pt1 = pt1.rotatePoint(cg, -angle); pt2 = pt2.rotatePoint(cg, -angle); l = ShapeFactory.createLine(pt1, pt2); if (LNumber.equalsDouble(angle, 0.) && angle > 0. && angle < PI / 2.) l2 = l.getPerpendicularLine(nw); else l2 = l.getPerpendicularLine(ShapeFactory.createPoint(nwx, sey)); pt1 = l.getIntersection(l2); final double distance = Point2D.distance(cg.getX(), cg.getY(), pt1.getX(), pt1.getY()); l.setP1(pt1); final IPoint[] pts = l.findPoints(pt1, 2 * distance * (ignoreMidPt ? 1 : gradMidPt)); pt2 = pts[0]; if (!ignoreMidPt && gradMidPt < 0.5) pt1 = pt1.rotatePoint(cg, PI); } }//if(angle!=0) p1.setLocation(pt1.getX(), pt1.getY()); p2.setLocation(pt2.getX(), pt2.getY()); }catch(final Exception e) { p1.setLocation(0f, 0f); p2.setLocation(0f, 0f); } } /** * Sets the colour of the line of the shape with the given SVG stroke. * @param shape The shape to set. * @param stoke The stroke of the shape. * @param opacity The possible stroke-opacity of the colour. May be null. * @since 2.0.0 */ public static void setLineColour(final IShape shape, final String stoke, final String opacity) { if(shape!=null && stoke!=null) { final Color col = CSSColors.INSTANCE.getRGBColour(stoke); shape.setLineColour(col); if(opacity!=null) try { shape.setLineColour(new Color(col.getRed(), col.getGreen(), col.getBlue(), (int)(Double.valueOf(opacity)*255.0)));} catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } } } /** * Sets the fill properties to the given figure. * @param shape 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. * @param opacity The possible fill-opacity of the colour. May be null. * @since 2.0.0 */ public static void setFill(final IShape shape, final String fill, final String opacity, final SVGDefsElement defs) { if(fill==null || shape==null || fill.equals(SVGAttributes.SVG_VALUE_NONE)) return ; // Getting the url to the SVG symbol of the filling. if(fill.startsWith(SVG_URL_TOKEN_BEGIN) && fill.endsWith(")") && defs!=null) { //$NON-NLS-1$ final String uri = fill.substring(5, fill.length()-1); final SVGElement def = defs.getDef(uri); // A pattern means hatchings. if(def instanceof SVGPatternElement) { final SVGPatternElement pat = (SVGPatternElement)def; final Color c = pat.getBackgroundColor(); final String str = pat.getAttribute(pat.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_TYPE); double angle; double sep; final double width; final String attr; try { angle = Double.parseDouble(pat.getAttribute(pat.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+ LNamespace.XML_ROTATION)); }catch(final Exception e) { angle = 0.; } attr = pat.getAttribute(pat.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_SIZE); if(attr==null) sep = pat.getHatchingSep(); else try { sep = Double.parseDouble(attr); } catch(final Exception e) { sep = 0.; } if(PSTricksConstants.isValidFillStyle(str)) shape.setFillingStyle(FillingStyle.getStyleFromLatex(str)); if(!Double.isNaN(angle)) shape.setHatchingsAngle(angle); shape.setFilled(c!=null); shape.setFillingCol(c); shape.setHatchingsCol(pat.getHatchingColor()); if(!Double.isNaN(sep)) shape.setHatchingsSep(sep); width = pat.getHatchingStrokeWidth(); if(!Double.isNaN(width)) shape.setHatchingsWidth(width); } else // A linear gradient means a gradient. if(def instanceof SVGLinearGradientElement) { final SVGLinearGradientElement grad = (SVGLinearGradientElement)def; shape.setGradColStart(grad.getStartColor()); shape.setGradColEnd(grad.getEndColor()); shape.setFillingStyle(FillingStyle.GRAD); shape.setGradMidPt(grad.getMiddlePoint()); shape.setGradAngle(grad.getAngle()); } } else { // Just getting the filling colour. final Color c = CSSColors.INSTANCE.getRGBColour(fill); if(c!=null) { shape.setFillingCol(c); shape.setFilled(true); if(opacity!=null) try { shape.setFillingCol(new Color(c.getRed(), c.getGreen(), c.getBlue(), (int)(Double.valueOf(opacity)*255.0)));} catch(final NumberFormatException ex) { BadaboomCollector.INSTANCE.add(ex); } } } } /** * Sets the figure properties concerning the line properties. * @param shape 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(final IShape shape, final String dashArray, final String linecap) { if(shape==null || dashArray==null) return ; if(!dashArray.equals(SVGAttributes.SVG_VALUE_NONE)) if(linecap!=null && SVGAttributes.SVG_LINECAP_VALUE_ROUND.equals(linecap)) shape.setLineStyle(LineStyle.DOTTED); else shape.setLineStyle(LineStyle.DASHED); } /** * Sets the given thickness to the given SVG element. * @param elt The element to set. * @param thickness The thickness to set. * @param hasDoubleBorders True: the shape has double borders and it must be considered during the computation of the thickness. * @param doubleSep The size of the double borders. * @since 3.0 */ public static void setThickness(final SVGElement elt, final double thickness, final boolean hasDoubleBorders, final double doubleSep) { if(elt==null) return ; elt.setStrokeWidth(hasDoubleBorders ? thickness*2. + doubleSep : thickness); } /** * Sets the line style to the given SVG element. * @param elt The element to set. * @param blackDash The black dash of the line for dashed line style. * @param whiteDash The white dash of the line for dashed line style. * @param dotSep The separation between dots for dotted line style. * @param lineStyle The line style to set to the SVG element. * @param hasDoubleBorders True: the shape has double borders. * @param thickness The thickness to set to the element. * @param doubleSep The size of the double borders. * @since 3.0 */ public static void setDashedDotted(final Element elt, final double blackDash, final double whiteDash, final double dotSep, final String lineStyle, final boolean hasDoubleBorders, final double thickness, final 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 + ", " + //$NON-NLS-1$ (dotSep + (hasDoubleBorders ? thickness*2f + doubleSep : thickness))); } } /** * 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() { final double gap; if(!shape.isBordersMovable() || shape.getBordersPosition().getLatexToken().equals(PSTricksConstants.BORDERS_MIDDLE)) gap = 0.; else if(shape.getBordersPosition().getLatexToken().equals(PSTricksConstants.BORDERS_INSIDE)) gap = -shape.getThickness() - (shape.hasDbleBord() ? shape.getDbleBordSep() + shape.getThickness() : 0.) ; else gap = shape.getThickness() + (shape.hasDbleBord() ? shape.getDbleBordSep() + 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(final SVGDocument doc, final double thickness, final Color col, final IPoint p1, final IPoint p2, final double blackDash, final double whiteDash, final boolean hasDble, final double dotSep, final double doubleSep) { if(doc==null) return null; final SVGLineElement line = new SVGLineElement(doc); if(p1!=null) { line.setX1(p1.getX()); line.setY1(p1.getY()); } if(p2!=null) { line.setX2(p2.getX()); line.setY2(p2.getY()); } line.setStrokeWidth(thickness); line.setStroke(col); LShapeSVGGenerator.setDashedDotted(line, blackDash, whiteDash, dotSep, PSTricksConstants.LINE_DASHED_STYLE, hasDble, thickness, doubleSep); return line; } /** * 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(final SVGElement elt, final SVGElement root) { if(elt==null || root==null) return ; elt.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_BG); elt.setFill(shape.getFillingCol()); elt.setStroke(shape.getFillingCol()); setThickness(elt, shape.getThickness(), shape.isDbleBorderable(), shape.getDbleBordSep()); root.appendChild(elt); } /** * 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(final SVGDocument doc, final double rad, final IPoint pt, final Color col) { if(doc==null) return null; final SVGCircleElement circle = new SVGCircleElement(doc); circle.setR(rad); if(pt!=null) { circle.setCx(pt.getX()); circle.setCy(pt.getY()); } circle.setFill(col); return circle; } /** * @return the shape. * @since 2.0.0 */ public S getShape() { return shape; } } LSquareSVGGenerator.java000066400000000000000000000126071321075051700361020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import static java.lang.Math.min; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGRectElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a square.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LSquareSVGGenerator extends LShapeSVGGenerator { /** * Creates an SVG generator for squares. * @param square The source square to convert in SVG. * @since 3.0 */ protected LSquareSVGGenerator(final ISquare square) { super(square); } /** * Creates a square from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LSquareSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createSquare()); initRectangle(elt, withTransformation); } /** * Initialises the rectangle using an SVGGElement provided by a latexdraw SVG document. * @param elt The source element. * @throws IllegalArgumentException If the given element is null or not valid. * @since 3.0 */ protected void initRectangle(final SVGGElement elt, final boolean withTransformation) { final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGRectElement)) throw new IllegalArgumentException(); setSVGLatexdrawParameters(elt); setSVGRectParameters((SVGRectElement)elt2); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); } /** * Sets the parameters of the latexdraw rectangle using the given SVG rectangle. * @param elt The SVG rectangle used to set the latexdraw rectangle. * @since 2.0 */ protected void setSVGRectParameters(final SVGRectElement elt) { if(elt==null) return ; setSVGParameters(elt); final double rx = elt.getRx(); final double gap= getPositionGap(); shape.setPosition(elt.getX()+gap/2., elt.getY()+elt.getHeight()-gap/2.); shape.setWidth(elt.getWidth()-gap); shape.setLineArc(2.*rx/(shape.getWidth() - (shape.hasDbleBord() ? shape.getDbleBordSep()+shape.getThickness() : 0.))); } @Override public SVGElement toSVG(final SVGDocument document) { if(document==null || document.getFirstChild().getDefs()==null) throw new IllegalArgumentException(); final double gap = getPositionGap(); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); SVGElement elt; final SVGElement root = new SVGGElement(document); final double width = Math.max(1, br.getX()-tl.getX()+gap); final double x = tl.getX()-gap/2.; final double y = tl.getY()-gap/2.; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_SQUARE); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); if(shape.hasShadow()) { elt = new SVGRectElement(x, y, width, width, document); setSVGShadowAttributes(elt, true); root.appendChild(elt); setSVGRoundCorner(elt); } if(shape.hasShadow() && !shape.getLineStyle().getLatexToken().equals(PSTricksConstants.LINE_NONE_STYLE)) { // The background of the borders must be filled is there is a shadow. elt = new SVGRectElement(x, y, width, width, document); setSVGBorderBackground(elt, root); setSVGRoundCorner(elt); } elt = new SVGRectElement(x, y, width, width, document); root.appendChild(elt); setSVGAttributes(document, elt, true); setSVGRoundCorner(elt); if(shape.hasDbleBord()) { elt = new SVGRectElement(x, y, width, width, 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(final SVGElement elt) { if(elt==null)//FIXME factorise scala trait return ; if(shape.isRoundCorner()) { final double add = shape.isDbleBorderable() ? shape.getDbleBordSep() + shape.getThickness() : 0.; final double value = 0.5*(min(shape.getWidth(), shape.getHeight())-add)*shape.getLineArc(); elt.setAttribute(SVGAttributes.SVG_RX, String.valueOf(value)); } } } LTextSVGGenerator.java000066400000000000000000000107051321075051700355630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextSize; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.parsers.svg.CSSColors; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGTextElement; import net.sf.latexdraw.util.LNamespace; /** * Defines a SVG generator for a text.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LTextSVGGenerator extends LShapeSVGGenerator { protected LTextSVGGenerator(final IText f) { super(f); } /** * Creates a text from an SVG text element. * @param elt The source element. * @since 2.0.0 */ protected LTextSVGGenerator(final SVGTextElement elt) { this(ShapeFactory.createText()); if(elt==null) throw new IllegalArgumentException(); final String txt = elt.getText(); if(txt==null || txt.isEmpty()) throw new IllegalArgumentException("This text is empty."); //$NON-NLS-1$ shape.setText(txt); shape.setPosition(elt.getX(), elt.getY()); applyTransformations(elt); } /** * Creates a text from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LTextSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createText()); if(elt==null) throw new IllegalArgumentException(); final NodeList nl = elt.getElementsByTagNameNS(SVGDocument.SVG_NAMESPACE, SVGElements.SVG_TEXT); if(nl.getLength()>0) { final SVGTextElement text = (SVGTextElement)nl.item(0); shape.setText(text.getText()); shape.setPosition(text.getX(), text.getY()); } else throw new IllegalArgumentException(); TextSize textSize; try { textSize = TextSize.getTextSizeFromSize(Double.valueOf(elt.getSVGAttribute(SVGAttributes.SVG_FONT_SIZE, null)).intValue()); } catch(final Exception e) { textSize = null; } if(textSize!=null) shape.setText("\\" + textSize.getLatexToken() + '{' + shape.getText().replace("&", "\\&") + '}'); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(SVGAttributes.SVG_FONT_WEIGHT_BOLD.equals(elt.getSVGAttribute(SVGAttributes.SVG_FONT_WEIGHT, null))) shape.setText("\\textbf{" + shape.getText() + '}'); //$NON-NLS-1$ if(SVGAttributes.SVG_FONT_STYLE_ITALIC.equals(elt.getSVGAttribute(SVGAttributes.SVG_FONT_STYLE, null))) shape.setText("\\emph{" + shape.getText() + '}'); //$NON-NLS-1$ shape.setLineColour(CSSColors.INSTANCE.getRGBColour(elt.getFill())); shape.setTextPosition(TextPosition.getTextPosition(elt.getAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_POSITION))); if(withTransformation) applyTransformations(elt); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc == null) return null; final SVGElement root = new SVGGElement(doc); final String ltdPref = LNamespace.LATEXDRAW_NAMESPACE + ':'; final Element txt = new SVGTextElement(doc); root.setAttribute(ltdPref + LNamespace.XML_TYPE, LNamespace.XML_TYPE_TEXT); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); root.setAttribute(SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(shape.getLineColour(), true)); root.setAttribute(ltdPref + LNamespace.XML_POSITION, String.valueOf(shape.getTextPosition().getLatexToken())); txt.setAttribute(SVGAttributes.SVG_X, String.valueOf(shape.getX())); txt.setAttribute(SVGAttributes.SVG_Y, String.valueOf(shape.getY())); txt.appendChild(doc.createTextNode(shape.getText())); root.appendChild(txt); setSVGRotationAttribute(root); return root; } } LTriangleSVGGenerator.java000066400000000000000000000135201321075051700364020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import java.awt.geom.Point2D; import java.util.List; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGPolygonElement; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import net.sf.latexdraw.util.LNamespace; /** * Defines an SVG generator for a triangle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ class LTriangleSVGGenerator extends LShapeSVGGenerator { /** * Creates a generator of SVG triangle. * @param triangle The triangle used for the generation. * @throws IllegalArgumentException If the given triangle is null. * @since 2.0 */ protected LTriangleSVGGenerator(final ITriangle triangle) { super(triangle); } /** * Creates a triangle from a latexdraw-SVG element. * @param elt The source element. * @since 2.0.0 */ protected LTriangleSVGGenerator(final SVGGElement elt, final boolean withTransformation) { this(ShapeFactory.createTriangle()); final SVGElement elt2 = getLaTeXDrawElement(elt, null); if(elt==null || !(elt2 instanceof SVGPolygonElement)) throw new IllegalArgumentException(); final SVGPolygonElement main = (SVGPolygonElement)elt2; setSVGLatexdrawParameters(elt); setSVGParameters(main); final List ptsPol = SVGPointsParser.getPoints(elt.getAttribute( elt.getUsablePrefix(LNamespace.LATEXDRAW_NAMESPACE_URI)+LNamespace.XML_POINTS)); if(ptsPol==null || ptsPol.size()!=4) throw new IllegalArgumentException(); shape.getPtAt(0).setPoint2D(ptsPol.get(0)); shape.getPtAt(1).setPoint2D(ptsPol.get(1)); shape.getPtAt(2).setPoint2D(ptsPol.get(2)); shape.getPtAt(3).setPoint2D(ptsPol.get(3)); setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW)); setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS)); if(withTransformation) applyTransformations(elt); // Managing inverted triangle. if(ptsPol.get(0).getY()>ptsPol.get(2).getY()) shape.addToRotationAngle(null, Math.PI); } @Override public SVGElement toSVG(final SVGDocument doc) { if(doc==null || doc.getFirstChild().getDefs()==null) return null; final SVGElement root = new SVGGElement(doc); SVGElement elt; root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_TYPE, LNamespace.XML_TYPE_TRIANGLE); root.setAttribute(SVGAttributes.SVG_ID, getSVGID()); final double gap = getPositionGap()/2.; final IPoint pt1 = shape.getTopLeftPoint(); final IPoint pt2 = shape.getBottomRightPoint(); final IPoint p1 = ShapeFactory.createPoint((pt1.getX()+pt2.getX())/2., pt1.getY()); final IPoint p2 = ShapeFactory.createPoint(pt2.getX(), pt2.getY()); final IPoint p3 = ShapeFactory.createPoint(pt1.getX(), pt2.getY()); final double p1x = p1.getX(); final double p1y = p1.getY(); final double p2x = p2.getX(); final double p2y = p2.getY(); final double p3x = p3.getX(); double cornerGap1 = GLibUtilities.getCornerGap(ShapeFactory.createPoint(p1x, p2y), p1, p2, gap); double cornerGap2 = GLibUtilities.getCornerGap(shape.getGravityCentre(), p2, p3, gap); if(p2x>p3x) cornerGap2*=-1; if(p1y>p2y) cornerGap1*=-1; final String points = p1x + "," + (p1y - cornerGap1) + " " + //$NON-NLS-1$//$NON-NLS-2$ (p2x - cornerGap2) + "," + (p2y + (p1y *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGDocumentGenerator implements ISOpenSaver { /** The singleton that allows the save/load latexdraw SVG documents. */ public static final SVGDocumentGenerator INSTANCE = new SVGDocumentGenerator(); private SVGDocumentGenerator() { super(); } @Override public boolean save(final String path, final LFrame ui, final MProgressBar progressBar, final JLabel statusBar) { final SaveWorker lw = new SaveWorker(ui, path, statusBar, true, false); if(progressBar!=null) lw.addPropertyChangeListener(new ProgressListener(progressBar)); SwingUtilities.invokeLater(lw); return true; } @Override public boolean open(final String path, final LFrame ui, final MProgressBar progressBar, final JLabel statusBar) { final LoadWorker lw = new LoadWorker(ui, path, statusBar); if(progressBar!=null) lw.addPropertyChangeListener(new ProgressListener(progressBar)); SwingUtilities.invokeLater(lw); return true; } /** * Exports the selected shapes as a template. * @param path The path where the template will be saved. * @param ui The main frame of the app. * @param progressBar The progress bar. * @param statusBar The status bar. * @param templateMenu The menu that contains the template menu items. */ public void saveTemplate(final String path, final LFrame ui, final MProgressBar progressBar, final JLabel statusBar, final MMenu templateMenu) { final SaveTemplateWorker lw = new SaveTemplateWorker(ui, path, statusBar, templateMenu); if(progressBar!=null) lw.addPropertyChangeListener(new ProgressListener(progressBar)); SwingUtilities.invokeLater(lw); } /** * Inserts a set of shapes into the drawing. * @param path The file of the SVG document to load. * @param ui The UI that contains the drawing. * @since 3.0 */ public IShape insert(final String path, final LFrame ui) { InsertWorker worker = new InsertWorker(ui, path); worker.execute(); try { if(worker.get()) { return worker.getInsertedShapes(); } }catch(InterruptedException | ExecutionException e) { BadaboomCollector.INSTANCE.add(e); } return null; } /** * Updates the templates. * @param templatesMenu The menu that contains the templates. * @param updatesThumbnails True: the thumbnails of the template will be updated. * @since 3.0 */ public void updateTemplates(final MMenu templatesMenu, final boolean updatesThumbnails) { new UpdateTemplatesWorker(templatesMenu, updatesThumbnails).execute(); } /** * The listener that listens the progress performed by the workers to update the progress bar. */ static class ProgressListener implements PropertyChangeListener { private final MProgressBar progressBar; protected ProgressListener(final MProgressBar progressBar) { super(); this.progressBar = progressBar; } @Override public void propertyChange(final PropertyChangeEvent evt) { if("progress".equals(evt.getPropertyName())) //$NON-NLS-1$ progressBar.setValue((Integer)evt.getNewValue()); else if("state".equals(evt.getPropertyName())) //$NON-NLS-1$ switch((SwingWorker.StateValue)evt.getNewValue()){ case STARTED: progressBar.setVisible(true); break; case DONE: progressBar.setVisible(false); break; default: break; } } } /** * The abstract worker that factorises the code of loading and saving workers. */ abstract static class IOWorker extends SwingWorker { protected LFrame ui; protected String path; protected JLabel statusBar; private List instrumentsState; private List instruments; /** set the ui as modified after the work? */ protected boolean setModified; protected IOWorker(final LFrame ui, final String path, final JLabel statusBar) { super(); this.ui = ui; this.path = path; this.statusBar = statusBar; setModified = false; } /** * @return The name of the SVG document. * @since 3.0 */ protected String getDocumentName() { String name; if(path==null) name = ""; //$NON-NLS-1$ else { name = new File(path).getName(); final int indexSVG = name.lastIndexOf(SVGFilter.SVG_EXTENSION); if(indexSVG!=-1) name = name.substring(0, indexSVG); } return name; } @Override protected Boolean doInBackground() throws Exception { if(ui!=null) { final Instrument[] ins = ui.getInstruments(); instrumentsState = new ArrayList<>(); instruments = new ArrayList<>(); MappingRegistry.REGISTRY.removeMappingsUsingTarget(ui.getExporter(), ShapeList2ExporterMapping.class); for(final Instrument instrument : ins) { if(!(instrument instanceof ExceptionsManager)) { instrumentsState.add(instrument.isActivated()); instruments.add(instrument); } if(instrument instanceof WidgetInstrument) ((WidgetInstrument)instrument).setActivated(false, true); else instrument.setActivated(false); } } return true; } @Override protected void done() { super.done(); if(ui!=null) { for(int i=0, size=instrumentsState.size(); i shapes = toLatexdraw(svgDoc, 0); if(shapes.size()==1) { insertedShapes = shapes.get(0); }else { IGroup gp = ShapeFactory.createGroup(); shapes.forEach(sh -> gp.addShape(sh)); insertedShapes = gp; } pres.addShape(insertedShapes); // Updating the possible widgets of the instruments. for(final Instrument instrument : ui.getInstruments()) instrument.interimFeedback(); ui.updatePresentations(); return true; }catch(final Exception e){ BadaboomCollector.INSTANCE.add(e); return false; } } public IShape getInsertedShapes() { return insertedShapes; } } /** This worker updates the templates. */ static class UpdateTemplatesWorker extends TemplatesWorker { protected MMenu templatesMenu; protected boolean updateThumbnails; protected UpdateTemplatesWorker(final MMenu templatesMenu, final boolean updateThumbnails) { super(null, null, null); this.templatesMenu = templatesMenu; this.updateThumbnails = updateThumbnails; } @Override protected Boolean doInBackground() throws Exception { super.doInBackground(); if(updateThumbnails) { updateTemplates(LPath.PATH_TEMPLATES_DIR_USER, LPath.PATH_CACHE_DIR); updateTemplates(LPath.PATH_TEMPLATES_SHARED, LPath.PATH_CACHE_SHARE_DIR); } // Removing the former menu items but the last two of them (the update menu item and the separator). for(int i=0, size=templatesMenu.getMenuComponentCount()-2; i filter.accept(f)).forEach(file -> { try { IGroup template = ShapeFactory.createGroup(); List shapes = toLatexdraw(new SVGDocument(file.toURI()), 0); shapes.forEach(sh -> template.addShape(sh)); File thumbnail = new File(pathCache + File.separator + file.getName() + PNGFilter.PNG_EXTENSION); createTemplateThumbnail(thumbnail, template); }catch(final Exception ex) {BadaboomCollector.INSTANCE.add(ex);} }); } } /** * Creates a thumbnail from the given selection in the given file. * @param templateFile The file of the future thumbnail. * @param selection The set of shapes composing the template. */ protected void createTemplateThumbnail(final File templateFile, final IShape selection) { final IPoint br = selection.getBottomRightPoint(); final IPoint tl = selection.getTopLeftPoint(); final double dec = 8.; final double width = Math.abs(br.getX()-tl.getX())+2*dec; final double height = Math.abs(br.getY()-tl.getY())+2*dec; final double maxSize = 20.; final BufferedImage bufferImage = new BufferedImage((int)width, (int)height, BufferedImage.TYPE_INT_RGB); final Graphics2D graphic = bufferImage.createGraphics(); final double scale = Math.min(maxSize/width, maxSize/height); final BufferedImage bufferImage2 = new BufferedImage((int)maxSize, (int)maxSize, BufferedImage.TYPE_INT_ARGB); final Graphics2D graphic2 = bufferImage2.createGraphics(); final IViewShape view = View2DTK.getFactory().createView(selection); final AffineTransform aff = new AffineTransform(); final int MAX_CPT = 100; int cpt = 0; graphic.setColor(Color.WHITE); graphic.fillRect(0, 0, (int)width, (int)height); graphic.scale(scale, scale); graphic.translate(-tl.getX()+dec, -tl.getY()+dec); aff.translate(0, 0); view.paint(graphic, null); // Waiting for the producing of the thumbnails before flushing them. while(FlyweightThumbnail.hasThumbnailsInProgress() && cpt shapes; final SVGDocument doc = new SVGDocument(); final SVGSVGElement root = doc.getFirstChild(); final SVGGElement g = new SVGGElement(doc); SVGElement elt; if(onlySelection) shapes = drawing.getSelection().getShapes(); else shapes = drawing.getShapes(); root.appendChild(g); root.setAttribute("xmlns:"+LNamespace.LATEXDRAW_NAMESPACE, LNamespace.LATEXDRAW_NAMESPACE_URI);//$NON-NLS-1$ root.appendChild(new SVGDefsElement(doc)); try { for(final IShape sh : shapes) { // For each shape an SVG element is created. elt = SVGShapesFactory.INSTANCE.createSVGElement(sh, doc); if(elt!=null) g.appendChild(elt); setProgress((int)Math.min(100., getProgress()+incr)); } }catch(final Exception ex) { BadaboomCollector.INSTANCE.add(ex); } // Setting SVG attributes to the created document. root.setAttribute(SVGAttributes.SVG_VERSION, "1.1");//$NON-NLS-1$ root.setAttribute(SVGAttributes.SVG_BASE_PROFILE, "full");//$NON-NLS-1$ return doc; } @Override protected Boolean doInBackground() throws Exception { super.doInBackground(); setProgress(0); final IDrawing drawing = ui.getPresentation(IDrawing.class, LCanvas.class).getAbstractPresentation(); // Creation of the SVG document. final Instrument[] instruments = ui.getInstruments(); final double incr = 100./(drawing.size() + instruments.length + ui.getPresentations().size()); final SVGDocument doc = toSVG(drawing, incr); final SVGMetadataElement meta = new SVGMetadataElement(doc); final SVGSVGElement root = doc.getFirstChild(); final SVGElement metaLTD = (SVGElement)doc.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+SVGElements.SVG_METADATA); // Creation of the SVG meta data tag. meta.appendChild(metaLTD); root.appendChild(meta); if(saveParameters) { // The parameters of the instruments are now saved. for(final Instrument instrument : instruments) { instrument.save(false, LNamespace.LATEXDRAW_NAMESPACE, doc, metaLTD); setProgress((int)Math.min(100., getProgress()+incr)); } for(final Presentation presentation : ui.getPresentations()) { presentation.getConcretePresentation().save(false, LNamespace.LATEXDRAW_NAMESPACE, doc, metaLTD); setProgress((int)Math.min(100., getProgress()+incr)); } ui.save(false, LNamespace.LATEXDRAW_NAMESPACE, doc, metaLTD); ui.setTitle(getDocumentName()); } return doc.saveSVGDocument(path); } @Override protected void done() { super.done(); // Showing a message in the status bar. if(statusBar!=null) statusBar.setText(LangTool.INSTANCE.getStringDialogFrame("SVG.1")); //$NON-NLS-1$ } } abstract static class LoadShapesWorker extends IOWorker { protected LoadShapesWorker(final LFrame ui, final String path, final JLabel statusBar) { super(ui, path, statusBar); } /** * Converts an SVG document into a set of shapes. * @param doc The SVG document. * @param incrProgressBar The increment that will be used by the progress bar. * @return The created shapes or null. * @since 3.0 */ protected List toLatexdraw(final SVGDocument doc, final double incrProgressBar) { final NodeList elts = doc.getDocumentElement().getChildNodes(); List shapes = IntStream.range(0, elts.getLength()).mapToObj(i -> { setProgress((int) Math.min(100., getProgress() + incrProgressBar)); return elts.item(i); }).filter(node -> node instanceof SVGElement).map(node -> IShapeSVGFactory.INSTANCE.createShape((SVGElement) node)). filter(sh -> sh!=null).collect(Collectors.toList()); if(shapes.size()==1 && shapes.get(0) instanceof IGroup) { return ((IGroup)shapes.get(0)).getShapes(); } return shapes; } } /** * The worker that loads SVG documents. */ static class LoadWorker extends LoadShapesWorker { protected LoadWorker(final LFrame ui, final String path, final JLabel statusBar) { super(ui, path, statusBar); } /** * Loads the instruments of the systems. * @param meta The meta-data that contains the data of the instruments. * @param instruments The instruments to set. * @since 3.0 */ private void loadInstruments(final Element meta, final Instrument[] instruments) { final NodeList nl = meta.getChildNodes(); Node n; Element elt; for(int i=0, size = nl.getLength(); i drawing.addShape(s)); setProgress(Math.min(100, getProgress()+50)); // Loads the presentation's data. for(final Presentation presentation : ui.getPresentations()) { presentation.getConcretePresentation().load(false, LNamespace.LATEXDRAW_NAMESPACE_URI, ldMeta); setProgress((int)Math.min(100., getProgress()+incrProgressBar)); } // The parameters of the instruments are loaded. if(ldMeta!=null) loadInstruments(ldMeta, instruments); // Updating the possible widgets of the instruments. for(final Instrument instrument : instruments) instrument.interimFeedback(); if(ldMeta!=null) ui.load(false, LNamespace.LATEXDRAW_NAMESPACE_URI, ldMeta); ui.updatePresentations(); ui.setTitle(getDocumentName()); return true; }catch(final Exception e){ BadaboomCollector.INSTANCE.add(e); return false; } } } } SVGShapesFactory.java000066400000000000000000000155531321075051700354350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/generators/svgpackage net.sf.latexdraw.generators.svg; import net.sf.latexdraw.glib.models.interfaces.shape.*; import net.sf.latexdraw.glib.views.CreateViewCmd; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; /** * Creates SVG elements based on latexdraw.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/21/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class SVGShapesFactory { /** The singleton. */ public static final SVGShapesFactory INSTANCE = new SVGShapesFactory(); /** The chain of responsibility used to reduce the complexity of the factory. */ private CreateViewSVGCmd createCmd; /** * Creates the factory. */ private SVGShapesFactory() { super(); initCommands(); } /** * Creates an SVG Element corresponding to the given shape. * @param shape The shape used to determine which SVG element to create. * @param doc The SVG document used to instantiate to SVG element. * @return The created SVG element. */ public SVGElement createSVGElement(final IShape shape, final SVGDocument doc) { return shape==null || doc==null ? null : createCmd.execute(shape, doc); } /** * Initialises the chain of responsibility. */ private void initCommands() { CreateViewSVGCmd cmd = new CreateViewSVGCmd(null, IPicture.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LPictureSVGGenerator((IPicture)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IText.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LTextSVGGenerator((IText)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IFreehand.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LFreeHandSVGGenerator((IFreehand)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IDot.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LDotSVGGenerator((IDot)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IGrid.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LGridSVGGenerator((IGrid)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IAxes.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LAxeSVGGenerator((IAxes)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IBezierCurve.class){ @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LBezierCurveSVGGenerator((IBezierCurve)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IPolygon.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LPolygonSVGGenerator((IPolygon)shape).toSVG(doc); } }; // All the commands of the chain of responsibility are chained together. cmd = new CreateViewSVGCmd(cmd, IPolyline.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LPolylinesSVGGenerator((IPolyline)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IRhombus.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LRhombusSVGGenerator((IRhombus)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, ITriangle.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LTriangleSVGGenerator((ITriangle)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IGroup.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LGroupSVGGenerator((IGroup)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IEllipse.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LEllipseSVGGenerator((IEllipse)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, ICircle.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LCircleSVGGenerator((ICircle)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, ICircleArc.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LCircleArcSVGGenerator((ICircleArc)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IPlot.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LPlotSVGGenerator((IPlot)shape).toSVG(doc); } }; cmd = new CreateViewSVGCmd(cmd, IRectangle.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LRectangleSVGGenerator((IRectangle)shape).toSVG(doc); } }; // The last created command is the first element of the chain. createCmd = new CreateViewSVGCmd(cmd, ISquare.class) { @Override public SVGElement create(final IShape shape, final SVGDocument doc) { return new LSquareSVGGenerator((ISquare)shape).toSVG(doc); } }; } /** * This class is a mix of the design patterns Command and Chain of responsibility. * The goal is to find the command which can create the view of the given shape. */ private abstract class CreateViewSVGCmd extends CreateViewCmd { /** * Creates the command. * @param next The next command in the chain of responsibility. Can be null. * @param classShape The type of the shape supported by the command. * @since 3.0 */ protected CreateViewSVGCmd(final CreateViewSVGCmd next, final Class classShape) { super(next, classShape); } @Override public SVGElement create(final IShape shape) { return create(shape, null); } /** * Creates an instance of the view corresponding to the given shape. * @param shape The model used to create the view. * @param doc The SVG document used to create elements. * @return The created view. * @since 3.0 */ public abstract SVGElement create(final IShape shape, final SVGDocument doc); /** * Launches the creation process. * @param model The model used to create the view. * @param doc The SVG document used to create elements. * @return The created view or null. * @since 3.0 */ public SVGElement execute(final IShape model, final SVGDocument doc) { final SVGElement view; if(clazz.isInstance(model)) view = create(model, doc); else view = next==null ? null : next.execute(model, doc); return view; } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/000077500000000000000000000000001321075051700274525ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlers/000077500000000000000000000000001321075051700312525ustar00rootroot00000000000000ArcAngleHandler.java000066400000000000000000000040631321075051700350130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a handler that changes the start/end angle of an arc.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class ArcAngleHandler extends Handler { /** Defines if the handled angle is the starting or the ending angle. */ protected boolean start; /** * Creates and initialises an arc angle handler. * @param isStart Defines if the handled angle is the starting or the ending angle. * @since 3.0 */ public ArcAngleHandler(final boolean isStart) { super(); this.start = isStart; shape = new Rectangle2D.Double(); updateShape(); } @Override protected void updateShape() { shape.setFrame(point.getX()-size/2., point.getY()-size/2., size, size); } @Override public void update(final IArc arc, final double zoom) { if(arc==null) return; final IPoint zoomedGC = arc.getGravityCentre().zoom(zoom); final double rotAngle = arc.getRotationAngle(); IPoint pt; if(start) pt = arc.getStartPoint(); else pt = arc.getEndPoint(); // If the shape is rotated, the handler's position must fit the rotation angle. if(!LNumber.equalsDouble(rotAngle, 0.)) pt = pt.rotatePoint(zoomedGC, rotAngle); point.setPoint(pt.zoom(zoom).getMiddlePoint(zoomedGC)); super.update(arc, zoom); } } CtrlPointHandler.java000066400000000000000000000027141321075051700352560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.geom.Ellipse2D; import net.sf.latexdraw.glib.models.interfaces.shape.IControlPointShape; /** * Defines a handler that moves a control point (for Bézier curves).
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class CtrlPointHandler extends Handler { /** The index of the point in its shape. */ protected int indexPt; /** * Creates the handler. * @param index The index of the point in its shape. */ public CtrlPointHandler(final int index) { super(); shape = new Ellipse2D.Double(); indexPt = index; updateShape(); } @Override protected void updateShape() { shape.setFrame(point.getX()-size/2., point.getY()-size/2., size, size); } /** * @return The index of the point in its shape. * @since 3.0 */ public int getIndexPt() { return indexPt; } } FrameArcHandler.java000066400000000000000000000030011321075051700350060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; //import java.awt.Shape; //import java.awt.geom.Ellipse2D; //import java.awt.geom.Rectangle2D; // ///** // * Defines a handler to change the frame arc attribute.
    // *
    // * This file is part of LaTeXDraw
    // * Copyright (c) 2005-2014 Arnaud BLOUIN
    // *
    // * LaTeXDraw is free software; you can redistribute it and/or modify // * 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.
    // *
    // * LaTeXDraw is distributed without any warranty; without even the // * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // * PURPOSE. See the GNU General Public License for more details.
    // *
    // * 08/28/11
    // * @author Arnaud BLOUIN
    // * @version 3.0
    // */ //public class FrameArcHandler extends Handler { // /** // * Creates the handler. // */ // public FrameArcHandler() { // super(); // shape = new Ellipse2D.Double(); // size = size/4.*3.; // } // // // @Override // protected void updateShape() { // shape.setFrame(point.getX(), point.getY()-size, size, size); // } // // // @Override // public void updateFromShape(final Shape sh) { // if(sh instanceof Rectangle2D) { // final Rectangle2D rec = (Rectangle2D)sh; // // if(rec.getHeight()>rec.getWidth()) // setPoint(rec.getMinX()-size, rec.getMinY()+size); // else // setPoint(rec.getMinX(), rec.getMinY()); // } // } //} latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlers/Handler.java000066400000000000000000000057741321075051700335070ustar00rootroot00000000000000package net.sf.latexdraw.glib.handlers; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Shape; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.malai.picking.Picker; /** * A handler helps to manipulate and to delimit a shape view.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ abstract class Handler implements IHandler { /** The coordinates of the centre of the delimiter. */ protected IPoint point; /** The size of the handler. */ protected double size; /** The opacity of the delimiters. Can be changed. */ protected int opacity; /** The colour of the handler. */ protected Color colour; /** The shape of the handler. */ protected T shape; /** * Creates the handler. */ protected Handler() { super(); opacity = 100; size = DEFAULT_SIZE; colour = new Color(0, 0, 0, opacity); point = ShapeFactory.createPoint(); } /** * Changes the centre of the handler and updates the shape. * @param x The new X coordinate. * @param y The new Y coordinate. */ @Override public void setPoint(final double x, final double y) { if(GLibUtilities.isValidPoint(x, y)) { point.setPoint(x, y); updateShape(); } } /** * @return The centre of the handler. */ @Override public IPoint getCentre() { return point; } /** * paint the handler. */ @Override public void paint(final Graphics2D g) { if(g==null) return ; g.setColor(colour); g.fill(shape); } /** * Updates the handler. */ @Override public void update(final S model, final double zoom) { if(opacity!=colour.getTransparency()) colour = new Color(colour.getRed(), colour.getGreen(),colour.getBlue(), opacity); updateShape(); } /** * Updates the Java2D shape of the handler. * @since 3.0 */ protected abstract void updateShape(); @Override public String toString() { return super.toString() + "[centre=" + point + ", size=" + size + ", colour=" + colour + ']'; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } @Override public void updateFromShape(final Shape sh) { updateShape(); } @Override public boolean contains(final double x, final double y) { return shape.contains(x, y); } @Override public Picker getPicker() { return null; } } IHandler.java000066400000000000000000000034741321075051700335340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.Graphics2D; import java.awt.Shape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.malai.picking.Pickable; /** * This interface defines a handler.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/29/11
    * @author Arnaud BLOUIN
    * @version 3.0
    * @param The type of the shape model that the handler controls. */ public interface IHandler extends Pickable { /** The default size of a handler. */ int DEFAULT_SIZE = 16; /** * Updates the handler using the given shape. * @param shape The shape used to updated the handler. * @since 3.0 */ void updateFromShape(final Shape shape); /** * Changes the centre of the handler and updates the shape. * @param x The new X coordinate. * @param y The new Y coordinate. */ void setPoint(final double x, final double y); /** * @return The centre of the handler. */ IPoint getCentre(); /** * paint the handler. * @param g The object into which objects are painted. */ void paint(final Graphics2D g); /** * Updates the handler. * @param shape The shape model. * @param zoom The current zoom level. */ void update(final T shape, final double zoom); } MovePtHandler.java000066400000000000000000000040361321075051700345510ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a handler that moves a point of a shape.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class MovePtHandler extends Handler { /** The index of the point in its shape. */ protected int indexPt; /** * The constructor by default. * @param indexPt The index of the point in its shape. */ public MovePtHandler(final int indexPt) { super(); shape = new Rectangle2D.Double(); this.indexPt = indexPt; updateShape(); } @Override public void update(final IModifiablePointsShape sh, final double zoom) { if(sh==null) return; final IPoint zoomedGC = sh.getGravityCentre().zoom(zoom); final double rotAngle = sh.getRotationAngle(); IPoint pt = sh.getPtAt(indexPt); // If the shape is rotated, the handler's position must fit the rotation angle. if(!LNumber.equalsDouble(rotAngle, 0.)) pt = pt.rotatePoint(zoomedGC, rotAngle); point.setPoint(pt.zoom(zoom)); super.update(sh, zoom); } @Override protected void updateShape() { shape.setFrame(point.getX()-size/2., point.getY()-size/2., size, size); } /** * @return The index of the point in its shape. * @since 3.0 */ public int getIndexPt() { return indexPt; } } RotationHandler.java000066400000000000000000000040331321075051700351330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.geom.Arc2D; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines a handler that rotates a shape.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class RotationHandler extends Handler { public static final BasicStroke STROKE = new BasicStroke(2.5f); private final Arc2D arc; /** * The constructor by default. */ public RotationHandler() { super(); shape = new Path2D.Double(); arc = new Arc2D.Double(); updateShape(); } @Override protected void updateShape() { arc.setArc(point.getX()+STROKE.getLineWidth()/2., point.getY()+STROKE.getLineWidth()/2., size, size, 0, 270, Arc2D.OPEN); shape.reset(); shape.append(arc, false); shape.moveTo(point.getX()+STROKE.getLineWidth()/2.+size+2., point.getY()+STROKE.getLineWidth()/2.+size/2.); shape.lineTo(point.getX()+STROKE.getLineWidth()/2.+size-2., point.getY()+STROKE.getLineWidth()/2.+size/2.); shape.lineTo(point.getX()+STROKE.getLineWidth()/2.+size, point.getY()+STROKE.getLineWidth()/2.+size/2.+4.); shape.closePath(); } @Override public void paint(final Graphics2D g) { g.setColor(colour); g.setStroke(STROKE); g.draw(shape); } @Override public boolean contains(final double x, final double y) { return super.contains(x, y) || STROKE.createStrokedShape(shape).contains(x, y); } } ScaleHandler.java000066400000000000000000000116501321075051700343660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/handlerspackage net.sf.latexdraw.glib.handlers; import java.awt.Shape; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position; /** * Defines a handler that scales a shape.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/28/11
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class ScaleHandler extends Handler { /** The position of the possible scalings. */ protected Position position; /** * The constructor by default. * @param position The position of the handler. * @see Position */ public ScaleHandler(final Position position) { super(); this.position = Objects.requireNonNull(position); shape = new Path2D.Double(); updateShape(); } @Override protected void updateShape() { final double x = point.getX(); final double y = point.getY(); final double mid = size/2.; final double quat = size/4.; final double oct = size/8.; shape.reset(); switch(position) { case EAST: shape.moveTo(x, y-size/4.); shape.lineTo(x, y+size/4.); shape.lineTo(x+size/2., y+size/4.); shape.lineTo(x+size/2., y+size/2.); shape.lineTo(x+size, y); shape.lineTo(x+size/2., y-size/2.); shape.lineTo(x+size/2., y-size/4.); shape.closePath(); break; case NORTH: shape.moveTo(x-size/4., y); shape.lineTo(x+size/4., y); shape.lineTo(x+size/4., y-size/2.); shape.lineTo(x+size/2., y-size/2.); shape.lineTo(x, y-size); shape.lineTo(x-size/2., y-size/2.); shape.lineTo(x-size/4., y-size/2.); shape.closePath(); break; case SOUTH: shape.moveTo(x-size/4., y); shape.lineTo(x+size/4., y); shape.lineTo(x+size/4., y+size/2.); shape.lineTo(x+size/2., y+size/2.); shape.lineTo(x, y+size); shape.lineTo(x-size/2., y+size/2.); shape.lineTo(x-size/4., y+size/2.); shape.closePath(); break; case WEST: shape.moveTo(x, y-size/4.); shape.lineTo(x, y+size/4.); shape.lineTo(x-size/2., y+size/4.); shape.lineTo(x-size/2., y+size/2.); shape.lineTo(x-size, y); shape.lineTo(x-size/2., y-size/2.); shape.lineTo(x-size/2., y-size/4.); shape.closePath(); break; case NE: shape.moveTo(x+size-oct, y-size+oct); shape.lineTo(x+size-oct, y-quat+oct); shape.lineTo(x+mid+quat-oct, y-mid+oct); shape.lineTo(x+quat-oct, y+oct); shape.lineTo(x-oct, y-quat+oct); shape.lineTo(x+mid-oct, y-mid-quat+oct); shape.lineTo(x+quat-oct, y-size+oct); shape.closePath(); break; case NW: shape.moveTo(x-size+oct, y-size+oct); shape.lineTo(x-size+oct, y-quat+oct); shape.lineTo(x-mid-quat+oct, y-mid+oct); shape.lineTo(x-quat+oct, y+oct); shape.lineTo(x+oct, y-quat+oct); shape.lineTo(x-mid+oct, y-mid-quat+oct); shape.lineTo(x-quat+oct, y-size+oct); shape.closePath(); break; case SW: shape.moveTo(x-size+oct, y+size-oct); shape.lineTo(x-size+oct, y+quat-oct); shape.lineTo(x-mid-quat+oct, y+mid-oct); shape.lineTo(x-quat+oct, y-oct); shape.lineTo(x+oct, y+quat-oct); shape.lineTo(x-mid+oct, y+mid+quat-oct); shape.lineTo(x-quat+oct, y+size-oct); shape.closePath(); break; case SE: shape.moveTo(x+size-oct, y+size-oct); shape.lineTo(x+size-oct, y+quat-oct); shape.lineTo(x+mid+quat-oct, y+mid-oct); shape.lineTo(x+quat-oct, y-oct); shape.lineTo(x-oct, y+quat-oct); shape.lineTo(x+mid-oct, y+mid+quat-oct); shape.lineTo(x+quat-oct, y+size-oct); shape.closePath(); break; } } /** * @return The position of the handler. * @since 3.0 */ public Position getPosition() { return position; } @Override public void updateFromShape(final Shape sh) { if(sh instanceof Rectangle2D) { final Rectangle2D frame = (Rectangle2D)sh; switch(position) { case EAST: setPoint(frame.getMaxX(), frame.getCenterY()); break; case NE: setPoint(frame.getMaxX(), frame.getMinY()); break; case NORTH: setPoint(frame.getCenterX(), frame.getMinY()); break; case NW: setPoint(frame.getMinX(), frame.getMinY()); break; case SE: setPoint(frame.getMaxX(), frame.getMaxY()); break; case SOUTH: setPoint(frame.getCenterX(), frame.getMaxY()); break; case SW: setPoint(frame.getMinX(), frame.getMaxY()); break; case WEST: setPoint(frame.getMinX(), frame.getCenterY()); break; } } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/000077500000000000000000000000001321075051700307355ustar00rootroot00000000000000GLibUtilities.scala000066400000000000000000000076331321075051700344050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/modelspackage net.sf.latexdraw.glib.models import net.sf.latexdraw.util.LNumber import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.ILine /** * Defines some utilities function for the glib library.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ object GLibUtilities { /** * @param pt The point to test. * @return True if the given point is valid (not NaN nor infinite nor null). * @since 3.0 */ def isValidPoint(pt:IPoint) : Boolean = pt!=null && isValidPoint(pt.getX, pt.getY) /** * @param coord The value to test. * @return True if the given value is value (not NaN nor infinite). * @since 3.0 */ def isValidCoordinate(coord:Double) = !(java.lang.Double.isNaN(coord) || java.lang.Double.isInfinite(coord)) /** * @param x The X coordinates to test. * @param y The Y coordinates to test. * @return True if the given values are value (not NaN nor infinite). * @since 3.0 */ def isValidPoint(x:Double, y:Double) : Boolean = isValidCoordinate(x) && isValidCoordinate(y) /** * Computes the altitude ha of the right-triangle 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 */ def getAltitude(a:IPoint, b:IPoint, c:IPoint) : Double = { if(!isValidPoint(a) || !isValidPoint(b) || !isValidPoint(c)) return 0.0 val ac = a.distance(c) val ab = a.distance(b) if(LNumber.equalsDouble(ab, ac)) return a.distance((b.getX+c.getX)/2.0, (b.getY+c.getY)/2.0) return ab * ac / b.distance(c) } /** * 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 */ def getCornerGap(a:IPoint, b:IPoint, c:IPoint, gap:Double) : Double = { if(!isValidPoint(a) || !isValidPoint(b) || !isValidPoint(c)) return 0.0 return gap / getAltitude(a, b, c) * a.distance(b) } /** * Creates the tangent to the ellipse at the given angle. * @param angle The position of the tangent point in radian * @param orientation Change the orientation of the tangent * @return The tangent. */ def getTangenteAt(tl:IPoint, br:IPoint, gc:IPoint, angle:Double, orientation:Boolean) : ILine = { // final double th = (isDbleBorderable() && hasDbleBord() ? thickness*2.+ getDbleBordSep() : thickness)/2.; // tl.setPoint(tl.getX()+th, tl.getY()+th); // br.setPoint(br.getX()-th, br.getY()-th); val pt = ShapeFactory.createPoint(br.getX, (br.getY+tl.getY)/2.0).rotatePoint(gc, -angle) val a = Math.abs(tl.getX-gc.getX) val b = Math.abs(tl.getY-gc.getY) val dec = 100.0 val tgt = ShapeFactory.createLine(pt.getX, pt.getY, 0.0, 0.0) if((angle%Math.PI.toFloat).toFloat<=0.01f) { tgt.setX2(pt.getX) if(orientation) tgt.setY2(pt.getY - dec) else tgt.setY2(pt.getY + dec) } else { if(orientation) tgt.setX2(pt.getX-dec) else tgt.setX2(pt.getX+dec) if((angle%(Math.PI/2f)).toFloat<=0.01f) tgt.setY2(pt.getY) else tgt.setY2(-(b*(pt.getX-gc.getX)*(tgt.getX2-pt.getX))/(a*(pt.getY-gc.getY)) + pt.getY) } tgt.updateAandB return tgt } } ShapeFactory.scala000066400000000000000000000026661321075051700342650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/modelspackage net.sf.latexdraw.glib.models import java.awt.Point import java.awt.geom.Point2D import scala.language.implicitConversions import net.sf.latexdraw.glib.models.impl.LShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShapeFactory /** * This class contains the factory that must be used to create shape instances.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 01/04/2011
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ object ShapeFactory extends LShapeFactory { /** Converts a Point to an IPoint. */ implicit def Point2IPoint(pt:Point) = ShapeFactory.createPoint(pt.getX, pt.getY) /** Converts a Point2D to an IPoint. */ implicit def Point2D2IPoint(pt:Point2D) = ShapeFactory.createPoint(pt.getX, pt.getY) /** Converts an IPoint to a Point2D. */ implicit def IPoint2Point2D(pt:IPoint) = new Point2D.Double(pt.getX, pt.getY) } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/impl/000077500000000000000000000000001321075051700316765ustar00rootroot00000000000000LAbstractCtrlPointShape.java000066400000000000000000000230721321075051700371650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IControlPointShape; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines a model of a abstract shape that contains control points.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ abstract class LAbstractCtrlPointShape extends LModifiablePointsShape implements IControlPointShape { /** The default balance gap used to balance all the points of the bézier curve. */ int DEFAULT_BALANCE_GAP = 50; /** This vector contains the points which allows to change the angles of the curves */ protected final List firstCtrlPts; /** Contains the second control points of each points; useful for closed curve. */ protected final List secondCtrlPts; /** * Creates the shape. */ protected LAbstractCtrlPointShape() { super(); firstCtrlPts = new ArrayList<>(); secondCtrlPts = new ArrayList<>(); } @Override public void scale(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { super.scale(prevWidth, prevHeight, pos, bound); scaleSetPoints(firstCtrlPts, prevWidth, prevHeight, pos, bound); scaleSetPoints(secondCtrlPts, prevWidth, prevHeight, pos, bound); } @Override public void scaleWithRatio(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { super.scaleWithRatio(prevWidth, prevHeight, pos, bound); scaleSetPointsWithRatio(firstCtrlPts, prevWidth, prevHeight, pos, bound); scaleSetPointsWithRatio(secondCtrlPts, prevWidth, prevHeight, pos, bound); } /** * Method used by the balance method. Just returns the balanced control points of the given points. */ private IPoint[] getBalancedPoints(final IPoint pt, final IPoint prevPt, final IPoint nextPt) { final ILine line = ShapeFactory.createLine(prevPt, nextPt); if(line.isHorizontalLine()) line.setLine(pt.getX(), pt.getY(), pt.getX()+10, pt.getY()); else { final double b = pt.getY() - line.getA()*pt.getX(); line.setLine(pt.getX(), pt.getY(), pt.getX()+10, line.getA()*(pt.getX()+10) + b); } return line.findPoints(pt, DEFAULT_BALANCE_GAP); } /** * Method used by the balance method. Just sets the given control points at the given position. */ private void setControlPoints(final int position, final IPoint[] ctrlPts) { if(ctrlPts==null || ctrlPts.length!=2) return ; // If there exists an intersection point between the two lines created using control points and points, // where is a loop that must be removed by inverting the control points. // For the first point, the lines are created differently. final int posPrev = position==0 ? 1 : position - 1; final int posNext = position==0 ? points.size()-1 : position==points.size()-1 ? 0 : position + 1; final ILine line1 = ShapeFactory.createLine(getPtAt(posPrev), ctrlPts[0]); final ILine line2 = ShapeFactory.createLine(getPtAt(posNext), ctrlPts[1]); if(line1.getIntersectionSegment(line2)==null) { firstCtrlPts.get(position).setPoint(ctrlPts[0]); secondCtrlPts.get(position).setPoint(ctrlPts[1]); }else { firstCtrlPts.get(position).setPoint(ctrlPts[1]); secondCtrlPts.get(position).setPoint(ctrlPts[0]); } } @Override public void balance() { final int size = getNbPoints(); if(size<3) return ;//Works only with more than 2 points. IPoint ptPrev; IPoint ptNext; // Balancing all the points except the first and the last one. for(int i=1; i=firstCtrlPts.size()) point = null; else point = position==-1 ? firstCtrlPts.get(firstCtrlPts.size()-1) : firstCtrlPts.get(position); return point; } @Override public List getFirstCtrlPts() { return firstCtrlPts; } @Override public void mirrorHorizontal(final IPoint origin) { super.mirrorHorizontal(origin); if(GLibUtilities.isValidPoint(origin)) { firstCtrlPts.forEach(pt -> pt.setPoint(pt.horizontalSymmetry(origin))); secondCtrlPts.forEach(pt -> pt.setPoint(pt.horizontalSymmetry(origin))); } } @Override public void mirrorVertical(final IPoint origin) { super.mirrorVertical(origin); if(GLibUtilities.isValidPoint(origin)) { firstCtrlPts.forEach(pt -> pt.setPoint(pt.verticalSymmetry(origin))); secondCtrlPts.forEach(pt -> pt.setPoint(pt.verticalSymmetry(origin))); } } @Override public IPoint getSecondCtrlPtAt(final int position) { final IPoint point; if(secondCtrlPts.isEmpty() || position<-1 || position>=secondCtrlPts.size()) point = null; else point = position==-1 ? secondCtrlPts.get(secondCtrlPts.size()-1) : secondCtrlPts.get(position); return point; } @Override public List getSecondCtrlPts() { return secondCtrlPts; } @Override public void setXFirstCtrlPt(final double x, final int id) { if(GLibUtilities.isValidCoordinate(x) && id>=0 && id=0 && id=0 && id=0 && id=-1 && position pts = cpSh.getFirstCtrlPts(); firstCtrlPts.clear(); for(final IPoint pt : pts) firstCtrlPts.add(ShapeFactory.createPoint(pt)); pts = cpSh.getSecondCtrlPts(); secondCtrlPts.clear(); for(final IPoint pt : pts) secondCtrlPts.add(ShapeFactory.createPoint(pt)); } } @Override public void translate(final double tx, final double ty) { super.translate(tx, ty); // Translating control points. if(GLibUtilities.isValidPoint(tx, ty)) { for(final IPoint pt : firstCtrlPts) pt.translate(tx, ty); for(final IPoint pt : secondCtrlPts) pt.translate(tx, ty); } } } LAbstractGrid.java000066400000000000000000000141421321075051700351510ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid; /** * Defines a model of an abstract latex grid.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ abstract class LAbstractGrid extends LPositionShape implements IStandardGrid { /** If true, the x label will be displayed at the south of the grid. Else at the north */ protected boolean xLabelSouth; /** If true, the y label will be displayed at the west of the grid. Else at the east */ protected boolean yLabelWest; /** The x-minimum values of the axes */ protected double gridStartx; /** The y-minimum values of the axes */ protected double gridStarty; /** The x-maximum values of the axes */ protected double gridEndx; /** The y-maximum values of the axes */ protected double gridEndy; /** The x-coordinate of the origin of the grid */ protected double originx; /** The y-coordinate of the origin of the grid */ protected double originy; /** The size of the labels. */ protected int labelSize; /** * Creates an abstract grid. * @param pt The position */ protected LAbstractGrid(final IPoint pt) { super(pt); xLabelSouth = true; yLabelWest = true; originx = 0; originy = 0; gridStartx = 0; gridStarty = 0; gridEndx = 2; gridEndy = 2; labelSize = 10; } @Override public double getGridMinX() { return gridEndx=gridStartx ? gridEndx : gridStartx; } @Override public double getGridMinY() { return gridEndy=gridStarty ? gridEndy : gridStarty; } @Override public IPoint getBottomRightPoint() { final IPoint pos = getPosition(); return ShapeFactory.createPoint(pos.getX()+getGridMaxX()*PPC, pos.getY()-getGridMinY()*PPC); } @Override public IPoint getTopLeftPoint() { final IPoint pos = getPosition(); return ShapeFactory.createPoint(pos.getX()+getGridMinX()*PPC, pos.getY()-getGridMaxY()*PPC); } @Override public IPoint getTopRightPoint() { final IPoint pos = getPosition(); final double step = getStep(); //FIXME strange: different from getTopLeftPoint and co. but works for scale. return ShapeFactory.createPoint(pos.getX()+step*(gridEndx-gridStartx), pos.getY()-step*(gridEndy-gridStarty)); } @Override public void mirrorHorizontal(final IPoint origin) { if(origin==null) return ; final IPoint bl = points.get(0).horizontalSymmetry(origin); final IPoint br = getBottomRightPoint().horizontalSymmetry(origin); points.get(0).setPoint(br.getX()tl.getY() ? bl.getY() : tl.getY()); } @Override public void setLabelsSize(final int labelsSize) { if(labelsSize>=0) labelSize = labelsSize; } @Override public double getGridEndX() { return gridEndx; } @Override public double getGridEndY() { return gridEndy; } @Override public double getGridStartX() { return gridStartx; } @Override public double getGridStartY() { return gridStarty; } @Override public int getLabelsSize() { return labelSize; } @Override public double getOriginX() { return originx; } @Override public double getOriginY() { return originy; } @Override public void setGridEnd(final double x, final double y) { setGridEndX(x); setGridEndY(y); } @Override public void setGridEndX(final double x) { if(x>=gridStartx && GLibUtilities.isValidCoordinate(x)) gridEndx = x; } @Override public void setGridEndY(final double y) { if(y>=gridStarty && GLibUtilities.isValidCoordinate(y)) gridEndy = y; } @Override public void setGridStart(final double x, final double y) { setGridStartX(x); setGridStartY(y); } @Override public void setGridStartX(final double x) { if(x<=gridEndx && GLibUtilities.isValidCoordinate(x)) gridStartx = x; } @Override public void setGridStartY(final double y) { if(y<=gridEndy && GLibUtilities.isValidCoordinate(y)) gridStarty = y; } @Override public void setOrigin(final double x, final double y) { setOriginX(x); setOriginY(y); } @Override public void setOriginX(final double x) { if(GLibUtilities.isValidCoordinate(x)) originx = x; } @Override public void setOriginY(final double y) { if(GLibUtilities.isValidCoordinate(y)) originy = y; } @Override public void copy(final IShape s) { super.copy(s); if(s instanceof IStdGridProp) { final IStdGridProp grid = (IStdGridProp) s; gridEndx = grid.getGridEndX(); gridEndy = grid.getGridEndY(); gridStartx = grid.getGridStartX(); gridStarty = grid.getGridStartY(); originx = grid.getOriginX(); originy = grid.getOriginY(); setLabelsSize(grid.getLabelsSize()); } } @Override public IPoint getGridStart() { return ShapeFactory.createPoint(gridStartx, gridStarty); } @Override public IPoint getGridEnd() { return ShapeFactory.createPoint(gridEndx, gridEndy); } } LArc.scala000066400000000000000000000055111321075051700334470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.util.ArrayList import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp import net.sf.latexdraw.glib.models.interfaces.shape.IArc import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.ILine import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle /** * Defines a model of an arc.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] trait LArc extends IArc with LArrowableShape { /** The style of the arc. */ var style = ArcStyle.ARC /** The start angle of the arc. In radian. */ var startAngle = 0.0 /** The end angle of the arc. In radian. */ var endAngle = 3.0*Math.PI/2.0 arrows += ShapeFactory.createArrow(this) arrows += ShapeFactory.createArrow(this) override def getArrowLine(arrow:IArrow) : ILine = { if(getArrowAt(0)==arrow) return GLibUtilities.getTangenteAt(getTopLeftPoint, getBottomRightPoint, getGravityCentre, startAngle, startAngle=Math.PI) return null } override def isShowPtsable = true override def getAngleEnd = endAngle override def getAngleStart = startAngle override def getEndPoint: IPoint = { val grav = getGravityCentre ShapeFactory.createPoint(grav.getX+Math.cos(endAngle)*getHeight/2.0, grav.getY-Math.sin(endAngle)*getHeight/2.0) } override def getStartPoint: IPoint = { val grav = getGravityCentre ShapeFactory.createPoint(grav.getX+Math.cos(startAngle)*getWidth/2.0, grav.getY-Math.sin(startAngle)*getWidth/2.0) } override def getArcStyle: ArcStyle = style override def setAngleEnd(angleEnd:Double) { if(GLibUtilities.isValidCoordinate(angleEnd)) this.endAngle = angleEnd } override def setAngleStart(angleStart:Double) { if(GLibUtilities.isValidCoordinate(angleStart)) this.startAngle = angleStart } override def setArcStyle(styl:ArcStyle) { if(styl!=null) this.style = styl } } LArrow.java000066400000000000000000000160361321075051700336760ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; /** * Defines a model of an arrow.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/14/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LArrow implements IArrow { /** The style of the arrow. */ protected ArrowStyle style; /** The latex parameter arrowSize num. */ protected double arrowSizeDim; /** The latex parameter arrowSize num. */ protected double arrowSizeNum; /** The length of the arrow. */ protected double arrowLength; /** The inset of the arrow. */ protected double arrowInset; /** The latex parameter dotsize dim. */ protected double dotSizeDim; /** The latex parameter dotsize num. */ protected double dotSizeNum; /** The latex parameter tbarsize num. */ protected double tBarSizeDim; /** The latex parameter tbarsize num. */ protected double tBarSizeNum; /** The latex parameter bracket num. */ protected double bracketNum; /** The latex parameter rbracket num. */ protected double rBracketNum; /** The owner of the arrow. */ protected IArrowableShape owner; /** * Creates an arrow. * @param owner The shape that contains the arrow. */ protected LArrow(final IArrowableShape owner) { super(); this.owner = Objects.requireNonNull(owner); style = ArrowStyle.NONE; arrowInset = 0.; arrowLength = PSTricksConstants.DEFAULT_ARROW_LENGTH; arrowSizeDim = PSTricksConstants.DEFAULT_ARROW_SIZE_DIM*IShape.PPC; arrowSizeNum = PSTricksConstants.DEFAULT_ARROW_SIZE_NUM; dotSizeDim = PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM*IShape.PPC; dotSizeNum = PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM; tBarSizeDim = PSTricksConstants.DEFAULT_ARROW_TBARSIZE_DIM*IShape.PPC; tBarSizeNum = PSTricksConstants.DEFAULT_ARROW_TBARSIZE_NUM; bracketNum = PSTricksConstants.DEFAULT_ARROW_BRACKET_LGTH; rBracketNum = PSTricksConstants.DEFAULT_ARROW_RBRACKET_LGTH; } /** * Creates an arrow from an other arrow. * @param arrow The arrow to copy. * @throws IllegalArgumentException If the given arrow is null. */ protected LArrow(final IArrow arrow, final IArrowableShape owner) { this(owner); copy(Objects.requireNonNull(arrow)); } @Override public void copy(final IArrow model) { if(model==null) return; arrowInset = model.getArrowInset(); arrowLength = model.getArrowLength(); arrowSizeDim = model.getArrowSizeDim(); arrowSizeNum = model.getArrowSizeNum(); bracketNum = model.getBracketNum(); dotSizeDim = model.getDotSizeDim(); dotSizeNum = model.getDotSizeNum(); rBracketNum = model.getRBracketNum(); style = model.getArrowStyle(); tBarSizeDim = model.getTBarSizeDim(); tBarSizeNum = model.getTBarSizeNum(); } @Override public double getRoundShapedArrowRadius() { return (dotSizeDim+dotSizeNum*owner.getFullThickness())/2.; } @Override public double getBarShapedArrowWidth() { return tBarSizeDim + tBarSizeNum*owner.getFullThickness(); } @Override public double getBracketShapedArrowLength() { return bracketNum*getBarShapedArrowWidth(); } @Override public double getArrowShapeLength() { switch(style) { case LEFT_ARROW: case RIGHT_ARROW: case LEFT_DBLE_ARROW: case RIGHT_DBLE_ARROW: return getArrowShapedWidth()*arrowLength; case ROUND_IN: return (getDotSizeDim()+getDotSizeNum()*owner.getFullThickness())/2.; case LEFT_SQUARE_BRACKET: case RIGHT_SQUARE_BRACKET: return bracketNum*getBarShapedArrowWidth(); case CIRCLE_IN: case DISK_IN: return getRoundShapedArrowRadius(); default: return 0;//TODO } } @Override public double getArrowShapedWidth() { return arrowSizeNum*owner.getFullThickness()+arrowSizeDim; } @Override public ILine getArrowLine() { return owner.getArrowLine(this); } @Override public double getArrowInset() { return arrowInset; } @Override public double getArrowLength() { return arrowLength; } @Override public double getArrowSizeDim() { return arrowSizeDim; } @Override public double getArrowSizeNum() { return arrowSizeNum; } @Override public ArrowStyle getArrowStyle() { return style; } @Override public double getBracketNum() { return bracketNum; } @Override public double getDotSizeDim() { return dotSizeDim; } @Override public double getDotSizeNum() { return dotSizeNum; } @Override public double getRBracketNum() { return rBracketNum; } @Override public IArrowableShape getShape() { return owner; } @Override public double getTBarSizeDim() { return tBarSizeDim; } @Override public double getTBarSizeNum() { return tBarSizeNum; } @Override public boolean isInverted() { final boolean isLeft = isLeftArrow(); final boolean isRightStyle = style.isRightStyle(); return isLeft && isRightStyle || !isLeft && !isRightStyle; } @Override public boolean isLeftArrow() { return owner.getArrowIndex(this)=0) arrowInset = inset; } @Override public void setArrowLength(final double lgth) { if(lgth>=0) arrowLength = lgth; } @Override public void setArrowSizeDim(final double arrowSizeDim) { if(arrowSizeDim>0.) this.arrowSizeDim = arrowSizeDim; } @Override public void setArrowSizeNum(final double arrowSizeNum) { if(arrowSizeNum>=0.) this.arrowSizeNum = arrowSizeNum; } @Override public void setArrowStyle(final ArrowStyle arrowStyle) { if(arrowStyle!=null) style = arrowStyle; } @Override public void setBracketNum(final double bracketNum) { if(bracketNum>=0.) this.bracketNum = bracketNum; } @Override public void setDotSizeDim(final double dotSizeDim) { if(dotSizeDim>0.) this.dotSizeDim = dotSizeDim; } @Override public void setDotSizeNum(final double dotSizeNum) { if(dotSizeNum>=0.1) this.dotSizeNum = dotSizeNum; } @Override public void setRBracketNum(final double rBracketNum) { if(rBracketNum>=0.) this.rBracketNum = rBracketNum; } @Override public void setTBarSizeDim(final double tbarSizeDim) { if(tbarSizeDim>0.) tBarSizeDim = tbarSizeDim; } @Override public void setTBarSizeNum(final double tBarSizeNum) { if(tBarSizeNum>=0.) this.tBarSizeNum = tBarSizeNum; } } LArrowableShape.scala000066400000000000000000000077171321075051700356530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.Buffer import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Implementation of IArrowableShape * @author Arnaud Blouin */ private[impl] trait LArrowableShape extends IArrowableShape { val arrows : Buffer[IArrow] = new ArrayBuffer[IArrow]() override def copy(sh:IShape) { if(getClass.isInstance(sh)) { val arr = sh.asInstanceOf[IArrowableShape] arrows.clear for(i <- 0 until arr.getNbArrows) arrows += ShapeFactory.createArrow(arr.getArrowAt(i), this) }else { sh match { case arr:IArrowableShape => setArrowStyle(arr.getArrowStyle(0), 0) setArrowStyle(arr.getArrowStyle(-1), -1) setArrowInset(arr.getArrowInset) setArrowLength(arr.getArrowLength) setArrowSizeDim(arr.getArrowSizeDim) setArrowSizeNum(arr.getArrowSizeNum) setDotSizeDim(arr.getDotSizeDim) setDotSizeNum(arr.getDotSizeNum) setBracketNum(arr.getBracketNum) setRBracketNum(arr.getRBracketNum) setTBarSizeDim(arr.getTBarSizeDim) setTBarSizeNum(arr.getTBarSizeNum) case _ => } } } override def getArrowAt(position:Int) : IArrow = {// TODO use Option if(arrows.isEmpty || position>=arrows.size || position < -1) return null if(position == -1) return arrows.last return arrows(position) } override def getArrowIndex(arrow:IArrow) = arrows.indexOf(arrow) override def getNbArrows = arrows.size override def setDotSizeDim(dotSizeDim:Double) { arrows.foreach{_.setDotSizeDim(dotSizeDim)} } override def setDotSizeNum(dotSizeNum:Double) { arrows.foreach{_.setDotSizeNum(dotSizeNum)} } override def setTBarSizeNum(tbarSizeNum:Double) { arrows.foreach{_.setTBarSizeNum(tbarSizeNum)} } override def setTBarSizeDim(tbarSizeDim:Double) { arrows.foreach{_.setTBarSizeDim(tbarSizeDim)} } override def getTBarSizeDim = if(arrows.isEmpty) Double.NaN else arrows.head.getTBarSizeDim override def getTBarSizeNum = if(arrows.isEmpty) Double.NaN else arrows.head.getTBarSizeNum override def setRBracketNum(rBracketNum:Double) { arrows.foreach{_.setRBracketNum(rBracketNum)} } override def setBracketNum(bracketNum:Double) { arrows.foreach{_.setBracketNum(bracketNum)} } override def setArrowLength(lgth:Double) { arrows.foreach{_.setArrowLength(lgth)} } override def setArrowSizeDim(arrowSizeDim:Double) { arrows.foreach{_.setArrowSizeDim(arrowSizeDim)} } override def setArrowSizeNum(arrowSizeNum:Double) { arrows.foreach{_.setArrowSizeNum(arrowSizeNum)} } override def setArrowInset(inset:Double) { arrows.foreach{_.setArrowInset(inset)} } override def getDotSizeDim = if(arrows.isEmpty) Double.NaN else arrows.head.getDotSizeDim override def getDotSizeNum = if(arrows.isEmpty) Double.NaN else arrows.head.getDotSizeNum override def getBracketNum = if(arrows.isEmpty) Double.NaN else arrows.head.getBracketNum override def getArrowSizeNum = if(arrows.isEmpty) Double.NaN else arrows.head.getArrowSizeNum override def getArrowSizeDim = if(arrows.isEmpty) Double.NaN else arrows.head.getArrowSizeDim override def getArrowInset = if(arrows.isEmpty) Double.NaN else arrows.head.getArrowInset override def getArrowLength = if(arrows.isEmpty) Double.NaN else arrows.head.getArrowLength override def getRBracketNum = if(arrows.isEmpty) Double.NaN else arrows.head.getRBracketNum override def setArrowStyle(style:ArrowStyle, position:Int) { if(style==null) return getArrowAt(position) match { case arrow:IArrow => arrow.setArrowStyle(style) case _ => } } override def getArrowStyle(position:Int) : ArrowStyle = { getArrowAt(position) match { case arrow:IArrow => arrow.getArrowStyle case _ => ArrowStyle.NONE } } }LAxes.scala000066400000000000000000000162061321075051700336450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle import net.sf.latexdraw.glib.models.interfaces.shape.IAxes import net.sf.latexdraw.glib.models.interfaces.shape.ILine import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.views.pst.PSTricksConstants /** * Defines a model of axes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 */ private[impl] class LAxes(pt:IPoint) extends LAbstractGrid(pt) with IAxes with LArrowableShape { /** The increment of X axe (Dx in PST). */ var incrementX : Double = PSTricksConstants.DEFAULT_DX /** The increment of Y axe (Dy in PST). */ var incrementY : Double = PSTricksConstants.DEFAULT_DY /** The distance between each label of the X axe; if 0, the default value will be used (in cm). */ var distLabelsX = 1.0 /** The distance between each label of the Y axe; if 0, the default value will be used (in cm). */ var distLabelsY = 1.0 /** Define which labels must be displayed. */ var labelsDisplayed = PlottingStyle.ALL /** Define the origin must be shown. */ var showOrigin = true /** Define how the ticks must be shown. */ var ticksDisplayed = PlottingStyle.ALL /** Define the style of the ticks. */ var ticksStyle = TicksStyle.FULL /** The size of the ticks. */ var ticksSize : Double = PSTricksConstants.DEFAULT_TICKS_SIZE*IShape.PPC /** The style of the axes. */ var axesStyle = AxesStyle.AXES // The first arrow is for the bottom of the Y-axis. arrows += ShapeFactory.createArrow(this) // The second arrow is for the left of the X-axis. arrows += ShapeFactory.createArrow(this) // The third arrow is for the top of the Y-axis. arrows += ShapeFactory.createArrow(this) // The fourth arrow is for the right of the X-axis. arrows += ShapeFactory.createArrow(this) override def copy(s:IShape) { super[LAbstractGrid].copy(s) super[LArrowableShape].copy(s) s match { case axes:IAxesProp => setTicksDisplayed(axes.getTicksDisplayed) setTicksSize(axes.getTicksSize) setTicksStyle(axes.getTicksStyle) setAxesStyle(axes.getAxesStyle) setShowOrigin(axes.isShowOrigin) setDistLabelsX(axes.getDistLabelsX) setDistLabelsY(axes.getDistLabelsY) setIncrementX(axes.getIncrementX) setIncrementY(axes.getIncrementY) setLabelsDisplayed(axes.getLabelsDisplayed) case _ => } } override def setArrowStyle(style:ArrowStyle, position:Int) { val arr1 = getArrowAt(position) if(style!=null && arr1!=null) { super.setArrowStyle(style, position) val pos = (if(position == -1) arrows.size-1 else position) % 4 pos match { case 0 => arrows(1).setArrowStyle(style) case 1 => arrows.head.setArrowStyle(style) case 2 => arrows(3).setArrowStyle(style) case 3 => arrows(2).setArrowStyle(style) } } } override def getArrowLine(arrow:IArrow) : ILine = { // For the X-axis if(arrow==arrows(1) || arrow==arrows(3)) return getArrowLineX(arrow==arrows(1)) // For the Y-axis. if(arrow==arrows.head || arrow==arrows(2)) return getArrowLineY(arrow==arrows(2)) return null } /** * @return The line of the Y-axis. */ private def getArrowLineY(topY:Boolean) : ILine = { val pos = getPosition val p2 = ShapeFactory.createPoint(pos.getX, pos.getY-gridEndy*IShape.PPC) val p1 = ShapeFactory.createPoint(pos.getX, pos.getY-gridStarty*IShape.PPC) if(topY) return ShapeFactory.createLine(p2, p1) return ShapeFactory.createLine(p1, p2) } /** * @return The line of the X-axis. */ private def getArrowLineX(leftX:Boolean) : ILine = { val pos = getPosition val p2 = ShapeFactory.createPoint(pos.getX+gridEndx*IShape.PPC, pos.getY) val p1 = ShapeFactory.createPoint(pos.getX+gridStartx*IShape.PPC, pos.getY) if(leftX) return ShapeFactory.createLine(p1, p2) return ShapeFactory.createLine(p2, p1) } override def getAxesStyle = axesStyle override def getDistLabelsX = distLabelsX override def getDistLabelsY = distLabelsY override def getLabelsDisplayed = labelsDisplayed override def getTicksDisplayed = ticksDisplayed override def getTicksSize = ticksSize override def getTicksStyle = ticksStyle override def isShowOrigin = showOrigin override def setAxesStyle(axesStyle:AxesStyle) { if(axesStyle!=null) this.axesStyle = axesStyle } override def setDistLabelsX(distLabelsX:Double) { if(distLabelsX>0 && GLibUtilities.isValidCoordinate(distLabelsX)) this.distLabelsX = distLabelsX } override def setDistLabelsY(distLabelsY:Double) { if(distLabelsY>0 && GLibUtilities.isValidCoordinate(distLabelsY)) this.distLabelsY = distLabelsY } override def setIncrementX(increment:Double) { if(increment>0 && GLibUtilities.isValidCoordinate(increment)) this.incrementX = increment } override def setIncrementY(increment:Double) { if(increment>0 && GLibUtilities.isValidCoordinate(increment)) this.incrementY = increment } override def setLabelsDisplayed(labelsDisplayed:PlottingStyle) { if(labelsDisplayed!=null) this.labelsDisplayed = labelsDisplayed } override def setShowOrigin(showOrigin:Boolean) { this.showOrigin = showOrigin } override def setTicksDisplayed(ticksDisplayed:PlottingStyle) { if(ticksDisplayed!=null) this.ticksDisplayed = ticksDisplayed } override def setTicksSize(ticksSize:Double) { if(ticksSize>0 && GLibUtilities.isValidCoordinate(ticksSize)) this.ticksSize = ticksSize } override def setTicksStyle(ticksStyle:TicksStyle) { if(ticksStyle!=null) this.ticksStyle = ticksStyle } override def getStep = IShape.PPC override def isLineStylable = true override def isThicknessable = true override def getIncrementX = incrementX override def getIncrementY = incrementY override def getIncrement = ShapeFactory.createPoint(incrementX, incrementY) override def setIncrement(increment:IPoint) { if(increment!=null) { setIncrementX(increment.getX) setIncrementY(increment.getY) } } override def getDistLabels = ShapeFactory.createPoint(distLabelsX, distLabelsY) override def setDistLabels(distLabels:IPoint) { if(distLabels!=null) { setDistLabelsX(distLabels.getX) setDistLabelsY(distLabels.getY) } } } LBezierCurve.scala000066400000000000000000000046521321075051700351740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve import net.sf.latexdraw.glib.models.interfaces.shape.ILine import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Defines a model of a Bezier curve.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] class LBezierCurve(var isClosed:Boolean) extends LAbstractCtrlPointShape() with IBezierCurve with LArrowableShape { arrows += ShapeFactory.createArrow(this) arrows += ShapeFactory.createArrow(this) /** * Creates a bezier curve with two points. * @param point The first point of the curve. * @param point2 The second point of the curve. */ def this(point:IPoint, point2:IPoint, closed:Boolean) = { this(closed) addPoint(point) addPoint(point2) } override def getArrowLine(arrow:IArrow) : ILine = { if(getNbPoints<2) return null arrows.indexOf(arrow) match { case 0 => return ShapeFactory.createLine(points.get(0), firstCtrlPts.get(0)) case 1 => return ShapeFactory.createLine(points.get(points.size-1), firstCtrlPts.get(points.size-1)) case _ => return null } } override def setIsClosed(isClosed:Boolean) { this.isClosed = isClosed } override def isDbleBorderable = true override def isFillable = true override def isInteriorStylable = true override def copy(sh:IShape) { super[LAbstractCtrlPointShape].copy(sh) super[LArrowableShape].copy(sh) sh match { case bc:IBezierCurve => setIsClosed(bc.isClosed) case _ => } } override def isLineStylable = true override def isShadowable = true override def isThicknessable = true override def shadowFillsShape() = false override def isShowPtsable = true } LCircle.scala000066400000000000000000000016731321075051700341500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.shape.ICircle import net.sf.latexdraw.glib.models.interfaces.shape.IPoint /** * Defines a model of a circle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] class LCircle(pos:IPoint, width:Double) extends LSquaredShape(pos, width) with ICircle { // } LCircleArc.scala000066400000000000000000000025251321075051700345730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Defines a model of a rounded arc.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] class LCircleArc(tl:IPoint, width:Double) extends LSquaredShape(tl, width) with LArc with ICircleArc { override def copy(sh:IShape) { super[LSquaredShape].copy(sh) super[LArc].copy(sh) sh match {//FIXME somewhere else case arc:IArcProp => startAngle = arc.getAngleStart endAngle = arc.getAngleEnd style = arc.getArcStyle case _ => } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/impl/LDot.java000066400000000000000000000216561321075051700334150ustar00rootroot00000000000000package net.sf.latexdraw.glib.models.impl; import java.awt.Color; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines a model of a dot.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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.
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LDot extends LPositionShape implements IDot { /** The current style of the dot. */ protected DotStyle style; /** The radius of the dot. */ protected double diametre; /** * @param pt The centre of the dot. */ protected LDot(final IPoint pt) { super(pt); style = DotStyle.DOT; diametre = 20.; } @Override public Color getFillingCol() { return isFillable() ? super.getFillingCol() : Color.BLACK; } @Override public DotStyle getDotStyle() { return style; } @Override public double getDiametre() { return diametre; } @Override public void setDotStyle(final DotStyle style) { if(style != null) this.style = style; } @Override public void setDiametre(final double diam) { if(diam > 0. && GLibUtilities.isValidCoordinate(diam)) this.diametre = diam; } /** * Returns the radius computed using a new position (value) and an axe (isX). * @param value The new X or Y coordinate of the extremity of the dot. * @param isX True: the value will be considered on the X-axe. Otherwise, on the Y-axe. * @return The new radius. * @since 3.0 */ protected double getNewRadius(final double value, final boolean isX) { if(GLibUtilities.isValidCoordinate(value)) return isX ? Math.abs(getPosition().getX() - value) : Math.abs(getPosition().getY() - value); return Double.NaN; } @Override public void mirrorHorizontal(final IPoint origin) { setPosition(getPosition().horizontalSymmetry(origin)); } @Override public void mirrorVertical(final IPoint origin) { setPosition(getPosition().verticalSymmetry(origin)); } @Override public void setX(final double x) { points.get(0).setX(x); } @Override public void setY(final double y) { points.get(0).setY(y); } @Override public double getX() { return points.get(0).getX(); } @Override public double getY() { return points.get(0).getY(); } @Override public void scale(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { scaleWithRatio(prevWidth, prevHeight, pos, bound); } @Override public void scaleWithRatio(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { setDiametre(diametre * Math.max(prevWidth/bound.getWidth(), prevHeight/bound.getHeight())); } @Override public IPoint getPosition() { // The position of the dot is its centre. return points.get(0); } @Override public void copy(final IShape sh) { super.copy(sh); if(sh!=null && sh.isTypeOf(IDotProp.class)){ final IDotProp dot = (IDotProp)sh; setDotStyle(dot.getDotStyle()); setDiametre(dot.getDiametre()); setDotFillingCol(dot.getDotFillingCol()); } } @Override public IPoint getBottomLeftPoint() { final IPoint tl = ShapeFactory.createPoint(); final IPoint br = ShapeFactory.createPoint(); getTopLeftBottomRightPoints(tl, br); return ShapeFactory.createPoint(tl.getX(), br.getY()); } @Override public IPoint getBottomRightPoint() { final IPoint br = ShapeFactory.createPoint(); getTopLeftBottomRightPoints(ShapeFactory.createPoint(), br); return br; } @Override public IPoint getTopLeftPoint() { final IPoint tl = ShapeFactory.createPoint(); getTopLeftBottomRightPoints(tl, ShapeFactory.createPoint()); return tl; } @Override public IPoint getTopRightPoint() { final IPoint tl = ShapeFactory.createPoint(); final IPoint br = ShapeFactory.createPoint(); getTopLeftBottomRightPoints(tl, br); return ShapeFactory.createPoint(br.getX(), tl.getY()); } /** * Gives the top-left point and the bottom-right point of the dot * considering its current style. * @param tl The top-left point to set. Must not be null. * @param br The bottom-right point to set. Must not be null. * @throws NullPointerException If tl or br is null. * @since 3.0 */ protected void getTopLeftBottomRightPoints(final IPoint tl, final IPoint br) { final IPoint centre = getPosition(); final double x = centre.getX(); final double y = centre.getY(); final double tlx = x - diametre; final double tly = y - diametre; final double brx = x + diametre; final double bry = y + diametre; final double dec = 2. * diametre / THICKNESS_O_STYLE_FACTOR; // Each dot shape has a special shape computed from the parameters // defined below. switch(style){ case ASTERISK:// TODO: to check, I do not think it works. final double radiusAst = tly + diametre / 5. - (bry - diametre / 5.) / 2. + dec; tl.setX(Math.cos(7 * Math.PI / 6.) * radiusAst + x); tl.setY(tly + diametre / 5. - dec); br.setX(Math.cos(Math.PI / 6.) * radiusAst + x); br.setY(bry - diametre / 5. + dec); break; case BAR: // The thickness of the bar. final double barThickness = diametre / 8.; tl.setX(x - barThickness); tl.setY(tly); br.setX(x + barThickness); // TODO: check if it is not radius*(1/1.875+1/8.): the bar // thickness may be used into radius/1.875 br.setY(bry + diametre / 1.875); break; case DIAMOND: case FDIAMOND: final double p = 2. * Math.abs(tlx - brx) / (2. * Math.sin(GOLDEN_ANGLE)) * Math.cos(GOLDEN_ANGLE); final double x1 = brx - 1.5 * dec; final double x2 = tlx + 1.5 * dec; tl.setX(x1 < x2 ? x1 : x2); tl.setY((tly + bry) / 2. + p / 2. - 1.5 * dec); br.setX(x1 > x2 ? x1 : x2); br.setY((tly + bry) / 2. - p / 2. + 1.5 * dec); break; case FPENTAGON: case PENTAGON: final double dist = diametre + dec; final double xValue = Math.sin(2. * Math.PI / 5.) * dist; tl.setX(-xValue + x); tl.setY(tly - dec); br.setX(xValue + x); br.setY(0.25 * (Math.sqrt(5.) + 1.) * dist + y + dec); break; case FSQUARE: case SQUARE:// TODO may be wrong, to compare with 2.0. tl.setX(tlx); tl.setY(tly); br.setX(brx); br.setY(bry); break; case FTRIANGLE: case TRIANGLE: tl.setX(tlx - 0.3 * dec); tl.setY(tly - 1.5 * dec); br.setX(brx + 0.3 * dec); br.setY(bry - 3. * dec); break; case DOT: case O: case OPLUS: case OTIMES: tl.setX(tlx); tl.setY(tly); br.setX(brx); br.setY(bry); break; case PLUS:// TODO may be wrong, to compare with 2.0. final double plusGap = diametre / 80.; tl.setX(tlx - plusGap); tl.setY(tly - plusGap); br.setX(brx + plusGap); br.setY(bry + plusGap); break; case X:// TODO may be wrong, to compare with 2.0. final double crossGap = diametre / 5.; tl.setX(tlx - crossGap); tl.setY(tly - crossGap); br.setX(brx + crossGap); br.setY(bry + crossGap); break; } } @Override public boolean isFillable() { return style.isFillable(); } @Override public boolean isFilled() { return isFillable() || style == DotStyle.FDIAMOND || style == DotStyle.FPENTAGON || style == DotStyle.FSQUARE || style == DotStyle.FTRIANGLE || style==DotStyle.DOT; } @Override public IPoint getLazyTopLeftPoint() { final IPoint centre = getPosition(); return ShapeFactory.createPoint(centre.getX() - diametre / 2., centre.getY() - diametre / 2.); } @Override public IPoint getLazyBottomRightPoint() { final IPoint centre = getPosition(); return ShapeFactory.createPoint(centre.getX() + diametre / 2., centre.getY() + diametre / 2.); } @Override public double getPlusGap() { return diametre / 160.; } @Override public double getCrossGap() { return diametre / 10.; } @Override public double getBarGap() { return diametre / 3.75; } @Override public double getBarThickness() { return diametre / 8.; } @Override public double getGeneralGap() { return diametre / IDot.THICKNESS_O_STYLE_FACTOR; } @Override public double getOGap() { final double dec = style==DotStyle.O ? 3.6 : 2.6; return diametre * (0.1 / dec) * 2; } @Override public Color getDotFillingCol() { return getFillingCol(); } @Override public void setDotFillingCol(final Color value) { setFillingCol(value); } } LDrawing.scala000066400000000000000000000043671321075051700343450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import org.malai.mapping.MappingRegistry import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory /** * Implements the concept of drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-17
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] class LDrawing extends IDrawing with LSetShapes { /** The selected shapes of the drawing. */ val selection = ShapeFactory.createGroup() /** Defined if the shape has been modified. */ var modified = false override def getSelection = selection override def setSelection(newSelection : java.util.List[IShape]) { selection.clear newSelection.foreach(sh => selection.addShape(sh)) } override def clear() { super.clear selection.clear } override def removeShape(sh : IShape) : Boolean = { selection.removeShape(sh) super.removeShape(sh) } override def removeShape(i : Int) : IShape = { // Must be removed from the selection before removing from the main list (otherwise mapping selection2border will fail. if(!shapes.isEmpty && i>= -1 && i selection.removeShape(shapes.get(shapes.size()-1)) case _ => selection.removeShape(shapes.get(i)) } super.removeShape(i) } override def setModified(modified : Boolean) { if(modified) MappingRegistry.REGISTRY.onObjectModified(this) else shapes.foreach{_.setModified(false)} this.modified = modified } override def isModified = modified || shapes.exists{_.isModified} override def reinit() = clear } LEllipse.java000066400000000000000000000067671321075051700342130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; /** * Defines a model of an ellipse.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LEllipse extends LRectangularShape implements IEllipse { /** * Creates an Ellipse. * @since 3.0 */ protected LEllipse() { this(ShapeFactory.createPoint(), ShapeFactory.createPoint(1, 1)); } /** * Creates an ellipse. * @param tl The top-left point of the ellipse. * @param br The bottom-right point of the ellipse. * @throws IllegalArgumentException If a or b is not valid. */ protected LEllipse(final IPoint tl, final IPoint br) { super(tl, br); } // // @Override // public IPoint[] getIntersection(final ILine line) { // if(line==null) // return null; // // double lineb = line.getB(); // double linea = line.getA(); // boolean vert = !GLibUtilities.isValidPoint(linea, lineb);// The line is vertical. // IPoint[] pts; // double a = getA()/2.; // double b = getB()/2.; // IPoint centre= getGravityCentre(); // // if(vert) { // We rotate the two points of the line to get a horizontal line // ILine line2 = new LLine(line.getPoint1().rotatePoint(centre, Math.PI/2.), line.getPoint2().rotatePoint(centre, Math.PI/2.)); // linea = line2.getA(); // lineb = line2.getB(); // } // // double alpha = lineb-centre.getY(); // double beta = b*b+linea*linea*a*a; // double gamma = 2.*alpha*linea*a*a-2.*centre.getX()*b*b; // double mu = b*b*centre.getX()*centre.getX()+a*a*alpha*alpha-a*a*b*b; // double delta = gamma*gamma - 4*beta*mu; // // if(delta>0) { // double x1 = (-gamma+Math.sqrt(delta))/(2.*beta); // double x2 = (-gamma-Math.sqrt(delta))/(2.*beta); // pts = new LPoint[2]; // // pts[0] = new LPoint(x1, linea*x1+lineb); // pts[1] = new LPoint(x2, linea*x2+lineb); // } // else // if(LNumber.equalsDouble(delta,0.)) { // double x0 = -gamma/(2.*beta); // pts = new LPoint[1]; // pts[0] = new LPoint(x0, linea*x0+lineb); // } // else // pts = null; // // if(vert && pts!=null) {// If the line is vertical, we rotate the resulting points at their real position. // pts[0] = pts[0].rotatePoint(centre, -Math.PI/2.); // // if(pts.length>1) // pts[1] = pts[1].rotatePoint(centre, -Math.PI/2.); // } // // return pts; // } @Override public void setCentre(final IPoint centre) { if(!GLibUtilities.isValidPoint(centre)) return ; final IPoint gc = getGravityCentre(); translate(centre.getX()-gc.getX(), centre.getY()-gc.getY()); } @Override public double getA() { final double rx = getWidth()/2.; final double ry = getHeight()/2.; return rxry ? ry : rx; } } LFreehand.java000066400000000000000000000052531321075051700343170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines a model of a free hand shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LFreehand extends LModifiablePointsShape implements IFreehand { /** The type of the curves of the shape. */ protected FreeHandType type; /** The interval to consider while painting the shape. */ protected int interval; /** Defines if the drawing is opened of closed. */ protected boolean open; /** * Creates and initialises a freehand model. * @throws IllegalArgumentException If the given point is not valid. * @since 3.0 */ protected LFreehand() { super(); type = FreeHandType.CURVES; interval = 5; open = true; } @Override public void copy(final IShape sh) { super.copy(sh); if(sh instanceof IFreeHandProp) { final IFreeHandProp fh = (IFreeHandProp)sh; open = fh.isOpen(); interval= fh.getInterval(); type = fh.getType(); } } @Override public int getInterval() { return interval; } @Override public FreeHandType getType() { return type; } @Override public boolean isOpen() { return open; } @Override public void setInterval(final int interval) { if(interval>0) this.interval = interval; } @Override public void setOpen(final boolean open) { this.open = open; } @Override public void setType(final FreeHandType type) { if(type!=null) this.type = type; } @Override public boolean isBordersMovable() { return false; } @Override public boolean isDbleBorderable() { return false; } @Override public boolean isFillable() { return true; } @Override public boolean isInteriorStylable() { return true; } @Override public boolean isLineStylable() { return true; } @Override public boolean isShadowable() { return true; } @Override public boolean isShowPtsable() { return false; } @Override public boolean isThicknessable() { return true; } } LGrid.java000066400000000000000000000147371321075051700334770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.awt.Color; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; /** * Defines a model of a grid.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LGrid extends LAbstractGrid implements IGrid { /** The colour of the sub-grid. */ protected Color subGridColour; /** The number of division in a sub-grid. */ protected int subGridDiv; /** The thickness of the main borders of the grid. */ protected double gridWidth; /** The colour of the labels */ protected Color gridLabelsColour; /** 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 double 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; /** * Creates a grid with a predefined point. * @param pt The position. */ protected LGrid(final IPoint pt) { super(pt); gridDots = PSTricksConstants.DEFAULT_GRIDDOTS; gridLabelsColour = PSTricksConstants.DEFAULT_LABELGRIDCOLOR; labelSize = (int)PSTricksConstants.DEFAULT_GRID_LABEL; gridWidth = PSTricksConstants.DEFAULT_GRID_WIDTH*PPC; subGridColour = PSTricksConstants.DEFAULT_SUB_GRID_COLOR; subGridDiv = PSTricksConstants.DEFAULT_SUBGRIDDIV; subGridDots = PSTricksConstants.DEFAULT_SUBGRIDDOTS; subGridWidth = PSTricksConstants.DEFAULT_SUB_GRID_WIDTH*PPC; unit = PSTricksConstants.DEFAULT_UNIT; } @Override public void copy(final IShape sh) { super.copy(sh); if(sh instanceof IGridProp) { final IGridProp grid = (IGridProp) sh; gridDots = grid.getGridDots(); subGridColour = grid.getSubGridColour(); subGridDiv = grid.getSubGridDiv(); subGridDots = grid.getSubGridDots(); gridLabelsColour= grid.getGridLabelsColour(); xLabelSouth = grid.isXLabelSouth(); yLabelWest = grid.isYLabelWest(); unit = grid.getUnit(); gridWidth = grid.getGridWidth(); subGridWidth = grid.getSubGridWidth(); } } @Override public boolean isXLabelSouth() { return xLabelSouth; } @Override public boolean isYLabelWest() { return yLabelWest; } @Override public void setXLabelSouth(final boolean isXLabelSouth) { xLabelSouth = isXLabelSouth; } @Override public void setYLabelWest(final boolean isYLabelWest) { yLabelWest = isYLabelWest; } @Override public IPoint getBottomRightPoint() { final IPoint pos = getPosition(); return ShapeFactory.createPoint(pos.getX()+getGridMaxX()*PPC*unit, pos.getY()-getGridMinY()*PPC); } @Override public IPoint getTopLeftPoint() { final IPoint pos = getPosition(); return ShapeFactory.createPoint(pos.getX()+getGridMinX()*PPC, pos.getY()-getGridMaxY()*PPC*unit); } @Override public void scale(final double x, final double y, final Position pos, final Rectangle2D bound) { scaleWithRatio(x, y, pos, bound); } @Override public void scaleWithRatio(final double x, final double y, final Position pos, final Rectangle2D bound) { if(pos==null || bound==null) return; final double sx = x/bound.getWidth(); final double sy = y/bound.getHeight(); switch(pos) { case WEST: case SW: if(unit+sx-1>=0.5) setUnit(unit+sx-1); break; case SOUTH: if(unit+sy-1>=0.5) setUnit(unit+sy-1); break; case NORTH: case NW: if(unit+sy-1>=0.5) { setUnit(unit+sy-1); translate(0., -getTopRightPoint().getY()+bound.getY()); } break; case NE: if(unit+sy-1>=0.5) { setUnit(unit+sy-1); final IPoint tr = getTopRightPoint(); translate(-tr.getX()+bound.getMaxX(), -tr.getY()+bound.getY()); } break; case EAST: case SE: if(unit+sx-1>=0.5) { setUnit(unit+sx-1); translate(-getTopRightPoint().getX()+bound.getMaxX(), 0.); } break; } } @Override public int getGridDots() { return gridDots; } @Override public Color getGridLabelsColour() { return gridLabelsColour; } @Override public double getGridWidth() { return gridWidth; } @Override public Color getSubGridColour() { return subGridColour; } @Override public int getSubGridDiv() { return subGridDiv; } @Override public int getSubGridDots() { return subGridDots; } @Override public double getSubGridWidth() { return subGridWidth; } @Override public double getUnit() { return unit; } @Override public void setGridDots(final int grDots) { if(grDots>=0) this.gridDots = grDots; } @Override public void setGridLabelsColour(final Color gridLabelsCol) { if(gridLabelsCol!=null) this.gridLabelsColour = gridLabelsCol; } @Override public void setGridWidth(final double gridW) { if(gridW>0 && GLibUtilities.isValidCoordinate(gridW)) this.gridWidth = gridW; } @Override public void setSubGridColour(final Color subGridCol) { if(subGridCol!=null) this.subGridColour = subGridCol; } @Override public void setSubGridDiv(final int subGridD) { if(subGridD>=0) this.subGridDiv = subGridD; } @Override public void setSubGridDots(final int subGridD) { if(subGridD>=0) this.subGridDots = subGridD; } @Override public void setSubGridWidth(final double subGridW) { if(subGridW>0 && GLibUtilities.isValidCoordinate(subGridW)) this.subGridWidth = subGridW; } @Override public void setUnit(final double un) { if(un>0 && GLibUtilities.isValidCoordinate(un))//TODO unit may be lesser than 0. this.unit = un; } @Override public double getStep() { return unit*IShape.PPC; } } LGroup.scala000066400000000000000000001003331321075051700340340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.Color import java.util.ArrayList import java.util.List import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.bufferAsJavaList import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp.FreeHandType import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp import net.sf.latexdraw.glib.models.interfaces.prop.IScalable /** * A Group is a group of IShape instances.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-17
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] class LGroup() extends LShape() with LGroupArc with LGroupArrowable with LGroupAxes with LGroupDot with LGroupFreeHand with LGroupLineArc with LGroupGrid with LGroupShape with LGroupStdGrid with LGroupText with LSetShapes with LPlotGroup { override def duplicate() = duplicateDeep(true) override def setModified(modified : Boolean) = { getShapes.foreach{_.setModified(modified)} super.setModified(modified) } override def duplicateDeep(duplicateShapes : Boolean) : IGroup = { val dup = ShapeFactory.createGroup() if(duplicateShapes) shapes.foreach{sh => dup.addShape(sh.duplicate)} else shapes.foreach{sh => dup.addShape(sh)} return dup } override def isTypeOf(clazz : java.lang.Class[_]) : Boolean = { if(clazz==null) return false if(clazz.equals(getClass) || clazz.equals(classOf[IShape]) || clazz.equals(classOf[LShape]) || clazz.equals(classOf[IGroup])) return true return shapes.exists{_.isTypeOf(clazz)} } override def setPlotPolarList(values:List[java.lang.Boolean]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setPolar(values.get(i)) case _ => } } override def getPlotPolarList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{ case sh : IPlotProp => list.add(sh.isPolar) case _ => list.add(false) } return list } override def setYScaleList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IScalable => prop.setYScale(values.get(i)) case _ => } } override def getYScaleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case fh : IScalable => list.add(fh.getYScale) case _ => list.add(null) } return list } override def setXScaleList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IScalable => prop.setXScale(values.get(i)) case _ => } } override def getXScaleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case fh : IScalable => list.add(fh.getXScale) case _ => list.add(null) } return list } override def setPlotMinXList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setPlotMinX(values.get(i)) case _ => } } override def getPlotMinXList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case fh : IPlotProp => list.add(fh.getPlotMinX) case _ => list.add(null) } return list } override def setPlotMaxXList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setPlotMaxX(values.get(i)) case _ => } } override def getPlotMaxXList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case fh : IPlotProp => list.add(fh.getPlotMaxX) case _ => list.add(null) } return list } override def setNbPlottedPointsList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setNbPlottedPoints(values.get(i)) case _ => } } override def getNbPlottedPointsList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case fh : IPlotProp => list.add(fh.getNbPlottedPoints) case _ => list.add(null) } return list } override def setPlotStyleList(values : List[IPlotProp.PlotStyle]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setPlotStyle(values.get(i)) case _ => } } override def getPlotStyleList: List[IPlotProp.PlotStyle] = { val list = new ArrayList[IPlotProp.PlotStyle]() shapes.foreach{ case fh : IPlotProp => list.add(fh.getPlotStyle) case _ => list.add(null) } return list } override def setPlotEquationList(values : List[String]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IPlotProp => prop.setPlotEquation(values.get(i)) case _ => } } override def getPlotEquationList: List[String] = { val list = new ArrayList[String]() shapes.foreach{ case fh : IPlotProp => list.add(fh.getPlotEquation) case _ => list.add(null) } return list } override def setFreeHandIntervalList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IFreeHandProp => prop.setInterval(values.get(i)) case _ => } } override def getFreeHandIntervalList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case fh : IFreeHandProp => list.add(fh.getInterval) case _ => list.add(null) } return list } override def setFreeHandOpenList(values : List[java.lang.Boolean]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IFreeHandProp => prop.setOpen(values.get(i)) case _ => } } override def getFreeHandOpenList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{ case fh : IFreeHandProp => list.add(fh.isOpen) case _ => list.add(null) } return list } override def setGridLabelsColourList(values : List[Color]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setGridLabelsColour(values.get(i)) case _ => } } override def getGridLabelsColourList: List[Color] = getShapes.map{case sh:IGridProp => sh.getGridLabelsColour; case _ => Color.BLACK} override def setSubGridColourList(values : List[Color]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setSubGridColour(values.get(i)) case _ => } } override def getSubGridColourList: List[Color] = getShapes.map{case sh:IGridProp => sh.getSubGridColour; case _ => Color.BLACK} override def setGridWidthList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setGridWidth(values.get(i)) case _ => } } override def getGridWidthList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case grid : IGridProp => list.add(grid.getGridWidth) case _ => list.add(null) } return list } override def setSubGridWidthList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setSubGridWidth(values.get(i)) case _ => } } override def getSubGridWidthList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case grid : IGridProp => list.add(grid.getSubGridWidth) case _ => list.add(null) } return list } override def setGridDotsList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setGridDots(values.get(i)) case _ => } } override def getGridDotsList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case grid : IGridProp => list.add(grid.getGridDots) case _ => list.add(null) } return list } override def setSubGridDotsList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setSubGridDots(values.get(i)) case _ => } } override def getSubGridDotsList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case grid : IGridProp => list.add(grid.getSubGridDots) case _ => list.add(null) } return list } override def setSubGridDivList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setSubGridDiv(values.get(i)) case _ => } } override def getSubGridDivList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case grid : IGridProp => list.add(grid.getSubGridDiv) case _ => list.add(null) } return list } override def setFreeHandTypeList(values : List[FreeHandType]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IFreeHandProp => prop.setType(values.get(i)) case _ => } } override def getFreeHandTypeList: List[FreeHandType] = getShapes.map{case sh:IFreeHandProp => sh.getType; case _ => FreeHandType.CURVES} override def setAxesDistLabelsList(values : List[IPoint]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setDistLabels(values.get(i)) case _ => } } override def getAxesDistLabelsList: List[IPoint] = getShapes.map{case sh:IAxesProp => sh.getDistLabels; case _ => null} override def setAxesLabelsDisplayedList(values : List[PlottingStyle]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setLabelsDisplayed(values.get(i)) case _ => } } override def getAxesLabelsDisplayedList: List[PlottingStyle] = getShapes.map{case sh:IAxesProp => sh.getLabelsDisplayed; case _ => PlottingStyle.NONE} override def setAxesShowOriginList(values : List[java.lang.Boolean]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setShowOrigin(values.get(i)) case _ => } } override def getAxesShowOriginList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{ case axes : IAxesProp => list.add(axes.isShowOrigin) case _ => list.add(null) } return list } override def setAxesTicksStyleList(values : List[TicksStyle]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setTicksStyle(values.get(i)) case _ => } } override def getAxesTicksStyleList: List[TicksStyle] = getShapes.map{case sh:IAxesProp => sh.getTicksStyle; case _ => TicksStyle.FULL} override def setAxesTicksSizeList(values : List[java.lang.Double]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setTicksSize(values.get(i)) case _ => } } override def getAxesTicksSizeList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case axes : IAxesProp => list.add(axes.getTicksSize) case _ => list.add(null) } return list } override def setAxesTicksDisplayedList(values : List[PlottingStyle]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setTicksDisplayed(values.get(i)) case _ => } } override def getAxesTicksDisplayedList: List[PlottingStyle] = getShapes.map{case sh:IAxesProp => sh.getTicksDisplayed; case _ => PlottingStyle.NONE} override def setAxesIncrementsList(values : List[IPoint]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setIncrement(values.get(i)) case _ => } } override def getAxesIncrementsList: List[IPoint] = getShapes.map{case sh:IAxesProp => sh.getIncrement; case _ => null} override def setGridLabelSizeList(values : List[java.lang.Integer]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IStdGridProp => prop.setLabelsSize(values.get(i)) case _ => } } override def getGridLabelSizeList: List[java.lang.Integer] = { val list = new ArrayList[java.lang.Integer]() shapes.foreach{ case axes : IStdGridProp => list.add(axes.getLabelsSize) case _ => list.add(null) } return list } override def setGridXLabelSouthList(values : List[java.lang.Boolean]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setXLabelSouth(values.get(i)) case _ => } } override def getGridXLabelSouthList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{ case axes : IGridProp => list.add(axes.isXLabelSouth) case _ => list.add(null) } return list } override def setGridYLabelWestList(values : List[java.lang.Boolean]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IGridProp => prop.setYLabelWest(values.get(i)) case _ => } } override def getGridYLabelWestList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{ case axes : IGridProp => list.add(axes.isYLabelWest) case _ => list.add(null) } return list } override def setAxesStyleList(values : List[AxesStyle]) = { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IAxesProp => prop.setAxesStyle(values.get(i)) case _ => } } override def getAxesStyleList: List[AxesStyle] = getShapes.map{case sh:IAxesProp => sh.getAxesStyle; case _ => AxesStyle.NONE} override def setGridOriginList(values : List[IPoint]) = { var pt : IPoint = null if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) { pt = values.get(i) if(pt!=null && shapes.get(i).isInstanceOf[IStdGridProp]) shapes.get(i).asInstanceOf[IStdGridProp].setOrigin(pt.getX, pt.getY) } } override def getGridOriginList: List[IPoint] = getShapes.map{case sh:IStdGridProp => ShapeFactory.createPoint(sh.getOriginX, sh.getOriginY); case _ => null} override def setGridEndList(values : List[IPoint]) = { var pt : IPoint = null if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) { pt = values.get(i) if(pt!=null && shapes.get(i).isInstanceOf[IStdGridProp]) shapes.get(i).asInstanceOf[IStdGridProp].setGridEnd(pt.getX, pt.getY) } } override def setGridStartList(values : List[IPoint]) = { var pt : IPoint = null if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) { pt = values.get(i) if(pt!=null && shapes.get(i).isInstanceOf[IStdGridProp]) shapes.get(i).asInstanceOf[IStdGridProp].setGridStart(pt.getX, pt.getY) } } override def getGridStartList: List[IPoint] = getShapes.map{case sh:IStdGridProp => sh.getGridStart; case _ => null} override def getGridEndList: List[IPoint] = getShapes.map{case sh:IStdGridProp => sh.getGridEnd; case _ => null} override def getBordersPositionList: List[BorderPos] = getShapes.map{sh => sh.isBordersMovable match { case true => sh.getBordersPosition; case false => BorderPos.INTO}} override def getLineColourList: List[Color] = getShapes.map{_.getLineColour} override def setBordersPositionList(list : List[BorderPos]) = { if(list!=null && list.size==shapes.size) for(i <- 0 until list.size) if(shapes.get(i).isBordersMovable) shapes.get(i).setBordersPosition(list.get(i)) } override def setLineColourList(list : List[Color]) = { if(list!=null && list.size==shapes.size) for(i <- 0 until list.size) shapes.get(i).setLineColour(list.get(i)) } override def getAngleStartList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case arc : IArcProp => list.add(arc.getAngleStart) case _ => list.add(null) } return list } override def getAngleEndList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case arc : IArcProp => list.add(arc.getAngleEnd) case _ => list.add(null) } return list } override def getArcStyleList: List[ArcStyle] = getShapes.map{case sh:IArcProp => sh.getArcStyle; case _ => ArcStyle.ARC} override def getRotationAngleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => list.add(sh.getRotationAngle)} return list } override def getTextPositionList: List[TextPosition] = getShapes.map{case sh:ITextProp => sh.getTextPosition; case _ => TextPosition.BOT_LEFT} override def getTextList: List[String] = getShapes.map{case sh:ITextProp => sh.getText; case _ => ""} override def getHatchingsAngleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isInteriorStylable match { case true => list.add(sh.getHatchingsAngle) case false => list.add(null) } } return list } override def getHatchingsWidthList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isInteriorStylable match { case true => list.add(sh.getHatchingsWidth) case false => list.add(null) } } return list } override def getHatchingsSepList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isInteriorStylable match { case true => list.add(sh.getHatchingsSep) case false => list.add(null) } } return list } override def getGradAngleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isInteriorStylable match { case true => list.add(sh.getGradAngle) case false => list.add(null) } } return list } override def getGradMidPtList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isInteriorStylable match { case true => list.add(sh.getGradMidPt) case false => list.add(null) } } return list } override def getLineArcList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case lineArc : ILineArcProp => list.add(lineArc.getLineArc) case _ => list.add(null) } return list } override def getFillingColList: List[Color] = getShapes.map{sh => sh.isInteriorStylable match { case true => sh.getFillingCol; case false => Color.BLACK}} override def getHatchingsColList: List[Color] = getShapes.map{sh => sh.isInteriorStylable match { case true => sh.getHatchingsCol; case false => Color.BLACK}} override def hasDbleBordList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{sh => sh.isDbleBorderable match { case true => list.add(sh.hasDbleBord) case false => list.add(null) } } return list } override def getDbleBordSepList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isDbleBorderable match { case true => list.add(sh.getDbleBordSep) case false => list.add(null) } } return list } override def getDbleBordColList: List[Color] = getShapes.map{sh => sh.isDbleBorderable match { case true => sh.getDbleBordCol; case false => Color.BLACK}} override def hasShadowList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{sh => sh.isShadowable match { case true => list.add(sh.hasShadow) case false => list.add(null) } } return list } override def getShadowSizeList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isShadowable match { case true => list.add(sh.getShadowSize) case false => list.add(null) } } return list } override def getShadowAngleList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isShadowable match { case true => list.add(sh.getShadowAngle) case false => list.add(null) } } return list } override def getShadowColList: List[Color] = getShapes.map{sh => sh.isShadowable match { case true => sh.getShadowCol; case false => Color.BLACK}} override def getGradColStartList: List[Color] = getShapes.map{sh => sh.isInteriorStylable match { case true => sh.getGradColStart; case false => Color.BLACK}} override def getGradColEndList: List[Color] = getShapes.map{sh => sh.isInteriorStylable match { case true => sh.getGradColEnd; case false => Color.BLACK}} override def getThicknessList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{sh => sh.isThicknessable match { case true => list.add(sh.getThickness) case false => list.add(null) } } return list } override def getFillingStyleList: List[FillingStyle] = getShapes.map{sh => sh.isInteriorStylable match { case true => sh.getFillingStyle; case false => FillingStyle.NONE}} override def getLineStyleList: List[LineStyle] = getShapes.map{sh => sh.isLineStylable match { case true => sh.getLineStyle; case false => LineStyle.SOLID}} override def getDotFillingColList: List[Color] = getShapes.map{case sh:IDotProp => sh.getDotFillingCol; case _ => Color.BLACK} override def getDotStyleList: List[DotStyle] = getShapes.map{case sh:IDotProp => sh.getDotStyle; case _ => DotStyle.DOT} override def getDotSizeList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() shapes.foreach{ case dot : IDotProp => list.add(dot.getDiametre) case _ => list.add(null) } return list } override def setAngleStartList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IArcProp => prop.setAngleStart(values.get(i)) case _ => } } override def setDotStyleList(values : List[DotStyle]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IDotProp => prop.setDotStyle(values.get(i)) case _ => } } override def setAngleEndList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IArcProp => prop.setAngleEnd(values.get(i)) case _ => } } override def setArcStyleList(values : List[ArcStyle]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IArcProp => prop.setArcStyle(values.get(i)) case _ => } } override def setRotationAngleList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i).setRotationAngle(values.get(i)) } override def setTextPositionList(values : List[TextPosition]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: ITextProp => prop.setTextPosition(values.get(i)) case _ => } } override def setTextList(values : List[String]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: ITextProp => prop.setText(values.get(i)) case _ => } } override def setHatchingsAngleList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setHatchingsAngle(values.get(i)) } override def setHatchingsWidthList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setHatchingsWidth(values.get(i)) } override def setHatchingsSepList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setHatchingsSep(values.get(i)) } override def setGradAngleList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setGradAngle(values.get(i)) } override def setGradMidPtList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setGradMidPt(values.get(i)) } override def setLineArcList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: ILineArcProp => prop.setLineArc(values.get(i)) case _ => } } override def setFillingColList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setFillingCol(values.get(i)) } override def setHatchingsColList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setHatchingsCol(values.get(i)) } override def setHasDbleBordList(values : List[java.lang.Boolean]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isDbleBorderable) shapes.get(i).setHasDbleBord(values.get(i)) } override def setDbleBordSepList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isDbleBorderable) shapes.get(i).setDbleBordSep(values.get(i)) } override def setDbleBordColList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isDbleBorderable) shapes.get(i).setDbleBordCol(values.get(i)) } override def setHasShadowList(values : List[java.lang.Boolean]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isShadowable) shapes.get(i).setHasShadow(values.get(i)) } override def setShadowSizeList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isShadowable) shapes.get(i).setShadowSize(values.get(i)) } override def setShadowAngleList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isShadowable) shapes.get(i).setShadowAngle(values.get(i)) } override def setShadowColList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isShadowable) shapes.get(i).setShadowCol(values.get(i)) } override def setGradColStartList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setGradColStart(values.get(i)) } override def setGradColEndList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setGradColEnd(values.get(i)) } override def setThicknessList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isThicknessable) shapes.get(i).setThickness(values.get(i)) } override def setFillingStyleList(values : List[FillingStyle]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isInteriorStylable) shapes.get(i).setFillingStyle(values.get(i)) } override def setLineStyleList(values : List[LineStyle]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isLineStylable) shapes.get(i).setLineStyle(values.get(i)) } override def setDotFillingColList(values : List[Color]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IDotProp => prop.setDotFillingCol(values.get(i)) case _ => } } override def setDotSizeList(values : List[java.lang.Double]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) shapes.get(i) match { case prop: IDotProp => prop.setDiametre(values.get(i)) case _ => } } override def setShowPointsList(values : List[java.lang.Boolean]) { if(values!=null && values.size==shapes.size) for(i <- 0 until values.size) if(shapes.get(i).isShowPtsable) shapes.get(i).setShowPts(values.get(i)) } override def getShowPointsList: List[java.lang.Boolean] = { val list = new ArrayList[java.lang.Boolean]() shapes.foreach{sh => sh.isShowPtsable match { case true => list.add(sh.isShowPts) case false => list.add(null) } } return list } } LGroupArc.scala000066400000000000000000000036031321075051700344640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp /** * This trait encapsulates the code of the group related to the support of IArcProp shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupArc extends IGroup { /** May return the first IArcProp shape of the group. */ private def firstIArcProp = arcShapes.find{_.isTypeOf(classOf[IArcProp])} private def arcShapes = getShapes.flatMap{case x:IArcProp => x::Nil; case _ => Nil} override def getArcStyle: IArcProp.ArcStyle = firstIArcProp match { case Some(arc) => arc.getArcStyle case _ => IArcProp.ArcStyle.ARC } override def setArcStyle(typeArc : IArcProp.ArcStyle) { arcShapes.foreach{_.setArcStyle(typeArc)} } override def getAngleStart: Double = firstIArcProp match { case Some(arc) => arc.getAngleStart case _ => Double.NaN } override def setAngleStart(angleStart : Double) { arcShapes.foreach{_.setAngleStart(angleStart)} } override def getAngleEnd: Double = firstIArcProp match { case Some(arc) => arc.getAngleEnd case _ => Double.NaN } override def setAngleEnd(angleEnd : Double) { arcShapes.foreach{_.setAngleEnd(angleEnd)} } } LGroupArrowable.scala000066400000000000000000000260711321075051700357010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.util.ArrayList import java.util.List import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.bufferAsJavaList import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.ILine /** * This trait encapsulates the code of the group related to the support of arrowable shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupArrowable extends IGroup { /** May return the first grid of the group. */ private def firstIArrowable = arrowShapes.find{_.isTypeOf(classOf[IArrowableShape])} private def arrowShapes = getShapes.flatMap{case x:IArrowableShape => x::Nil; case _ => Nil} override def getArrowIndex(arrow:IArrow) = firstIArrowable match { case Some(arr) => arr.getArrowIndex(arrow) case _ => -1 } override def getNbArrows = firstIArrowable match { case Some(arr) => arr.getNbArrows case _ => 0 } override def setTBarSizeDimList(values:List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setTBarSizeDim(values.get(j)) case _ => } } override def getTBarSizeDimList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getTBarSizeDim) case _ => list.add(java.lang.Double.NaN) } return list } override def setTBarSizeNumList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setTBarSizeNum(values.get(j)) case _ => } } override def getTBarSizeNumList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getTBarSizeNum) case _ => list.add(java.lang.Double.NaN) } return list } override def setDotSizeNumList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setDotSizeNum(values.get(j)) case _ => } } override def getDotSizeNumList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getDotSizeNum) case _ => list.add(java.lang.Double.NaN) } return list } override def setDotSizeDimList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setDotSizeDim(values.get(j)) case _ => } } override def getDotSizeDimList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getDotSizeDim) case _ => list.add(java.lang.Double.NaN) } return list } override def setBracketNumList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setBracketNum(values.get(j)) case _ => } } override def getBracketNumList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getBracketNum) case _ => list.add(java.lang.Double.NaN) } return list } override def setRBracketNumList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setRBracketNum(values.get(j)) case _ => } } override def getRBracketNumList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getRBracketNum) case _ => list.add(java.lang.Double.NaN) } return list } override def setArrowSizeNumList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setArrowSizeNum(values.get(j)) case _ => } } override def getArrowSizeNumList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getArrowSizeNum) case _ => list.add(java.lang.Double.NaN) } return list } override def setArrowSizeDimList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setArrowSizeDim(values.get(j)) case _ => } } override def getArrowSizeDimList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getArrowSizeDim) case _ => list.add(java.lang.Double.NaN) } return list } override def setArrowLengthList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setArrowLength(values.get(j)) case _ => } } override def getArrowLengthList: java.util.List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getArrowLength) case _ => list.add(java.lang.Double.NaN) } return list } override def setArrowInsetList(values:java.util.List[java.lang.Double]) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setArrowInset(values.get(j)) case _ => } } override def getArrowInsetList: List[java.lang.Double] = { val list = new ArrayList[java.lang.Double]() getShapes.foreach{ case arr:IArrowableShape => list.add(arr.getArrowInset) case _ => list.add(java.lang.Double.NaN) } return list } override def getArrowStyleList(i : Int) : java.util.List[ArrowStyle] = getShapes.map{case arr:IArrowableShape => arr.getArrowStyle(i); case _ => ArrowStyle.NONE} override def setArrowStyleList(values : java.util.List[ArrowStyle], i : Int) { val shapes = getShapes if(values!=null && values.size==shapes.size) for(j <- 0 until values.size) shapes.get(j) match { case shape: IArrowableShape => shape.setArrowStyle(values.get(j), i) case _ => } } override def setArrowStyle(style : IArrow.ArrowStyle, position : Int) { arrowShapes.foreach{_.setArrowStyle(style, position)} } override def getArrowStyle(position : Int) : IArrow.ArrowStyle = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowStyle(position) case _ => IArrow.ArrowStyle.NONE } } override def getArrowAt(position : Int) : IArrow = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowAt(position) case _ => null } } override def getArrowLine(arrow : IArrow) : ILine = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowLine(arrow) case _ => null } } override def setDotSizeDim(dotSizeDim : Double) { arrowShapes.foreach{_.setDotSizeDim(dotSizeDim)} } override def setDotSizeNum(dotSizeNum : Double) { arrowShapes.foreach{_.setDotSizeNum(dotSizeNum)} } override def setTBarSizeNum(tbarSizeNum : Double) { arrowShapes.foreach{_.setTBarSizeNum(tbarSizeNum)} } override def setTBarSizeDim(tbarSizeDim : Double) { arrowShapes.foreach{_.setTBarSizeDim(tbarSizeDim)} } override def getTBarSizeDim: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getTBarSizeDim case _ => Double.NaN } } override def getTBarSizeNum: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getTBarSizeNum case _ => Double.NaN } } override def setRBracketNum(rBracketNum : Double) { arrowShapes.foreach{_.setRBracketNum(rBracketNum)} } override def setBracketNum(bracketNum : Double) { arrowShapes.foreach{_.setBracketNum(bracketNum)} } override def setArrowLength(lgth : Double) { arrowShapes.foreach{_.setArrowLength(lgth)} } override def setArrowSizeDim(arrowSizeDim : Double) { arrowShapes.foreach{_.setArrowSizeDim(arrowSizeDim)} } override def setArrowSizeNum(arrowSizeNum : Double) { arrowShapes.foreach{_.setArrowSizeNum(arrowSizeNum)} } override def setArrowInset(inset : Double) { arrowShapes.foreach{_.setArrowInset(inset)} } override def getDotSizeDim: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getDotSizeDim case _ => Double.NaN } } override def getDotSizeNum: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getDotSizeNum case _ => Double.NaN } } override def getBracketNum: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getBracketNum case _ => Double.NaN } } override def getArrowSizeNum: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowSizeNum case _ => Double.NaN } } override def getArrowSizeDim: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowSizeDim case _ => Double.NaN } } override def getArrowInset: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowInset case _ => Double.NaN } } override def getArrowLength: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getArrowLength case _ => Double.NaN } } override def getRBracketNum: Double = { firstIArrowable match { case Some(arrowable) => arrowable.getRBracketNum case _ => Double.NaN } } } LGroupAxes.scala000066400000000000000000000103611321075051700346560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp /** * This trait encapsulates the code of the group related to the support of axes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupAxes extends IGroup { /** May return the first axes shape of the group. */ private def firstIAxes = axesShapes.find{_.isTypeOf(classOf[IAxesProp])} private def axesShapes = getShapes.flatMap{case x:IAxesProp => x::Nil; case _ => Nil} override def getIncrementX: Double = { firstIAxes match { case Some(axe) => axe.getIncrementX case _ => Double.NaN } } override def getIncrementY: Double = { firstIAxes match { case Some(axe) => axe.getIncrementY case _ => Double.NaN } } override def setIncrementX(increment : Double) { axesShapes.foreach{_.setIncrementX(increment)} } override def setIncrementY(increment : Double) { axesShapes.foreach{_.setIncrementY(increment)} } override def getDistLabelsX: Double = { firstIAxes match { case Some(axe) => axe.getDistLabelsX case _ => Double.NaN } } override def getDistLabelsY: Double = { firstIAxes match { case Some(axe) => axe.getDistLabelsY case _ => Double.NaN } } override def setDistLabelsX(distLabelsX : Double) { axesShapes.foreach{_.setDistLabelsX(distLabelsX)} } override def setDistLabelsY(distLabelsY : Double) { axesShapes.foreach{_.setDistLabelsY(distLabelsY)} } override def getLabelsDisplayed: IAxesProp.PlottingStyle = { firstIAxes match { case Some(axe) => axe.getLabelsDisplayed case _ => IAxesProp.PlottingStyle.ALL } } override def setLabelsDisplayed(labelsDisplayed : IAxesProp.PlottingStyle) { axesShapes.foreach{_.setLabelsDisplayed(labelsDisplayed)} } override def isShowOrigin: Boolean = { firstIAxes match { case Some(axe) => axe.isShowOrigin case _ => false } } override def setShowOrigin(showOrigin : Boolean) { axesShapes.foreach{_.setShowOrigin(showOrigin)} } override def getTicksDisplayed: IAxesProp.PlottingStyle = { firstIAxes match { case Some(axe) => axe.getTicksDisplayed case _ => IAxesProp.PlottingStyle.ALL } } override def setTicksDisplayed(ticksDisplayed : IAxesProp.PlottingStyle) { axesShapes.foreach{_.setTicksDisplayed(ticksDisplayed)} } override def getTicksStyle: IAxesProp.TicksStyle = { firstIAxes match { case Some(axe) => axe.getTicksStyle case _ => IAxesProp.TicksStyle.FULL } } override def setTicksStyle(ticksStyle : IAxesProp.TicksStyle) { axesShapes.foreach{_.setTicksStyle(ticksStyle)} } override def getTicksSize: Double = { firstIAxes match { case Some(axe) => axe.getTicksSize case _ => Double.NaN } } override def setTicksSize(ticksSize : Double) { axesShapes.foreach{_.setTicksSize(ticksSize)} } override def getAxesStyle: IAxesProp.AxesStyle = { firstIAxes match { case Some(axe) => axe.getAxesStyle case _ => IAxesProp.AxesStyle.AXES } } override def setAxesStyle(axesStyle : IAxesProp.AxesStyle) { axesShapes.foreach{_.setAxesStyle(axesStyle)} } override def getIncrement: IPoint = { firstIAxes match { case Some(axe) => axe.getIncrement case _ => null } } override def setIncrement(increment : IPoint) { axesShapes.foreach{_.setIncrement(increment)} } override def getDistLabels: IPoint = { firstIAxes match { case Some(axe) => axe.getDistLabels case _ => null } } override def setDistLabels(distLabels : IPoint) { axesShapes.foreach{_.setDistLabels(distLabels)} } } LGroupDot.scala000066400000000000000000000036341321075051700345110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.Color import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp import net.sf.latexdraw.glib.models.interfaces.shape.IGroup /** * This trait encapsulates the code of the group related to the support of dot shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupDot extends IGroup { /** May return the first grid of the group. */ private def firstDottable = dotShapes.find{_.isTypeOf(classOf[IDotProp])} private def dotShapes = getShapes.flatMap{case x:IDotProp => x::Nil; case _ => Nil} override def getDotFillingCol: Color = { firstDottable match { case Some(dot) => dot.getDotFillingCol case _ => Color.BLACK } } override def setDotFillingCol(fillingCol : Color) { dotShapes.foreach{_.setDotFillingCol(fillingCol)} } override def getDotStyle: IDotProp.DotStyle = { firstDottable match { case Some(dot) => dot.getDotStyle case _ => IDotProp.DotStyle.DOT } } override def setDotStyle(style : IDotProp.DotStyle) { dotShapes.foreach{_.setDotStyle(style)} } override def getDiametre: Double = { firstDottable match { case Some(dot) => dot.getDiametre case _ => Double.NaN } } override def setDiametre(dia : Double) { dotShapes.foreach{_.setDiametre(dia)} } } LGroupFreeHand.scala000066400000000000000000000036601321075051700354360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp /** * This trait encapsulates the code of the group related to the support of free hand shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupFreeHand extends IGroup { /** May return the first free hand shape of the group. */ private def firstIFreeHand = fhShapes.find{_.isTypeOf(classOf[IFreeHandProp])} private def fhShapes = getShapes.flatMap{case x:IFreeHandProp => x::Nil; case _ => Nil} override def getType: IFreeHandProp.FreeHandType = { firstIFreeHand match { case Some(fh) => fh.getType case _ => IFreeHandProp.FreeHandType.CURVES } } override def setType(fhType : IFreeHandProp.FreeHandType) { fhShapes.foreach{_.setType(fhType)} } override def isOpen: Boolean = { firstIFreeHand match { case Some(fh) => fh.isOpen case _ => false } } override def setOpen(open : Boolean) { fhShapes.foreach{_.setOpen(open)} } override def getInterval: Int = { firstIFreeHand match { case Some(fh) => fh.getInterval case _ => 0 } } override def setInterval(interval : Int) { fhShapes.foreach{_.setInterval(interval)} } } LGroupGrid.scala000066400000000000000000000070241321075051700346450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.Color import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp /** * This trait encapsulates the code of the group related to the support of grids.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupGrid extends IGroup { /** May return the first grid of the group. */ private def firstIGrid = gridShapes.find{_.isTypeOf(classOf[IGridProp])} private def gridShapes = getShapes.flatMap{case x:IGridProp => x::Nil; case _ => Nil} override def isXLabelSouth: Boolean = firstIGrid match { case Some(stdGrid) => stdGrid.isXLabelSouth case _ => false } override def setXLabelSouth(isXLabelSouth : Boolean) { gridShapes.foreach{_.setXLabelSouth(isXLabelSouth)} } override def isYLabelWest: Boolean = firstIGrid match { case Some(stdGrid) => stdGrid.isYLabelWest case _ => false } override def setYLabelWest(isYLabelWest : Boolean) { gridShapes.foreach{_.setYLabelWest(isYLabelWest)} } override def getGridDots: Int = { firstIGrid match { case Some(grid) => grid.getGridDots case _ => 0 } } override def setGridDots(gridDots : Int) { gridShapes.foreach{_.setGridDots(gridDots)} } override def getGridLabelsColour: Color = { firstIGrid match { case Some(grid) => grid.getGridLabelsColour case _ => Color.BLACK } } override def setGridLabelsColour(gridLabelsColour : Color) { gridShapes.foreach{_.setGridLabelsColour(gridLabelsColour)} } override def getGridWidth: Double = { firstIGrid match { case Some(grid) => grid.getGridWidth case _ => Double.NaN } } override def setGridWidth(gridWidth : Double) { gridShapes.foreach{_.setGridWidth(gridWidth)} } override def getSubGridColour: Color = { firstIGrid match { case Some(grid) => grid.getSubGridColour case _ => Color.BLACK } } override def setSubGridColour(subGridColour : Color) { gridShapes.foreach{_.setSubGridColour(subGridColour)} } override def getSubGridDiv: Int = { firstIGrid match { case Some(grid) => grid.getSubGridDiv case _ => 0 } } override def setSubGridDiv(subGridDiv : Int) { gridShapes.foreach{_.setSubGridDiv(subGridDiv)} } override def getSubGridDots: Int = { firstIGrid match { case Some(grid) => grid.getSubGridDots case _ => 0 } } override def setSubGridDots(subGridDots : Int) { gridShapes.foreach{_.setSubGridDots(subGridDots)} } override def getSubGridWidth: Double = { firstIGrid match { case Some(grid) => grid.getSubGridWidth case _ => Double.NaN } } override def setSubGridWidth(subGridWidth : Double) { gridShapes.foreach{_.setSubGridWidth(subGridWidth)} } override def setUnit(unit : Double) { gridShapes.foreach{_.setUnit(unit)} } override def getUnit: Double = { firstIGrid match { case Some(grid) => grid.getUnit case _ => Double.NaN } } } LGroupLineArc.scala000066400000000000000000000030141321075051700352700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp /** * This trait encapsulates the code of the group related to the support of line arc shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupLineArc extends IGroup { /** May return the first free hand shape of the group. */ private def firstLineArc = lineArcShapes.find{_.isTypeOf(classOf[ILineArcProp])} private def lineArcShapes = getShapes.flatMap{case x:ILineArcProp => x::Nil; case _ => Nil} override def getLineArc: Double = { firstLineArc match { case Some(la) => la.getLineArc case _ => Double.NaN } } override def setLineArc(lineArc : Double) { lineArcShapes.foreach{_.setLineArc(lineArc)} } override def isRoundCorner = firstLineArc.isDefined && firstLineArc.get.isRoundCorner } LGroupPlot.scala000066400000000000000000000045161321075051700347010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp private[impl] trait LPlotGroup extends IGroup { private def firstPlot = plotShapes.find{_.isTypeOf(classOf[IPlotProp])} private def plotShapes = getShapes.flatMap{case x:IPlotProp => x::Nil; case _ => Nil} override def getYScale: Double = { firstPlot match { case Some(la) => la.getYScale case _ => Double.NaN } } override def setScale(s:Double) { plotShapes.foreach(_.setScale(s)) } override def setYScale(sy:Double) { plotShapes.foreach(_.setYScale(sy)) } override def getXScale: Double = { firstPlot match { case Some(la) => la.getXScale case _ => Double.NaN } } override def setXScale(sx:Double) { plotShapes.foreach(_.setXScale(sx)) } override def isPolar:Boolean= { firstPlot match { case Some(sh) => sh.isPolar case _ => false } } override def setPolar(polar:Boolean) { plotShapes.foreach(_.setPolar(polar)) } override def getPlotStyle: IPlotProp.PlotStyle = { firstPlot match { case Some(la) => la.getPlotStyle case _ => IPlotProp.PlotStyle.CURVE } } override def setPlotStyle(style:IPlotProp.PlotStyle) { plotShapes.foreach(_.setPlotStyle(style)) } override def getPlotEquation: String = { firstPlot match { case Some(la) => la.getPlotEquation case _ => "" } } override def setPlotEquation(eq:String) { plotShapes.foreach(_.setPlotEquation(eq)) } override def getNbPlottedPoints: Int = { firstPlot match { case Some(la) => la.getNbPlottedPoints case _ => 0 } } override def setNbPlottedPoints(nb:Int) { plotShapes.foreach(_.setNbPlottedPoints(nb)) } override def getPlotMinX: Double = { firstPlot match { case Some(la) => la.getPlotMinX() case _ => java.lang.Double.NaN } } override def setPlotMinX(minX:Double) { plotShapes.foreach(_.setPlotMinX(minX)) } override def getPlotMaxX: Double = { firstPlot match { case Some(la) => la.getPlotMaxX() case _ => java.lang.Double.NaN } } override def setPlotMaxX(maxX:Double) { plotShapes.foreach(_.setPlotMaxX(maxX)) } override def getPlottingStep: Double = { firstPlot match { case Some(la) => la.getPlottingStep() case _ => 0 } } } LGroupShape.scala000066400000000000000000000267661321075051700350360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.Color import java.awt.geom.Rectangle2D import scala.collection.JavaConversions.asScalaBuffer import scala.collection.mutable.Buffer import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp import net.sf.latexdraw.glib.models.interfaces.shape.IDot import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid /** * This trait encapsulates the code of the group related to the support of the general shape's properties.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-16
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupShape extends IGroup { override def mirrorHorizontal(origin:IPoint) { getShapes.foreach{_.mirrorHorizontal(origin)} } override def mirrorVertical(origin:IPoint) { getShapes.foreach{_.mirrorVertical(origin)} } override def setThickness(thickness : Double) = getShapes.foreach{_.setThickness(thickness)} override def scale(prevWidth : Double, prevHeight : Double, pos : IShape.Position, bound : Rectangle2D) { val shs:Buffer[IShape] = getShapes if(shs.exists{sh => sh.isInstanceOf[ISquaredShape] || sh.isInstanceOf[IStandardGrid] || sh.isInstanceOf[IDot]}) shs.foreach{_.scaleWithRatio(prevWidth, prevHeight, pos, bound)} else shs.foreach{_.scale(prevWidth, prevHeight, pos, bound)} } override def getThickness: Double = { getShapes.find{_.isThicknessable} match { case Some(sh) => sh.getThickness case _ => Double.NaN } } override def isThicknessable = getShapes.exists{_.isThicknessable} override def isShowPtsable = getShapes.exists{_.isShowPtsable} override def isShowPts = getShapes.exists{shape => shape.isShowPtsable && shape.isShowPts} override def setShowPts(show : Boolean) { getShapes.filter{_.isShowPtsable}.foreach{_.setShowPts(show)} } override def getLineColour: Color = { getShapes.headOption match { case Some(shape) => shape.getLineColour case _ => Color.BLACK } } override def isLineStylable = getShapes.exists{_.isLineStylable} override def getLineStyle: IShape.LineStyle = { getShapes.find{_.isLineStylable} match { case Some(sh) => sh.getLineStyle case _ => IShape.LineStyle.SOLID } } override def setLineStyle(style : IShape.LineStyle) { getShapes.filter{_.isLineStylable}.foreach{_.setLineStyle(style)} } override def isBordersMovable = getShapes.exists{_.isBordersMovable} override def getBordersPosition: IShape.BorderPos = { getShapes.find{_.isBordersMovable} match { case Some(sh) => sh.getBordersPosition case _ => IShape.BorderPos.INTO } } override def setBordersPosition(position : IShape.BorderPos) { getShapes.filter{_.isBordersMovable}.foreach{_.setBordersPosition(position)} } override def setLineColour(lineColour : Color) { getShapes.foreach{_.setLineColour(lineColour)} } override def setDbleBordCol(colour : Color) { getShapes.filter{_.isDbleBorderable}.foreach{_.setDbleBordCol(colour)} } override def getDbleBordCol: Color = { getShapes.find{_.hasDbleBord} match { case Some(sh) => sh.getDbleBordCol case _ => Color.BLACK } } override def hasDbleBord = getShapes.exists{shape => shape.hasDbleBord && shape.isDbleBorderable } override def setHasDbleBord(dbleBorders : Boolean) { getShapes.filter{_.isDbleBorderable}.foreach{_.setHasDbleBord(dbleBorders)} } override def isDbleBorderable = getShapes.exists{_.isDbleBorderable} override def setDbleBordSep(dbleBorderSep : Double) { getShapes.filter{_.isDbleBorderable}.foreach{_.setDbleBordSep(dbleBorderSep)} } override def getDbleBordSep: Double = { getShapes.find{shape => shape.isDbleBorderable && shape.hasDbleBord} match { case Some(sh) => sh.getDbleBordSep case _ => Double.NaN } } override def isShadowable = getShapes.exists{_.isShadowable } override def hasShadow = getShapes.exists{shape => shape.isShadowable && shape.hasShadow } override def setHasShadow(shadow : Boolean) { getShapes.filter{_.isShadowable}.foreach{_.setHasShadow(shadow)} } override def setShadowSize(shadSize : Double) { getShapes.filter{_.isShadowable}.foreach{_.setShadowSize(shadSize)} } override def getShadowSize: Double = { getShapes.find{shape => shape.isShadowable && shape.hasShadow} match { case Some(sh) => sh.getShadowSize case _ => Double.NaN } } override def setShadowAngle(shadAngle : Double) { getShapes.filter{_.isShadowable}.foreach{_.setShadowAngle(shadAngle)} } override def getShadowAngle: Double = { getShapes.find{shape => shape.isShadowable && shape.hasShadow} match { case Some(sh) => sh.getShadowAngle case _ => Double.NaN } } override def setShadowCol(colour : Color) { getShapes.filter{_.isShadowable}.foreach{_.setShadowCol(colour)} } override def getShadowCol: Color = { getShapes.find{shape => shape.isShadowable && shape.hasShadow} match { case Some(sh) => sh.getShadowCol case _ => Color.BLACK } } override def getFillingStyle: IShape.FillingStyle = { getShapes.find{_.isInteriorStylable} match { case Some(sh) => sh.getFillingStyle case _ => IShape.FillingStyle.NONE } } override def setFillingStyle(style : IShape.FillingStyle) { getShapes.filter{_.isInteriorStylable}.foreach{_.setFillingStyle(style)} } override def isFillable = getShapes.exists{_.isFillable } override def isInteriorStylable = getShapes.exists{_.isInteriorStylable } override def setFillingCol(colour : Color) = { getShapes.filter{_.isFillable}.foreach{_.setFillingCol(colour)} } override def getFillingCol: Color = { getShapes.find{shape => shape.isFillable && shape.isFilled} match { case Some(sh) => sh.getFillingCol case _ => Color.BLACK } } override def setHatchingsCol(colour : Color) { getShapes.filter{_.isInteriorStylable}.foreach{_.setHatchingsCol(colour)} } override def getHatchingsCol: Color = { getShapes.find{shape => shape.isInteriorStylable && shape.getFillingStyle.isHatchings} match { case Some(sh) => sh.getHatchingsCol case _ => Color.BLACK } } override def setGradColStart(colour : Color) { getShapes.filter{_.isInteriorStylable}.foreach{_.setGradColStart(colour)} } override def getGradColStart: Color = { getShapes.find{shape => shape.isInteriorStylable && shape.getFillingStyle.isGradient} match { case Some(sh) => sh.getGradColStart case _ => Color.BLACK } } override def setGradColEnd(colour : Color) { getShapes.filter{_.isInteriorStylable}.foreach{_.setGradColEnd(colour)} } override def getGradColEnd: Color = { getShapes.find{shape => shape.isInteriorStylable && shape.getFillingStyle.isGradient} match { case Some(sh) => sh.getGradColEnd case _ => Color.BLACK } } override def setGradAngle(gradAngle : Double) { getShapes.filter{_.isInteriorStylable}.foreach{_.setGradAngle(gradAngle)} } override def getGradAngle: Double = { getShapes.find{shape => shape.isInteriorStylable && shape.getFillingStyle.isGradient} match { case Some(sh) => sh.getGradAngle case _ => Double.NaN } } override def setGradMidPt(gradMidPoint : Double) = { getShapes.filter{_.isInteriorStylable}.foreach{_.setGradMidPt(gradMidPoint)} } override def getGradMidPt: Double = { getShapes.find{shape => shape.isInteriorStylable && shape.getFillingStyle.isGradient} match { case Some(sh) => sh.getGradMidPt case _ => Double.NaN } } override def getHatchingsAngle: Double = { getShapes.find{shape => shape.isInteriorStylable} match { case Some(sh) => sh.getHatchingsAngle case _ => Double.NaN } } override def getHatchingsSep: Double = { getShapes.find{shape => shape.isInteriorStylable} match { case Some(sh) => sh.getHatchingsSep case _ => Double.NaN } } override def getHatchingsWidth: Double = { getShapes.find{shape => shape.isInteriorStylable} match { case Some(sh) => sh.getHatchingsWidth case _ => Double.NaN } } override def setHatchingsAngle(hatchingsAngle : Double) { getShapes.filter{_.isInteriorStylable}.foreach{_.setHatchingsAngle(hatchingsAngle)} } override def setHatchingsSep(hatchingsSep : Double) = { getShapes.filter{_.isInteriorStylable}.foreach{_.setHatchingsSep(hatchingsSep)} } override def setHatchingsWidth(hatchingsWidth : Double) = { getShapes.filter{_.isInteriorStylable}.foreach{_.setHatchingsWidth(hatchingsWidth)} } override def translate(tx : Double, ty : Double) = getShapes.foreach{_.translate(tx, ty)} override def addToRotationAngle(gravCentre : IPoint, angle : Double) = { val gc : IPoint = if(gravCentre==null) getGravityCentre else gravCentre getShapes.foreach{_.addToRotationAngle(gc, angle)} } override def setRotationAngle(rotationAngle : Double) = getShapes.foreach{_.setRotationAngle(rotationAngle)} override def rotate(point : IPoint, angle : Double) = getShapes.foreach{_.rotate(point, angle)} override def getRotationAngle: Double = { getShapes.headOption match { case Some(sh) => sh.getRotationAngle case _ => 0.0 } } override def getGravityCentre: IPoint = { size match { case 0 => ShapeFactory.createPoint case _ => getTopLeftPoint.getMiddlePoint(getBottomRightPoint) } } override def getBottomRightPoint: IPoint = { var x : Double = Double.NaN var y : Double = Double.NaN if(size>0) { var br : IPoint = null x = Double.MinValue y = Double.MinValue getShapes.foreach{shape => br = shape.getBottomRightPoint if(br.getX>x) x = br.getX if(br.getY>y) y = br.getY } } return ShapeFactory.createPoint(x, y) } override def getBottomLeftPoint: IPoint = { var x : Double = Double.NaN var y : Double = Double.NaN if(size>0) { var bl : IPoint = null x = Double.MaxValue y = Double.MinValue getShapes.foreach{shape => bl = shape.getBottomLeftPoint if(bl.getXy) y = bl.getY } } return ShapeFactory.createPoint(x, y) } override def getTopLeftPoint: IPoint = { var x : Double = Double.NaN var y : Double = Double.NaN if(size>0) { var tl : IPoint = null x = Double.MaxValue y = Double.MaxValue getShapes.foreach{shape => tl = shape.getTopLeftPoint if(tl.getX0) { var tr : IPoint = null x = Double.MinValue y = Double.MaxValue getShapes.foreach{shape => tr = shape.getTopRightPoint if(tr.getX>x) x = tr.getX if(tr.getY *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-17
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupStdGrid extends IGroup { /** May return the first stdGrid of the group. */ private def firstIStdGrid = gridShapes.find{_.isTypeOf(classOf[IStdGridProp])} private def gridShapes = getShapes.flatMap{case x:IStdGridProp => x::Nil; case _ => Nil} override def getGridMinX: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridMinX case _ => Double.NaN } override def getGridMaxX: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridMaxX case _ => Double.NaN } override def getGridMinY: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridMinY case _ => Double.NaN } override def getGridMaxY = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridMaxY case _ => Double.NaN } override def getLabelsSize: Int = firstIStdGrid match { case Some(stdGrid) => stdGrid.getLabelsSize case _ => -1 } override def setLabelsSize(labelsSize : Int) { gridShapes.foreach{_.setLabelsSize(labelsSize)} } override def setGridEndX(x : Double) { gridShapes.foreach{_.setGridEndX(x)} } override def setGridEndY(y : Double) { gridShapes.foreach{_.setGridEndY(y)} } override def getGridStartX: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridStartX case _ => Double.NaN } override def getGridStartY: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridStartY case _ => Double.NaN } override def setGridStart(x : Double, y : Double) { gridShapes.foreach{_.setGridStart(x, y)} } override def getGridEndX: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridEndX case _ => Double.NaN } override def getGridEndY: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridEndY case _ => Double.NaN } override def setGridEnd(x : Double, y : Double) { gridShapes.foreach{_.setGridEnd(x, y)} } override def getOriginX: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getOriginX case _ => Double.NaN } override def getOriginY: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getOriginY case _ => Double.NaN } override def setOrigin(x : Double, y : Double) { gridShapes.foreach{_.setOrigin(x, y)} } override def setGridStartY(y : Double) { gridShapes.foreach{_.setGridStartY(y)} } override def setGridStartX(x : Double) { gridShapes.foreach{_.setGridStartX(x)} } override def setOriginX(x : Double) { gridShapes.foreach{_.setOriginX(x)} } override def setOriginY(y : Double) { gridShapes.foreach{_.setOriginY(y)} } override def getStep: Double = firstIStdGrid match { case Some(stdGrid) => stdGrid.getStep case _ => Double.NaN } override def getGridStart: IPoint = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridStart case _ => null } override def getGridEnd: IPoint = firstIStdGrid match { case Some(stdGrid) => stdGrid.getGridEnd case _ => null } } LGroupText.scala000066400000000000000000000033561321075051700347100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IText import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp /** * This trait encapsulates the code of the group related to the support of texts.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-17
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LGroupText extends IGroup { /** May return the first free hand shape of the group. */ private def firstIText = txtShapes.find{_.isTypeOf(classOf[IText])} private def txtShapes = getShapes.flatMap{case x:IText => x::Nil; case _ => Nil} override def getTextPosition: ITextProp.TextPosition = firstIText match { case Some(txt) => txt.getTextPosition case _ => null } override def setTextPosition(textPosition : ITextProp.TextPosition) { txtShapes.foreach{_.setTextPosition(textPosition)} } override def getText: String = firstIText match { case Some(txt) => txt.getText case _ => null } override def setText(text : String) { txtShapes.foreach{_.setText(text)} } } LLine.java000077500000000000000000000235741321075051700335030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.awt.geom.Line2D; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a model of a line. This model must be used only to define other models. * It is not a shape. See the LLines class for the shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/14/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LLine extends Line2D.Double implements ILine { private static final long serialVersionUID = 1L; /** The director coefficient of the line (y=ax+b). */ protected double a; /** y=ax+b. */ protected double b; /** * Constructs a line from the specified coordinates. * @param x1 the X coordinate of the start point. * @param y1 the Y coordinate of the start point. * @param x2 the X coordinate of the end point. * @param y2 the Y coordinate of the end point. * @throws IllegalArgumentException If one of the given coordinate is not valid. */ protected LLine(final double x1, final double y1, final double x2, final double y2) { this(ShapeFactory.createPoint(x1, y1), ShapeFactory.createPoint(x2, y2)); } /** * Creates a line by creating a second point with: * @param b y = ax+ b * @param p1 The first point. * @throws IllegalArgumentException If one of the given parameter is not valid. */ protected LLine(final double b, final IPoint p1) { this(p1, ShapeFactory.createPoint(0,b)); } /** * Constructs a line from the specified Point2D objects. * @param p1 the start Point2D of this line segment. * @param p2 the end Point2D of this line segment. * @throws IllegalArgumentException If one of the given points is not valid. */ protected LLine(final IPoint p1, final IPoint p2) { super(); if(!GLibUtilities.isValidPoint(p1) || !GLibUtilities.isValidPoint(p2)) throw new IllegalArgumentException(); setP1(p1); setP2(p2); updateAandB(); } @Override public void setLine(final double x1, final double y1, final double x2, final double y2) { if(GLibUtilities.isValidPoint(x1, y1) && GLibUtilities.isValidPoint(x2, y2)) { super.setLine(x1, y1, x2, y2); updateAandB(); } } @Override public boolean isInSegment(final IPoint pt) { if(pt==null) return false; final double minX = Math.min(x1, x2); final double maxX = Math.max(x1, x2); final double minY = Math.min(y1, y2); final double maxY = Math.max(y1, y2); final double x = pt.getX(); final double y = pt.getY(); if(isHorizontalLine()) return LNumber.equalsDouble(y, minY) && x>=minX && x<=maxX; if(isVerticalLine()) return LNumber.equalsDouble(x, minX) && y>=minY && y<=maxY; return y>=minY && y<=maxY && x>=minX && x<=maxX && LNumber.equalsDouble(y, getA()*x+getB()); } @Override public void updateAandB() { if(isVerticalLine()) { a = java.lang.Double.NaN; b = java.lang.Double.NaN; } else { a = (y1 -y2)/(x1 - x2); b = y1 - a * x1; } } @Override public IPoint[] findPoints(final IPoint p, final double distance) { return p==null ? null : findPoints(p.getX(), p.getY(), distance); } @Override public IPoint[] findPoints(final double x, final double y, final double distance) { if(!GLibUtilities.isValidPoint(x, y) || !GLibUtilities.isValidCoordinate(distance)) return null; if(LNumber.equalsDouble(distance, 0.)) { final IPoint[] sol = new LPoint[1]; sol[0] = ShapeFactory.createPoint(x,y); return sol; } if(isVerticalLine()) { if(isHorizontalLine())// The line is a point. So no position can be computed. return null; final IPoint[] sol = new LPoint[2]; sol[0] = ShapeFactory.createPoint(x, y-distance); sol[1] = ShapeFactory.createPoint(x, y+distance); return sol; } final double aLine = a*a+1.; final double bLine = -2.*(x+y*a-a*b); final double cLine = b*b-2.*y*b+y*y+x*x-distance*distance; final double delta = bLine*bLine-4.*aLine*cLine; if(delta>0.) { final double x1b; final double x2b; final double y1b; final double y2b; final IPoint[] sol = new LPoint[2]; x1b = (-bLine+Math.sqrt(delta))/(2*aLine); x2b = (-bLine-Math.sqrt(delta))/(2*aLine); y1b = a*x1b+b; y2b = a*x2b+b; sol[0] = ShapeFactory.createPoint(x1b, y1b); sol[1] = ShapeFactory.createPoint(x2b, y2b); return sol; } else if(LNumber.equalsDouble(delta, 0.)) { final double x2b; final double y2b; final IPoint[] sol = new LPoint[1]; x2b = -bLine/2*aLine; y2b = a*x2b+b; sol[0] = ShapeFactory.createPoint(x2b, y2b); return sol; } else return null; } @Override public ILine getPerpendicularLine(final IPoint pt) { /*//TODO if(isVerticalLine()) return new Line(new Point2D.Double(-10000, y), new Point2D.Double(10000, y)); if(isHorizontalLine()) return new Line(new Point2D.Double(x, -10000), new Point2D.Double(x, 10000)); final double a2 = -1./getA(); final double b2 = y-a2*x; return new Line(new Point2D.Double(x, y), new Point2D.Double(-b2/a2, 0.)); */ if(!GLibUtilities.isValidPoint(pt)) return null; if(isVerticalLine())//FIXME must always create a perpendicular line + add test return LNumber.equalsDouble(pt.getX(), x1) ? ShapeFactory.createLine(pt.getY(), ShapeFactory.createPoint(pt)) : null; if(LNumber.equalsDouble(pt.getX(), 0.)) { final IPoint pt3 = ShapeFactory.createPoint(getPoint2()); final IPoint pt2 = pt3.rotatePoint(pt, Math.PI/2.); return ShapeFactory.createLine(pt2, pt); } if(LNumber.equalsDouble(a, 0.)) return ShapeFactory.createLine(pt.getX(), pt.getY(), pt.getX(), pt.getY()-10.); final double a2 = -1./a; return ShapeFactory.createLine(pt.getY()-a2*pt.getX(), pt); } @Override public boolean isVerticalLine() { return LNumber.equalsDouble(x1, x2); } @Override public boolean isHorizontalLine() { return LNumber.equalsDouble(y1, y2); } @Override public IPoint getIntersection(final ILine l) { if(l==null) return null; if(LNumber.equalsDouble(a, l.getA(), 0.00000000001)) return null; final boolean verticalLine1 = isVerticalLine(); final boolean verticalLine2 = l.isVerticalLine(); final double x; final double y; if(verticalLine2) { if(verticalLine1)// The two lines a parallels return null; if(l.isHorizontalLine())// Points of the line l are equal. return null; if(isHorizontalLine()) { x = l.getX1(); y = getY1(); }else { y = a*l.getX1()+b; x = (y-b)/a; } }else { final double la = l.getA(); final double lb = l.getB(); if(verticalLine1) { if(l.isHorizontalLine()) { x = getX1(); y = l.getY1(); } else { y = la*getX1()+lb; x = (y-lb)/la; } }else { x = (b-lb)/(la-a); y = a*x+b; } } return ShapeFactory.createPoint(x, y); } @Override public IPoint getIntersectionSegment(final ILine l) { final IPoint p = getIntersection(l); if(p==null) return null; final double px = p.getX(); final double py = p.getY(); final IPoint tl = getTopLeftPoint(); final IPoint br = getBottomRightPoint(); final IPoint tl2 = l.getTopLeftPoint(); final IPoint br2 = l.getBottomRightPoint(); if(px>=tl.getX() && px<=br.getX() && py>=tl.getY() && py<=br.getY() && px>=tl2.getX() && px<=br2.getX() && py>=tl2.getY() && py<=br2.getY()) return p; return null; } @Override public IPoint getTopLeftPoint() { final IPoint pt1 = getPoint1(); final IPoint pt2 = getPoint2(); return ShapeFactory.createPoint(pt1.getX() *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/14/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ abstract class LModifiablePointsShape extends LShape implements IModifiablePointsShape { /** * Creates the shape. */ protected LModifiablePointsShape() { super(); } @Override public void rotate(final IPoint point, final double angle) { setRotationAngle(point, angle); } public void setRotationAngle(final IPoint gc, final double rotationAngle) { if(GLibUtilities.isValidCoordinate(rotationAngle)) { final double diff = rotationAngle-this.rotationAngle; final IPoint gc2 = gc==null ? getGravityCentre() : gc; super.setRotationAngle(rotationAngle); for(final IPoint pt : points) pt.setPoint(pt.rotatePoint(gc2, diff)); } } @Override public void setRotationAngle(final double rotationAngle) { setRotationAngle(null, rotationAngle); } @Override public boolean setPoint(final IPoint p, final int position) { return p != null && setPoint(p.getX(), p.getY(), position); } @Override public boolean setPoint(final double x, final double y, final int position) { if(!GLibUtilities.isValidPoint(x, y) || position<-1 || position>points.size() || points.isEmpty()) return false; final IPoint p = position==-1 ? points.get(points.size()-1) : points.get(position); p.setPoint(x, y); return true; } @Override public boolean removePoint(final IPoint pt) { if(pt==null) return false; final int ind = points.indexOf(pt); return ind != -1 && removePoint(ind) != null; } @Override public IPoint removePoint(final int position) { if(position>=-1 && positionpoints.size()) return null; final IPoint pRemoved = points.remove(position==-1 ? points.size()-1 : position); if(position==-1 || points.isEmpty()) points.add(pt); else points.add(position, pt); return pRemoved; } @Override public void addPoint(final IPoint pt) { addPoint(pt, -1); } @Override public void addPoint(final IPoint pt, final int position) { if(GLibUtilities.isValidPoint(pt) && position>=-1 && position<=points.size()) if(position==-1 || position==points.size()) points.add(pt); else points.add(position, pt); } } LPicture.java000066400000000000000000000136421321075051700342170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.awt.Image; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import javax.imageio.ImageIO; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.filters.EPSFilter; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPicture; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.util.LPath; import org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D; /** * Defines a model of a picture.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LPicture extends LPositionShape implements IPicture { /** The buffered image. */ protected Image image; /** The path of the eps image. */ protected String pathTarget; /** The path of the source image. */ protected String pathSource; /** * Creates a picture and the corresponding EPS picture. * @param pt The position of the top-left point of the picture. * @throws IllegalArgumentException If the given picture path is not valid. */ protected LPicture(final IPoint pt) { super(pt); } /** * Loads the image using the source path and creates the eps picture. * @throws IOException If the picture cannot be loaded. * @since 3.0 */ protected void loadImage() throws IOException { if(image!=null) { image.flush(); new File(pathTarget).delete(); } image = ImageIO.read(new File(pathSource)); if(image==null) throw new IOException("Picture " + pathSource + " is not a valid picture."); //$NON-NLS-1$ //$NON-NLS-2$ createEPSImage(); } @Override public void copy(final IShape sh) { super.copy(sh); if(sh instanceof IPicture) try{ setPathSource(((IPicture)sh).getPathSource()); } catch(final IOException ex) { BadaboomCollector.INSTANCE.add(ex); } } @Override public void mirrorVertical(final IPoint origin) { final IPoint gc = getGravityCentre(); if(GLibUtilities.isValidPoint(origin) && !origin.equals(gc, 0.0001)) { translate(0d, gc.verticalSymmetry(origin).getY() - gc.getY()); } } @Override public void mirrorHorizontal(final IPoint origin) { final IPoint gc = getGravityCentre(); if(GLibUtilities.isValidPoint(origin) && !origin.equals(gc, 0.0001)) { translate(gc.horizontalSymmetry(origin).getX() - gc.getX(), 0d); } } /** * Creates an EPS image from the source one. * @throws IOException If a problem while reading/writing files occurs. * @since 2.0.0 */ protected void createEPSImage() throws IOException { if(pathSource==null || image==null) return ; final int indexName = pathSource.lastIndexOf(File.separator)+1; final String name = pathSource.substring(indexName, pathSource.lastIndexOf('.'))+EPSFilter.EPS_EXTENSION; final String dirPath = pathSource.substring(0, indexName); pathTarget = dirPath+name; File file = new File(pathTarget); boolean created; try {// We create the output file that will contains the eps picture. created = file.createNewFile(); }catch(final IOException ex) { created = false; } // If created is false, it may mean that the file already exist. if(!created && !file.canWrite()) { pathTarget = LPath.PATH_CACHE_DIR+File.separator+name; file = new File(pathTarget); } // Within jlibeps, graphics are defined using 72 DPI (72/2.54=28,3465 PPC), but latexdraw uses 50 PPC. // That's why, we need the scale the graphics to have a 50 PPC eps picture. final double scale = 72. / PSTricksConstants.INCH_VAL_CM / IShape.PPC;// 72 DPI / 2.54 / 50 PPC try(FileOutputStream finalImage = new FileOutputStream(file)){ final EpsGraphics2D g = new EpsGraphics2D("LaTeXDrawPicture", finalImage, 0, 0, (int)(getWidth()*scale), (int)(getHeight()*scale));//$NON-NLS-1$ g.scale(scale, scale); g.drawImage(image, 0, 0, null); g.flush(); g.close(); } } @Override public IPoint getPosition() { return getTopLeftPoint(); } @Override public IPoint getTopLeftPoint() { return getPtAt(0); } @Override public IPoint getTopRightPoint() { final IPoint pos = getPtAt(0); return ShapeFactory.createPoint(pos.getX()+getWidth(), pos.getY()); } @Override public IPoint getFullBottomRightPoint() { return getBottomRightPoint(); } @Override public IPoint getFullTopLeftPoint() { return getTopLeftPoint(); } @Override public IPoint getBottomRightPoint() { final IPoint pos = getPtAt(0); return ShapeFactory.createPoint(pos.getX()+getWidth(), pos.getY()+getHeight()); } @Override public IPoint getBottomLeftPoint() { final IPoint pos = getPtAt(0); return ShapeFactory.createPoint(pos.getX(), pos.getY()+getHeight()); } @Override public double getHeight() { return image==null ? 0 : image.getHeight(null); } @Override public Image getImage() { return image; } @Override public String getPathSource() { return pathSource; } @Override public String getPathTarget() { return pathTarget; } @Override public double getWidth() { return image==null ? 0 : image.getWidth(null); } @Override public void setPathSource(final String pathSource) throws IOException { this.pathSource = pathSource; loadImage(); } @Override public boolean isColourable() { return false; } } LPlot.scala000066400000000000000000000141601321075051700336600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IPlot import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp import net.sf.latexdraw.parsers.ps.PSFunctionParser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position import net.sf.latexdraw.glib.views.pst.PSTricksConstants import java.awt.Color import java.awt.geom.Rectangle2D /** * Implementation of the plotted function. * @since 3.2 * @author Arnaud Blouin */ private[impl] class LPlot(pt:IPoint, var minX:Double, var maxX:Double, var equation:String, var polar:Boolean) extends LPositionShape(pt) with IPlot with LScalable { private var nbPoints:Int = 50 private var style:IPlotProp.PlotStyle = IPlotProp.PlotStyle.CURVE private var parser:PSFunctionParser = new PSFunctionParser(equation) private var dotStyle = IDotProp.DotStyle.DOT private var dotDiametre = PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM*IShape.PPC+PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM require(GLibUtilities.isValidPoint(pt) && minX style = plot.getPlotStyle nbPoints = plot.getNbPlottedPoints polar = plot.isPolar dotStyle = plot.getDotStyle dotDiametre = plot.getDiametre minX = plot.getPlotMinX maxX = plot.getPlotMaxX xscale = plot.getXScale yscale = plot.getYScale setPlotEquation(plot.getPlotEquation) case dot:IDotProp => dotStyle = dot.getDotStyle dotDiametre = dot.getDiametre case _ => } } override def mirrorVertical(origin:IPoint) { val gc = getGravityCentre if(GLibUtilities.isValidPoint(origin) && !origin.equals(gc, 0.0001)) translate(0, gc.verticalSymmetry(origin).getY-gc.getY) } override def mirrorHorizontal(origin:IPoint) { val gc = getGravityCentre if(GLibUtilities.isValidPoint(origin) && !origin.equals(gc, 0.0001)) translate(gc.horizontalSymmetry(origin).getX-gc.getX, 0) } override def setPlotStyle(style:IPlotProp.PlotStyle) { if(style!=null) this.style = style } override def getPlotStyle = style override def setNbPlottedPoints(nbPts:Int) { if(nbPts>1) nbPoints = nbPts } override def isShowPtsable = false override def isThicknessable = style!=IPlotProp.PlotStyle.DOTS override def isShadowable = style!=IPlotProp.PlotStyle.DOTS override def isLineStylable = style!=IPlotProp.PlotStyle.DOTS override def isInteriorStylable = style!=IPlotProp.PlotStyle.DOTS override def isFillable = style!=IPlotProp.PlotStyle.DOTS || dotStyle.isFillable override def isDbleBorderable = style!=IPlotProp.PlotStyle.DOTS override def getPlottingStep = (maxX-minX)/(nbPoints-1) override def getTopLeftPoint = { val step = getPlottingStep val pos = getPosition ShapeFactory.createPoint(pos.getX+minX*IShape.PPC*xscale, pos.getY-(0 until nbPoints).map{x=>getY(minX+x*step)}.max*IShape.PPC*yscale) } override def getBottomRightPoint = { val step = getPlottingStep val pos = getPosition ShapeFactory.createPoint(pos.getX+maxX*IShape.PPC*xscale, pos.getY-(0 until nbPoints).map{x=>getY(minX+x*step)}.min*IShape.PPC*yscale) } override def getTopRightPoint = { val step = getPlottingStep val pos = getPosition ShapeFactory.createPoint(pos.getX+maxX*IShape.PPC*xscale, pos.getY-(0 until nbPoints).map{x=>getY(minX+x*step)}.max*IShape.PPC*yscale) } override def getBottomLeftPoint = { val step = getPlottingStep val pos = getPosition ShapeFactory.createPoint(pos.getX+minX*IShape.PPC*xscale, pos.getY-(0 until nbPoints).map{x=>getY(minX+x*step)}.min*IShape.PPC*yscale) } protected override def scaleSetPointsWithRatio(pts:java.util.List[IPoint], prevWidth:Double, prevHeight:Double, pos:Position, bound:Rectangle2D) { scaleSetPoints(pts, prevWidth, prevHeight, pos, bound) } protected override def scaleSetPoints(pts:java.util.List[IPoint], prevWidth:Double, prevHeight:Double, pos:Position, bound:Rectangle2D) { pos match { case Position.EAST => getPtAt(0).translate(bound.getWidth-prevWidth, 0.0) case Position.WEST => getPtAt(0).translate(prevWidth-bound.getWidth, 0.0) case Position.SOUTH => getPtAt(0).translate(0.0, bound.getHeight-prevHeight) case Position.NORTH => getPtAt(0).translate(0.0, prevHeight-bound.getHeight) case Position.NE => getPtAt(0).translate(bound.getWidth-prevWidth, prevHeight-bound.getHeight) case Position.NW => getPtAt(0).translate(prevWidth-bound.getWidth, prevHeight-bound.getHeight) case Position.SE => getPtAt(0).translate(bound.getWidth-prevWidth, bound.getHeight-prevHeight) case Position.SW => getPtAt(0).translate(prevWidth-bound.getWidth, bound.getHeight-prevHeight) } } override def getPosition = getPtAt(0) override def getNbPlottedPoints = nbPoints override def getY(x:Double) = parser.getY(x) override def getPlotEquation = equation override def setPlotEquation(eq:String) { if(eq!=null && !eq.isEmpty) { equation = eq parser = new PSFunctionParser(equation) } } override def getPlotMinX = minX override def getPlotMaxX = maxX override def setPolar(pol:Boolean) { polar = pol } override def isPolar = polar override def setPlotMaxX(x:Double) { if(GLibUtilities.isValidCoordinate(x) && x>minX) maxX = x } override def setPlotMinX(x:Double) { if(GLibUtilities.isValidCoordinate(x) && x0.0 && GLibUtilities.isValidCoordinate(diam)) dotDiametre = diam } def setDotFillingCol(col: Color) { setFillingCol(col) } def setDotStyle(dotst: IDotProp.DotStyle) { if(dotst!=null) dotStyle = dotst } }LPoint.java000077500000000000000000000140071321075051700336740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import static java.lang.Math.PI; import static java.lang.Math.atan; import java.awt.geom.Point2D; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a model of a point. This model must be used only to define other models. * It is not a shape. See the LDot class for the shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LPoint extends Point2D.Double implements IPoint { private static final long serialVersionUID = 1L; /** * Creates a Point2D with coordinates (0, 0). */ protected LPoint() { super(); } /** * Creates a point from a IPoint * @param pt The IPoint, if null the default value (0,0) will be used. */ protected LPoint(final IPoint pt) { super(); if(pt==null) setLocation(0, 0); else setLocation(pt.getX(), pt.getY()); } /** * Creates a Point2D with the specified coordinates. * @param x The X-coordinate to set. * @param y The Y-coordinate to set. */ protected LPoint(final double x, final double y) { super(x, y); } @Override public double computeAngle(final IPoint pt) { if(!GLibUtilities.isValidPoint(pt)) return java.lang.Double.NaN; double angle; final double x2 = pt.getX() - x; final double y2 = pt.getY() - y; if(LNumber.equalsDouble(x2, 0.)) { angle = Math.PI/2.; if(y2<0.) angle = Math.PI*2. - angle; } else angle = x2<0. ? Math.PI-atan(-y2/x2) : atan(y2/x2); return angle; } @Override public IPoint zoom(final double zoomLevel) { return ShapeFactory.createPoint(x*zoomLevel, y*zoomLevel); } @Override public double computeRotationAngle(final IPoint pt1, final IPoint pt2) { if(!GLibUtilities.isValidPoint(pt1) || !GLibUtilities.isValidPoint(pt2)) return java.lang.Double.NaN; final double thetaOld = computeAngle(pt1); final double thetaNew = computeAngle(pt2); return thetaNew-thetaOld; } @Override public IPoint centralSymmetry(final IPoint centre) { return rotatePoint(centre, Math.PI); } @Override public IPoint rotatePoint(final IPoint gravityC, final double theta) { if(!GLibUtilities.isValidPoint(gravityC) || !GLibUtilities.isValidCoordinate(theta)) return null; final IPoint pt = ShapeFactory.createPoint(); final double cosTheta; final double sinTheta; double angle = theta; final double gx = gravityC.getX(); final double gy = gravityC.getY(); if(angle<0.) angle = 2.*PI + angle; angle %= 2. * PI; if(LNumber.equalsDouble(angle, 0.)) return (IPoint)clone(); if(LNumber.equalsDouble(angle-PI/2., 0.)) { cosTheta = 0.; sinTheta = 1.; } else if(LNumber.equalsDouble(angle-PI, 0.)) { cosTheta = -1.; sinTheta = 0.; } else if(LNumber.equalsDouble(angle-3.*PI/2., 0.)) { cosTheta = 0.; sinTheta = -1.; } else { cosTheta = Math.cos(angle); sinTheta = Math.sin(angle); } pt.setX(cosTheta * (x - gx) - sinTheta * (y - gy) + gx); pt.setY(sinTheta * (x - gx) + cosTheta * (y - gy) + gy); return pt; } @Override public boolean equals(final IPoint p, final double gap) { return !(!GLibUtilities.isValidCoordinate(gap) || !GLibUtilities.isValidPoint(p)) && LNumber.equalsDouble(x, p.getX(), gap) && LNumber.equalsDouble(y, p.getY(), gap); } @Override public IPoint getMiddlePoint(final IPoint p) { return p==null ? null : ShapeFactory.createPoint((x+p.getX())/2., (y+p.getY())/2.); } @Override public void translate(final double tx, final double ty) { if(GLibUtilities.isValidPoint(tx, ty)) setLocation(x+tx, y+ty); } @Override public IPoint horizontalSymmetry(final IPoint origin) { if(!GLibUtilities.isValidPoint(origin)) return null; return ShapeFactory.createPoint(2.*origin.getX()-x, y); } @Override public IPoint verticalSymmetry(final IPoint origin) { if(!GLibUtilities.isValidPoint(origin)) return null; return ShapeFactory.createPoint(x, 2.*origin.getY() - y); } @Override public void setPoint(final double newX, final double newY) { if(GLibUtilities.isValidPoint(newX, newY)) setLocation(newX, newY); } @Override public void setX(final double newX) { if(GLibUtilities.isValidCoordinate(newX)) x = newX; } @Override public void setY(final double newY) { if(GLibUtilities.isValidCoordinate(newY)) y = newY; } @Override public void setPoint(final IPoint pt) { if(GLibUtilities.isValidPoint(pt)) setLocation(pt.getX(), pt.getY()); } @Override public double distance(final IPoint pt) { return pt==null ? java.lang.Double.NaN : distance(pt.getX(), pt.getY()); } @Override public Point2D.Double toPoint2D() { return new Point2D.Double(x, y); } @Override public void setPoint2D(final Point2D pt) { if(pt!=null) setPoint(pt.getX(), pt.getY()); } @Override public IPoint substract(final IPoint pt) { if(pt==null) return null; return ShapeFactory.createPoint(getX()-pt.getX(), getY()-pt.getY()); } @Override public IPoint normalise() { final double magnitude = magnitude(); return ShapeFactory.createPoint(getX()/magnitude, getY()/magnitude); } @Override public double magnitude() { return Math.sqrt(getX()*getX()+getY()*getY()); } @Override public IPoint add(final IPoint pt) { final IPoint added = ShapeFactory.createPoint((IPoint)this); if(pt!=null) added.translate(pt.getX(), pt.getY()); return added; } } LPolygon.java000066400000000000000000000032621321075051700342300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; /** * Defines a model of a polygon.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LPolygon extends LModifiablePointsShape implements IPolygon { /** * Creates a model with no point. */ protected LPolygon() { super(); } /** * Creates a model with two points. * @throws IllegalArgumentException If one of the two points is null. */ protected LPolygon(final IPoint point, final IPoint point2) { this(); if(point==null || point2==null) throw new IllegalArgumentException(); addPoint(point); addPoint(point2); } @Override public boolean isDbleBorderable() { return true; } @Override public boolean isFillable() { return true; } @Override public boolean isInteriorStylable() { return true; } @Override public boolean isLineStylable() { return true; } @Override public boolean isShadowable() { return true; } @Override public boolean isThicknessable() { return true; } } LPolyline.scala000066400000000000000000000036431321075051700345410ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.ILine import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Defines a view of a polyline.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2008
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] class LPolyline() extends LPolygon() with IPolyline with LArrowableShape { arrows += ShapeFactory.createArrow(this) arrows += ShapeFactory.createArrow(this) /** * Creates a model with two points. */ def this(point:IPoint, point2:IPoint) = { this() require(point!=null && point2!=null) addPoint(point) addPoint(point2) } override def copy(sh:IShape) { super[LPolygon].copy(sh) super[LArrowableShape].copy(sh) } override def getArrowLine(arrow:IArrow) : ILine = { if(getNbPoints<2) return null val index = arrows.indexOf(arrow) index match { case 0 => return ShapeFactory.createLine(points.get(0), points.get(1)) case 1 => return ShapeFactory.createLine(points.get(getNbPoints-1), points.get(getNbPoints-2)) case _ => return null } } override def isFillable = getNbPoints>2 override def shadowFillsShape() = false } LPositionShape.java000066400000000000000000000042471321075051700353720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; /** * Defines a model of a shape that has a position.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ abstract class LPositionShape extends LShape implements IPositionShape { /** * Creates a LPositionShape with a predefined point. * @param pt The position. If pt is not valid, a point at position (0,0) is used. */ protected LPositionShape(final IPoint pt) { super(); points.add(GLibUtilities.isValidPoint(pt) ? pt : ShapeFactory.createPoint()); } @Override public void setPosition(final IPoint pt) { if(pt!=null) setPosition(pt.getX(), pt.getY()); } @Override public void setPosition(final double x, final double y) { if(GLibUtilities.isValidPoint(x, y)) { final IPoint pos = getPosition(); translate(x - pos.getX(), y - pos.getY()); } } @Override public void setX(final double x) { if(GLibUtilities.isValidCoordinate(x)) { final IPoint pos = getPosition(); translate(x - pos.getX(), 0); } } @Override public void setY(final double y) { if(GLibUtilities.isValidCoordinate(y)) { final IPoint pos = getPosition(); translate(0, y - pos.getY()); } } @Override public IPoint getPosition() { return getBottomLeftPoint(); } @Override public double getX() { return getPosition().getX(); } @Override public double getY() { return getPosition().getY(); } } LRectangle.scala000066400000000000000000000023351321075051700346470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Defines a model of a rectangle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private class LRectangle(tl:IPoint, br:IPoint) extends LRectangularShape(tl, br) with IRectangle with LineArcProp { override def copy(sh:IShape) { super.copy(sh) sh match { case prop: ILineArcProp => setLineArc(prop.getLineArc) case _ => } } } LRectangularShape.scala000066400000000000000000000054501321075051700361740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape /** * Defines a model of a rectangular shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/16/2010
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] abstract class LRectangularShape(tl:IPoint, br:IPoint) extends LPositionShape(tl) with IRectangularShape { require(GLibUtilities.isValidPoint(tl) && GLibUtilities.isValidPoint(br) && tl.getX0) { val xPos = points.get(points.size-1).getX + width points.get(1).setX(xPos) points.get(2).setX(xPos) } } override def setHeight(height:Double) { if(GLibUtilities.isValidCoordinate(height) && height>0) { val yPos = points.get(points.size-1).getY - height points.get(0).setY(yPos) points.get(1).setY(yPos) } } override def isBordersMovable = true override def isDbleBorderable = true override def isFillable = true override def isInteriorStylable = true override def isLineStylable = true override def isShadowable = true override def isThicknessable = true } LRhombus.java000066400000000000000000000032311321075051700342140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; /** * Defines a model of a rhombus.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LRhombus extends LRectangularShape implements IRhombus { /** * Creates a rhombus at the bottom-left position (0,0) with width=height=1. */ protected LRhombus() { this(ShapeFactory.createPoint(0.5, -0.5), 1, 1); } /** * Creates a rhombus. * @param centre The centre of the rhombus. * @param width The width of the rhombus. * @param height The height of the rhombus. * @throws IllegalArgumentException If the width or the height is not valid. * @throws NullPointerException If the given point is null. */ protected LRhombus(final IPoint centre, final double width, final double height) { super(ShapeFactory.createPoint(centre.getX()-width/2., centre.getY()-height/2.), ShapeFactory.createPoint(centre.getX()+width/2., centre.getY()+height/2.)); } } LScalable.scala000066400000000000000000000013431321075051700344470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.prop.IScalable import net.sf.latexdraw.glib.models.GLibUtilities /** * Implementation of the interface IScalable * @author Arnaud Blouin * @since 3.2 */ trait LScalable extends IScalable { var xscale:Double = 1.0 var yscale:Double = 1.0 override def setXScale(xscale:Double) { if(xscale>0 && GLibUtilities.isValidCoordinate(xscale)) this.xscale = xscale } override def setYScale(yscale:Double) { if(yscale>0 && GLibUtilities.isValidCoordinate(yscale)) this.yscale = yscale } override def setScale(scale:Double) { setXScale(scale) setYScale(scale) } override def getXScale = xscale override def getYScale = yscale } LSetShapes.scala000066400000000000000000000044071321075051700346440ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import org.malai.mapping.ActiveArrayList import net.sf.latexdraw.glib.models.interfaces.prop.ISetShapesProp import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * This trait implements the ISetShapes interface.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-17
    * @author Arnaud BLOUIN * @since 3.0 */ private[impl] trait LSetShapes extends ISetShapesProp { /** The set of shapes. */ val shapes : java.util.List[IShape] = new ActiveArrayList[IShape]() override def contains(sh : IShape) = if(sh==null) false else shapes.contains(sh) override def addShape(sh : IShape) { if(sh!=null && (!sh.isInstanceOf[ISetShapesProp] || !sh.asInstanceOf[ISetShapesProp].isEmpty)) shapes.add(sh) } override def addShape(sh : IShape, index : Int) = if(sh!=null && index<=shapes.size && (index== -1 || index>=0) && (!sh.isInstanceOf[ISetShapesProp] || !sh.asInstanceOf[ISetShapesProp].isEmpty)) if(index== -1 || index==shapes.size) shapes.add(sh) else shapes.add(index, sh) override def clear() { if(!shapes.isEmpty) shapes.clear } override def getShapeAt(i : Int) : IShape = if(i< -1 || i>=shapes.size) null else i match { case -1 => shapes.get(shapes.size-1) case _ => shapes.get(i) } override def getShapes = shapes override def isEmpty = shapes.isEmpty override def removeShape(sh : IShape) : Boolean = sh match { case null => false case _ => shapes.remove(sh) } override def removeShape(i : Int) : IShape = shapes.isEmpty || i< -1 || i>=shapes.size match { case true => null case false => i== -1 match { case true => shapes.remove(shapes.size-1) case false => shapes.remove(i) } } override def size() = shapes.size } LShape.java000066400000000000000000000545311321075051700336460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import java.awt.Color; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import org.malai.mapping.MappingRegistry; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.util.LNumber; /** * Defines a model of a shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ abstract class LShape implements IShape { /** The thickness of the lines of the shape in pixels. */ protected double thickness; /** The colour of the lines. */ protected Color lineColour; /** The style of the lines. */ protected LineStyle lineStyle; /** The white dash separator for dashed lines in pixel. */ protected double dashSepWhite; /** The black dash separator for dashed lines in pixel. */ protected double dashSepBlack; /** The dot separator for dotted lines. */ protected double dotSep; /** The colour of the interior of the shape. */ protected Color fillingCol; /** The style of the interior of the shape. */ protected FillingStyle fillingStyle; /** The start colour of the gradient. */ protected Color gradColStart; /** The end colour of the gradient. */ protected Color gradColEnd; /** The angle of the gradient in radian. */ protected double gradAngle; /** The middle point of the gradient. */ protected double gradMidPt; /** The separation size between hatchings in pixel. */ protected double hatchingsSep; /** The colour of the hatchings. */ protected Color hatchingsCol; /** The angle of the hatchings in radian. */ protected double hatchingsAngle; /** The thickness of the hatchings in pixel. */ protected double hatchingsWidth; /** The rotation angle of the shape. */ protected double rotationAngle; /** Defines if the points of the shape must be considered. */ protected boolean showPts; /** Defines if the shape has double borders. */ protected boolean hasDbleBord; /** The colour of the double borders. */ protected Color dbleBordCol; /** The separation size of the double borders in pixel. */ protected double dbleBordSep; /** Defines if the shape has a shadow. */ protected boolean hasShadow; /** The colour of the shadow. */ protected Color shadowCol; /** The angle of the shadow in radian. */ protected double shadowAngle; /** The size of the shadow in pixel. */ protected double shadowSize; /** The position of the border of the shape. */ protected BorderPos bordersPosition; /** The points of the shape. */ protected final List points; /** Defined if the shape has been modified. */ protected boolean modified; /** * The second default constructor */ protected LShape() { super(); modified = false; thickness = 2.; rotationAngle = 0.; shadowAngle = -Math.PI / 4.; gradAngle = 0.; hatchingsAngle = 0.; hasShadow = false; hasDbleBord = false; lineStyle = LineStyle.SOLID; lineColour = PSTricksConstants.DEFAULT_LINE_COLOR; dotSep = PSTricksConstants.DEFAULT_DOT_STEP * PPC; dashSepBlack = PSTricksConstants.DEFAULT_DASH_BLACK * PPC; dashSepWhite = PSTricksConstants.DEFAULT_DASH_WHITE * PPC; hatchingsCol = PSTricksConstants.DEFAULT_HATCHING_COLOR; hatchingsSep = PSTricksConstants.DEFAULT_HATCH_SEP * PPC; hatchingsWidth = PSTricksConstants.DEFAULT_HATCH_WIDTH * PPC; fillingStyle = FillingStyle.NONE; fillingCol = PSTricksConstants.DEFAULT_INTERIOR_COLOR; bordersPosition = BorderPos.INTO; dbleBordCol = PSTricksConstants.DEFAULT_DOUBLE_COLOR; dbleBordSep = 6.; shadowCol = PSTricksConstants.DEFAULT_SHADOW_COLOR; shadowSize = PSTricksConstants.DEFAULT_SHADOW_SIZE * PPC; gradColStart = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR; gradColEnd = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR; gradMidPt = PSTricksConstants.DEFAULT_GRADIENT_MID_POINT; showPts = false; points = new ArrayList<>(); } @Override public double getFullThickness() { return isDbleBorderable() && hasDbleBord() ? getThickness()*2.+getDbleBordSep() : getThickness(); } @Override public void copy(final IShape s) { if(s==null) return ; setThickness(s.getThickness()); setRotationAngle(s.getRotationAngle()); setShadowAngle(s.getShadowAngle()); setGradAngle(s.getGradAngle()); setHatchingsAngle(s.getHatchingsAngle()); setHasShadow(s.hasShadow()); setHasDbleBord(s.hasDbleBord()); setLineStyle(s.getLineStyle()); setLineColour(s.getLineColour()); setDotSep(s.getDotSep()); setDashSepBlack(s.getDashSepBlack()); setDashSepWhite(s.getDashSepWhite()); setHatchingsCol(s.getHatchingsCol()); setHatchingsSep(s.getHatchingsSep()); setHatchingsWidth(s.getHatchingsWidth()); setFillingStyle(s.getFillingStyle()); setFillingCol(s.getFillingCol()); setBordersPosition(s.getBordersPosition()); setDbleBordCol(s.getDbleBordCol()); setDbleBordSep(s.getDbleBordSep()); setShadowCol(s.getShadowCol()); setShadowSize(s.getShadowSize()); setGradColStart(s.getGradColStart()); setGradColEnd(s.getGradColEnd()); setGradMidPt(s.getGradMidPt()); setShowPts(s.isShowPts()); copyPoints(s); } protected void copyPoints(final IShape sh) { if(sh==null || !getClass().isInstance(sh)) return ; points.clear(); for(final IPoint pt : sh.getPoints()) points.add(ShapeFactory.createPoint(pt)); } @Override public void addToRotationAngle(final IPoint gravCentre, final double angle) { if(GLibUtilities.isValidCoordinate(angle)) { setRotationAngle(getRotationAngle()+angle); if(gravCentre!=null) { final IPoint gravityCentre = getGravityCentre(); final IPoint rotatedGC = gravityCentre.rotatePoint(gravCentre, angle); translate(rotatedGC.getX()-gravityCentre.getX(), rotatedGC.getY()-gravityCentre.getY()); } } } @Override public double getBorderGap() { switch(bordersPosition) { case MID: return hasDbleBord ? thickness+dbleBordSep/2. : thickness/2.; case OUT: return hasDbleBord ? thickness*2.+dbleBordSep : thickness; case INTO: return 0; } return 0; } @Override public BorderPos getBordersPosition() { return bordersPosition; } @Override public double getDashSepBlack() { return dashSepBlack; } @Override public double getDashSepWhite() { return dashSepWhite; } @Override public Color getDbleBordCol() { return dbleBordCol; } @Override public double getDbleBordSep() { return dbleBordSep; } @Override public double getDotSep() { return dotSep; } @Override public Color getFillingCol() { return fillingCol; } @Override public FillingStyle getFillingStyle() { return fillingStyle; } @Override public IPoint getFullBottomRightPoint() { final double gap = getBorderGap(); final IPoint br = getBottomRightPoint(); br.translate(gap, gap); return br; } @Override public IPoint getFullTopLeftPoint() { final double gap = getBorderGap(); final IPoint tl = getTopLeftPoint(); tl.translate(-gap, -gap); return tl; } @Override public double getGradAngle() { return gradAngle; } @Override public Color getGradColEnd() { return gradColEnd; } @Override public Color getGradColStart() { return gradColStart; } @Override public double getGradMidPt() { return gradMidPt; } @Override public IPoint getGravityCentre() { return points.isEmpty() ? ShapeFactory.createPoint() : getTopLeftPoint().getMiddlePoint(getBottomRightPoint()); } @Override public double getHatchingsAngle() { return hatchingsAngle; } @Override public Color getHatchingsCol() { return hatchingsCol; } @Override public double getHatchingsSep() { return hatchingsSep; } @Override public double getHatchingsWidth() { return hatchingsWidth; } @Override public int getId() { return hashCode(); } @Override public Color getLineColour() { return lineColour; } @Override public LineStyle getLineStyle() { return lineStyle; } @Override public int getNbPoints() { return points.size(); } @Override public List getPoints() { return points; } @Override public IPoint getPtAt(final int position) { final IPoint point; if(points.isEmpty() || position<-1 || position>=points.size()) point = null; else point = position==-1 ? points.get(points.size()-1) : points.get(position); return point; } @Override public double getRotationAngle() { return rotationAngle; } @Override public double getShadowAngle() { return shadowAngle; } @Override public Color getShadowCol() { return shadowCol; } @Override public double getShadowSize() { return shadowSize; } @Override public double getThickness() { return thickness; } @Override public boolean hasDbleBord() { return hasDbleBord; } @Override public boolean hasGradient() { return isInteriorStylable() && fillingStyle==FillingStyle.GRAD; } @Override public boolean hasHatchings() { return isInteriorStylable() && fillingStyle.isHatchings(); } @Override public boolean hasShadow() { return hasShadow; } @Override public boolean isFilled() { return fillingStyle.isFilled(); } @Override public boolean isShowPts() { return showPts; } @Override public boolean isColourable() { return true; } // protected static void scaleX(final List list, final double xRef, final double sx) { // for(final IPoint pt : list) // if(!LNumber.equalsDouble(xRef, pt.getX())) // pt.setX(xRef+(pt.getX()-xRef)*sx); // } // // protected static void scaleY(final List list, final double yRef, final double sy) { // for(final IPoint pt : list) // if(!LNumber.equalsDouble(yRef, pt.getY())) // pt.setY(yRef+(pt.getY()-yRef)*sy); // } // // protected static void scaleXY(final List list, final IPoint ref, final double sx, final double sy) { // final double xRef = ref.getX(); // final double yRef = ref.getY(); // // for(final IPoint pt : list) { // if(!LNumber.equalsDouble(xRef, pt.getX())) // pt.setX(xRef+(pt.getX()-xRef)*sx); // if(!LNumber.equalsDouble(yRef, pt.getY())) // pt.setY(yRef+(pt.getY()-yRef)*sy); // } // } // // // protected void scaleX(final double xRef, final double sx) { // final IPoint tl = getTopLeftPoint(); // final IPoint br = getBottomRightPoint(); // // if(sx>1. || Math.abs(tl.getX()-br.getX())*sx>1.) // scaleX(points, xRef, sx); // } // // // protected void scaleY(final double yRef, final double sy) { // final IPoint tl = getTopLeftPoint(); // final IPoint br = getBottomRightPoint(); // // if(sy>1. || Math.abs(tl.getY()-br.getY())*sy>1.) // scaleY(points, yRef, sy); // } // // // protected void scaleXY(final IPoint ref, final double sx, final double sy) { // final IPoint tl = getTopLeftPoint(); // final IPoint br = getBottomRightPoint(); // // if((sx>1. || Math.abs(tl.getX()-br.getX())*sx>1.) && (sy>1. || Math.abs(tl.getY()-br.getY())*sy>1.)) // scaleXY(points, ref, sx, sy); // System.out.println(sx + " " + sy); // } @Override public void setBordersPosition(final BorderPos position) { if(position!=null && isBordersMovable()) bordersPosition = position; } @Override public void setDashSepBlack(final double dashSepBlack) { if(dashSepBlack>0 && GLibUtilities.isValidCoordinate(dashSepBlack)) this.dashSepBlack = dashSepBlack; } @Override public void setDashSepWhite(final double dashSepWhite) { if(dashSepWhite>0 && GLibUtilities.isValidCoordinate(dashSepWhite)) this.dashSepWhite = dashSepWhite; } @Override public void setDbleBordCol(final Color dbleBordCol) { if(dbleBordCol!=null && isDbleBorderable()) this.dbleBordCol = dbleBordCol; } @Override public void setDbleBordSep(final double dbleBordSep) { if(dbleBordSep>=0 && isDbleBorderable() && GLibUtilities.isValidCoordinate(dbleBordSep)) this.dbleBordSep = dbleBordSep; } @Override public void setDotSep(final double dotSep) { if(dotSep>=0 && GLibUtilities.isValidCoordinate(dotSep)) this.dotSep = dotSep; } @Override public void setFilled(final boolean isFilled) { if(!isFillable()) return; if(isFilled) switch(fillingStyle) { case CLINES: fillingStyle = FillingStyle.CLINES_PLAIN; break; case VLINES: fillingStyle = FillingStyle.VLINES_PLAIN; break; case HLINES: fillingStyle = FillingStyle.HLINES_PLAIN; break; case NONE: fillingStyle = FillingStyle.PLAIN; break; case PLAIN: case GRAD: case CLINES_PLAIN: case HLINES_PLAIN: case VLINES_PLAIN: /* Nothing to do. */ break; } else switch(fillingStyle) { case CLINES_PLAIN: fillingStyle = FillingStyle.CLINES; break; case VLINES_PLAIN: fillingStyle = FillingStyle.VLINES; break; case HLINES_PLAIN: fillingStyle = FillingStyle.HLINES; break; case PLAIN: fillingStyle = FillingStyle.NONE; break; case NONE: case GRAD: case CLINES: case HLINES: case VLINES: /* Nothing to do. */ break; } } @Override public void setFillingCol(final Color fillingCol) { if(fillingCol!=null && isFillable()) this.fillingCol = fillingCol; } @Override public void setFillingStyle(final FillingStyle fillingStyle) { if(fillingStyle!=null && isFillable()) this.fillingStyle = fillingStyle; } @Override public void setGradAngle(final double gradAngle) { if(GLibUtilities.isValidCoordinate(gradAngle) && isInteriorStylable()) this.gradAngle = gradAngle; } @Override public void setGradColEnd(final Color gradColEnd) { if(gradColEnd!=null && isInteriorStylable()) this.gradColEnd = gradColEnd; } @Override public void setGradColStart(final Color gradColStart) { if(gradColStart!=null && isInteriorStylable()) this.gradColStart = gradColStart; } @Override public void setGradMidPt(final double gradMidPt) { if(gradMidPt>=0 && gradMidPt<=1 && isInteriorStylable()) this.gradMidPt = gradMidPt; } @Override public void setHasDbleBord(final boolean hasDbleBord) { if(isDbleBorderable()) this.hasDbleBord = hasDbleBord; } @Override public void setHasShadow(final boolean hasShadow) { if(isShadowable()) this.hasShadow = hasShadow; } @Override public void setHatchingsAngle(final double hatchingsAngle) { if(GLibUtilities.isValidCoordinate(hatchingsAngle) && isInteriorStylable()) this.hatchingsAngle = hatchingsAngle; } @Override public void setHatchingsCol(final Color hatchingsCol) { if(hatchingsCol!=null && isInteriorStylable()) this.hatchingsCol = hatchingsCol; } @Override public void setHatchingsSep(final double hatchingsSep) { if(GLibUtilities.isValidCoordinate(hatchingsSep) && hatchingsSep>=0 && isInteriorStylable()) this.hatchingsSep = hatchingsSep; } @Override public void setHatchingsWidth(final double hatchingsWidth) { if(GLibUtilities.isValidCoordinate(hatchingsWidth) && hatchingsWidth>0 && isInteriorStylable()) this.hatchingsWidth = hatchingsWidth; } @Override public void setLineColour(final Color lineColour) { if(lineColour!=null) this.lineColour = lineColour; } @Override public void setLineStyle(final LineStyle lineStyle) { if(lineStyle!=null && isLineStylable()) this.lineStyle = lineStyle; } @Override public void scale(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { if(bound==null || pos==null) return ; scaleSetPoints(points, prevWidth, prevHeight, pos, bound); } @Override public void scaleWithRatio(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { if(bound==null || pos==null) return ; scaleSetPointsWithRatio(points, prevWidth, prevHeight, pos, bound); } protected void scaleSetPointsWithRatio(final List pts, final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { final double s = Math.max(prevWidth/bound.getWidth(), prevHeight/bound.getHeight()); final IPoint refPt = pos.getReferencePoint(bound); final double refX = refPt.getX(); final double refY = refPt.getY(); for(final IPoint pt : pts) { if(!LNumber.equalsDouble(pt.getX(), refX)) pt.setX(refX+(pt.getX()-refX)*s); if(!LNumber.equalsDouble(pt.getY(), refY)) pt.setY(refY+(pt.getY()-refY)*s); } } protected void scaleSetPoints(final List pts, final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound) { final double sx = prevWidth/bound.getWidth(); final double sy = prevHeight/bound.getHeight(); final boolean xScale = pos.isEast() || pos.isWest(); final boolean yScale = pos.isNorth() || pos.isSouth(); final IPoint refPt = pos.getReferencePoint(bound); final double refX = refPt.getX(); final double refY = refPt.getY(); for(final IPoint pt : pts) { if(xScale && !LNumber.equalsDouble(pt.getX(), refX)) pt.setX(refX+(pt.getX()-refX)*sx); if(yScale && !LNumber.equalsDouble(pt.getY(), refY)) pt.setY(refY+(pt.getY()-refY)*sy); } } @Override public void setRotationAngle(final double rotationAngle) { if(GLibUtilities.isValidCoordinate(rotationAngle)) this.rotationAngle = rotationAngle; } @Override public void setShadowAngle(final double shadowAngle) { if(isShadowable() && GLibUtilities.isValidCoordinate(shadowAngle)) this.shadowAngle = shadowAngle; } @Override public void setShadowCol(final Color shadowCol) { if(shadowCol!=null && isShadowable()) this.shadowCol = shadowCol; } @Override public void setShadowSize(final double shadowSize) { if(isShadowable() && shadowSize>0 && GLibUtilities.isValidCoordinate(shadowSize)) this.shadowSize = shadowSize; } @Override public void setShowPts(final boolean showPts) { if(isShowPtsable()) this.showPts = showPts; } @Override public void setThickness(final double thickness) { if(thickness>0 && isThicknessable() && GLibUtilities.isValidCoordinate(thickness)) this.thickness = thickness; } @Override public boolean shadowFillsShape() { return true; } @Override public void translate(final double tx, final double ty) { if(GLibUtilities.isValidPoint(tx, ty)) for (final IPoint point : points) point.translate(tx, ty); } @Override public void mirrorHorizontal(final IPoint origin) { if(!GLibUtilities.isValidPoint(origin)) return ; IPoint pt1; for(final IPoint pt : points) { pt1 = pt.horizontalSymmetry(origin); if(pt1!=null) pt.setPoint(pt1); } } @Override public void mirrorVertical(final IPoint origin) { if(!GLibUtilities.isValidPoint(origin)) return ; IPoint pt1; for(final IPoint pt : points) { pt1 = pt.verticalSymmetry(origin); if(pt1!=null) pt.setPoint(pt1); } } @Override public IPoint getBottomRightPoint() { final IPoint br = ShapeFactory.createPoint(); if(!points.isEmpty()) { IPoint pt = points.get(0); br.setPoint(pt); for(int i=1, size=points.size(); ibr.getX()) br.setX(pt.getX()); if(pt.getY()>br.getY()) br.setY(pt.getY()); } } return br; } @Override public IPoint getBottomLeftPoint() { final IPoint bl = ShapeFactory.createPoint(); if(!points.isEmpty()) { IPoint pt = points.get(0); bl.setPoint(pt); for(int i=1, size=points.size(); ibl.getY()) bl.setY(pt.getY()); } } return bl; } @Override public IPoint getTopLeftPoint() { final IPoint tl = ShapeFactory.createPoint(); if(!points.isEmpty()) { IPoint pt = points.get(0); tl.setPoint(pt); for(int i=1, size=points.size(); itr.getX()) tr.setX(pt.getX()); if(pt.getY() clazz) { return clazz != null && clazz.isInstance(this); } @Override public double getHeight() { return Math.abs(getBottomLeftPoint().getY()-getTopLeftPoint().getY()); } @Override public double getWidth() { return Math.abs(getTopRightPoint().getX()-getTopLeftPoint().getX()); } } LShapeFactory.scala000066400000000000000000000203611321075051700353320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.geom.Point2D import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape import net.sf.latexdraw.glib.models.interfaces.shape.IAxes import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve import net.sf.latexdraw.glib.models.interfaces.shape.ICircle import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc import net.sf.latexdraw.glib.models.interfaces.shape.IDot import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand import net.sf.latexdraw.glib.models.interfaces.shape.IGrid import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.ILine import net.sf.latexdraw.glib.models.interfaces.shape.IPicture import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.ISquare import net.sf.latexdraw.glib.models.interfaces.shape.IText import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle import net.sf.latexdraw.glib.models.interfaces.shape.IPlot /** * This factory creates shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class LShapeFactory extends IShapeFactory { /** The map that maps types to creation operations. */ val factoryMap: Map[Class[_], () => IShape] = Map( (classOf[IPlot], () => createPlot(createPoint, 1.0, 10.0, "x", false)), (classOf[ICircleArc], () => createCircleArc()), (classOf[LCircleArc], () => createCircleArc()), (classOf[ICircle], () => createCircle()), (classOf[LCircle], () => createCircle()), (classOf[IEllipse], () => createEllipse()), (classOf[LEllipse], () => createEllipse()), (classOf[ISquare], () => createSquare()), (classOf[LSquare], () => createSquare()), (classOf[IRectangle], () => createRectangle()), (classOf[LRectangle], () => createRectangle()), (classOf[ITriangle], () => createTriangle()), (classOf[LTriangle], () => createTriangle()), (classOf[IRhombus], () => createRhombus()), (classOf[LRhombus], () => createRhombus()), (classOf[IPolyline], () => createPolyline()), (classOf[LPolyline], () => createPolyline()), (classOf[IPolygon], () => createPolygon()), (classOf[LPolygon], () => createPolygon()), (classOf[IAxes], () => createAxes(createPoint)), (classOf[LAxes], () => createAxes(createPoint)), (classOf[IGrid], () => createGrid(createPoint)), (classOf[LGrid], () => createGrid(createPoint)), (classOf[IBezierCurve], () => createBezierCurve()), (classOf[LBezierCurve], () => createBezierCurve()), (classOf[IDot], () => createDot(createPoint)), (classOf[LDot], () => createDot(createPoint)), (classOf[IFreehand], () => createFreeHand()), (classOf[LFreehand], () => createFreeHand()), (classOf[IGroup], () => createGroup()), (classOf[LGroup], () => createGroup()), (classOf[IPicture], () => createPicture(createPoint)), (classOf[LPicture], () => createPicture(createPoint)), (classOf[IText], () => createText()), (classOf[LText], () => createText()), (classOf[IPlot], () => createPlot(createPoint, 1, 10, "x", false)), (classOf[LPlot], () => createPlot(createPoint, 1, 10, "x", false))) override def newShape[T <: IShape](shapeClass : java.lang.Class[T]) : Option[T] = shapeClass match { case null => None case _ => try { Some(shapeClass.cast(factoryMap(shapeClass)())) } catch { case ex: Throwable => BadaboomCollector.INSTANCE.add(ex); None } } override def createGroup(sh:IShape):IGroup = { val gp = createGroup() if(sh!=null) gp.addShape(sh) return gp } override def createPlot(pos:IPoint, minX:Double, maxX:Double, eq:String, polar:Boolean) : IPlot = new LPlot(pos, minX, maxX, eq, polar) override def createPoint(pt:Point2D):IPoint = if(pt==null) createPoint else createPoint(pt.getX, pt.getY) override def createDrawing() : IDrawing = new LDrawing() override def createArrow(arrow : IArrow, owner : IArrowableShape) : IArrow = new LArrow(arrow, owner) override def createArrow(owner : IArrowableShape) : IArrow = new LArrow(owner) override def createAxes(pt : IPoint) :IAxes = new LAxes(pt) override def createDot(pt : IPoint) : IDot = new LDot(pt) override def createBezierCurve() : IBezierCurve = new LBezierCurve(true) override def createBezierCurve(point : IPoint, point2 : IPoint) : IBezierCurve = new LBezierCurve(point, point2, true) override def createEllipse(tl : IPoint, br : IPoint) : IEllipse = new LEllipse(tl, br) override def createEllipse() : IEllipse = new LEllipse() override def createTriangle(pos : IPoint, width : Double, height : Double) : ITriangle = new LTriangle(pos, width, height) override def createTriangle() : ITriangle = new LTriangle() override def createRhombus(centre : IPoint, width : Double, height : Double) : IRhombus = new LRhombus(centre, width, height) override def createRhombus() : IRhombus = new LRhombus() override def createPicture(pt : IPoint) : IPicture = new LPicture(pt) override def createGrid(pt : IPoint) : IGrid = new LGrid(pt) override def createFreeHand() : IFreehand = new LFreehand() override def createCircle(pt : IPoint, radius : Double) : ICircle = new LCircle(pt, radius) override def createCircle() : ICircle = createCircle(ShapeFactory.createPoint, 10) override def createGroup() : IGroup = new LGroup() override def createLine(x1 : Double, y1 : Double, x2 : Double, y2 : Double) : ILine = new LLine(x1, y1, x2, y2) override def createLine(b : Double, p1 : IPoint) : ILine = new LLine(b, p1) override def createLine(p1 : IPoint, p2 : IPoint) : ILine = new LLine(p1, p2) override def createPoint() : IPoint = new LPoint() override def createPoint(x : Double, y : Double) : IPoint = new LPoint(x, y) override def createPoint(pt : IPoint) : IPoint = new LPoint(pt) override def createPolyline() : IPolyline = new LPolyline() override def createPolyline(point : IPoint, point2 : IPoint) : IPolyline = new LPolyline(point, point2) override def createPolygon() : IPolygon = new LPolygon() override def createPolygon(point : IPoint, point2 : IPoint) : IPolygon = new LPolygon(point, point2) override def createRectangle() : IRectangle = createRectangle(ShapeFactory.createPoint, ShapeFactory.createPoint(1, 1)) override def createRectangle(pos : IPoint, width : Double, height : Double) : IRectangle = createRectangle(pos, ShapeFactory.createPoint(pos.getX+width, pos.getY+height)) override def createRectangle(tl : IPoint, br : IPoint) : IRectangle = new LRectangle(tl, br) override def createText() : IText = new LText() override def createText(pt : IPoint, text : String) : IText = new LText(pt, text) override def createSquare() : ISquare = createSquare(ShapeFactory.createPoint, 1) override def createSquare(pos : IPoint, width : Double) : ISquare = new LSquare(pos, width) override def createCircleArc(pos : IPoint, width : Double) : ICircleArc = new LCircleArc(pos, width) override def createCircleArc() : ICircleArc = createCircleArc(ShapeFactory.createPoint, 1) override def duplicate(shape : IShape) = if(shape==null) null else shape.duplicate } LSquare.scala000066400000000000000000000023331321075051700342010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.ISquare /** * Defines a model of a square.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ private[impl] class LSquare(pos:IPoint, width:Double) extends LSquaredShape(pos, width) with ISquare with LineArcProp { override def copy(sh:IShape) { super.copy(sh) sh match { case prop: ILineArcProp => setLineArc(prop.getLineArc) case _ => } } } LSquaredShape.scala000066400000000000000000000032501321075051700353250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import java.awt.geom.Rectangle2D import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape import net.sf.latexdraw.util.LNumber private[impl] abstract class LSquaredShape(tl:IPoint, width:Double) extends LPositionShape(tl) with ISquaredShape { require(GLibUtilities.isValidPoint(tl) && width>0 && GLibUtilities.isValidCoordinate(width)) points.add(ShapeFactory.createPoint(tl)) points.add(ShapeFactory.createPoint(tl)) points.add(ShapeFactory.createPoint(tl)) setWidth(width) override def scale(prevWidth:Double, prevHeight:Double, pos:Position, bound:Rectangle2D) { if(bound==null || pos==null) return ; scaleSetPointsWithRatio(points, prevWidth, prevHeight, pos, bound) } override def setWidth(width:Double) { if(GLibUtilities.isValidCoordinate(width) && width>0) { val pt = points.get(points.size-1) val xPos = pt.getX + width val yPos = pt.getY - width points.get(1).setX(xPos) points.get(2).setX(xPos) points.get(0).setY(yPos) points.get(1).setY(yPos) } } override def getHeight = getWidth override def getWidth = points.get(1).getX - points.get(0).getX override def isBordersMovable = true override def isDbleBorderable = true override def isFillable = true override def isInteriorStylable = true override def isLineStylable = true override def isShadowable = true override def isThicknessable = true }LText.java000066400000000000000000000043601321075051700335250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; /** * Defines a model of a text.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LText extends LPositionShape implements IText { /** The text */ protected String text; /** The text position of the text. */ protected TextPosition textPosition; /** * The constructor by default. * @since 3.0 */ protected LText() { this(ShapeFactory.createPoint(), "text"); //$NON-NLS-1$ } /** * @param pt The position of the text. * @param text The text. * @throws IllegalArgumentException If pt is not valid. * @since 3.0 */ protected LText(final IPoint pt, final String text) { super(pt); this.text = text==null || text.isEmpty() ? "text" : text; //$NON-NLS-1$ textPosition = TextPosition.BOT_LEFT; } @Override public String getText() { return text; } @Override public void setText(final String text) { if(text!=null && !text.isEmpty()) this.text = text; } @Override public void copy(final IShape s) { super.copy(s); if(s instanceof ITextProp) { final ITextProp textSh= (ITextProp)s; text = textSh.getText(); textPosition = textSh.getTextPosition(); } } @Override public TextPosition getTextPosition() { return textPosition; } @Override public void setTextPosition(final TextPosition textPosition) { if(textPosition!=null) this.textPosition = textPosition; } } LTriangle.java000066400000000000000000000030001321075051700343340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; /** * Defines a model of a triangle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/05/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LTriangle extends LRectangularShape implements ITriangle { /** * Creates a triangle at the position (0,0). */ protected LTriangle() { this(ShapeFactory.createPoint(), 1, 1); } /** * Creates a triangle. * @param pos The north-west point of the triangle. * @param width The width of the triangle. * @param height The height of the triangle. * @throws IllegalArgumentException If the width or the height is not valid. */ protected LTriangle(final IPoint pos, final double width, final double height) { super(pos, pos==null ? null : ShapeFactory.createPoint(pos.getX()+width, pos.getY()+height)); } } LineArcProp.scala000066400000000000000000000010611321075051700350000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/implpackage net.sf.latexdraw.glib.models.impl import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp import net.sf.latexdraw.glib.models.GLibUtilities /** * Line arc properties. * @author Arnaud Blouin */ private[impl] trait LineArcProp extends ILineArcProp { /** The radius of arcs drawn at the corners of lines. */ var frameArc:Double = 0.0 override def getLineArc = frameArc override def isRoundCorner = frameArc>0 override def setLineArc(arc:Double) { if(GLibUtilities.isValidCoordinate(arc) && arc>=0 && arc<=1) frameArc = arc } }latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/000077500000000000000000000000001321075051700330605ustar00rootroot00000000000000prop/000077500000000000000000000000001321075051700337615ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfacesIArcProp.java000066400000000000000000000047171321075051700363140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import java.awt.geom.Arc2D; import net.sf.latexdraw.lang.LangTool; /** * Properties of arc shapes. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IArcProp { /** The different styles of arc. */ enum ArcStyle { WEDGE { @Override public boolean supportArrow() { return false; } @Override public String getLabel() { return LangTool.INSTANCE.getStringOthers("Arc.arc"); }//$NON-NLS-1$ @Override public int getJava2DArcStyle() { return Arc2D.PIE;} }, ARC { @Override public boolean supportArrow() { return true; } @Override public String getLabel() { return LangTool.INSTANCE.getStringOthers("Arc.wedge"); }//$NON-NLS-1$ @Override public int getJava2DArcStyle() { return Arc2D.OPEN;} }, CHORD { @Override public boolean supportArrow() { return false; } @Override public String getLabel() { return LangTool.INSTANCE.getStringOthers("Arc.chord"); }//$NON-NLS-1$ @Override public int getJava2DArcStyle() { return Arc2D.CHORD;} }; /** * @return True if the arc type can have arrows. * @since 3.0.0 */ public abstract boolean supportArrow(); /** * @return The translated label of the arc type. * @since 3.0 */ public abstract String getLabel(); /** * @return The Java value corresponding to the arc style. * @since 3.1 */ public abstract int getJava2DArcStyle(); } /** * @return the style of the arc. * @since 3.0.0 */ ArcStyle getArcStyle(); /** * @param style the arc style to set. * @since 3.0.0 */ void setArcStyle(final ArcStyle style); /** * @return the angleStart. * @since 3.0.0 */ double getAngleStart(); /** * @param angleStart the angleStart to set. * @since 3.0.0 */ void setAngleStart(final double angleStart); /** * @return the angleEnd. * @since 3.0.0 */ double getAngleEnd(); /** * @param angleEnd the angleEnd to set. * @since 3.0.0 */ void setAngleEnd(final double angleEnd); } IArrowable.java000066400000000000000000000063241321075051700366600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; /** * Defines an interface to share operations on arrow's properties.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/07/2011
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IArrowable { /** * Sets the latex parameter dotsize dim. * @param dotSizeDim The new dotsize dim. * @since 3.0 */ void setDotSizeDim(final double dotSizeDim); /** * Sets the latex parameter dotsize num. * @param dotSizeNum The new dotsize num. * @since 3.0 */ void setDotSizeNum(final double dotSizeNum); /** * Sets the latex parameter tbarsize num. * @param tbarSizeNum The new tbarsize num. * @since 3.0 */ void setTBarSizeNum(final double tbarSizeNum); /** * Sets the latex parameter tbarsize num. * @param tbarSizeDim The new tbarsize num. * @since 3.0 */ void setTBarSizeDim(final double tbarSizeDim); /** * @return The tbarsize dim parameter. * @since 3.0 */ double getTBarSizeDim(); /** * @return The tbarsize num parameter. * @since 3.0 */ double getTBarSizeNum(); /** * Sets the latex parameter rbracket num. * @param rBracketNum The new rbracket num. * @since 3.0 */ void setRBracketNum(final double rBracketNum); /** * Sets the latex parameter bracket num. * @param bracketNum The new bracket num. * @since 3.0 */ void setBracketNum(final double bracketNum); /** * Defines the length of the arrow. * @param lgth The new length of the arrow. * @since 3.0 */ void setArrowLength(final double lgth); /** * Sets the latex parameter arrowSize num. * @param arrowSizeDim The new arrowSize num. * @since 3.0 */ void setArrowSizeDim(final double arrowSizeDim); /** * Sets the latex parameter arrowSize num. * @param arrowSizeNum The new arrowSize num. * @since 3.0 */ void setArrowSizeNum(final double arrowSizeNum); /** * Defines the inset of the arrow. * @param inset The new inset. * @since 3.0 */ void setArrowInset(final double inset); /** * @return The dotsize dim parameter. * @since 3.0 */ double getDotSizeDim(); /** * @return The dotsize num parameter. * @since 3.0 */ double getDotSizeNum(); /** * @return The bracket num parameter. * @since 3.0 */ double getBracketNum(); /** * @return The arrowsize num parameter. * @since 3.0 */ double getArrowSizeNum(); /** * @return The arrowsize dim parameter. * @since 3.0 */ double getArrowSizeDim(); /** * @return The inset of the arrow. * @since 3.0 */ double getArrowInset(); /** * @return The length of the arrow. * @since 3.0 */ double getArrowLength(); /** * @return The rbracket parameter. * @since 3.0 */ double getRBracketNum(); } IAxesProp.java000066400000000000000000000206261321075051700365040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.lang.LangTool; /** * Groups axes' properties. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IAxesProp extends IStdGridProp { /** Defines the different kinds of axes. */ enum AxesStyle { AXES { @Override public String getPSTToken() {return PSTricksConstants.TOKEN_AXES_STYLE_AXES;} @Override public boolean supportsArrows() {return true;} @Override public String toString() {return LangTool.INSTANCE.getString18("Axe.1");}//$NON-NLS-1$ }, FRAME { @Override public String getPSTToken() {return PSTricksConstants.TOKEN_AXES_STYLE_FRAME;} @Override public boolean supportsArrows() {return false;} @Override public String toString() {return LangTool.INSTANCE.getString18("Axe.2");}//$NON-NLS-1$ }, NONE { @Override public String getPSTToken() {return PSTricksConstants.TOKEN_AXES_STYLE_NONE;} @Override public boolean supportsArrows() {return false;} @Override public String toString() {return "None";}//$NON-NLS-1$ }; /** * @return True if the axe style supports arrows. * @since 3.0 */ public abstract boolean supportsArrows(); /** * @return The PST token corresponding to the axe style. * @since 3.0 */ public abstract String getPSTToken(); /** * @param style The PST token or the name of the style (e.g. AXES.toString()) corresponding to the style to get. * @return The corresponding style or null. * @since 3.0 */ public static AxesStyle getStyle(final String style) { return style==null ? null : style.equals(PSTricksConstants.TOKEN_AXES_STYLE_AXES) || style.equals(AXES.toString()) ? AXES : style.equals(PSTricksConstants.TOKEN_AXES_STYLE_FRAME) || style.equals(FRAME.toString()) ? FRAME : style.equals(PSTricksConstants.TOKEN_AXES_STYLE_NONE) || style.equals(NONE.toString()) ? NONE : null; } } /** Defines the different kinds of ticks. */ enum TicksStyle { FULL { @Override public boolean isTop() {return true;} @Override public boolean isBottom() {return true;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_TICKS_STYLE_FULL;} @Override public String toString() {return LangTool.INSTANCE.getString18("Axe.3");}//$NON-NLS-1$ }, TOP { @Override public boolean isTop() {return true;} @Override public boolean isBottom() {return false;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_TICKS_STYLE_TOP;} @Override public String toString() {return LangTool.INSTANCE.getString18("Axe.4");}//$NON-NLS-1$ }, BOTTOM { @Override public boolean isTop() {return false;} @Override public boolean isBottom() {return true;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM;} @Override public String toString() {return LangTool.INSTANCE.getString18("Axe.5");}//$NON-NLS-1$ }; /** * @return The PST token corresponding to the tick style. * @since 3.0 */ public abstract String getPSTToken(); /** * @return True if the current tick style considers the top ticks. * @since 3.0 */ public abstract boolean isTop(); /** * @return True if the current tick style considers the bottom ticks. * @since 3.0 */ public abstract boolean isBottom(); /** * @param style The style to check. Can be the PST token or the name of the style (e.g. FULL.toString()). * @return The corresponding style or null. * @since 3.0 */ public static TicksStyle getStyle(final String style) { if(style==null) return null; if(PSTricksConstants.TOKEN_TICKS_STYLE_FULL.equals(style) || FULL.toString().equals(style)) return FULL; if(PSTricksConstants.TOKEN_TICKS_STYLE_TOP.equals(style) || TOP.toString().equals(style)) return TOP; if(PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM.equals(style) || BOTTOM.toString().equals(style)) return BOTTOM; return null; } } /** Defines the different style of labels. */ enum PlottingStyle { ALL { @Override public boolean isX() {return true;} @Override public boolean isY() {return true;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL;} }, X { @Override public boolean isX() {return true;} @Override public boolean isY() {return false;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_LABELS_DISPLAYED_X;} }, Y { @Override public boolean isX() {return false;} @Override public boolean isY() {return true;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y;} }, NONE { @Override public boolean isX() {return false;} @Override public boolean isY() {return false;} @Override public String getPSTToken() {return PSTricksConstants.TOKEN_LABELS_DISPLAYED_NONE;} }; @Override public String toString() { return getPSTToken(); } /** * @return The PST token corresponding to the labels style. * @since 3.0 */ public abstract String getPSTToken(); /** * @return True if the current style supports the X-axis. * @since 3.0 */ public abstract boolean isX(); /** * @return True if the current style supports the Y-axis. * @since 3.0 */ public abstract boolean isY(); /** * The style that corresponds to the given string. * @param style The style to check. * @return The corresponding style or null. * @since 3.0 */ public static PlottingStyle getStyle(final String style) { if(style==null) return null; if(style.equals(ALL.toString())) return ALL; if(style.equals(Y.toString())) return Y; if(style.equals(X.toString())) return X; if(style.equals(NONE.toString())) return NONE; return null; } } /** * @return The X increment of the axes. * @since 3.0 */ double getIncrementX(); /** * @return The Y increment of the axes. * @since 3.0 */ double getIncrementY(); /** * @return The increments of the axes. * @since 3.0 */ IPoint getIncrement(); /** * @param increment the X increment to set. */ void setIncrementX(final double increment); /** * @param increment the Y increment to set. */ void setIncrementY(final double increment); /** * @param increment The axes' increment to set. */ void setIncrement(final IPoint increment); /** * @return The distance between the labels of the axes. */ IPoint getDistLabels(); /** * @return the distLabels.x. */ double getDistLabelsX(); /** * @return the distLabels.y. */ double getDistLabelsY(); /** * @param distLabels The distance between the labels of the axes. */ void setDistLabels(final IPoint distLabels); /** * @param distLabelsX the distLabels.x to set. */ void setDistLabelsX(final double distLabelsX); /** * @param distLabelsY the distLabels.y to set. */ void setDistLabelsY(final double distLabelsY); /** * @return the labelsDisplayed. */ PlottingStyle getLabelsDisplayed(); /** * @param labelsDisplayed the labelsDisplayed to set. */ void setLabelsDisplayed(final PlottingStyle labelsDisplayed); /** * @return the showOrigin. */ boolean isShowOrigin(); /** * @param showOrigin the showOrigin to set. */ void setShowOrigin(final boolean showOrigin); /** * @return the ticksDisplayed. */ PlottingStyle getTicksDisplayed(); /** * @param ticksDisplayed the ticksDisplayed to set. */ void setTicksDisplayed(final PlottingStyle ticksDisplayed); /** * @return the ticksStyle. */ TicksStyle getTicksStyle(); /** * @param ticksStyle the ticksStyle to set. */ void setTicksStyle(final TicksStyle ticksStyle); /** * @return the ticksSize. */ double getTicksSize(); /** * @param ticksSize the ticksSize to set. */ void setTicksSize(final double ticksSize); /** * @return the axesStyle. */ AxesStyle getAxesStyle(); /** * @param axesStyle the axesStyle to set. */ void setAxesStyle(final AxesStyle axesStyle); } IDotProp.java000066400000000000000000000131431321075051700363260ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import java.awt.Color; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; /** * Properties of dot shapes. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IDotProp { /** The different styles of dot. */ enum DotStyle { ASTERISK { @Override public String getPSTToken() {return PSTricksConstants.ASTERISK_STYLE;} }, BAR { @Override public String getPSTToken() {return PSTricksConstants.BAR_STYLE;} }, OPLUS { @Override public String getPSTToken() {return PSTricksConstants.OPLUS_STYLE;} }, OTIMES { @Override public String getPSTToken() {return PSTricksConstants.OTIMES_STYLE;} }, PLUS { @Override public String getPSTToken() {return PSTricksConstants.PLUS_STYLE;} }, DOT { @Override public String getPSTToken() {return PSTricksConstants.DOT_STYLE;} }, X { @Override public String getPSTToken() {return PSTricksConstants.X_STYLE;} }, FDIAMOND { @Override public String getPSTToken() {return PSTricksConstants.FDIAMOND_STYLE;} }, FTRIANGLE { @Override public String getPSTToken() {return PSTricksConstants.FTRIANGLE_STYLE;} }, FPENTAGON { @Override public String getPSTToken() {return PSTricksConstants.FPENTAGON_STYLE;} }, DIAMOND { @Override public boolean isFillable() { return true; } @Override public String getPSTToken() {return PSTricksConstants.DIAMOND_STYLE;} }, O { @Override public boolean isFillable() { return true; } @Override public String getPSTToken() {return PSTricksConstants.O_STYLE;} }, TRIANGLE { @Override public boolean isFillable() { return true; } @Override public String getPSTToken() {return PSTricksConstants.TRIANGLE_STYLE;} }, PENTAGON { @Override public boolean isFillable() { return true; } @Override public String getPSTToken() {return PSTricksConstants.PENTAGON_STYLE;} }, SQUARE { @Override public boolean isFillable() { return true; } @Override public String getPSTToken() {return PSTricksConstants.SQUARE_STYLE;} }, FSQUARE { @Override public String getPSTToken() {return PSTricksConstants.FSQUARE_STYLE;} }; /** * Allows to know if the dot shape can be filled. * @return True if the dot can be filled. */ public boolean isFillable() { return false; } /** * @return The PSTricks token corresponding to the dot style. * @since 3.0 */ public abstract String getPSTToken(); /** * @param styleName The style to get (in PST or the name of the style, e.g. FSQUARE.toString()) * @return The style which name is the given name style or null. * @since 3.0 */ public static DotStyle getStyle(final String styleName) { if(styleName==null) return null; if(FSQUARE.name().equals(styleName) || PSTricksConstants.FSQUARE_STYLE.equals(styleName)) return FSQUARE; if(SQUARE.name().equals(styleName) || PSTricksConstants.SQUARE_STYLE.equals(styleName)) return SQUARE; if(PENTAGON.name().equals(styleName) || PSTricksConstants.PENTAGON_STYLE.equals(styleName)) return PENTAGON; if(TRIANGLE.name().equals(styleName) || PSTricksConstants.TRIANGLE_STYLE.equals(styleName)) return TRIANGLE; if(O.name().equals(styleName) || PSTricksConstants.O_STYLE.equals(styleName)) return O; if(DIAMOND.name().equals(styleName) || PSTricksConstants.DIAMOND_STYLE.equals(styleName)) return DIAMOND; if(FPENTAGON.name().equals(styleName) || PSTricksConstants.FPENTAGON_STYLE.equals(styleName)) return FPENTAGON; if(FTRIANGLE.name().equals(styleName) || PSTricksConstants.FTRIANGLE_STYLE.equals(styleName)) return FTRIANGLE; if(FDIAMOND.name().equals(styleName) || PSTricksConstants.FDIAMOND_STYLE.equals(styleName)) return FDIAMOND; if(X.name().equals(styleName) || PSTricksConstants.X_STYLE.equals(styleName)) return X; if(DOT.name().equals(styleName) || PSTricksConstants.DOT_STYLE.equals(styleName)) return DOT; if(PLUS.name().equals(styleName) || PSTricksConstants.PLUS_STYLE.equals(styleName)) return PLUS; if(OTIMES.name().equals(styleName) || PSTricksConstants.OTIMES_STYLE.equals(styleName)) return OTIMES; if(OPLUS.name().equals(styleName) || PSTricksConstants.OPLUS_STYLE.equals(styleName)) return OPLUS; if(BAR.name().equals(styleName) || PSTricksConstants.BAR_STYLE.equals(styleName)) return BAR; if(ASTERISK.name().equals(styleName) || PSTricksConstants.ASTERISK_STYLE.equals(styleName)) return ASTERISK; return null; } } /** * @return The style of the dot. * @since 3.0 */ DotStyle getDotStyle(); /** * Defines the style of the dot. * @param style The new style. * @since 3.0 */ void setDotStyle(final DotStyle style); /** * @return the diametre of the dot. * @since 3.0 */ double getDiametre(); /** * Defines the diametre of the dot. * @param diametre the diametre to set. Must be greater than 0. * @since 3.0 */ void setDiametre(final double diametre); /** * @return The filling colour of the dottable or null if not fillable. * @since 3.0 */ Color getDotFillingCol(); /** * Sets the filling colour of the dottable. * @param fillingCol its new colour. * @since 3.0 */ void setDotFillingCol(final Color fillingCol); } IFreeHandProp.java000066400000000000000000000030701321075051700372520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; /** * Defines properties of freehand shapes. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IFreeHandProp { /** The different types of freehand. */ enum FreeHandType { CURVES, LINES; /** * @param type The type to check. * @return The corresponding type. Returns CURVES by default. * @since 3.0 */ public static FreeHandType getType(final String type) { for(final FreeHandType fh : values()) if(fh.toString().equals(type)) return fh; return CURVES; } } /** * @return the type. * @since 3.0 */ FreeHandType getType(); /** * @param type the type to set. * @since 3.0 */ void setType(final FreeHandType type); /** * @return the open. * @since 3.0 */ boolean isOpen(); /** * @param open the open to set. * @since 3.0 */ void setOpen(final boolean open); /** * @return the interval. * @since 3.0 */ int getInterval(); /** * @param interval the interval to set. * @since 3.0 */ void setInterval(final int interval); } IGridProp.java000066400000000000000000000051161321075051700364660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import java.awt.Color; /** * Groups properties of grids. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IGridProp extends IStdGridProp { /** * @return Returns the gridDots. */ int getGridDots(); /** * @param gridDots The gridDots to set. Must be greater or equal than 0. */ void setGridDots(final int gridDots); /** * @return Returns the gridLabelsColor. */ Color getGridLabelsColour(); /** * @param gridLabelsColour The gridLabelsColor to set. */ void setGridLabelsColour(final Color gridLabelsColour); /** * @return the isXLabelSouth. */ boolean isXLabelSouth(); /** * @param isXLabelSouth the isXLabelSouth to set. */ void setXLabelSouth(final boolean isXLabelSouth); /** * @return the isYLabelWest. */ boolean isYLabelWest(); /** * @param isYLabelWest the isYLabelWest to set. */ void setYLabelWest(final boolean isYLabelWest); /** * @return Returns the gridWidth. */ double getGridWidth(); /** * @param gridWidth The gridWidth to set. Must be greater than 0. */ void setGridWidth(final double gridWidth); /** * @return Returns the subGridColor. */ Color getSubGridColour(); /** * @param subGridColour The subGridColor to set. */ void setSubGridColour(final Color subGridColour); /** * @return Returns the subGridDiv. */ int getSubGridDiv(); /** * @param subGridDiv The subGridDiv to set. Must be greater or equal than 0. */ void setSubGridDiv(final int subGridDiv); /** * @return Returns the subGridDots. */ int getSubGridDots(); /** * @param subGridDots The subGridDots to set. Must be greater or equal than 0. */ void setSubGridDots(final int subGridDots); /** * @return Returns the subGridWidth. */ double getSubGridWidth(); /** * @param subGridWidth The subGridWidth to set. Must be greater than 0. */ void setSubGridWidth(final double subGridWidth); /** * @param unit The unit to set. Must be greater than 0. */ void setUnit(final double unit); /** * @return Returns the unit. */ double getUnit(); } ILineArcProp.java000066400000000000000000000020621321075051700371130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; /** * Defines an interface that classes defining a shape that * can have round corners should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ILineArcProp { /** * @return the lineArc. */ double getLineArc(); /** * @param lineArc the lineArc to set. Must be in [0,1] */ void setLineArc(final double lineArc); /** * @return the isCornerRound. */ boolean isRoundCorner(); } IPlotProp.java000066400000000000000000000067601321075051700365250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; /** * Plot shapes' properties. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IPlotProp extends IScalable, IDotProp{ /** * The different possible plotting styles. */ enum PlotStyle { CURVE { @Override public String getPSTToken() { return "curve"; } //$NON-NLS-1$ }, LINE { @Override public String getPSTToken() { return "line";} //$NON-NLS-1$ }, DOTS { @Override public String getPSTToken() { return "dots";} //$NON-NLS-1$ }, POLYGON { @Override public String getPSTToken() { return "polygon";} //$NON-NLS-1$ }, ECURVE { @Override public String getPSTToken() { return "ecurve";} //$NON-NLS-1$ }, CCURVE { @Override public String getPSTToken() {return "ccurve";} //$NON-NLS-1$ }; /** @return The PST token corresponding to the plot style. */ public abstract String getPSTToken(); /** * @param latexToken The latex token to check. * @return The style corresponding to the PSTricks token given as parameter, or CURVE otherwise. * @since 3.2 */ public static PlotStyle getPlotStyle(final String latexToken) { for(final PlotStyle fh : values()) if(fh.getPSTToken().equals(latexToken)) return fh; return CURVE; } } /** * @return True if the plot is defined for polar coordinates (false: for a cartesian coordinates). * @since 3.3 */ boolean isPolar(); /** * Sets if the plot is defined for a radial or a cartesian system. * @param polar True: polar, false: cartesian * @since 3.3 */ void setPolar(final boolean polar); /** * @return The equation. */ String getPlotEquation(); /** * Sets the equation. * @param equation The equation to set. Nothing done if null or empty. * @throws InvalidFormatPSFunctionException When the given equation is not valid. */ void setPlotEquation(final String equation); /** * @return Returns the X-min value of the plotted function. */ double getPlotMinX(); /** * Sets the X-min value of the plotted function. * @param minX The X-min value of the plotted function. Must be lower than X-max. */ void setPlotMinX(final double minX); /** * @return Returns the X-max value of the plotted function. */ double getPlotMaxX(); /** * Sets the X-max value of the plotted function. * @param maxX The X-max value of the plotted function. Must be greater than X-min. */ void setPlotMaxX(final double maxX); /** * @return the nbPoints. */ int getNbPlottedPoints(); /** * Sets the number of points to plot. * @param nbPlottedPoints The number of points to plot. Must be greater than 1. */ void setNbPlottedPoints(final int nbPlottedPoints); /** * @return The step between the points to plot. */ double getPlottingStep(); /** @return The current plot style. */ PlotStyle getPlotStyle(); /** * Sets the plot style. * @param style The new plot style. Nothing done if null. */ void setPlotStyle(final PlotStyle style); } IScalable.java000066400000000000000000000024071321075051700364460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; /** * An interface for shapes having X/Y scale properties. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @since 3.2 */ public interface IScalable { /** * Sets the X-scale of the shape. * @param xscale The new X-scale in ]0;+inf[ */ void setXScale(final double xscale); /** * Sets the Y-scale of the shape. * @param yscale The new Y-scale in ]0;+inf[ */ void setYScale(final double yscale); /** * Sets both Y and X scales of the shape. * @param scale The new Y and X scale in ]0;+inf[ */ void setScale(final double scale); /** * @return The X-scale of the shape. */ double getXScale(); /** * @return The Y-scale of the shape. */ double getYScale(); } ISetShapesProp.java000066400000000000000000000052201321075051700374740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines an interface of a set of shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/22/2010
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ISetShapesProp { /** * Adds a shape to the drawing. * @param s The shape to add. Does nothing if the given shape is null. */ void addShape(final IShape s); /** * Adds a shape to the drawing at at given position. * @param s The shape to add. Does nothing if the given shape is null. * @param index The position where the figure must be inserted. Does nothing if the given position is not valid. */ void addShape(final IShape s, final int index); /** * Removes a shape of the drawing. * @param s The shape to remove. * @return true if the given shape is removed. False if the given shape is null. */ boolean removeShape(final IShape s); /** * Removes a shape of the drawing a the given position. * @param i the position of the shape in the vector (-1: the last shape of the vector). * @return The deleted shape if it exists. Null if the given position is not valid. * @since 1.9.1 */ IShape removeShape(final int i); /** * Allows to get the shape located at the given position. * @param i The position of the figure (-1: the last shape of the drawing). * @return The searched shape if it exists. Null if the given position is not valid. */ IShape getShapeAt(final int i); /** * Allows to get the number of shapes that contains the drawing. * @return The number of shapes in the drawing. */ int size(); /** * Allows to know if a shape is in the drawing. * @param s The shape to check. * @return True if the shape is in the drawing. False when the given shape is null. */ boolean contains(final IShape s); /** * Allows to know if the drawing is empty or not. * @return True if there is at least one shape in the drawing. */ boolean isEmpty(); /** * Empties the drawing. */ void clear(); /** * @return The shapes of the drawing. */ List getShapes(); } IStdGridProp.java000066400000000000000000000063461321075051700371470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; /** * Defines the properties of standard grids. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface IStdGridProp { /** * @return The minimal X-tick of the grid. * @since 3.0 */ double getGridMinX(); /** * @return The maximal X-tick of the grid. * @since 3.0 */ double getGridMaxX(); /** * @return The minimal Y-tick of the grid. * @since 3.0 */ double getGridMinY(); /** * @return The maximal Y-tick of the grid. * @since 3.0 */ double getGridMaxY(); /** * @return The size of the labels. * @since 3.0 */ int getLabelsSize(); /** * Defines the size of the labels. * @param labelsSize The new size of the labels. * @since 3.0 */ void setLabelsSize(final int labelsSize); /** * @param x The x-coordinate to set. */ void setGridEndX(final double x); /** * @param y The y-coordinate to set. */ void setGridEndY(final double y); /** * @return The x-coordinate of the starting point of the grid. */ double getGridStartX(); /** * @return The y-coordinate of the starting point of the grid. */ double getGridStartY(); /** * @return The starting point of the grid. * @since 3.0 */ IPoint getGridStart(); /** * @return The ending point of the grid. * @since 3.0 */ IPoint getGridEnd(); /** * @param x The x-coordinate of the starting point of the grid. * @param y The y-coordinate of the starting point of the grid. */ void setGridStart(final double x, final double y); /** * @return The x-coordinate of the ending point of the grid. */ double getGridEndX(); /** * @return The y-coordinate of the ending point of the grid. */ double getGridEndY(); /** * @param x The x-coordinate of the ending point of the grid. * @param y The y-coordinate of the ending point of the grid. */ void setGridEnd(final double x, final double y); /** * @return The x-coordinate of the origin. */ double getOriginX(); /** * @return The y-coordinate of the origin. */ double getOriginY(); /** * @param x The x-coordinate of the origin of the grid. * @param y The y-coordinate of the origin of the grid. */ void setOrigin(final double x, final double y); /** * @param y The y-coordinate to set. */ void setGridStartY(final double y); /** * @param x The x-coordinate to set. */ void setGridStartX(final double x); /** * @param x The X-coordinate to set. */ void setOriginX(final double x); /** * @param y The Y-coordinate to set. */ void setOriginY(final double y); /** * @return The size of a step of the grid (can be LShape.PPC or LShape.PPC*unit for instance). * @since 3.0 */ double getStep(); } ITextProp.java000066400000000000000000000111121321075051700365160ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/proppackage net.sf.latexdraw.glib.models.interfaces.prop; /** * Text shape properties. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    */ public interface ITextProp { /** This enumeration defines the concept of text size for latex texts. */ enum TextSize { /** \tiny size */ TINY {@Override public String getLatexToken() {return "tiny";}}, //$NON-NLS-1$ /** \scriptsize size */ SCRIPT {@Override public String getLatexToken() {return "scriptsize";}}, //$NON-NLS-1$ /** \footnotesize size */ FOOTNOTE {@Override public String getLatexToken() {return "footnotesize";}}, //$NON-NLS-1$ /** \small size */ SMALL {@Override public String getLatexToken() {return "small";}}, //$NON-NLS-1$ /** \small size */ NORMAL {@Override public String getLatexToken() {return "normalsize";}}, //$NON-NLS-1$ /** \large size */ LARGE1 {@Override public String getLatexToken() {return "large";}}, //$NON-NLS-1$ /** \Large size */ LARGE2 {@Override public String getLatexToken() {return "Large";}}, //$NON-NLS-1$ /** \LARGE size */ LARGE3 {@Override public String getLatexToken() {return "LARGE";}}, //$NON-NLS-1$ /** \huge size */ HUGE1 {@Override public String getLatexToken() {return "huge";}}, //$NON-NLS-1$ /** \Huge size */ HUGE2 {@Override public String getLatexToken() {return "Huge";}}; //$NON-NLS-1$ /** * @return The latex token corresponding to the text size. * @since 3.0 */ public abstract String getLatexToken(); /** * @param size The text size value to analyse. * @return The corresponding text size item or null. * @since 3.0 */ public static TextSize getTextSizeFromSize(final int size) { switch(size){ case 11: return TINY; case 16: return FOOTNOTE; case 35: return HUGE1; case 44: return HUGE2; case 22: return LARGE1; case 24: return LARGE2; case 30: return LARGE3; case 18: return NORMAL; case 14: return SCRIPT; case 17: return SMALL; default: return null; } } } /** The position of the text (bottom-right, top-left, etc.). */ enum TextPosition { BOT_LEFT {@Override public String getLatexToken() {return "bl";}}, //$NON-NLS-1$ BOT {@Override public String getLatexToken() {return "b";}}, //$NON-NLS-1$ BOT_RIGHT {@Override public String getLatexToken() { return "br";}}, //$NON-NLS-1$ TOP_LEFT {@Override public String getLatexToken() {return "tl";}}, //$NON-NLS-1$ TOP {@Override public String getLatexToken() {return "t";}}, //$NON-NLS-1$ TOP_RIGHT {@Override public String getLatexToken() {return "tr";}}, //$NON-NLS-1$ BASE {@Override public String getLatexToken() { return "B";}}, //$NON-NLS-1$ BASE_LEFT {@Override public String getLatexToken() {return "Bl";}}, //$NON-NLS-1$ BASE_RIGHT {@Override public String getLatexToken() { return "Br";}}, //$NON-NLS-1$ LEFT {@Override public String getLatexToken() {return "l";}}, //$NON-NLS-1$ RIGHT {@Override public String getLatexToken() {return "r";}}, //$NON-NLS-1$ CENTER {@Override public String getLatexToken() {return "";}}; //$NON-NLS-1$ /** * @return The latex token corresponding to the text position. * @since 3.0 */ public abstract String getLatexToken(); /** * @param latexToken The latex token to test. * @return The TextPosition enumeration item corresponding to the given latex token. * @since 3.0 */ public static TextPosition getTextPosition(final String latexToken) { TextPosition textPos = null; final TextPosition[] textPosList = values(); for(int i=0; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IArc extends IPositionShape, IArcProp, IArrowableShape { /** * @return The coordinate of the start point of the arc. * @since 1.9 */ IPoint getStartPoint(); /** * @return The coordinate of the end point of the arc. * @since 1.9 */ IPoint getEndPoint(); } IArrow.java000066400000000000000000000256331321075051700361600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IArrowable; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; /** * Defines an interface that classes defining an arrow should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IArrow extends IArrowable { enum ArrowStyle { NONE { @Override public String getPSTToken() { return ""; } //$NON-NLS-1$ @Override public ArrowStyle getOppositeArrowStyle() { return NONE; } }, LEFT_ARROW { @Override public String getPSTToken() { return PSTricksConstants.LARROW_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return RIGHT_ARROW; } @Override public boolean needsLineReduction() { return true; } }, RIGHT_ARROW { @Override public String getPSTToken() { return PSTricksConstants.RARROW_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return LEFT_ARROW; } @Override public boolean needsLineReduction() { return true; } }, RIGHT_DBLE_ARROW { @Override public String getPSTToken() { return PSTricksConstants.DRARROW_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return LEFT_DBLE_ARROW; } @Override public boolean needsLineReduction() { return true; } }, LEFT_DBLE_ARROW { @Override public String getPSTToken() { return PSTricksConstants.DLARROW_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return RIGHT_DBLE_ARROW; } @Override public boolean needsLineReduction() { return true; } }, BAR_END { @Override public String getPSTToken() { return PSTricksConstants.BAREND_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return BAR_END; } }, BAR_IN { @Override public String getPSTToken() { return PSTricksConstants.BARIN_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return BAR_IN; } }, LEFT_SQUARE_BRACKET { @Override public String getPSTToken() { return PSTricksConstants.LSBRACKET_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return RIGHT_SQUARE_BRACKET; } }, RIGHT_SQUARE_BRACKET { @Override public String getPSTToken() { return PSTricksConstants.RSBRACKET_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return LEFT_SQUARE_BRACKET; } }, LEFT_ROUND_BRACKET { @Override public String getPSTToken() { return PSTricksConstants.LRBRACKET_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return RIGHT_ROUND_BRACKET; } }, RIGHT_ROUND_BRACKET { @Override public String getPSTToken() { return PSTricksConstants.RRBRACKET_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return LEFT_ROUND_BRACKET; } }, CIRCLE_END { @Override public String getPSTToken() { return PSTricksConstants.CIRCLEEND_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return CIRCLE_END; } }, CIRCLE_IN { @Override public String getPSTToken() { return PSTricksConstants.CIRCLEIN_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return CIRCLE_IN; } }, DISK_END { @Override public String getPSTToken() { return PSTricksConstants.DISKEND_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return DISK_END; } }, DISK_IN { @Override public String getPSTToken() { return PSTricksConstants.DISKIN_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return DISK_IN; } }, ROUND_END { @Override public String getPSTToken() { return PSTricksConstants.ROUNDEND_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return ROUND_END; } }, ROUND_IN { @Override public String getPSTToken() { return PSTricksConstants.ROUNDIN_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return ROUND_IN; } @Override public boolean needsLineReduction() { return true; } }, SQUARE_END { @Override public String getPSTToken() { return PSTricksConstants.SQUAREEND_STYLE; } @Override public ArrowStyle getOppositeArrowStyle() { return SQUARE_END; } }; /** * @return The opposite arrow of the current one. * @since 3.0 */ public abstract ArrowStyle getOppositeArrowStyle(); /** * @return The PSTricks token of the arrow style. * @since 3.0 */ public abstract String getPSTToken(); /** * @return True if the style is a bar. * @since 3.0 */ public boolean isBar() { return this==BAR_END || this==BAR_IN; } public boolean isReducingShape() { return this==LEFT_ARROW || this==RIGHT_ARROW || this==LEFT_DBLE_ARROW || this==RIGHT_DBLE_ARROW || this==ROUND_IN || this==CIRCLE_IN || this==DISK_IN; } /** * @return True if the style is an arrow. * @since 3.0 */ public boolean isArrow() { return this==LEFT_ARROW || this==RIGHT_ARROW || this==RIGHT_DBLE_ARROW || this== LEFT_DBLE_ARROW; } /** * @return True if the style is a round bracket. * @since 3.0 */ public boolean isRoundBracket() { return this==LEFT_ROUND_BRACKET || this==RIGHT_ROUND_BRACKET; } /** * @return True if the style is a square bracket. * @since 3.0 */ public boolean isSquareBracket() { return this==LEFT_SQUARE_BRACKET || this==RIGHT_SQUARE_BRACKET; } /** * @return True if the style is a circle or a disk. * @since 3.0 */ public boolean isCircleDisk() { return this==CIRCLE_END || this==CIRCLE_IN || this==DISK_END || this==DISK_IN; } /** * @return True if the style is a style for right arrows. * @since 3.0 */ public boolean isRightStyle() { return this==RIGHT_ARROW || this==RIGHT_DBLE_ARROW || this==RIGHT_ROUND_BRACKET || this==RIGHT_SQUARE_BRACKET; } /** * @param style The style to test. * @return True if the given style and the calling style are of the same kind (e.g. both are circles or disks). * @since 3.0 */ public boolean isSameKind(final ArrowStyle style) { return style!=null && (isArrow() && style.isArrow() || isBar() && style.isBar() || isCircleDisk() && style.isCircleDisk() || isRoundBracket() && style.isRoundBracket() || isSquareBracket() && style.isSquareBracket()); } /** * @return True if the current arrow style need its line to be reduced. * For instance the arrow style requires its line to be smaller. * The width of the arrow can be used in complement to reduce the line. * @since 3.0 */ public boolean needsLineReduction() { return false; } /** * @return The arrow style corresponding to the given PST token or the style name (or null). * @param token The PST token or the name of the style to get (e.g. NONE.toString()). * @since 3.0 */ public static ArrowStyle getArrowStyle(final String token) { if(token==null) return null; if(token.isEmpty() || NONE.toString().equals(token)) return NONE; if(PSTricksConstants.LARROW_STYLE.equals(token) || LEFT_ARROW.toString().equals(token)) return LEFT_ARROW; if(PSTricksConstants.RARROW_STYLE.equals(token) || RIGHT_ARROW.toString().equals(token)) return RIGHT_ARROW; if(PSTricksConstants.DRARROW_STYLE.equals(token) || RIGHT_DBLE_ARROW.toString().equals(token)) return RIGHT_DBLE_ARROW; if(PSTricksConstants.DLARROW_STYLE.equals(token) || LEFT_DBLE_ARROW.toString().equals(token)) return LEFT_DBLE_ARROW; if(PSTricksConstants.BARIN_STYLE.equals(token) || BAR_IN.toString().equals(token)) return BAR_IN; if(PSTricksConstants.BAREND_STYLE.equals(token) || BAR_END.toString().equals(token)) return BAR_END; if(PSTricksConstants.RSBRACKET_STYLE.equals(token) || RIGHT_SQUARE_BRACKET.toString().equals(token)) return RIGHT_SQUARE_BRACKET; if(PSTricksConstants.LSBRACKET_STYLE.equals(token) || LEFT_SQUARE_BRACKET.toString().equals(token)) return LEFT_SQUARE_BRACKET; if(PSTricksConstants.LRBRACKET_STYLE.equals(token) || LEFT_ROUND_BRACKET.toString().equals(token)) return LEFT_ROUND_BRACKET; if(PSTricksConstants.RRBRACKET_STYLE.equals(token) || RIGHT_ROUND_BRACKET.toString().equals(token)) return RIGHT_ROUND_BRACKET; if(PSTricksConstants.CIRCLEIN_STYLE.equals(token) || CIRCLE_IN.toString().equals(token)) return CIRCLE_IN; if(PSTricksConstants.CIRCLEEND_STYLE.equals(token) || CIRCLE_END.toString().equals(token)) return CIRCLE_END; if(PSTricksConstants.DISKIN_STYLE.equals(token) || DISK_IN.toString().equals(token)) return DISK_IN; if(PSTricksConstants.DISKEND_STYLE.equals(token) || DISK_END.toString().equals(token)) return DISK_END; if(PSTricksConstants.SQUAREEND_STYLE.equals(token) || SQUARE_END.toString().equals(token)) return SQUARE_END; if(PSTricksConstants.ROUNDEND_STYLE.equals(token) || ROUND_END.toString().equals(token)) return ROUND_END; if(PSTricksConstants.ROUNDIN_STYLE.equals(token) || ROUND_IN.toString().equals(token)) return ROUND_IN; return null; } } /** * Copies the parameters of the given arrow to the current arrow. * The owner of the arrow to copy is not copied to the current arrow. * @param model The arrow to copy. Cannot be null. * @since 3.0 */ void copy(final IArrow model); /** * @return True if the current arrow has a style. * @since 3.0 */ boolean hasStyle(); /** * Defines the style of the arrow. * @param arrowStyle The new style of the arrow. * @since 3.0 */ void setArrowStyle(final ArrowStyle arrowStyle); /** * @return The length of the arrow computed from the provided formula: * length = arrowlength x (num x linewidth + dim) * @since 3.0 */ double getArrowShapeLength(); /** * @return The style of the arrow. * @since 3.0 */ ArrowStyle getArrowStyle(); /** * @return True if the arrow is the left arrow of its shape. * @since 3.0 */ boolean isLeftArrow(); /** * @return True if the arrow if inverted in its shape. * @since 3.0 */ boolean isInverted(); /** * @return The shape that contains the arrow. * @since 3.0 */ IArrowableShape getShape(); /** * @return The line that can be used to locate the arrow. * @since 3.0 */ ILine getArrowLine(); /** * @return The radius of the rounded arrow styles. * @since 3.0 */ double getRoundShapedArrowRadius(); /** * @return The width of the bar arrow styles. * @since 3.0 */ double getBarShapedArrowWidth(); /** * @return The length of the brackets of bracket arrow styles. * @since 3.0 */ double getBracketShapedArrowLength(); /** * @return The width of arrow styles. * @since 3.0 */ double getArrowShapedWidth(); } IArrowableShape.java000066400000000000000000000036351321075051700377630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IArrowable; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; /** * Shapes that can have arrows. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * */ public interface IArrowableShape extends IShape, IArrowable { /** * @param arrow The arrow to look for. * @return The index of the given arrow in the set of arrows of the shape. -1 is not in the set. * @since 3.1 */ int getArrowIndex(IArrow arrow); /** * @return The number of arrows. * @since 3.1 */ int getNbArrows(); /** * Sets the style of the arrow at the given position. * @param style The style to set. * @param position The position of the arrow to modify. * @since 3.0 */ void setArrowStyle(final ArrowStyle style, final int position); /** * @param position The position of the arrow to use. * @return The style of the arrow at the given position. * @since 3.0 */ ArrowStyle getArrowStyle(final int position); /** * @param arrow The arrow to analyse. * @return The line that will be used to place the arrow. * @since 3.0 */ ILine getArrowLine(final IArrow arrow); /** * @param position The position of the wanted arrow (-1 for the last arrow). * @return The arrow at the given position or null if the position is not valid. * @since 3.0 */ IArrow getArrowAt(final int position); } IAxes.java000066400000000000000000000016351321075051700357620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp; /** * Defines an interface that classes defining latex axes should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IAxes extends IStandardGrid, IAxesProp, IArrowableShape { // } IBezierCurve.java000066400000000000000000000020651321075051700373050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a Bezier curve should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IBezierCurve extends IControlPointShape, IArrowableShape { /** * @return the isClosed. */ boolean isClosed(); /** * Defines if the shape is closed. * @param isClosed True: the shape will be closed. * @since 3.0 */ void setIsClosed(final boolean isClosed); } ICircle.java000066400000000000000000000015021321075051700362540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a circle should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ICircle extends ISquaredShape { // } ICircleArc.java000066400000000000000000000015121321075051700367030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a circled arc should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ICircleArc extends IArc, ICircle { // } IControlPointShape.java000066400000000000000000000053471321075051700405010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.util.List; /** * Defines an interface that classes defining a shape, containg control points, should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IControlPointShape extends IModifiablePointsShape { /** The default position gap of control points against their reference point. */ int DEFAULT_POSITION_CTRL = 40; /** * Balances all the control points in order the create a rounded shape. */ void balance(); /** * @param position The position of the wanted points (-1 for the last point). * @return The first control point at the given position or null if the position is not valid. * @since 3.0 */ IPoint getFirstCtrlPtAt(final int position); /** * @param position The position of the wanted points (-1 for the last point). * @return The second control point at the given position or null if the position is not valid. * @since 3.0 */ IPoint getSecondCtrlPtAt(final int position); /** * Updates the second control points by using the first control points. * @since 1.9 */ void updateSecondControlPoints(); /** * Sets 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 */ void setXFirstCtrlPt(final double x, final int id); /** * Sets 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 */ void setYFirstCtrlPt(final double y, final int id); /** * Sets 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 */ void setXSecondCtrlPt(final double x, final int id); /** * Sets 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 */ void setYSecondCtrlPt(final double y, final int id); /** * @return the firstCtrlPts. */ List getFirstCtrlPts(); /** * @return the secondCtrlPts. */ List getSecondCtrlPts(); } IDot.java000066400000000000000000000047651321075051700356170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp; /** * Defines an interface that classes defining a dot should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IDot extends IPositionShape, IDotProp { /** Useful to calculate the thickness of dot with the o style. */ double THICKNESS_O_STYLE_FACTOR = 16.; /** The thickness of the plus shape is computed with that coefficient. */ double PLUS_COEFF_WIDTH = 6.5; /** * While getTopLeftPoint takes care about the current shape of the dot to compute the top left point, * this function computes the top left point only using the centre and the width of the dot which are * the same for all the dot styles * @return The top left point of the dot. * @since 3.0 */ IPoint getLazyTopLeftPoint(); /** * While getBottomRightPoint takes care about the current shape of the dot to compute the bottom right point, * this function computes the bottom right point only using the centre and the width of the dot which are * the same for all the dot styles * @return The top bottom right of the dot. * @since 3.0 */ IPoint getLazyBottomRightPoint(); /** * @return The gap used to create plus-shaped dots. * @since 3.0 */ double getPlusGap(); /** * @return The gap used to create cross-shaped dots. * @since 3.0 */ double getCrossGap(); /** * @return The gap used to create bar-shaped dots. * @since 3.0 */ double getBarGap(); /** * @return The thickness used to create bar-shaped dots. * @since 3.0 */ double getBarThickness(); /** * @return The gap used to compute the shape of several kinds of dot. * @since 3.0 */ double getGeneralGap(); /** * @return The gap used to create O-shaped dots. * @since 3.0 */ double getOGap(); /** * @return True if the dot can be filled. * @since 3.0 */ @Override boolean isFillable(); } IDrawing.java000066400000000000000000000025721321075051700364560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.prop.ISetShapesProp; import org.malai.presentation.AbstractPresentation; /** * Defines an interface of a drawing that contains a set of shapes * and a set of selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/22/2010
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IDrawing extends ISetShapesProp, AbstractPresentation { /** * @return The group that contains the selected shape. Cannot be null. * @since 3.0 */ IGroup getSelection(); /** * Selects the given shapes and unselect the already selected shapes. * @param shapes The shapes to select. Cannot be null. * @throws NullPointerException when shapes is null. * @since 3.0 */ void setSelection(final List shapes); } IEllipse.java000066400000000000000000000021731321075051700364550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining an ellipse should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IEllipse extends IRectangularShape { /** * @return The half of the biggest axe. * @since 3.0 */ double getA(); /** * @return The half of the smallest axe. * @since 3.0 */ double getB(); /** * Translates the shape to its new centre. * @param centre The new centre. * @since 3.0 */ void setCentre(final IPoint centre); } IFreehand.java000066400000000000000000000016501321075051700365730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; /** * Defines an interface that classes defining a freehand shape should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IFreehand extends IFreeHandProp, IModifiablePointsShape { // } IGrid.java000066400000000000000000000016161321075051700357460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp; /** * Defines an interface that classes defining a latex grid should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IGrid extends IStandardGrid, IGridProp { // } IGroup.java000066400000000000000000001243111321075051700361530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.awt.Color; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.prop.ISetShapesProp; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; /** * Defines an interface that classes defining a group of shapes should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IGroup extends IArrowableShape, ISetShapesProp, ILineArcProp, ITextProp, IArcProp, IAxesProp, IGridProp, IFreeHandProp, IPlotProp { /** * Duplicates the group of shapes. * @param duplicateShapes True: the shapes will be duplicated as well. * @return The duplicated group of shapes. * @since 3.0 */ IGroup duplicateDeep(final boolean duplicateShapes); /** * Sets if polar coordinates for the plots of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setPlotPolarList(final List values); /** * @return The list of polar/cartesian coordinates of the plots contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getPlotPolarList(); /** * Sets the max X of the plots of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setPlotMaxXList(final List values); /** * @return The list of max X of the plots contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getPlotMaxXList(); /** * Sets the min X of the plots of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setPlotMinXList(final List values); /** * @return The list of min X of the plots contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getPlotMinXList(); /** * Sets the number of plotted points of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setNbPlottedPointsList(final List values); /** * @return The list of number of plotted points the shapes contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getNbPlottedPointsList(); /** * Sets the plot style of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setPlotStyleList(final List values); /** * @return The list of the plot style of the shapes contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getPlotStyleList(); /** * Sets the Y-scale shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setYScaleList(final List values); /** * @return The list of Y-scale of the shapes contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. */ List getYScaleList(); /** * Sets the X-scale shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setXScaleList(final List values); /** * @return The list of X scale of the shapes contained by the group. * If a shape of the group does not support this property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getXScaleList(); /** * @return The list of plot equations of the shapes contained by the group. * If a shape of the group does not support the border position property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getPlotEquationList(); /** * @return The list of the border positions of the shapes contained by the group. * If a shape of the group does not support the border position property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getBordersPositionList(); /** * @return The list of line colours of the shapes contained by the group. * If a shape of the group does not support the line colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getLineColourList(); /** * @return The list of start angle of the arc shapes contained by the group. * If a shape of the group does not support the start angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getAngleStartList(); /** * @return The list of end angle of the arc shapes contained by the group. * If a shape of the group does not support the end angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getAngleEndList(); /** * @return The list of arc styles of the arc shapes contained by the group. * If a shape of the group does not support the arc style property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getArcStyleList(); /** * @return The list of arrow style of the shapes contained by the group. * If a shape of the group does not support the arrow style property, null is added * to the list. The list cannot be null. * @param i The index of the arrows to get. * @since 3.0 */ List getArrowStyleList(int i); /** * @return The list of the rotation angles of the shapes contained by the group. * If a shape of the group does not support the rotation angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getRotationAngleList(); /** * @return The list of the text positions the shapes contained by the group. * If a shape of the group does not support the text position property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getTextPositionList(); /** * @return The list of the text contents of the shapes contained by the group. * If a shape of the group does not support the text property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getTextList(); /** * @return The list of the hatchings angle of the shapes contained by the group. * If a shape of the group does not support the hatchings angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getHatchingsAngleList(); /** * @return The list of the hatchings width of the shapes contained by the group. * If a shape of the group does not support the hatchings width property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getHatchingsWidthList(); /** * @return The list of the hatchings size of the shapes contained by the group. * If a shape of the group does not support the hatchings size property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getHatchingsSepList(); /** * @return The list of the gradient angle of the shapes contained by the group. * If a shape of the group does not support the gradient angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGradAngleList(); /** * @return The list of the gradient middle point of the shapes contained by the group. * If a shape of the group does not support the gradient middle point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGradMidPtList(); /** * @return The list of the line arc values of the shapes contained by the group. * If a shape of the group does not support the line arc property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getLineArcList(); /** * @return The list of filling colours of the shapes contained by the group. * If a shape of the group does not support the filling colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getFillingColList(); /** * @return The list of hatchings colours of the shapes contained by the group. * If a shape of the group does not support the hatchings colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getHatchingsColList(); /** * @return The list of boolean defining if the shapes contained by the group have double borders. * If a shape of the group does not support the double border property, null is added * to the list. The list cannot be null. * @since 3.0 */ List hasDbleBordList(); /** * @return The list of double border width of the shapes contained by the group. * If a shape of the group does not support the double border width property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getDbleBordSepList(); /** * @return The list of double border colours of the shapes contained by the group. * If a shape of the group does not support the double border colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getDbleBordColList(); /** * @return The list of boolean defining if the shapes contained by the group have shadow. * If a shape of the group does not support the shadow property, null is added * to the list. The list cannot be null. * @since 3.0 */ List hasShadowList(); /** * @return The list of shadow size of the shapes contained by the group. * If a shape of the group does not support the shadow size property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getShadowSizeList(); /** * @return The list of shadow angle of the shapes contained by the group. * If a shape of the group does not support the shadow angle property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getShadowAngleList(); /** * @return The list of shadow colours of the shapes contained by the group. * If a shape of the group does not support the shadow colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getShadowColList(); /** * @return The list of ending gradient colours of the shapes contained by the group. * If a shape of the group does not support the ending gradient colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGradColStartList(); /** * @return The list of starting gradient colours of the shapes contained by the group. * If a shape of the group does not support the starting gradient colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGradColEndList(); /** * @return The list of the thicknesses of the shapes contained by the group. * If a shape of the group does not support the thickness property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getThicknessList(); /** * @return The list of the filling styles of the shapes contained by the group. * If a shape of the group does not support the filling style property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getFillingStyleList(); /** * @return The list of the line styles of the shapes contained by the group. * If a shape of the group does not support the line style property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getLineStyleList(); /** * @return The list of filling colours of the dot shapes contained by the group. * If a shape of the group does not support the dot filling colour property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getDotFillingColList(); /** * @return The list of the dot styles of the shapes contained by the group. * If a shape of the group does not support the dot style property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getDotStyleList(); /** * @return The list of the dot sizes of the shapes contained by the group. * If a shape of the group does not support the dot size property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getDotSizeList(); /** * Sets the equation of plot shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. */ void setPlotEquationList(final List values); /** * Sets the starting angle of the arcable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAngleStartList(final List values); /** * Sets the border position of the shapes of the group. * @param list The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setBordersPositionList(final List list); /** * Sets the line colour of the shapes of the group. * @param list The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setLineColourList(final List list); /** * Sets the dot style of the dottable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setDotStyleList(final List values); /** * Sets the ending angle of the arcable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAngleEndList(final List values); /** * Sets the arc style of the arcable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setArcStyleList(final List values); /** * Sets the arrow style of the arrowable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @param i The index of the arrow to set. * @since 3.0 */ void setArrowStyleList(final List values, final int i); /** * Sets the rotation angle of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setRotationAngleList(final List values); /** * Sets the text position of the text shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setTextPositionList(final List values); /** * Sets the text content of the text shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setTextList(final List values); /** * Sets the hatchings angle of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHatchingsAngleList(final List values); /** * Sets the hatchings width of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHatchingsWidthList(final List values); /** * Sets the hatchings gap of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHatchingsSepList(final List values); /** * Sets the starting angle of the gradient of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGradAngleList(final List values); /** * Sets the middle point reference of the gradient of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGradMidPtList(final List values); /** * Sets the line arc value of the line-arcable shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setLineArcList(final List values); /** * Sets the filling colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setFillingColList(final List values); /** * Sets the hatchings colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHatchingsColList(final List values); /** * Defines if the shapes of the group have double borders. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHasDbleBordList(final List values); /** * Sets the double border gap of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setDbleBordSepList(final List values); /** * Sets the double borders colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setDbleBordColList(final List values); /** * Defines if the shapes of the group have a shadow. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setHasShadowList(final List values); /** * Sets the shadow sizes of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setShadowSizeList(final List values); /** * Sets the shadow angles of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setShadowAngleList(final List values); /** * Sets the shadow colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setShadowColList(final List values); /** * Sets the first gradient colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGradColStartList(final List values); /** * Sets the last gradient colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGradColEndList(final List values); /** * Sets the thickness of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setThicknessList(final List values); /** * Sets the style of the filling of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setFillingStyleList(final List values); /** * Sets the line style colour of the shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setLineStyleList(final List values); /** * Sets the filling colour of the dot shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setDotFillingColList(final List values); /** * Sets the size of the dot shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setDotSizeList(final List values); /** * Sets the starting points of the grid shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridStartList(final List values); /** * @return The list of the starting points of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridStartList(); /** * Sets the ending points of the grid shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridEndList(final List values); /** * @return The list of the ending points of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridEndList(); /** * Sets the origin points of the grid shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridOriginList(final List values); /** * @return The list of the origin points of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridOriginList(); /** * Sets the size of the labels of the grid shapes of the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridLabelSizeList(final List values); /** * @return The list of the sizes of the labels of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridLabelSizeList(); /** * Sets the Y-coordinate of the labels of the grid contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridXLabelSouthList(final List values); /** * @return The list of the Y-coordinate labels of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridXLabelSouthList(); /** * Sets the X-coordinate of the labels of the grid contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridYLabelWestList(final List values); /** * @return The list of the Y-coordinate labels of the grid shapes contained by the group. * If a shape of the group does not support the starting point property, null is added * to the list. The list cannot be null. * @since 3.0 */ List getGridYLabelWestList(); /** * Sets the style of the axes contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesStyleList(final List values); /** * @return The list of the styles of the axes contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesStyleList(); /** * Sets the style of the axes' ticks contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesTicksStyleList(final List values); /** * @return The list of the styles of the axes' ticks contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesTicksStyleList(); /** * Sets the size of the axes' ticks contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesTicksSizeList(final List values); /** * @return The list of the sizes of the axes' ticks contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesTicksSizeList(); /** * Sets how the ticks of the axes contained by the group are displayed. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesTicksDisplayedList(final List values); /** * @return The list of the plotting styles of the axes' ticks contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesTicksDisplayedList(); /** * Sets the labels' increments of the axes contained by the group are displayed. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesIncrementsList(final List values); /** * @return The list of the labels' increments of the axes' ticks contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesIncrementsList(); /** * Sets how the labels of the axes contained by the group are displayed. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesLabelsDisplayedList(final List values); /** * @return The list of the plotting styles of the axes' labels contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesLabelsDisplayedList(); /** * Defines if the origin of the axes contained by the group are displayed. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesShowOriginList(final List values); /** * @return The list of booleans defining if the origin of the axes contained in the group must be shown. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesShowOriginList(); /** * Sets the distances between the labels of the axes contained by the group are displayed. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setAxesDistLabelsList(final List values); /** * @return The list of the distances between the labels of the axes contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getAxesDistLabelsList(); /** * Sets the labels' colours of the grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridLabelsColourList(final List values); /** * @return The list of labels' colours of the grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getGridLabelsColourList(); /** * Sets the labels' colours of the grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setSubGridColourList(final List values); /** * @return The list of labels' colours of the grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getSubGridColourList(); /** * Sets the width of the grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridWidthList(final List values); /** * @return The width of the grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getGridWidthList(); /** * Sets the width of the sub-grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setSubGridWidthList(final List values); /** * @return The width of the sub-grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getSubGridWidthList(); /** * Sets the number of dots composing the main lines of each grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setGridDotsList(final List values); /** * @return The number of dots composing the main lines of each grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getGridDotsList(); /** * Sets the number of dots composing the sub-lines of each grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setSubGridDotsList(final List values); /** * @return The number of dots composing the sub-lines of each grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getSubGridDotsList(); /** * Sets the division of the sub-lines of each grids contained by the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setSubGridDivList(final List values); /** * @return The division of the sub-lines of each grids contained by the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getSubGridDivList(); /** * Sets the type of the freehand shapes contained in the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setFreeHandTypeList(final List values); /** * @return The types of the freehand shapes contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getFreeHandTypeList(); /** * Sets the interval of the freehand shapes contained in the group. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setFreeHandIntervalList(final List values); /** * @return The intervals of the freehand shapes contained in the group. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getFreeHandIntervalList(); /** * Defines if the freehand shapes contained in the group are open. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setFreeHandOpenList(final List values); /** * @return The boolean value defining if the freehand shapes contained in the group are open. * If a shape of the group is not an axe, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getFreeHandOpenList(); /** * @return The boolean value defining if the shapes contained in the group must show their points. * If a shape of the group cannot show their points, null is added. * to the list. The list cannot be null. * @since 3.0 */ List getShowPointsList(); /** * Defines if the shapes contained in the group must show their points. * @param values The list of values to use. Its must must equals the number of * shapes of the group. If an element of the list is null, its corresponding * shape will not be set. * @since 3.0 */ void setShowPointsList(final List values); /** * Sets the tbarsizedim parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setTBarSizeDimList(List values); /** * @return The tbarsizedim values of the shapes of the group. * @since 3.1 */ List getTBarSizeDimList(); /** * Sets the tbarsizenum parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setTBarSizeNumList(List values); /** * @return The tbarsizenum values of the shapes of the group. * @since 3.1 */ List getTBarSizeNumList(); /** * Sets the dotsizenum parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setDotSizeNumList(List values); /** * @return The dotsizenum values of the shapes of the group. * @since 3.1 */ List getDotSizeNumList(); /** * Sets the dotsizedim parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setDotSizeDimList(List values); /** * @return The dotsizedim values of the shapes of the group. * @since 3.1 */ List getDotSizeDimList(); /** * Sets the bracketNum parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setBracketNumList(List values); /** * @return The bracketNum values of the shapes of the group. * @since 3.1 */ List getBracketNumList(); /** * Sets the rbracketNum parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setRBracketNumList(List values); /** * @return The rbracketNum values of the shapes of the group. * @since 3.1 */ List getRBracketNumList(); /** * Sets the arrowsizenum parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setArrowSizeNumList(List values); /** * @return The arrowsizenum values of the shapes of the group. * @since 3.1 */ List getArrowSizeNumList(); /** * Sets the arrowsizedim parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setArrowSizeDimList(List values); /** * @return The arrowsizedim values of the shapes of the group. * @since 3.1 */ List getArrowSizeDimList(); /** * Sets the arrowLength parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setArrowLengthList(List values); /** * @return The arrowLength values of the shapes of the group. * @since 3.1 */ List getArrowLengthList(); /** * Sets the arrowInset parameters to the shapes of the group. * @param values The values to use. * @since 3.1 */ void setArrowInsetList(List values); /** * @return The arrowInset values of the shapes of the group. * @since 3.1 */ List getArrowInsetList(); } ILine.java000066400000000000000000000116401321075051700357460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a line should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ILine { /** * Computes the angle of the line. * @return The angle of the line. * @since 3.0 */ double getLineAngle(); /** * @return The x coordinate of the first point. * @since 3.0 */ double getX1(); /** * @return The x coordinate of the second point. * @since 3.0 */ double getX2(); /** * @return The y coordinate of the first point. * @since 3.0 */ double getY1(); /** * @return The y coordinate of the second point. * @since 3.0 */ double getY2(); /** * @return The first point. * @since 3.0 */ IPoint getPoint1(); /** * @return The second point. * @since 3.0 */ IPoint getPoint2(); /** * @return True if the line is vertical. * @since 3.0 */ boolean isVerticalLine(); /** * @return True if the line is horizontal. * @since 3.0 */ boolean isHorizontalLine(); /** * @return True if the segment defined by the line contains the given point. False otherwise or * if the given point is null. * @param pt The point to check. * @since 3.0 */ boolean isInSegment(final IPoint pt); /** * Sets the position of the line. Do nothing if one of the given parameter * is not valid. * @param x1 The x coordinate of the first point. * @param y1 The y coordinate of the first point. * @param x2 The x coordinate of the second point. * @param y2 The y coordinate of the second point. * @since 3.0 */ void setLine(final double x1, final double y1, final double x2, final double y2); /** * Sets the x coordinate of the first point. * @param x1 The new x coordinate of the first point. * @since 3.0 */ void setX1(final double x1); /** * Sets the x coordinate of the second point. * @param x2 The new x coordinate of the second point. * @since 3.0 */ void setX2(final double x2); /** * Sets the y coordinate of the first point. * @param y1 The new y coordinate of the first point. * @since 3.0 */ void setY1(final double y1); /** * Sets the y coordinate of the second point. * @param y2 The new y coordinate of the second point. * @since 3.0 */ void setY2(final double y2); /** * Sets the first point. * @param pt The new first point. * @since 3.0 */ void setP1(final IPoint pt); /** * Sets the second point. * @param pt The new second point. * @since 3.0 */ void setP2(final IPoint pt); /** * @return the a parameter of the line. */ double getA(); /** * @return the b parameter of the line. */ double getB(); /** * @return The top left point of the line (may be not a point on the line). */ IPoint getTopLeftPoint(); /** * @return The bottom right point of the line (may be not a point on the line). */ IPoint getBottomRightPoint(); /** * Creates 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. */ ILine getPerpendicularLine(final IPoint pt); /** * @param l The second lines * @return The intersection between two lines. Null if the given is not valid or * if both lines are parallels or both lines are identical. */ IPoint getIntersection(final ILine l); /** * @param l The second line. * @return The point of the intersection between of the two segments. */ IPoint getIntersectionSegment(final ILine l); /** * Gets 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 or null if a problem occurs. */ IPoint[] findPoints(final double x, final double y, final double distance); /** * Gets 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 found points or null if a problem occurs. */ IPoint[] findPoints(final IPoint p, final double distance); /** * Update the y-intercept b and slope a. */ void updateAandB(); } IModifiablePointsShape.java000066400000000000000000000054371321075051700412770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface for shapes that contain modifiable points.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IModifiablePointsShape extends IShape { /** * Adds a point to the shape model. * @param pt The point to add. Must be valid. * @since 3.0 */ void addPoint(final IPoint pt); /** * Adds the given point to the points list at the given position. The model is not updated! * @param pt The point to add. * @param position The position of insertion (-1 corresponds to the last point). * @since 3.0 */ void addPoint(final IPoint pt, final int position); /** * Removes the given point of the shape. * @param pt The point to remove. * @return True if the point is removed. False otherwise. * @since 3.0 */ boolean removePoint(final IPoint pt); /** * Removes the point at the given position. * @param position The position of the point to remove (-1 corresponds to the last point). * @return The removed point or null. * @since 3.0 */ IPoint removePoint(final int position); /** * Sets the point at the given position to the given coordinate. The model is not updated! * @param p The new position of the wanted point. * @param position The position of the point to move in the points list (-1 corresponds to the last point). * @return true if the operation is successful. * @since 3.0 */ boolean setPoint(final IPoint p, final int position); /** * Sets the point at the given position to the given coordinate. * @param x The new X-coordinate. The model is not updated! * @param y The new Y-coordinate. * @param position The position of the point to move in the points list (-1 corresponds to the last point). * @return true if the operation is successful. * @since 3.0 */ boolean setPoint(final double x, final double y, final int position); /** * Replaces the point at the given position by the given point. * @param pt The new point. Must not be a point of the shape. * @param position The position of the point to remove (-1 corresponds to the last point). * @return The removed point or null. * @since 3.0 */ IPoint replacePoint(final IPoint pt, final int position); } IPicture.java000066400000000000000000000024021321075051700364660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.awt.Image; import java.io.IOException; /** * Defines an interface that classes defining a picture should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPicture extends IPositionShape { /** * Sets the new picture. * @param pathSource the pathSource to set. * @throws IOException If a problem while reading/writing pictures occurs. */ void setPathSource(String pathSource) throws IOException; /** * @return the pathSource. */ String getPathSource(); /** * @return the pathTarget. */ String getPathTarget(); /** * @return the image. */ Image getImage(); } IPlot.java000066400000000000000000000020241321075051700357710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; /** * Defines an interface that classes defining a plot should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPlot extends IPositionShape, IPlotProp { /** * @param x The X coordinate. * @return The corresponding Y coordinate or NaN if a problem occurs. */ double getY(final double x); } IPoint.java000066400000000000000000000126431321075051700361540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.awt.geom.Point2D; /** * Defines an interface that classes defining a point should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPoint { /** * @return The Y coordinate of the point. * @since 3.0 */ double getY(); /** * @return The X coordinate of the point. * @since 3.0 */ double getX(); /** * Changes the coordinates of the point. * @param pt The new position. * @since 3.0 */ void setPoint(IPoint pt); /** * Sets the X coordinate of the point. * @param newX The new X coordinate. Must be valid (not equal too NaN,...). * @since 3.0 */ void setX(final double newX); /** * Sets the Y coordinate of the point. * @param newY The new Y coordinate. Must be valid (not equal too NaN,...). * @since 3.0 */ void setY(final double newY); /** * Sets the coordinates of the point. * @param newX The new X coordinate. Must be valid (not equal too NaN,...). * @param newY The new Y coordinate. Must be valid (not equal too NaN,...). * @since 3.0 */ void setPoint(final double newX, final double newY); /** * Gets a point by central symmetry. * @param pt The centre of the symmetry. * @return The resulting point. */ IPoint centralSymmetry(final IPoint pt); /** * Returns horizontally the point. * @param origin The location of the horizontal axe. * @return the computed point or null is the given point is not valid or if a problem occurs. */ IPoint horizontalSymmetry(final IPoint origin); /** * Returns vertically the point. * @param origin The location of the vertical axe. * @return the computed point or null is the given point is not valid or if a problem occurs. */ IPoint verticalSymmetry(final IPoint origin); /** * Adds the given pt to the current one: this+pt * @param pt The second point of the subtraction * @return The result of the subtraction. * @since 3.2 */ IPoint add(final IPoint pt); /** * Subtracts the given pt to the current one: this-pt * @param pt The second point of the subtraction * @return The result of the subtraction. * @since 3.2 */ IPoint substract(final IPoint pt); /** * Normalizes the point (considered here as a vector). * @return The vector normalization. * @since 3.2 */ IPoint normalise(); /** * The magnitude (length) of the point considered here as a vector. * @return The computed magnitude. * @since 3.2 */ double magnitude(); /** * Computes the angle of the given point where the calling point is used as * the gravity centre. * @param pt The point used to compute the angle. * @return The angle or NaN if the given point is not valid. */ double computeAngle(final IPoint pt); /** * Computes the angle of rotation between two points where the calling point is * used as the gravity centre. * @param pt1 The first point. * @param pt2 The second point. * @return The rotation point or NaN if one of the given point is not valid. */ double computeRotationAngle(final IPoint pt1, final IPoint pt2); /** * Allows to know if the point p is equal to the current point considering a gap. * @param p The point to compare. * @param gap The approximation gap. * @return True if they are equals considering the gap. * @exception IllegalArgumentException When gap<0 */ boolean equals(final IPoint p, final double gap); /** * @param p The second point. * @return The middle point of the current and given points. */ IPoint getMiddlePoint(final IPoint p); /** * Rotates a point with as reference another point. * @param gravityC The point of reference. * @param theta The angle of rotation in radian. * @return The rotated point. * @since 1.9 */ IPoint rotatePoint(final IPoint gravityC, final double theta); /** * Creates a new point zoomed using the calling points. * @param zoomLevel The zoom level. * @return The zoomed point. * @since 3.0 */ IPoint zoom(final double zoomLevel); /** * Translates the point. If one of the given coordinate is not valid (NaN, infinite,...), then * the translation does not occur. * @param tx The X translation. * @param ty The Y translation. */ void translate(final double tx, final double ty); /** * @param pt The second point. * @return The distance between the two points. * @since 3.0 */ double distance(final IPoint pt); /** * @param x The x coordinate of the second point. * @param y The y coordinate of the second point. * @return The distance between the two points. * @since 3.0 */ double distance(final double x, final double y); /** * @return A Point2D.Double point equivalent to the current point. * @since 3.0 */ Point2D.Double toPoint2D(); /** * Defines the current point using the given point. * @param pt The point 2D to copy. * @since 3.0 */ void setPoint2D(Point2D pt); } IPolygon.java000066400000000000000000000015151321075051700365060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a polygon should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPolygon extends IModifiablePointsShape { // } IPolyline.java000066400000000000000000000015221321075051700366500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a polyline should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPolyline extends IPolygon, IArrowableShape { // } IPositionShape.java000066400000000000000000000037651321075051700376550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a shape that has a position should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IPositionShape extends IShape { /** * @return The X coordinate of the shape (of the bottom-left point of the shape). * @since 3.0 */ double getX(); /** * @return The Y coordinate of the shape (of the bottom-left point of the shape). * @since 3.0 */ double getY(); /** * @return The position of the shape (the bottom-left point of the shape). * @since 3.0 */ IPoint getPosition(); /** * Sets the X coordinate of the shape (of the bottom-left point of the shape). * @param x The X coordinate of the shape. * @since 3.0 */ void setX(final double x); /** * Sets the Y coordinate of the shape (of the bottom-left point of the shape). * @param y The Y coordinate of the shape. * @since 3.0 */ void setY(final double y); /** * Sets the position of the shape (the bottom-left point of the shape). * @param pt The new position of the shape. * @since 3.0 */ void setPosition(final IPoint pt); /** * Sets the position of the shape (the bottom-left point of the shape). * @param x The X coordinate of the new position of the shape. * @param y The Y coordinate of the new position of the shape. * @since 3.0 */ void setPosition(final double x, final double y); } IRectangle.java000066400000000000000000000016351321075051700367660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; /** * Defines an interface that classes defining a rectangle should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IRectangle extends IRectangularShape, ILineArcProp { // } IRectangularShape.java000066400000000000000000000022721321075051700403100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface for rectangular shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IRectangularShape extends IPositionShape { /** * Sets the width of the rectangle (the reference point is the bottom-left point of the rectangle). * @param width The new width. * @since 3.0 */ void setWidth(final double width); /** * Sets the height of the rectangle (the reference point is the bottom-left point of the rectangle). * @param height The new height. * @since 3.0 */ void setHeight(final double height); } IRhombus.java000066400000000000000000000015101321075051700364710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a rhombus should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IRhombus extends IRectangularShape { // } IShape.java000066400000000000000000000526421321075051700361260ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import java.awt.Color; import java.awt.geom.Rectangle2D; import java.util.List; import org.malai.properties.Modifiable; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; /** * Defines an interface that classes defining an abstract shape should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/02/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IShape extends Modifiable { /** The number of pixels per centimetre by default. */ int PPC = 50; /** Corresponds to the golden angle (Useful for golden diamond). */ double GOLDEN_ANGLE = 0.553574; /** The different cardinal points. */ enum Position { NORTH { @Override public Position getOpposite() { return SOUTH; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getCenterX(), bound.getMinY()); } }, SOUTH { @Override public Position getOpposite() { return NORTH; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getCenterX(), bound.getMaxY()); } }, EAST { @Override public Position getOpposite() { return WEST; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMaxX(), bound.getCenterY()); } }, WEST { @Override public Position getOpposite() { return EAST; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMinX(), bound.getCenterY()); } }, NE { @Override public Position getOpposite() { return SW; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMaxX(), bound.getMinY()); } }, NW { @Override public Position getOpposite() { return SE; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMinX(), bound.getMinY()); } }, SE { @Override public Position getOpposite() { return NW; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMaxX(), bound.getMaxY()); } }, SW { @Override public Position getOpposite() { return NE; } @Override public IPoint getReferencePoint(final Rectangle2D bound) { return ShapeFactory.createPoint(bound.getMinX(), bound.getMaxY()); } }; /** * @return True if the given position is south oriented. * @since 3.0 */ public boolean isSouth() { return this==SOUTH || this==SE || this==SW; } /** * @return True if the given position is north oriented. * @since 3.0 */ public boolean isNorth() { return this==NORTH || this==NE || this==NW; } /** * @return True if the given position is east oriented. * @since 3.0 */ public boolean isEast() { return this==EAST || this==NE || this==SE; } /** * @return True if the given position is west oriented. * @since 3.0 */ public boolean isWest() { return this==WEST || this==SW || this==NW; } /** * @return The opposite position of the current position. * @since 3.0 */ public abstract Position getOpposite(); public abstract IPoint getReferencePoint(final Rectangle2D bound); } /** The different positions of the border. */ enum BorderPos { INTO { @Override public String getLatexToken() { return PSTricksConstants.BORDERS_INSIDE; } }, MID{ @Override public String getLatexToken() { return PSTricksConstants.BORDERS_MIDDLE; } }, OUT{ @Override public String getLatexToken() { return PSTricksConstants.BORDERS_OUTSIDE; } }; /** * @param styleName The style to get. * @return The style which name is the given name style. * @since 3.0 */ public static BorderPos getStyle(final String styleName) { if(styleName==null) return null; if(PSTricksConstants.BORDERS_INSIDE.equals(styleName) || INTO.toString().equals(styleName)) return INTO; if(PSTricksConstants.BORDERS_MIDDLE.equals(styleName) || MID.toString().equals(styleName)) return MID; if(PSTricksConstants.BORDERS_OUTSIDE.equals(styleName) || OUT.toString().equals(styleName)) return OUT; return null; } /** * @return The latex token corresponding to the BorderPos. * @since 3.0 */ public abstract String getLatexToken(); } /** The different styles of the lines. */ enum LineStyle { NONE{ @Override public String getLatexToken() { return PSTricksConstants.LINE_NONE_STYLE; } }, SOLID{ @Override public String getLatexToken() { return PSTricksConstants.LINE_SOLID_STYLE; } }, DASHED{ @Override public String getLatexToken() { return PSTricksConstants.LINE_DASHED_STYLE; } }, DOTTED{ @Override public String getLatexToken() { return PSTricksConstants.LINE_DOTTED_STYLE; } }; /** * @param styleName The style to get. * @return The style which name is the given name style. * @since 3.0 */ public static LineStyle getStyle(final String styleName) { if(styleName==null) return null; for(final LineStyle ls : values()) if(ls.toString().equals(styleName)) return ls; return null; } /** * @return The latex token corresponding to the line style. * @since 3.0 */ public abstract String getLatexToken(); } /** The different styles of filling. */ enum FillingStyle { NONE { @Override public boolean isFilled() { return false; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_NONE; } }, GRAD { @Override public boolean isFilled() { return false; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_GRADIENT; } }, HLINES { @Override public boolean isFilled() { return false; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_HLINES; } }, VLINES { @Override public boolean isFilled() { return false; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_VLINES; } }, CLINES { @Override public boolean isFilled() { return false; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_CROSSHATCH; } }, PLAIN { @Override public boolean isFilled() { return true; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_SOLID; } }, HLINES_PLAIN { @Override public boolean isFilled() { return true; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_HLINES_F; } }, VLINES_PLAIN { @Override public boolean isFilled() { return true; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_VLINES_F; } }, CLINES_PLAIN { @Override public boolean isFilled() { return true; } @Override public String getLatexToken() { return PSTricksConstants.TOKEN_FILL_CROSSHATCH_F; } }; /** * Allows to know if the style is filled. * @return True if the shape is filled. */ public abstract boolean isFilled(); /** * @return The latex token corresponding to the filling style. * @since 3.0 */ public abstract String getLatexToken(); /** * @param token The style to get. * @return The style which name is the given name style (or null). * @since 3.0 */ public static FillingStyle getStyleFromLatex(final String token) { if(token==null) return null; if(PSTricksConstants.TOKEN_FILL_NONE.equals(token)) return NONE; if(PSTricksConstants.TOKEN_FILL_HLINES.equals(token)) return HLINES; if(PSTricksConstants.TOKEN_FILL_HLINES_F.equals(token)) return HLINES_PLAIN; if(PSTricksConstants.TOKEN_FILL_VLINES.equals(token)) return VLINES; if(PSTricksConstants.TOKEN_FILL_VLINES_F.equals(token)) return VLINES_PLAIN; if(PSTricksConstants.TOKEN_FILL_CROSSHATCH.equals(token)) return CLINES; if(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F.equals(token)) return CLINES_PLAIN; if(PSTricksConstants.TOKEN_FILL_GRADIENT.equals(token)) return GRAD; if(PSTricksConstants.TOKEN_FILL_SOLID.equals(token)) return PLAIN; return null; } /** * @param style The text version of the filling style. * @return The filling style that corresponds to the given text (or null). * @since 3.0 */ public static FillingStyle getStyle(final String style) { if(style==null) return null; for(final FillingStyle fs : values()) if(fs.toString().equals(style)) return fs; return null; } /** * @return True if the style is a kind of hatchings. * @since 3.0 */ public boolean isHatchings() { return this==HLINES || this==HLINES_PLAIN || this==VLINES || this==VLINES_PLAIN || this==CLINES || this==CLINES_PLAIN; } /** * @return True if the style is a gradient. * @since 3.0 */ public boolean isGradient() { return this==GRAD; } } /** * @return The points of the shape. * @since 3.0 */ List getPoints(); /** * @return The number of points of the shape. */ int getNbPoints(); /** * @param position The position of the wanted points (-1 for the last point). * @return The point at the given position or null if the position is not valid. * @since 3.0 */ IPoint getPtAt(final int position); /** * @return The full thickness of the shape. It means that the potential double boundary can be considered. * @since 3.0 */ double getFullThickness(); /** * Copies a shape using another. * @param s The shape to copy. */ void copy(final IShape s); /** * @return True if the thickness of the shape can be changed. * @since 3.0 */ boolean isThicknessable(); /** * @return True if the shape can have a double border. * @since 3.0 */ boolean isDbleBorderable(); /** * @return True if the shape can have colours. * @since 3.0 */ boolean isColourable(); /** * @return True if the shape can have an interior colour. * @since 3.0 */ boolean isFillable(); /** * @return True if the borders of the shape can be moved. * @since 3.0 */ boolean isBordersMovable(); /** * @return True if the interior of the shape can have a style (hatchings, gradient). * @since 3.0 */ boolean isInteriorStylable(); /** * @return True if the points of the shape can be displayed. * @since 3.0 */ boolean isShowPtsable(); /** * @return True if the line style of the shape can be changed. * @since 3.0 */ boolean isLineStylable(); /** * @return True if the shape can have a shadow. * @since 3.0 */ boolean isShadowable(); /** * @return The top left point of the shape. It does not take account * of the thickness, the rotation angle, the double border, nor any * parameters; only the points of the shape are used to compute the returned point. * @since 3.0 */ IPoint getTopLeftPoint(); /** * @return The top right point of the shape. It does not take account * of the thickness, the rotation angle, the double border, nor any * parameters; only the points of the shape are used to compute the returned point. * @since 3.0 */ IPoint getTopRightPoint(); /** * @return The bottom right point of the shape. It does not take account * of the thickness, the rotation angle, the double border, nor any * parameters; only the points of the shape are used to compute the returned point. * @since 3.0 */ IPoint getBottomRightPoint(); /** * @return The bottom left point of the shape. It does not take account * of the thickness, the rotation angle, the double border, nor any * parameters; only the points of the shape are used to compute the returned point. * @since 3.0 */ IPoint getBottomLeftPoint(); /** * @return The top left point of the shape. It takes account * of the thickness, the rotation angle, the double border, or any * parameters but not the rotation angle; in contrary to getTopLeftPoint(). * @since 3.0 */ IPoint getFullTopLeftPoint(); /** * @return The bottom right point of the shape. It takes account * of the thickness, the rotation angle, the double border, or any * parameters but not the rotation angle; in contrary to getBottomRightPoint(). * @since 3.0 */ IPoint getFullBottomRightPoint(); /** * Scales the shape where the move reference point is the * bottom right point, and the fixation point the top left point. * @param prevWidth The previous width of the scaled shape. * @param prevHeight The previous height of the scaled shape. * @param pos The position of the reference point: if the reference point is top-left point, * then the scale will extend or reduce the shape at the bottom-right point. If the reference * position is NORTH or SOUTH the sx parameter will not be used. If it is EAST or WEST the sy * parameter will not be used. * @param bound The bound (e.g. the border of the selected shapes) used to compute the scaling. * @throws IllegalArgumentException If one of the parameter is not valid. * @since 3.0 */ void scale(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound); /** * Scales the shape by using the same ratio between X and Y. * @param prevWidth The previous width of the scaled shape. * @param prevHeight The previous height of the scaled shape. * @param pos The position of the reference point: if the reference point is top-left point, * then the scale will extend or reduce the shape at the bottom-right point. If the reference * position is NORTH or SOUTH the sx parameter will not be used. If it is EAST or WEST the sy * parameter will not be used. * @param bound The bound (e.g. the border of the selected shapes) used to compute the scaling. * @throws IllegalArgumentException If one of the parameter is not valid. * @since 3.0 */ void scaleWithRatio(final double prevWidth, final double prevHeight, final Position pos, final Rectangle2D bound); /** * Returns horizontally the shape. * @since 1.8 * @param origin The location of the horizontal axe. */ void mirrorHorizontal(final IPoint origin); /** * Returns vertically the shape. * @since 1.8 * @param origin The location of the vertical axe. */ void mirrorVertical(final IPoint origin); /** * Translates the shape. * @param tx The X translation. * @param ty The Y translation. */ void translate(final double tx, final double ty); /** * @return True if the shape has hatchings. * @since 3.0 */ boolean hasHatchings(); /** * @return True if the shape has a gradient. * @since 3.0 */ boolean hasGradient(); /** * @return the thickness. */ double getThickness(); /** * @param thickness the thickness to set. */ void setThickness(final double thickness); /** * @return the lineColour. */ Color getLineColour(); /** * @param lineColour the lineColour to set. */ void setLineColour(final Color lineColour); /** * @return the lineStyle. */ LineStyle getLineStyle(); /** * @param lineStyle the lineStyle to set. */ void setLineStyle(final LineStyle lineStyle); /** * @return the dashSepWhite. */ double getDashSepWhite(); /** * @param dashSepWhite the dashSepWhite to set. */ void setDashSepWhite(final double dashSepWhite); /** * @return the dashSepBlack. */ double getDashSepBlack(); /** * @param dashSepBlack the dashSepBlack to set. */ void setDashSepBlack(final double dashSepBlack); /** * @return the dotSep. */ double getDotSep(); /** * @param dotSep the dotSep to set. */ void setDotSep(final double dotSep); /** * @return the fillingCol. */ Color getFillingCol(); /** * @param fillingCol the fillingCol to set. */ void setFillingCol(final Color fillingCol); /** * @return the fillingStyle. */ FillingStyle getFillingStyle(); /** * @param fillingStyle the fillingStyle to set. */ void setFillingStyle(final FillingStyle fillingStyle); /** * @return the gradColStart. */ Color getGradColStart(); /** * @param gradColStart the gradColStart to set. */ void setGradColStart(final Color gradColStart); /** * @return the gradColEnd. */ Color getGradColEnd(); /** * @param gradColEnd the gradColEnd to set. */ void setGradColEnd(final Color gradColEnd); /** * @return the gradAngle. */ double getGradAngle(); /** * @param gradAngle the gradAngle to set. In radian. */ void setGradAngle(final double gradAngle); /** * @return the gradMidPt. */ double getGradMidPt(); /** * @param gradMidPt the gradMidPt to set. Must be in [0,1]. */ void setGradMidPt(final double gradMidPt); /** * @return the hatchingsSep. */ double getHatchingsSep(); /** * @param hatchingsSep the hatchingsSep to set. Must be greater or equal than 0. */ void setHatchingsSep(final double hatchingsSep); /** * @return the hatchingsCol. */ Color getHatchingsCol(); /** * @param hatchingsCol the hatchingsCol to set. */ void setHatchingsCol(final Color hatchingsCol); /** * @return the hatchingsAngle. */ double getHatchingsAngle(); /** * @param hatchingsAngle the hatchingsAngle to set. In radian. */ void setHatchingsAngle(final double hatchingsAngle); /** * @return the hatchingsWidth. */ double getHatchingsWidth(); /** * @param hatchingsWidth the hatchingsWidth to set. Must be greater than 0. */ void setHatchingsWidth(final double hatchingsWidth); /** * @return the rotationAngle. */ double getRotationAngle(); /** * @param rotationAngle the rotationAngle to set. In radian. */ void setRotationAngle(final double rotationAngle); /** * @return the showPts. */ boolean isShowPts(); /** * @param showPts the showPts to set. */ void setShowPts(final boolean showPts); /** * @return the hasDbleBord. */ boolean hasDbleBord(); /** * @param hasDbleBord the hasDbleBord to set. */ void setHasDbleBord(final boolean hasDbleBord); /** * @return the dbleBordCol. */ Color getDbleBordCol(); /** * @param dbleBordCol the dbleBordCol to set. */ void setDbleBordCol(final Color dbleBordCol); /** * @return the dbleBordSep. */ double getDbleBordSep(); /** * @param dbleBordSep the dbleBordSep to set. Must be greater or equal to 0. */ void setDbleBordSep(final double dbleBordSep); /** * @return the hasShadow. */ boolean hasShadow(); /** * @param hasShadow the hasShadow to set. */ void setHasShadow(final boolean hasShadow); /** * @return the shadowCol. */ Color getShadowCol(); /** * @param shadowCol the shadowCol to set. */ void setShadowCol(final Color shadowCol); /** * @return the shadowAngle in radian. */ double getShadowAngle(); /** * @param shadowAngle the shadowAngle to set. In radian. */ void setShadowAngle(final double shadowAngle); /** * @return the gravityCentre. */ IPoint getGravityCentre(); /** * @return the id. */ int getId(); /** * @return the isFilled. */ boolean isFilled(); /** * @param isFilled the isFilled to set. */ void setFilled(final boolean isFilled); /** * Adds the given angle to the current rotation angle. * @param gravCentre The gravity centre of the rotation. If null, the gravity centre of the shape will be used. * @param angle The angle to add. In radian. */ void addToRotationAngle(final IPoint gravCentre, final double angle); /** * @return the shadowSize in pixel. */ double getShadowSize(); /** * @param shadowSize the shadowSize to set. Must be greater than 0. */ void setShadowSize(final double shadowSize); /** * @return the bordersPosition. */ BorderPos getBordersPosition(); /** * Sets the position of the borders. * @param position The new position. * @since 3.0 */ void setBordersPosition(final BorderPos position); /** * @return True if when the shape has a shadow, it must be filled. * @since 2.0 */ boolean shadowFillsShape(); /** * Computes the gap created by the thickness, the double borders and the position * of the border. For example, it helps to compute the top left point that considers * the attributes of the shape (thickness, double borders,...). * @return The computed gap. * @since 3.0 */ double getBorderGap(); /** * Creates a duplicate of the shape (however id are not the same). * @return The duplicata. * @since 3.0 */ IShape duplicate(); /** * Rotates the shape. * @param point The rotation centre. * @param angle The angle of rotation in radians. * @since 3.0 */ void rotate(final IPoint point, final double angle); /** * This operation is a workaround to support the dynamic typing * of groups: the type of a group depends on its content. * This operation tests if the type of the calling shape conforms * to the given type. * @param clazz The type to check. * @return True if the type of the calling object conforms to the given type. * @since 3.0 */ boolean isTypeOf(final Class clazz); /** * @return The width of the rectangle. * @since 3.0 */ double getWidth(); /** * @return The height of the rectangle. * @since 3.0 */ double getHeight(); } IShapeFactory.scala000066400000000000000000000244311321075051700376130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape import java.awt.Point import java.awt.geom.Point2D import scala.language.implicitConversions import net.sf.latexdraw.glib.models.ShapeFactory /** * Defines an interface to implement an abstract factory.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ trait IShapeFactory { /** * @param shapeClass The class of the shape to instantiated. * @return A new instance of the class given as argument or null. * @since 3.0 */ def newShape[T <: IShape](shapeClass : java.lang.Class[T]) : Option[T] /** * @return The created drawing. * @since 3.0 */ def createDrawing() : IDrawing /** * Creates a group that will contains initially the given sh. * @param sh The shape to add to the group to create. * @since 3.3 */ def createGroup(sh:IShape):IGroup /** * Creates an arrow from an other arrow. * @param arrow The arrow to copy. * @param owner The shape that contains the arrow. * @return The created arrow. * @throws IllegalArgumentException If the given arrow is null. */ def createArrow(arrow : IArrow, owner : IArrowableShape) : IArrow /** * Creates an arrow. * @param owner The shape that contains the arrow. * @return The created arrow. */ def createArrow(owner : IArrowableShape) : IArrow /** * Creates axes with default values. * @param pt The bottom left position of the axes. * @return The created axes. */ def createAxes(pt : IPoint) : IAxes /** * @param pt The centre of the dot. * @return The created dot. */ def createDot(pt : IPoint) : IDot /** * Creates a model with no point. * @return The created bezier curve. */ def createBezierCurve() : IBezierCurve /** * Creates a bezier curve with two points. * @param point The first point of the curve. * @param point2 The second point of the curve. * @return The created bezier curve. */ def createBezierCurve(point : IPoint, point2 : IPoint) : IBezierCurve /** * Creates an ellipse. * @param tl The top-left point of the ellipse. * @param br The bottom-right point of the ellipse. * @throws IllegalArgumentException If a or b is not valid. * @return The created ellipse. */ def createEllipse(tl : IPoint, br : IPoint) : IEllipse /** * @return The created ellipse. */ def createEllipse() : IEllipse /** * Creates a triangle. * @param pos The north-west point of the triangle. * @param width The width of the triangle. * @param height The height of the triangle. * @throws IllegalArgumentException If the width or the height is not valid. * @return The created triangle. */ def createTriangle(pos : IPoint, width : Double, height : Double) : ITriangle /** * @return The created triangle. */ def createTriangle() : ITriangle /** * Creates a rhombus. * @param centre The centre of the rhombus. * @param width The width of the rhombus. * @param height The height of the rhombus. * @throws IllegalArgumentException If the width, the height or the centre is not valid. * @return The created rhombus. */ def createRhombus(centre : IPoint, width : Double, height : Double) : IRhombus /** * Creates a rhombus at the position (0,0) with width=height=1. * @return The created rhombus. */ def createRhombus() : IRhombus /** * Creates a picture and the corresponding EPS picture. * @param pt The position of the top-left point of the picture. * @return The created picture. * @throws IllegalArgumentException If the given picture path is not valid. * @throws NullPointerException If the given point is null. */ def createPicture(pt : IPoint) : IPicture /** * Creates a grid with a predefined point. * @param pt The position. * @return The created grid. */ def createGrid(pt : IPoint) : IGrid /** * Creates and initialises a freehand model. * @throws IllegalArgumentException If the given point is not valid. * @return The created freehand shape. * @since 3.0 */ def createFreeHand() : IFreehand /** * Creates a circle. * @param pt The position of the top-left point of the picture. * @param radius The radius. * @throws IllegalArgumentException If the radius is not valid. * @throws NullPointerException If the given point pt is null. * @return The created circle. */ def createCircle(pt : IPoint, radius : Double) : ICircle /** * @return The created circle. */ def createCircle() : ICircle /** * @return The created group of shapes. * @since 3.0 */ def createGroup() : IGroup /** * Constructs a line from the specified coordinates. * @param x1 the X coordinate of the start point. * @param y1 the Y coordinate of the start point. * @param x2 the X coordinate of the end point. * @param y2 the Y coordinate of the end point. * @throws IllegalArgumentException If one of the given coordinate is not valid. * @return The created line. */ def createLine(x1 : Double, y1 : Double, x2 : Double, y2 : Double) : ILine /** * Creates a line by creating a second point with: * @param b y = ax+ b * @param p1 The first point. * @throws IllegalArgumentException If one of the given parameter is not valid. * @return The created line. */ def createLine(b : Double, p1 : IPoint) : ILine /** * Constructs a line from the specified Point2D objects. * @param p1 the start Point2D of this line segment. * @param p2 the end Point2D of this line segment. * @throws IllegalArgumentException If one of the given points is not valid. * @return The created line. */ def createLine(p1 : IPoint, p2 : IPoint) : ILine /** * @return The created point with coordinates (0, 0). * @since 3.0 */ def createPoint() : IPoint /** * Duplicates a java 2D point into a IPoint. * If the given point pt is null, a point (0,0) is created. */ def createPoint(pt:Point2D):IPoint /** * Creates a Point2D with the specified coordinates. * @param x The X-coordinate to set. * @param y The Y-coordinate to set. * @return The created point. * @since 3.0 */ def createPoint(x : Double, y : Double) : IPoint /** * Creates a Point2D with the specified coordinates. * @param pt The IPoint, if null the default value (0,0) will be used. * @return The created point. * @since 3.0 */ def createPoint(pt : IPoint) : IPoint /** * @return The created polyline * @since 3.0 */ def createPolyline() : IPolyline /** * Creates a model with two points. * @param point The first point of the shape. * @param point2 The second point of the shape. * @return The created polyline. * @since 3.0 */ def createPolyline(point : IPoint, point2 : IPoint) : IPolyline /** * @return The created polygon * @since 3.0 */ def createPolygon() : IPolygon /** * Creates a polygon with two points. * @param point The first point of the shape. * @param point2 The second point of the shape. * @return The created polygon. * @since 3.0 */ def createPolygon(point : IPoint, point2 : IPoint) : IPolygon /** * @return The created rectangle with position (0,0) and width=10 and height=10. * @since 3.0 */ def createRectangle() : IRectangle /** * Creates a rectangle. * @param pos The north-west point of the rectangle. * @param width The width of the rectangle. * @param height The height of the rectangle. * @throws IllegalArgumentException If the width, the height or the point is not valid. * @throws NullPointerException if the given point is null. * @return The created rectangle. * @since 3.0 */ def createRectangle(pos : IPoint, width : Double, height : Double) : IRectangle /** * Creates a rectangle. * @param tl The top left point of the rectangle. * @param br The bottom right point of the rectangle. * @throws IllegalArgumentException if one of the given points is not valid. * @return The created rectangle. * @since 3.0 */ def createRectangle(tl : IPoint, br : IPoint) : IRectangle /** * Create a text at position (0,0) which text is "text". * @return The created text. * @since 3.0 */ def createText() : IText /** * Creates a text. * @param pt The position of the text. * @param text The text. * @throws IllegalArgumentException If pt is not valid. * @return The created text. * @since 3.0 */ def createText(pt : IPoint, text : String) : IText /** * Creates a square at position (0,0) which width equals 10. * @return The created square. * @since 3.0 */ def createSquare() : ISquare /** * Creates a square. * @param pos The north-west point of the square. * @param width The width of the square. * @throws IllegalArgumentException If the width or the height is not valid. * @return The created square. * @since 3.0 */ def createSquare(pos : IPoint, width : Double) : ISquare /** * Creates a circled arc. * @param pos The north-west point of the square. * @param width The width of the square. * @throws IllegalArgumentException If the width or the height is not valid. * @return The created circled arc. * @since 3.0 */ def createCircleArc(pos : IPoint, width : Double) : ICircleArc /** * Creates a circled arc with a 1 radius. * @return The created circled arc. * @since 3.0 */ def createCircleArc() : ICircleArc /** * Creates a plotted function. * @param pos The north-west point of the rectangle. * @param eq The equation of the function. * @param polar Defines the coordinates to use (polar or cartesian). * @throws IllegalArgumentException If the given point is not valid or minX is greater than maxX. * @return The created function. * @since 3.2 */ def createPlot(pos : IPoint, minX:Double, maxX:Double, eq:String, polar:Boolean) : IPlot /** * Duplicates the given shape. * @param shape The shape to duplicate * @return The duplicated shape or null. * @since 3.0 */ def duplicate(shape : IShape) : IShape }ISquare.java000066400000000000000000000016231321075051700363170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; /** * Defines an interface that classes defining a square should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ISquare extends ISquaredShape, ILineArcProp { // } ISquaredShape.java000066400000000000000000000004641321075051700374460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; public interface ISquaredShape extends IPositionShape { /** * Sets the width of the squared shape (the reference point is the bottom-left point of the shape). * @param width The new width. * @since 3.1 */ void setWidth(final double width); } IStandardGrid.java000066400000000000000000000016471321075051700374330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp; /** * Defines an interface that classes defining a model for latex grid should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IStandardGrid extends IPositionShape, IStdGridProp { // } IText.java000066400000000000000000000016111321075051700360000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp; /** * Defines an interface that classes defining a text should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface IText extends IPositionShape, ITextProp { // } ITriangle.java000066400000000000000000000015121321075051700366210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/interfaces/shapepackage net.sf.latexdraw.glib.models.interfaces.shape; /** * Defines an interface that classes defining a triangle should implement.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/03/2009
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public interface ITriangle extends IRectangularShape { // } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/ui/000077500000000000000000000000001321075051700300675ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/ui/ICanvas.java000066400000000000000000000121721321075051700322610ustar00rootroot00000000000000package net.sf.latexdraw.glib.ui; import java.awt.Cursor; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Rectangle2D; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniserHandler; import net.sf.latexdraw.instruments.Border; import org.malai.action.ActionHandler; import org.malai.interaction.Eventable; import org.malai.picking.Pickable; import org.malai.picking.Picker; import org.malai.presentation.ConcretePresentation; import org.malai.properties.Zoomable; import org.malai.swing.widget.ScrollableWidget; /** * Defines an interface for a canvas that draw the drawing and manages the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/15/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public interface ICanvas extends Zoomable, ConcretePresentation, ScrollableWidget, Eventable, ViewsSynchroniserHandler, ActionHandler, Picker, Pickable { /** * Changes the cursor of the canvas. * @param cursor The new canvas. Cannot be null. * @since 3.0 */ void setCursor(final Cursor cursor); /** * @return The model of the canvas. * @since 3.0 */ IDrawing getDrawing(); /** * Sets the anti aliasing value. * @param antiAliasingValue The new anti-aliasing value. * @since 3.0 */ void setAntiAliasing(final Object antiAliasingValue); /** * Sets the rendering value. * @param renderingValue The new rendering value. * @since 3.0 */ void setRendering(final Object renderingValue); /** * Sets the colour rendering value. * @param colorRenderingValue The new colour rendering value. * @since 3.0 */ void setColorRendering(final Object colorRenderingValue); /** * Sets the alpha interpolation value. * @param alphaInterpolValue The new alpha interpolation value. * @since 3.0 */ void setAlphaInterpolation(final Object alphaInterpolValue); /** * Paints the shapes. * @param g The graphics used to paint the shapes. * @since 3.0 */ void paint(final Graphics g); /** * Paints the shapes. * @param g The graphics. * @param withZoom True: the zoom will be considered. * @param withGrid True: the grid will be considered. * @throws NullPointerException If g is null. */ void paintViews(final Graphics2D g, final boolean withZoom, final boolean withGrid); /** * @return The origin location of the drawing area, i.e. defines the location in the drawing area * where the point (0,0) is. * @since 3.1 */ IPoint getOrigin(); /** * @return The visible part of the canvas. * @since 3.1 */ Rectangle getVisibleBound(); /** * Updates the canvas. */ @Override void update(); /** * Updates the border of the views. * @since 3.0 */ void updateBorder(); /** * Defines the dimensions of the canvas (needed for the scrollers). */ void updatePreferredSize(); /** * @param x The x-coordinate of the point to test. * @param y The y-coordinate of the point to test. * @return The view at the given point or null. * @since 3.0 */ IViewShape getViewAt(final double x, final double y); /** * @return The list of views. * @since 3.0 */ List getViews(); /** * Sets the temporary view. * @param view The new temporary view. * @since 3.0 */ void setTempView(final IViewShape view); /** * @return The temporary view contained by the canvas. * @since 3.0 */ IViewShape getTempView(); /** * Sets the rectangle corresponding to the rectangle that performs users to select shapes. Can be null. * This rectangle, if not null, is then displayed to provide users with feedback on the selection he is performing. * @param rect The rectangle to display. * @since 3.0 */ void setTempUserSelectionBorder(final Rectangle2D rect); /** * Repaints the canvas. * @since 3.0 */ void refresh(); /** * @return The instrument that managing selected views. * @since 3.0 */ Border getBorderInstrument(); /** * @return The magnetic grid of the canvas. * @since 3.0 */ LMagneticGrid getMagneticGrid(); /** * Requests the focus to the canvas. * @since 3.0 */ void requestFocus(); /** * Converts the given point in the coordinate system based on the canvas' origin. * The given point must be in the coordinate system of a jpanel (the top-left point is the origin). * @param pt The point to convert. * @return The converted point or null if the given point is null. * @since 3.1 */ IPoint convertToOrigin(final IPoint pt); }latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/ui/LCanvas.java000066400000000000000000000445201321075051700322660ustar00rootroot00000000000000package net.sf.latexdraw.glib.ui; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.ToolTipable; import net.sf.latexdraw.instruments.Border; import net.sf.latexdraw.mapping.ViewList2TooltipableList; import net.sf.latexdraw.ui.TextAreaAutoSize; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LNumber; import org.malai.action.Action; import org.malai.action.ActionsRegistry; import org.malai.mapping.*; import org.malai.picking.Pickable; import org.malai.picking.Picker; import org.malai.swing.action.library.MoveCamera; import org.malai.swing.widget.MPanel; import org.malai.undo.Undoable; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.swing.*; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; /** * Defines a canvas that draw the drawing and manages the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/09/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class LCanvas extends MPanel implements ICanvas { /** This stroke is used to show the rectangle made by the user to select some shapes. */ public static final BasicStroke STROKE_USER_SELECTION_BORDER = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1f, new float[] { 7f, 7f}, 0); private static final long serialVersionUID = 1L; /** The margin used to surround the drawing. */ public static final int MARGINS = 2500; /** The origin of the drawing in the whole drawing area. */ public static final IPoint ORIGIN = ShapeFactory.createPoint(MARGINS, MARGINS); /** The shapes of the canvas. */ protected final IActiveList views; /** The temporary view that the canvas may contain. */ protected final IUnary tempView; /** * This list contains a subset of the list 'view'. It contains the tooltipable views of 'views'. * This attribute is used only to avoid a full exploration of the list 'views' (that can be huge). */ protected final List tooltipableView; /** The border of the drawing. */ protected Rectangle2D border; /** The zoom applied on the canvas. */ protected final IUnary zoom; /** The value of the antialiasing (cf. RenderingHints.VALUE_ANTIALIAS_ON/OFF) */ protected Object antiAliasingValue; /** The value of the rendering (cf. RenderingHints.VALUE_RENDER_QUALITY/SPEED) */ protected Object renderingValue; /** The value of the colour rendering (cf. RenderingHints.VALUE_COLOR_RENDER_QUALITY/SPEED) */ protected Object colorRenderingValue; /** The value of the alpha-interpolation ( cf. RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY/SPEED) */ protected Object alphaInterpolValue; /** This rectangle is used as interim feedback to show the rectangle made by the user to select some shapes. */ protected Rectangle2D userSelectionBorder; /** The instrument that manages selected views. */ protected Border borderIns; /** The magnetic grid of the canvas. */ protected LMagneticGrid magneticGrid; /** Defined if the canvas has been modified. */ protected boolean modified; /** The model of the view. */ protected IDrawing drawing; /** The current page of the canvas. */ protected Page page; /** * Creates an initialises a canvas. * @param theDrawing The model of the canvas. * @since 3.0 */ public LCanvas(final IDrawing theDrawing){ super(true, true); drawing = theDrawing; modified = false; userSelectionBorder = null; magneticGrid = new LMagneticGrid(this); borderIns = new Border(this); border = new Rectangle2D.Double(); views = new ActiveArrayList<>(); tooltipableView = new ArrayList<>(); tempView = new ActiveUnary<>(); zoom = new ActiveUnary<>(1.); page = Page.USLETTER; FlyweightThumbnail.setCanvas(this); ActionsRegistry.INSTANCE.addHandler(this); borderIns.addEventable(this); setFocusable(true); setDoubleBuffered(true); setBackground(Color.WHITE); // Adding a mapping between the views and its subset containing only tooltipable views. MappingRegistry.REGISTRY.addMapping(new ViewList2TooltipableList(views, tooltipableView)); addMouseListener(new MouseAdapter() { @Override public void mouseEntered(final MouseEvent e) { // Workaround to assure that the canvas always has the focus. // This fix must not be applied when the current focused component is the text setter. if(!(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() instanceof TextAreaAutoSize)) LCanvas.this.requestFocusInWindow(); } }); // Adding a kind of instrument that manages the tooltips. addMouseMotionListener(new TooltipDisplayer()); update(); } @Override public void reinit() { synchronized(views){views.clear();} zoom.setValue(1.); centreViewport(); update(); } @Override public void paintComponent(final Graphics g) { super.paintComponent(g); if(g instanceof Graphics2D) paintViews((Graphics2D)g, true, true); } @Override public void paintViews(final Graphics2D g, final boolean withZoom, final boolean withGrid) { final IViewShape temp = getTempView(); final double zoomValue = getZoom(); final boolean mustZoom = withZoom && !LNumber.equalsDouble(zoomValue, 1.); g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, alphaInterpolValue); g.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, colorRenderingValue); g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAliasingValue); g.setRenderingHint(RenderingHints.KEY_RENDERING, renderingValue); // Displaying the magnetic grid. if(withGrid && magneticGrid.isGridDisplayed()) magneticGrid.paint(g); g.translate(ORIGIN.getX(), ORIGIN.getY()); if(mustZoom) g.scale(zoomValue, zoomValue); // Getting the clip must be done here to consider the scaling and translation. final Rectangle clip = g.getClipBounds(); page.paint(g, clip); synchronized(views){ for(final IViewShape view : views) view.paint(g, clip); } if(temp!=null) temp.paint(g, clip); if(userSelectionBorder!=null) { g.setStroke(STROKE_USER_SELECTION_BORDER); g.setColor(Color.GRAY); g.draw(userSelectionBorder); } if(mustZoom) g.scale(1./zoomValue, 1./zoomValue); borderIns.paint(g); g.translate(-ORIGIN.getX(), -ORIGIN.getY()); } @Override public void update() { updateBorder(); updatePreferredSize(); repaint(); revalidate(); } @Override public void updateBorder() { final IViewShape temp = getTempView(); if(views.isEmpty() && temp==null) border.setFrame(0., 0., 0., 0.); else { double minX = Double.MAX_VALUE; double minY = Double.MAX_VALUE; double maxX = -Double.MAX_VALUE; double maxY = -Double.MAX_VALUE; Rectangle2D bounds; synchronized(views){ for(final IViewShape view : views) { bounds = view.getBorder(); if(bounds.getMinX()maxX) maxX = bounds.getMaxX(); if(bounds.getMaxY()>maxY) maxY = bounds.getMaxY(); } } if(temp!=null) { bounds = temp.getBorder(); if(bounds.getMinX()maxX) maxX = bounds.getMaxX(); if(bounds.getMaxY()>maxY) maxY = bounds.getMaxY(); } border.setFrame(minX, minY, maxX-minX, maxY-minY); } } public void centreViewport() { SwingUtilities.invokeLater(() -> { final MoveCamera action = new MoveCamera(); action.setScrollPane(getScrollpane()); action.setPx(ORIGIN.getX()+page.getWidth()*IShape.PPC/2.); action.setPy(ORIGIN.getY()+getVisibleBound().getHeight()/2.-IShape.PPC); if(action.canDo()) action.doIt(); action.flush(); }); } @Override public void updatePreferredSize() { final double zoomValue = getZoom(); setPreferredSize(new Dimension( (int)(Math.max(border.getWidth(), page.getWidth())*zoomValue)+MARGINS*2, (int)(Math.max(border.getHeight(), page.getHeight())*zoomValue)+MARGINS*2)); } @Override public IViewShape getViewAt(final double x, final double y) { if(!GLibUtilities.isValidPoint(x, y)) return null; final double x2 = x/getZoom(); final double y2 = y/getZoom(); IViewShape view = null; synchronized(views){ int i=views.size()-1; while(i>=0 && view==null) if(views.get(i).contains(x2, y2)) view = views.get(i); else i--; } return view; } @Override public Pickable getPickableAt(final double x, final double y){ final double x2 = x-ORIGIN.getX(); final double y2 = y-ORIGIN.getY(); Pickable pickable = borderIns.getPickableAt(x2, y2); if(pickable==null) pickable = getViewAt(x2, y2); return pickable==null ? contains((int)x, (int)y) ? this : null : pickable; } @Override public Picker getPickerAt(final double x, final double y){ return null; } @Override public double getZoom() { return zoom.getValue(); } @Override public void setZoom(final double x, final double y, final double z) { if(z<=getMaxZoom() && z>=getMinZoom() && !LNumber.equalsDouble(z,zoom.getValue())) { final double oldZoom = zoom.getValue(); zoom.setValue(z); if(GLibUtilities.isValidCoordinate(x) && GLibUtilities.isValidCoordinate(y)) { final double dx = (z-oldZoom)*(x-ORIGIN.getX())/oldZoom; final double dy = (z-oldZoom)*(y-ORIGIN.getY())/oldZoom; final Point pt = scrollpane.getViewport().getViewPosition(); pt.x += dx; pt.y += dy; getScrollpane().getViewport().setViewPosition(pt); } borderIns.update(); update(); setModified(true); } } @Override public List getViews() { return views; } @Override public IViewShape getTempView() { return tempView.getValue(); } @Override public void setTempView(final IViewShape view) { tempView.setValue(view); } /** * @return The unary relation that contains the temporary view. * @since 3.0 */ public IUnary getUnaryTempView() { return tempView; } @Override public IPoint getTopRightDrawingPoint() { return ShapeFactory.createPoint(border.getMaxX(), border.getMinY()); } @Override public IPoint getBottomLeftDrawingPoint() { return ShapeFactory.createPoint(border.getMinX(), border.getMaxY()); } @Override public IPoint getOriginDrawingPoint() { return ShapeFactory.createPoint(border.getMinX(), border.getCenterY()); } @Override public int getPPCDrawing() { return IShape.PPC; } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { if(document==null || root==null) return ; Element elt; if(generalPreferences) { elt = document.createElement(LNamespace.XML_RENDERING); elt.setTextContent(String.valueOf(renderingValue==RenderingHints.VALUE_RENDER_QUALITY)); root.appendChild(elt); elt = document.createElement(LNamespace.XML_COLOR_RENDERING); elt.setTextContent(String.valueOf(colorRenderingValue==RenderingHints.VALUE_COLOR_RENDER_QUALITY)); root.appendChild(elt); elt = document.createElement(LNamespace.XML_ALPHA_INTER); elt.setTextContent(String.valueOf(alphaInterpolValue==RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY)); root.appendChild(elt); elt = document.createElement(LNamespace.XML_ANTI_ALIAS); elt.setTextContent(String.valueOf(antiAliasingValue==RenderingHints.VALUE_ANTIALIAS_ON)); root.appendChild(elt); } else { final String ns = nsURI==null || nsURI.isEmpty() ? "" : nsURI + ':'; //$NON-NLS-1$ elt = document.createElement(ns + LNamespace.XML_ZOOM); elt.appendChild(document.createTextNode(String.valueOf(getZoom()))); root.appendChild(elt); } magneticGrid.save(generalPreferences, nsURI, document, root); } @Override public void load(final boolean generalPreferences, final String nsURI, final Element meta) { if(meta==null) return ; // Getting the list of meta information tags. final NodeList nl = meta.getChildNodes(); Node node; int i; final int size = nl.getLength(); final String uri = nsURI==null ? "" : nsURI; //$NON-NLS-1$ String name; String content; // For each meta information tag. for(i=0; i getZoomUnary() { return zoom; } @Override public LMagneticGrid getMagneticGrid() { return magneticGrid; } @Override public void setAntiAliasing(final Object antiAliasingVal) { if(antiAliasingVal!=null) antiAliasingValue = antiAliasingVal; } @Override public void setRendering(final Object renderingVal) { if(renderingVal!=null) renderingValue = renderingVal; } @Override public void setColorRendering(final Object colorRenderingVal) { if(colorRenderingVal!=null) colorRenderingValue = colorRenderingVal; } @Override public void setAlphaInterpolation(final Object alphaInterpolVal) { if(alphaInterpolVal!=null) alphaInterpolValue = alphaInterpolVal; } @Override public boolean isModified() { return modified || magneticGrid.isModified(); } @Override public void setModified(final boolean modif) { modified = modif; if(!modif) magneticGrid.setModified(false); } @Override public IDrawing getDrawing() { return drawing; } @Override public Point2D getZoomedPoint(final double x, final double y) { final double zoomValue = zoom.getValue(); return new Point2D.Double(x/zoomValue, y/zoomValue); } @Override public Point2D getZoomedPoint(final Point pt) { return pt==null ? new Point2D.Double() : getZoomedPoint(pt.x, pt.y); } @Override public void onActionCancelled(final Action action) { // Nothing to do. } @Override public void onActionAdded(final Action action) { // Nothing to do. } @Override public void onActionAborted(final Action action) { // Nothing to do. } @Override public void onActionExecuted(final Action action) { update(); } @Override public void onUndoableCleared() { // Nothing to do. } @Override public void onUndoableAdded(final Undoable undoable) { // Nothing to do. } @Override public void onUndoableUndo(final Undoable undoable) { // Nothing to do. } @Override public void onUndoableRedo(final Undoable undoable) { // Nothing to do. } @Override public void onActionDone(final Action action) { // Nothing to do. } /** * This kind of instrument manages the tooltips displayed on some views. */ protected class TooltipDisplayer implements MouseMotionListener{ @Override public void mouseMoved(final MouseEvent e) { boolean again = true; ToolTipable tooltipable; final IPoint pt = LCanvas.this.convertToOrigin(ShapeFactory.createPoint(e.getX(), e.getY())); final Point2D pos = LCanvas.this.getZoomedPoint(pt.getX(), pt.getY()); final double x = pos.getX(); final double y = pos.getY(); for(int i=0, size=tooltipableView.size(); iwidth ? text.substring(0, width) : text); } again = false; } } if(again) setToolTipText(null); } @Override public void mouseDragged(final MouseEvent e) { /* Nothing to do. */ } } @Override public double getZoomIncrement() { return 0.05; } @Override public double getMaxZoom() { return 4.5; } @Override public double getMinZoom() { return 0.1; } @Override public IPoint getOrigin() { return ORIGIN; } @Override public Rectangle getVisibleBound() { return getVisibleRect(); } @Override public IPoint convertToOrigin(final IPoint pt) { final IPoint convertion; if(pt==null) convertion = null; else { convertion = ShapeFactory.createPoint(pt); convertion.translate(-ORIGIN.getX(), -ORIGIN.getY()); } return convertion; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/ui/LMagneticGrid.java000066400000000000000000000260231321075051700334060ustar00rootroot00000000000000package net.sf.latexdraw.glib.ui; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.ui.ScaleRuler; import net.sf.latexdraw.ui.ScaleRuler.Unit; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LPath; import net.sf.latexdraw.util.LResources; import org.malai.preferences.Preferenciable; import org.malai.properties.Modifiable; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.awt.*; import java.awt.geom.Point2D; import java.util.Objects; /** * This class defines a magnetic grid.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/21/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class LMagneticGrid implements Preferenciable, Modifiable { /** * This enumeration contains the different style * of a magnetic grid. */ public enum GridStyle { CUSTOMISED { @Override public String getLabel() { return LResources.LABEL_DISPLAY_PERSO_GRID; } }, STANDARD { @Override public String getLabel() { return LResources.LABEL_DISPLAY_GRID; } }, NONE { @Override public String getLabel() { return "None"; //$NON-NLS-1$ } }; /** * @return The label of the style. * @since 3.0 */ public abstract String getLabel(); /** * Searches the style which label matches the given name. * @param name The name of the style to find. * @return The found style or null. * @since 3.0 */ public static GridStyle getStylefromName(final String name) { for(final GridStyle style : values()) if(style.toString().equals(name)) return style; return null; } /** * Searches the style which label matches the given label. Warning, * labels change depending on the language. * @param label The label of the style to find. * @return The found style or null. * @since 3.0 */ public static GridStyle getStyleFromLabel(final String label) { for(final GridStyle style : values()) if(style.getLabel().equals(label)) return style; return null; } } /** The stroke of the grid. */ public static final BasicStroke STROKE = new BasicStroke(0, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); /** Allows to know if the grid is magnetic or not. */ protected boolean isMagnetic; /** defines the spacing between the lines of the grid. */ protected int gridSpacing; /** The style of the grid. */ protected GridStyle style; /** The canvas that paints the grid. */ protected ICanvas canvas; /** Defined if the canvas has been modified. */ protected boolean modified; /** * Creates the magnetic grid. * @param canvas The canvas in which the grid will work. * @throws NullPointerException if the given parameters are not valid. * @since 3.1 */ public LMagneticGrid(final ICanvas canvas) { super(); modified = false; this.canvas = Objects.requireNonNull(canvas); reinitGrid(); } /** * Paints the magnetic grid is activated. * @param graph The graphics in which the grid will be drawn. * @since 3.0 */ public void paint(final Graphics2D graph) { if(!isGridDisplayed()) return; final Rectangle clip = graph.getClipBounds(); if(clip==null) return; graph.setColor(Color.BLACK); graph.setStroke(STROKE); switch(style) { case STANDARD: double ppc = canvas.getPPCDrawing(); if(ScaleRuler.getUnit()==Unit.INCH) ppc*=PSTricksConstants.INCH_VAL_CM; paintSubLines(graph, clip); paintMainLines(graph, ppc, clip); break; case CUSTOMISED: paintMainLines(graph, gridSpacing, clip); break; case NONE: break; } } protected void paintSubLines(final Graphics2D graph, final Rectangle clip) { double pixPerCm10 = canvas.getPPCDrawing()*canvas.getZoom()/10.; if(ScaleRuler.getUnit()==Unit.INCH) pixPerCm10*=PSTricksConstants.INCH_VAL_CM; if(Double.compare(pixPerCm10, 4.)>0) { final double xMinclip = Math.floor(clip.getMinX()/pixPerCm10)*pixPerCm10-clip.getMinX(); final double yMinclip = Math.floor(clip.getMinY()/pixPerCm10)*pixPerCm10-clip.getMinY(); final double xMaxclip = clip.getMaxX(); final double yMaxclip = clip.getMaxY(); final double minX = clip.getMinX(); final double minY = clip.getMinY(); for(double i=pixPerCm10-1+xMinclip+minX+canvas.getOrigin().getX()%pixPerCm10; imodulo) x %= (int) modulo; double res = modulo-x; x = base; if(resmodulo) y %= (int) modulo; res = modulo-y; y = base; if(res0.5? (int)gap+1 : (int)gap; } return gap; } /** * Reinitialises the magnetic grid. * @since 3.0 */ public void reinitGrid() { setStyle(GridStyle.CUSTOMISED); setGridSpacing(20); setMagnetic(true); } /** * @return True: the grid is magnetic. * @since 2.0.0 */ public boolean isMagnetic() { return isMagnetic; } /** * @param isMagnetic True: the grid will be magnetic. * @since 2.0.0 */ public void setMagnetic(final boolean isMagnetic) { if(this.isMagnetic!=isMagnetic) { this.isMagnetic = isMagnetic; setModified(true); } } /** * @return The new spacing between lines of the personal grid. * @since 3.0 */ public int getGridSpacing() { return gridSpacing; } /** * @param gridSpacing The new spacing between lines of the personal grid. * @since 3.0 */ public void setGridSpacing(final int gridSpacing) { if(gridSpacing>1 && this.gridSpacing!=gridSpacing) { this.gridSpacing = gridSpacing; setModified(true); } } /** * @return True: the grid is magnetic. * @since 2.0.0 */ public boolean isPersonalGrid() { return style==GridStyle.CUSTOMISED; } /** * @return The style of the magnetic grid. * @since 2.0.0 */ public GridStyle getStyle() { return style; } /** * @param style The new style of the grid. If null, nothing is performed. * @since 3.0 */ public void setStyle(final GridStyle style) { if(style!=null && style!=this.style) { this.style = style; setModified(true); } } /** * @return True: The magnetic grid must be displayed. * @since 2.0.0 */ public boolean isGridDisplayed() { return style!=GridStyle.NONE; } @Override public void setModified(final boolean modified) { this.modified = modified; } @Override public boolean isModified() { return modified; } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { if(document==null || root==null) return ; final String ns = generalPreferences ? "" : LPath.INSTANCE.getNormaliseNamespaceURI(nsURI); //$NON-NLS-1$ Element elt = document.createElement(ns + LNamespace.XML_MAGNETIC_GRID_STYLE); elt.setTextContent(getStyle().toString()); root.appendChild(elt); elt = document.createElement(ns + LNamespace.XML_GRID_GAP); elt.setTextContent(String.valueOf(getGridSpacing())); root.appendChild(elt); elt = document.createElement(ns + LNamespace.XML_MAGNETIC_GRID); elt.setTextContent(String.valueOf(isMagnetic())); root.appendChild(elt); } @Override public void load(final boolean generalPreferences, final String nsURI, final Element meta) { final NodeList nl = meta.getChildNodes(); final String uri = nsURI==null ? "" : nsURI; //$NON-NLS-1$ Node node; String name; for(int i=0, size=nl.getLength(); i * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    * @since 3.1 *
    */ public enum Page { USLETTER { @Override public double getWidth() { return 21.6; } @Override public double getHeight() { return 27.9; } }; /** * @return The width of the page in CM. * @since 3.1 */ public abstract double getWidth(); /** * @return The height of the page in CM. * @since 3.1 */ public abstract double getHeight(); /** The stroke used for painting the page. */ private static final BasicStroke STROKE_PAGE = new BasicStroke(1f); /** The gap between the page and its shadow. */ private static final int GAP_SHADOW = 3; /** The size of the shadow of the page. */ private static final int SIZE_SHADOW = 4; private final Rectangle2D pageRec = new Rectangle2D.Double(0.0, 0.0, getWidth()*IShape.PPC, getHeight()*IShape.PPC); private final Rectangle2D shadowRec1 = new Rectangle2D.Double(pageRec.getMaxX(), pageRec.getMinY()+GAP_SHADOW, SIZE_SHADOW, pageRec.getHeight()); private final Rectangle2D shadowRec2 = new Rectangle2D.Double(pageRec.getMinX()+GAP_SHADOW, pageRec.getMaxY(), pageRec.getWidth(), SIZE_SHADOW); /** * Paints the page into the given graphics. * @param g The graphics to use. * @param clip The rectangle that requires to be painted. * @throws NullPointerException If the given graphics or point is null. * @since 3.1 */ public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(pageRec) && !clip.intersects(pageRec)) return; g.setStroke(STROKE_PAGE); g.setColor(Color.GRAY); g.fill(shadowRec1); g.fill(shadowRec2); g.setColor(Color.BLACK); g.draw(pageRec); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/000077500000000000000000000000001321075051700306075ustar00rootroot00000000000000AbstractCodeView.java000066400000000000000000000027271321075051700345740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/viewspackage net.sf.latexdraw.glib.views; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines an abstract view for code-view.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/18/2008
    * @author Arnaud BLOUIN * @since 3.0 * @param The type of the observed model. */ public abstract class AbstractCodeView extends AbstractView { /** The cache of the code. */ protected StringBuilder cache; /** * Creates and initialises an abstract code view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected AbstractCodeView(final S model) { super(model); cache = new StringBuilder(); } /** * Empties the cache. * @since 3.0 */ protected void emptyCache() { if(cache!=null) cache.delete(0, cache.length()); } /** * @return the cache. * @since 3.0 */ public StringBuilder getCache() { return cache; } } AbstractView.java000066400000000000000000000024131321075051700337710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/viewspackage net.sf.latexdraw.glib.views; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines an abstract view.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/15/2008
    * @author Arnaud BLOUIN * @since 3.0 * @param The type of the observed model. */ public abstract class AbstractView implements IAbstractView { /** The shape model. */ protected S shape; /** * Creates an abstract view. * @param model The model to view. * @throws IllegalArgumentException If the given model is null. * @since 3.0 */ protected AbstractView(final S model) { super(); shape = Objects.requireNonNull(model); } @Override public S getShape() { return shape; } } CreateViewCmd.java000066400000000000000000000044621321075051700340630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/viewspackage net.sf.latexdraw.glib.views; /** * Defines a generic command mixed with a chain of responsibility. * The goal is to tame the cyclomatic complexity of factories by linking * the commands together. If a command cannot create the view using the given objects, * the next command is called.
    * this class has three generics: the first one define the model of the view; the * second one the view; the third one is the type of the next element of the chain of * responsibility.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/25/11
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 * @param The type of the model used to create the view. * @param The type of the view to create. * @param The type of the next command. */ public abstract class CreateViewCmd> { /** The next command. */ protected F next; /** The type of the model supported by the command. */ protected Class clazz; /** * Creates the command. * @param nextOne The nextOne command in the chain of responsibility. Can be null. * @param clazzModel The class of the model. * @since 3.0 */ protected CreateViewCmd(final F nextOne, final Class clazzModel) { super(); next = nextOne; clazz = clazzModel; } /** * Launches the creation process. * @param model The model used to create the view. * @return The created view or null. * @since 3.0 */ public V execute(final M model) { if(clazz.isInstance(model)) return create(model); return next==null ? null : next.execute(model); } /** * Creates an instance of the view corresponding to the given shape. * @param model The model used to create the view. * @return The created view. * @since 3.0 */ protected abstract V create(final M model); } IAbstractView.java000066400000000000000000000016761321075051700341140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/viewspackage net.sf.latexdraw.glib.views; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines an interface for abstract views.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/01/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IAbstractView { /** * @return the model of the view. * @since 3.0 */ IShape getShape(); /** * Updates the view. * @since 3.0 */ void update(); } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/000077500000000000000000000000001321075051700316565ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/impl/000077500000000000000000000000001321075051700326175ustar00rootroot00000000000000FlyweightThumbnail.scala000066400000000000000000000260321321075051700373560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl import java.awt.image.BufferedImage import java.awt.{Color, Image} import java.io._ import java.nio.channels.FileChannel import javax.swing.SwingUtilities import com.sun.pdfview.PDFFile import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.filters.{PDFFilter, TeXFilter} import net.sf.latexdraw.glib.models.interfaces.shape.{IShape, IText} import net.sf.latexdraw.glib.ui.ICanvas import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText import net.sf.latexdraw.glib.views.latex.{DviPsColors, LaTeXGenerator} import net.sf.latexdraw.glib.views.pst.PSTricksConstants import net.sf.latexdraw.util._ import scala.collection.mutable.{HashMap, Map, Set} /** * This flyweight manages the thumbnails of the text shapes. Its goal is to limit the number * of pictures compiled and kept in memory
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-02-28
    * * @author Arnaud BLOUIN * @since 3.0 */ object FlyweightThumbnail { /** * The stored images. To obtain an image, its corresponding text must be given. * The integer associated with the Image corresponds to the text objects * using this image. When this number of objects equals 0, the image is removed and flushed. * The second String is the path of the files: for instance on Unix is can be * /tmp/latexdraw180980 (without any extension). The last String is the log of the * compilation. */ val images: Map[String, (Image, Set[IViewText], String, String)] = new HashMap() val _scaleImage = 2.0 val inProgressMsg = "Creation in progress" val creationsInProgress = Set[IViewText]() var _canvas: ICanvas = null var _thread = true /** True: the creation will be performed using threads. */ def setThread(withThread: Boolean) { _thread = withThread } /** Sets the canvas to notify when a picture is created (with threads only). */ def setCanvas(c: ICanvas) { _canvas = c } /** A ratio used to create bigger thumbnails to improve the quality of the displayed image. */ def scaleImage() = _scaleImage def clear() { creationsInProgress.synchronized { creationsInProgress.clear } images.synchronized { images.foreach { tu => flushImage(tu._2._1, tu._2._3) } images.clear } } def hasThumbnailsInProgress = creationsInProgress.synchronized { creationsInProgress.nonEmpty } /** * Returns the image corresponding to the given text. If the image does not already exists, * it is created and stored. */ def getImage(shape: IViewText): Image = if (shape == null) null else getImageInfo(shape)._1 /** * Returns the log corresponding to the compilation of the given text. If the image does not already exists, * it is created and stored. */ def getLog(shape: IViewText): String = if (shape == null) "" else getImageInfo(shape)._4 /** * Returns some information corresponding to the the given text. If the image does not already exists, * it is created and stored. */ def getImageInfo(view: IViewText): (Image, Set[IViewText], String, String) = { val shape = view.getShape.asInstanceOf[IText] if (creationsInProgress.synchronized { creationsInProgress.contains(view) }) return (null, Set(), "", inProgressMsg) if (shape == null) return (null, null, null, null) var res: (Image, Set[IViewText], String, String) = null val text = shape.getLineColour.toString + shape.getText images.synchronized { images.get(text) } match { case Some(tuple) => tuple._2.synchronized { tuple._2 += view } res = (tuple._1, tuple._2, tuple._3, tuple._4) images.synchronized { images += (text -> res) } case _ => if (_thread) { creationsInProgress.synchronized { creationsInProgress += view } res = (null, Set(), "", "Creation in progress") SwingUtilities.invokeLater(new Thread() { override def run() { val tuple = createImage(shape) images.synchronized { images += (text -> (tuple._1, Set(view), tuple._2, tuple._3)) } creationsInProgress.synchronized { creationsInProgress -= view } view.updateBorder() if (_canvas != null) { _canvas.getBorderInstrument.update() _canvas.update() } } }) } else { val tuple = createImage(shape) res = (tuple._1, Set(view), tuple._2, tuple._3) images += (text -> res) } } res } /** * When a text picture is flushed, it must notified this flyweight that it has to check if the * corresponding image must be flushed as well. */ def notifyImageFlushed(view: IViewText, text: String, col: Color) { if (!creationsInProgress.synchronized { creationsInProgress.contains(view) }) { images.synchronized { images.get(col.toString + text) } match { case Some(tuple) => tuple._2.synchronized { tuple._2 -= view } if (tuple._2.isEmpty) { // No more used, so flushed. images.synchronized { images.remove(col.toString + text) } flushImage(tuple._1, tuple._3) } else // Decreasing the number of objets using this image. images.synchronized { images += (col.toString + text -> (tuple._1, tuple._2, tuple._3, tuple._4)) } case _ => } } } /** * Flushes the pictures of the text and all the related resources. * * @since 3.0 */ private def flushImage(image: Image, pathPic: String) { if (image != null) // Flushing the picture. image.flush() // Removing the picture file. val file = new File(pathPic) if (file.exists && file.canWrite) file.delete } private def getLaTeXDocument(shape: IText): String = { val code = shape.getText val doc = new StringBuilder() val textColour = shape.getLineColour var coloured = false // We must scale the text to fit its latex size: latexdrawDPI/latexDPI is the ratio to scale the // created png picture. val scale = IShape.PPC * PSTricksConstants.INCH_VAL_CM / PSTricksConstants.INCH_VAL_PT * _scaleImage doc.append("\\documentclass{standalone}\n\\usepackage[usenames,dvipsnames]{pstricks}") //$NON-NLS-1$ doc.append(LaTeXGenerator.getPackages).append('\n') doc.append("\\begin{document}\n\\psscalebox{") //$NON-NLS-1$ doc.append(LNumber.getCutNumber(scale).toFloat).append(' ') doc.append(LNumber.getCutNumber(scale).toFloat).append('}').append('{') if (!textColour.equals(PSTricksConstants.DEFAULT_LINE_COLOR)) { var name = DviPsColors.INSTANCE.getColourName(textColour) coloured = true if (name == null) name = DviPsColors.INSTANCE.addUserColour(textColour) doc.append(DviPsColors.INSTANCE.getUsercolourCode(name)).append("\\textcolor{").append(name).append('}').append('{') //$NON-NLS-1$ } doc.append(code) if (coloured) doc.append('}') doc.append("}\n\\end{document}") //$NON-NLS-1$ doc.toString } /** * Executes a given command and returns the log. * * @param cmd The command to execute. * @return True if the command exit normally and the log. * @since 3.0 */ private def execute(cmd: Array[String]): (Boolean, String) = { var log = "" try { val process = Runtime.getRuntime.exec(cmd) val errReader = new StreamExecReader(process.getErrorStream()) val outReader = new StreamExecReader(process.getInputStream()) errReader.start() outReader.start() if (process.waitFor == 0) return (true, log) log = outReader.getLog + LResources.EOL + errReader.getLog } catch { case ex: Throwable => log += ex.getMessage } return (false, log) } /** * @return The LaTeX compiled picture of the text with its file path and its log, or None. * @since 3.0 */ private def createImage(shape: IText): (Image, String, String) = { var bi: Image = null var log = "" //$NON-NLS-1$ val tmpDir = LFileUtils.INSTANCE.createTempDir val doc = getLaTeXDocument(shape) val pathPic = tmpDir.getAbsolutePath + LResources.FILE_SEP + "latexdrawTmpPic" + System.currentTimeMillis //$NON-NLS-1$ val pathTex = pathPic + TeXFilter.TEX_EXTENSION val os = LSystem.INSTANCE.getSystem try { val fos = new FileOutputStream(pathTex) val osw = new OutputStreamWriter(fos) osw.append(doc) osw.flush() osw.close() fos.flush() fos.close() var res = execute(Array(os.getLatexBinPath, "--halt-on-error", "--interaction=nonstopmode", //$NON-NLS-1$ //$NON-NLS-2$ "--output-directory=" + tmpDir.getAbsolutePath, LFileUtils.INSTANCE.normalizeForLaTeX(pathTex))) //$NON-NLS-1$ var ok = res._1 log = res._2 new File(pathTex).delete new File(pathPic + ".aux").delete //$NON-NLS-1$ new File(pathPic + ".log").delete //$NON-NLS-1$ val psExt = ".eps" //$NON-NLS-1$ if (ok) { res = execute(Array(os.getDvipsBinPath, pathPic + ".dvi", "-o", pathPic + psExt)) //$NON-NLS-1$ //$NON-NLS-2$ ok = res._1 log = log + res._2 new File(pathPic + ".dvi").delete //$NON-NLS-1$ } if (ok) { res = execute(Array(os.getPs2pdfBinPath, pathPic + psExt, pathPic + PDFFilter.PDF_EXTENSION)) //$NON-NLS-1$ new File(pathPic + psExt).delete //$NON-NLS-1$ ok = res._1 log = log + res._2 } if (ok) try { val file = new File(pathPic + PDFFilter.PDF_EXTENSION) val raf = new RandomAccessFile(file, "r") val fc = raf.getChannel val mbb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size) val pdfFile = new PDFFile(mbb) mbb.clear fc.close() raf.close() if (pdfFile.getNumPages == 1) { val page = pdfFile.getPage(0) val bound = page.getBBox val img = page.getImage(bound.getWidth.toInt, bound.getHeight.toInt, bound, null, false, true) img match { case bi1: BufferedImage => bi = ImageCropper.INSTANCE.cropImage(bi1) case _ => } if (img != null) img.flush() } else BadaboomCollector.INSTANCE.add(new IllegalArgumentException("Not a single page: " + pdfFile.getNumPages)) file.delete } catch { case ex: Throwable => BadaboomCollector.INSTANCE.add(ex) } } catch { case e: Throwable => val sw = new StringWriter() val pw = new PrintWriter(sw) e.printStackTrace(pw) new File(pathPic + TeXFilter.TEX_EXTENSION).delete new File(pathPic + PDFFilter.PDF_EXTENSION).delete new File(pathPic + ".ps").delete //$NON-NLS-1$ new File(pathPic + ".dvi").delete //$NON-NLS-1$ new File(pathPic + ".aux").delete //$NON-NLS-1$ new File(pathPic + ".log").delete //$NON-NLS-1$ BadaboomCollector.INSTANCE.add(new FileNotFoundException("Log:\n" + log + "\nException:\n" + sw)) pw.flush() pw.close() sw.flush() sw.close() } return (bi, pathPic, log) } } LArcView.java000066400000000000000000000103411321075051700350560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Arc2D; import java.awt.geom.Line2D; import java.awt.geom.Path2D; import java.util.ArrayList; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewArc; import net.sf.latexdraw.util.LNumber; /** * Defines a view of the IArc model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/20/2008
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class LArcView extends LRectangularView implements IViewArc { /** * Creates an initialises the Java view of a LArc. * @param model The model to view. * @since 3.0 */ protected LArcView(final M model) { super(model); arrows = new ArrayList<>(); for(int i=0, size=shape.getNbArrows(); i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/03/2011
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ class LArrowView implements IViewArrow { /** The arrow model to view. */ protected IArrow model; /** The path of the view. */ protected Path2D path; /** * Creates the view of the arrow. * @param model The model of the arrow. * @throws IllegalArgumentException If the given arrow is null. * @since 3.0 */ protected LArrowView(final IArrow model) { super(); this.model = Objects.requireNonNull(model); path = new Path2D.Double(); } @Override public void paint(final Graphics2D g, final Color fColour, final boolean asShadow) { if(!model.hasStyle()) return ; final ILine arrowLine = model.getArrowLine(); if(arrowLine==null) return; final IPoint pt1 = arrowLine.getPoint1(); final double lineAngle = arrowLine.getLineAngle(); final double lineB = arrowLine.getB(); final double c2x; final double c2y; final double c3x; final double c3y; if(LNumber.equalsDouble(Math.abs(lineAngle), Math.PI/2.)) { final double cx = pt1.getX(); final double cy = pt1.getY(); 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 { c2x = -Math.sin(lineAngle)*lineB; c2y = Math.cos(lineAngle)*lineB; c3x = Math.cos(-lineAngle)*-c2x - Math.sin(-lineAngle)*(lineB-c2y); c3y = Math.sin(-lineAngle)*-c2x + Math.cos(-lineAngle)*(lineB-c2y); } if(!LNumber.equalsDouble(lineAngle%(Math.PI*2.),0.)) { g.rotate(lineAngle); g.translate(c3x,c3y); } paintArrow(g, fColour, asShadow); if(!LNumber.equalsDouble(lineAngle%(Math.PI*2.),0.)) { g.translate(-c3x,-c3y); g.rotate(-lineAngle); } } protected void paintCircle(final Graphics2D g, final Color fillColour, final Color lineColour) { g.setColor(fillColour); g.fill(path); g.setColor(lineColour); g.draw(path); } protected void paintDisk(final Graphics2D g, final Color lineColour) { g.setColor(lineColour); g.setStroke(new BasicStroke((float)model.getShape().getThickness(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); g.fill(path); g.draw(path); } protected void paintRoundBracket(final Graphics2D g, final Color lineColor) { g.setColor(lineColor); g.setStroke(new BasicStroke((float)model.getShape().getThickness(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); g.draw(path); } protected void paintBarBracket(final Graphics2D g, final Color lineColor) { g.setStroke(new BasicStroke((float)model.getShape().getFullThickness(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); g.setColor(lineColor); g.draw(path); } protected void paintArrow(final Graphics2D g, final Color lineColor) { g.setColor(lineColor); g.fill(path); } protected void paintArrow(final Graphics2D g, final Color fColour, final boolean asShadow) { final IShape shape = model.getShape(); final Color lineColor = asShadow ? shape.getShadowCol() : shape.getLineColour(); final Color fillColor = asShadow ? shape.getShadowCol() : fColour; switch(model.getArrowStyle()) { case LEFT_DBLE_ARROW : case RIGHT_DBLE_ARROW : case RIGHT_ARROW : case LEFT_ARROW : paintArrow(g, lineColor); break; case CIRCLE_END : case CIRCLE_IN : paintCircle(g, fillColor, lineColor); break; case DISK_END : case DISK_IN : paintDisk(g, lineColor); break; case LEFT_ROUND_BRACKET : case RIGHT_ROUND_BRACKET : paintRoundBracket(g, lineColor); break; case BAR_END : case BAR_IN : case LEFT_SQUARE_BRACKET : case RIGHT_SQUARE_BRACKET : paintBarBracket(g, lineColor); break; case ROUND_IN : case ROUND_END : g.setColor(lineColor); g.setStroke(new BasicStroke((float)model.getShape().getFullThickness(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); g.draw(path); break; case SQUARE_END : g.setColor(lineColor); g.setStroke(new BasicStroke((float)model.getShape().getFullThickness(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); g.draw(path); break; case NONE: break; } } protected void updatePathDiskCircleEnd(final double xRot, final double yRot) { final double lineWidth = model.getShape().getFullThickness(); final double arrowRadius = model.getRoundShapedArrowRadius(); LEllipseView.setEllipsePath(path, xRot - arrowRadius+lineWidth/2., yRot - arrowRadius+lineWidth/2., arrowRadius*2.-lineWidth, arrowRadius*2.-lineWidth); } protected void updatePathDiskCircleIn(final double xRot, final double yRot, final IPoint pt1, final IPoint pt2) { final double arrowRadius = model.getRoundShapedArrowRadius(); final double lineWidth = model.getShape().getFullThickness(); double x = xRot+lineWidth/2.; if(!isArrowInPositiveDirection(pt1, pt2)) x -=2.*arrowRadius; LEllipseView.setEllipsePath(path, x, yRot-arrowRadius+lineWidth/2., arrowRadius*2.-lineWidth, arrowRadius*2.-lineWidth); } protected void updatePathRightLeftSquaredBracket(final double xRot, final double yRot, final IPoint pt1, final IPoint pt2) { final boolean invert = model.isInverted(); final double[] xs = new double[2]; final double[] ys = new double[2]; final double lineWidth = model.getShape().getFullThickness(); double lgth = model.getBracketShapedArrowLength()+model.getShape().getFullThickness()/2.; if((!isArrowInPositiveDirection(pt1, pt2) || invert) && (isArrowInPositiveDirection(pt1, pt2) || !invert)) lgth *= -1.; updatePathBarIn(xRot, yRot, pt1, pt2, xs, ys); final double x3 = xs[0]+lgth; final double x4 = xs[1]+lgth; path.moveTo(xs[0], ys[0]+lineWidth/2.); path.lineTo(x3, ys[0]+lineWidth/2.); path.moveTo(xs[1], ys[1]-lineWidth/2.); path.lineTo(x4, ys[1]-lineWidth/2.); } protected void updatePathBarIn(final double xRot, final double yRot, final IPoint pt1, final IPoint pt2, final double[] xs, final double[] ys) { final double width = model.getBarShapedArrowWidth(); final double lineWidth = model.getShape().getThickness(); final double dec = isArrowInPositiveDirection(pt1, pt2) ? lineWidth/2. : -lineWidth/2.; xs[0] = xRot+dec; xs[1] = xRot+dec; ys[0] = yRot-width/2.; ys[1] = yRot+width/2.; path.moveTo(xs[0], ys[0]); path.lineTo(xs[1], ys[1]); } protected void updatePathBarEnd(final double xRot, final double yRot) { final double width = model.getBarShapedArrowWidth(); path.moveTo(xRot, yRot-width/2.); path.lineTo(xRot, yRot+width/2.); } private void updatePathArrow(final double x1, final double y1, final double x2, final double y2, final double x3, final double y3, final double x4, final double y4) { path.moveTo(x1, y1); path.lineTo(x2, y2); path.lineTo(x3, y3); path.lineTo(x4, y4); path.closePath(); } protected void updatePathRightLeftArrow(final double xRot, final double yRot, final IPoint pt1, final IPoint pt2) { final boolean invert= model.isInverted(); final double width = model.getArrowShapedWidth(); double length = model.getArrowLength()*width; double inset = model.getArrowInset()*length; double x = xRot; if(invert) x += isArrowInPositiveDirection(pt1, pt2) ? length : -length; if((!isArrowInPositiveDirection(pt1, pt2) || invert) && (isArrowInPositiveDirection(pt1, pt2) || !invert)) { length *= -1.; inset *= -1.; } updatePathArrow(x, yRot, x+length, yRot-width/2., x+length-inset, yRot, x+length, yRot+width/2.); } private boolean isArrowInPositiveDirection(final IPoint pt1, final IPoint pt2) { return pt1.getX() *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/12/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LAxesView extends LStandardGridView { /** The interval between the labels and the axes. */ public static final double GAP_LABEL = 5.; /** The path containing the data to paint concerning the ticks of the axes. */ protected Path2D pathTicks; protected LAxesView(final IAxes model) { super(model); arrows = new ArrayList<>(); for(int i=0, size=shape.getNbArrows(); i=0; String str; if(ticksStyle.isBottom() && ticksDisplay.isY()) gap = -(shape.getTicksSize() + shape.getThickness()/2. + GAP_LABEL); else gap = -(shape.getThickness()/2. + GAP_LABEL); for(double incry = shape.getIncrementY(), maxy = shape.getGridMaxY()/distY, miny = shape.getGridMinY()/distY, i = miny*incry; i<=maxy*incry; i+=incry*distY) { int inti = (int)i; if((inti!=0 || showOrig && xGE0) && isElementPaintable(noArrowBotY, noArrowTopY, miny, maxy, inti)) { str = String.valueOf(inti+origy); updateText(str, (float)(posx+gap-fontMetrics.stringWidth(str)), (float)(posy+height/2.-inti*gapy), font, frc); } } } /** * Updates the labels path by drawing the labels of the X-axis. */ private void updatePathLabelsX(final PlottingStyle ticksDisplay, final TicksStyle ticksStyle, final double gapx, final FontRenderContext frc) { // Painting the labels on the X-axis. final double posx = shape.getPosition().getX(); final double posy = shape.getPosition().getY(); final int origx = (int)shape.getOriginX(); final double gap = (ticksDisplay.isX() && ticksStyle.isBottom() ? shape.getTicksSize() : 0) + shape.getThickness()/2. + GAP_LABEL; final double sep = shape.getGridMaxY()<=-shape.getOriginY() ? -gap-GAP_LABEL : gap + fontMetrics.getAscent(); final Font font = fontMetrics.getFont(); final boolean noArrowLeftX = shape.getArrowStyle(1)==ArrowStyle.NONE || shape.getGridMinX()==shape.getOriginX(); final boolean noArrowRightX = shape.getArrowStyle(3)==ArrowStyle.NONE || shape.getGridMaxX()==shape.getOriginX(); final boolean showOrig = shape.isShowOrigin(); final double distX = shape.getDistLabelsX(); final boolean yGE0 = shape.getGridMinY()>=0; String str; for(double incrx = shape.getIncrementX(), maxx = shape.getGridMaxX()/distX, minx = shape.getGridMinX()/distX, i = minx*incrx; i<=maxx*incrx; i+=incrx*distX) { int inti = (int)i; if((inti!=0 || showOrig && yGE0) && isElementPaintable(noArrowLeftX, noArrowRightX, minx, maxx, inti)) { str = String.valueOf(inti+origx); updateText(str, (float)(posx+inti*gapx-fontMetrics.stringWidth(str)/2.), (float)(posy+sep), font, frc); } } } /** * @return True if a ticks or a label corresponding to the given parameter can be painted. */ private boolean isElementPaintable(final boolean noArrow1, final boolean noArrow2, final double min, final double max, final double i) { return (noArrow2 || !LNumber.equalsDouble(max, i)) && (noArrow1 || !LNumber.equalsDouble(min, i)); } /** * Updates the labels path by drawing the labels of the X/Y-axis. */ protected void updatePathLabels(final double gapx, final double gapy) { final FontRenderContext frc = new FontRenderContext(null, true, true); final PlottingStyle labelsDisplay = shape.getLabelsDisplayed(); final PlottingStyle ticksDisplay = shape.getTicksDisplayed(); final TicksStyle ticksStyle = shape.getTicksStyle(); if(labelsDisplay.isX()) updatePathLabelsX(ticksDisplay, ticksStyle, gapx, frc); if(labelsDisplay.isY()) updatePathLabelsY(ticksDisplay, ticksStyle, gapy, frc); } /** * Updates the general path of the view by drawing the frame of the shape. */ protected void updatePathFrame() { final double endx = shape.getGridEndX(); final double endy = shape.getGridEndY(); if(endx>0 || endy>0) { final double posx = shape.getPosition().getX(); final double posy = shape.getPosition().getY(); final double y1 = endy>0. ? posy-endy*IShape.PPC : posy; final double x2 = endx>0. ? posx+endx*IShape.PPC : posx; path.moveTo(posx, y1); path.lineTo(x2, y1); path.lineTo(x2, posy); path.lineTo(posx, posy); path.closePath(); } } /** * Updates the general path of the view by drawing the axis of the shape. */ protected void updatePathAxes() { final double posX = shape.getPosition().getX(); final double posY = shape.getPosition().getY(); final IArrow arr0 = shape.getArrowAt(1); final IArrow arr1 = shape.getArrowAt(3); final double arr0Reduction = arr0.getArrowStyle().needsLineReduction() ? arr0.getArrowShapedWidth() : 0.; final double arr1Reduction = arr1.getArrowStyle().needsLineReduction() ? arr1.getArrowShapedWidth() : 0.; path.moveTo(posX+shape.getGridStartX()*IShape.PPC + arr0Reduction, posY); path.lineTo(posX+shape.getGridEndX()*IShape.PPC - arr1Reduction, posY); path.moveTo(posX, posY-shape.getGridStartY()*IShape.PPC - arr0Reduction); path.lineTo(posX, posY-shape.getGridEndY()*IShape.PPC + arr1Reduction); } @Override public void updatePath() { final double incrx = shape.getIncrementX(); final double incry = shape.getIncrementY(); final double distX = shape.getDistLabelsX(); final double distY = shape.getDistLabelsY(); final AxesStyle axesStyle = shape.getAxesStyle(); final double gapX = LNumber.equalsDouble(distX, 0.) ? IShape.PPC : distX/incrx*IShape.PPC; final double gapY = LNumber.equalsDouble(distY, 0.) ? IShape.PPC : distY/incry*IShape.PPC; path.reset(); pathLabels.reset(); pathTicks.reset(); updatePathArrows(); switch(axesStyle) { case AXES: updatePathAxes(); break; case FRAME:updatePathFrame(); break; case NONE: break; } updatePathTicks(gapX, gapY); if(shape.getLabelsDisplayed()!=PlottingStyle.NONE) updatePathLabels(gapX, gapY); } @Override protected void updatePathArrows() { if(shape.getAxesStyle().supportsArrows()) super.updatePathArrows(); } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; final IPoint vectorTrans = beginRotation(g); g.setStroke(getStroke()); g.setColor(shape.getLineColour()); g.draw(path); g.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); g.setColor(Color.BLACK); g.draw(pathTicks); if(shape.getAxesStyle().supportsArrows()) paintArrows(g, false); if(shape.getLabelsDisplayed()!=PlottingStyle.NONE) { g.setColor(Color.BLACK); g.fill(pathLabels); } if(vectorTrans!=null) endRotation(g, vectorTrans); } @Override protected void paintArrows(final Graphics2D g, final boolean asShadow) { final Color colour = asShadow ? shape.getShadowCol() : shape.getFillingCol(); arrows.forEach(arr -> arr.paint(g, colour, asShadow)); } @Override public boolean intersects(final Rectangle2D r) { if(r==null) return false; final double rotationAngle = shape.getRotationAngle(); final boolean intersects; final Path2D pa; if(shape.getAxesStyle()==AxesStyle.NONE) pa = new Path2D.Double(new Rectangle2D.Double(shape.getPosition().getX(), shape.getPosition().getY(), 2, 2)); else pa = new Path2D.Double(path); if(shape.getTicksDisplayed()!=PlottingStyle.NONE) pa.append(pathTicks, false); if(shape.getLabelsDisplayed()!=PlottingStyle.NONE) pa.append(pathLabels, false); if(LNumber.equalsDouble(rotationAngle, 0.)) { intersects = pa.intersects(r); } else { final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double cx = (tl.getX()+br.getX())/2.; final double cy = (tl.getY()+br.getY())/2.; final double c2x = cos(rotationAngle)*cx - sin(rotationAngle)*cy; final double c2y = sin(rotationAngle)*cx + cos(rotationAngle)*cy; final AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y); at.rotate(rotationAngle); intersects = at.createTransformedShape(pa).intersects(r); } return intersects; } @Override public void updateBorder() { final double angle = shape.getRotationAngle(); Rectangle2D bound; if(shape.getAxesStyle()==AxesStyle.NONE) bound = new Rectangle2D.Double(shape.getPosition().getX(), shape.getPosition().getY(), 2, 2); else bound = path.getBounds2D(); if(shape.getTicksDisplayed()!=PlottingStyle.NONE) bound = bound.createUnion(pathTicks.getBounds2D()).getBounds2D(); if(shape.getLabelsDisplayed()!=PlottingStyle.NONE) bound = bound.createUnion(pathLabels.getBounds2D()).getBounds2D(); if(LNumber.equalsDouble(angle, 0.)) border.setFrame(bound); else { final IPoint tl = ShapeFactory.createPoint(); final IPoint br = ShapeFactory.createPoint(); getRotatedRectangle(bound.getMinX(), bound.getMinY(), bound.getWidth(), bound.getHeight(), angle, shape.getGravityCentre(), tl, br); border.setFrameFromDiagonal(tl.getX(), tl.getY(), br.getX(), br.getY()); } } } LBezierCurveView.java000066400000000000000000000201271321075051700366010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewBezierCurve; import java.awt.*; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.util.ArrayList; import java.util.List; /** * Defines a view of the model IBeziershape.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/01/08
    * @author Arnaud BLOUIN * @version 3.0 */ class LBezierCurveView extends LModifiablePointsShapeView implements IViewBezierCurve { /** * Creates an initialises the Java view of a LBeziershape. * @param model The model to view. * @since 3.0 */ protected LBezierCurveView(final IBezierCurve model) { super(model); arrows = new ArrayList<>(); for(int i=0, size=shape.getNbArrows(); i1; final boolean arrow2Drawable = shape.getArrowAt(-1).hasStyle() && shape.getNbPoints()>1 && !isClosed; final int size = shape.getNbPoints(); final List pts = shape.getPoints(); final List ctrlPts1 = shape.getFirstCtrlPts(); final List ctrlPts2 = shape.getSecondCtrlPts(); final double width = arr1.getDotSizeDim() + arr1.getDotSizeNum()*shape.getThickness(); final Ellipse2D.Double d = new Ellipse2D.Double(0, 0, width, width); int i; g.setColor(shape.getLineColour()); if(!arrow1Drawable || isClosed) fillCircle(d, pts.get(0), width, g); if(!arrow2Drawable || isClosed) fillCircle(d, pts.get(size-1), width, g); for(i=1; i pts = shape.getPoints(); final List ctrlPts1 = shape.getFirstCtrlPts(); final List ctrlPts2 = shape.getSecondCtrlPts(); final float thick = (float)(shape.hasDbleBord()? shape.getDbleBordSep()+shape.getThickness()*2. : shape.getThickness()); final Line2D.Double line = new Line2D.Double(); int i; g.setStroke(new BasicStroke(thick/2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f, new float[]{(float)shape.getDashSepBlack(), (float)shape.getDashSepWhite()}, 0)); g.setColor(shape.getLineColour()); for(i=3; i ctrlPts1 = shape.getFirstCtrlPts(); final List ctrlPts2 = shape.getSecondCtrlPts(); double minX = Double.MAX_VALUE; double minY = Double.MAX_VALUE; double maxX = -Double.MAX_VALUE; double maxY = -Double.MAX_VALUE; IPoint pt; for(final IPoint aCtrlPts1 : ctrlPts1) { if (aCtrlPts1.getX() < minX) minX = aCtrlPts1.getX(); if (aCtrlPts1.getY() < minY) minY = aCtrlPts1.getY(); if (aCtrlPts1.getX() > maxX) maxX = aCtrlPts1.getX(); if (aCtrlPts1.getY() > maxY) maxY = aCtrlPts1.getY(); } for(int i=1, size=ctrlPts2.size()-1; imaxX) maxX = pt.getX(); if(pt.getY()>maxY) maxY = pt.getY(); } minX = Math.min(minX, border.getMinX()); minY = Math.min(minY, border.getMinY()); maxX = Math.max(maxX, border.getMaxX()); maxY = Math.max(maxY, border.getMaxY()); border.setFrameFromDiagonal(minX, minY, maxX, maxY); } } @Override protected void setPath(final boolean close) { if(shape.getNbPoints()<2) return ; final List pts = shape.getPoints(); final List ctrlPts1 = shape.getFirstCtrlPts(); final List ctrlPts2 = shape.getSecondCtrlPts(); IPoint ctrl1; final int size; final double[] coords = updatePoint4Arrows(pts.get(0).getX(), pts.get(0).getY(), shape.getArrowAt(0)); final double[] coords2; if(pts.size()==2) // In this case the first curve contains the first and last points that must be modified. coords2 = updatePoint4Arrows(pts.get(1).getX(),pts.get(1).getY(), shape.getArrowAt(-1)); else coords2 = new double[]{pts.get(1).getX(),pts.get(1).getY()}; path.reset(); path.moveTo(coords[0], coords[1]); path.curveTo(ctrlPts1.get(0).getX(), ctrlPts1.get(0).getY(), ctrlPts1.get(1).getX(), ctrlPts1.get(1).getY(), coords2[0], coords2[1]); if(shape.isClosed()) size = pts.size(); else size = pts.size()-1; for(int i=2; i2) { ctrl1 = ctrlPts2.get(size-1); path.curveTo(ctrl1.getX(), ctrl1.getY(), ctrlPts1.get(size).getX(), ctrlPts1.get(size).getY(), pts.get(size).getX(), pts.get(size).getY()); } } } } LCircleArcView.java000066400000000000000000000016261321075051700362060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; /** * Defines a view of the LCircleArc model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/02/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class LCircleArcView extends LArcView { protected LCircleArcView(final ICircleArc model) { super(model); } } LCircleView.java000066400000000000000000000030241321075051700355520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; /** * Defines a view of the ICircle model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/12/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LCircleView extends LRectangularView { /** * Creates an initialises the Java view of a LCircle. * @param model The model to view. * @since 3.0 */ protected LCircleView(final ICircle model) { super(model); update(); } @Override public void updateBorder() { final double gap = getBorderGap(); final double width = shape.getWidth(); final double widthMin = Math.max(width+gap*2., shape.getThickness()); border.setFrame(shape.getX()-gap, shape.getY()-width-gap, widthMin, widthMin); } @Override protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { LEllipseView.setEllipsePath(path, tlx, tly, width, width); } } LDotView.java000066400000000000000000000260101321075051700350770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Rectangle; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewDot; /** * Defines a view of the IDot model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/04/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LDotView extends LShapeView implements IViewDot { /** * Initialises the view of the dot. * @param model The dot model. * @since 3.0 */ protected LDotView(final IDot model) { super(model); update(); } @Override public BasicStroke getStroke() { final BasicStroke stroke; switch(shape.getDotStyle()) { case FTRIANGLE : case TRIANGLE : case FPENTAGON : case PENTAGON : case FDIAMOND : case O : case DIAMOND : case ASTERISK : stroke = new BasicStroke((float)shape.getGeneralGap(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); break; case BAR : stroke = new BasicStroke((float)shape.getBarThickness(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); break; case DOT : stroke = new BasicStroke((float)(shape.getDiametre()/IDot.THICKNESS_O_STYLE_FACTOR), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); break; case OPLUS : case FSQUARE : case OTIMES : case SQUARE : stroke = new BasicStroke((float)shape.getGeneralGap(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER); break; case PLUS : stroke = new BasicStroke((float)(shape.getDiametre()/IDot.PLUS_COEFF_WIDTH), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); break; case X : stroke = new BasicStroke((float)shape.getCrossGap(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); break; default : stroke = null; } return stroke; } @Override public void paintBorders(final Graphics2D g) { // Nothing to do. } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; final IPoint vectorTrans = beginRotation(g); switch(shape.getDotStyle()) { case DIAMOND : case O : case PENTAGON : case SQUARE : case TRIANGLE : paintDotShape(g, true, shape.getFillingCol()); break; case DOT : case FDIAMOND : case FPENTAGON : case FSQUARE : case FTRIANGLE : paintDotShape(g, true, shape.getLineColour()); break; case ASTERISK : case BAR : case OPLUS : case OTIMES : case PLUS : case X : paintDotShape(g, false, null); break; } if(vectorTrans!=null) endRotation(g, vectorTrans); } private void paintDotShape(final Graphics2D g, final boolean toFill, final Color fillCol) { final BasicStroke stroke = getStroke(); if(toFill) { g.setColor(fillCol); g.fill(path); } if(stroke!=null) { g.setStroke(stroke); g.setColor(shape.getLineColour()); g.draw(path); } } protected void setPathOTime() { final IPoint centre = shape.getPosition(); final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); final double dec = shape.getGeneralGap(); final double tlx = tl.getX(); final double tly = tl.getY(); final double brx = br.getX(); final double bry = br.getY(); path.reset(); setPathOLikeDot(shape.getOGap()); IPoint p1 = ShapeFactory.createPoint((tlx+brx)/2., tly+dec*2); IPoint p2 = ShapeFactory.createPoint((tlx+brx)/2., bry-dec*2); p1 = p1.rotatePoint(centre, Math.PI/4.); p2 = p2.rotatePoint(centre, Math.PI/4.); path.moveTo(p1.getX(), p1.getY()); path.lineTo(p2.getX(), p2.getY()); p1.setPoint(tlx+dec*2, (tly+bry)/2.); p2.setPoint(brx-dec*2, (tly+bry)/2.); p1 = p1.rotatePoint(centre, Math.PI/4.); p2 = p2.rotatePoint(centre, Math.PI/4.); path.moveTo(p1.getX(), p1.getY()); path.lineTo(p2.getX(), p2.getY()); } protected void setPathOPlus() { final double dec = shape.getGeneralGap(); final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); path.reset(); setPathOLikeDot(shape.getOGap()); path.moveTo((tl.getX()+br.getX())/2., tl.getY()+dec*2); path.lineTo((tl.getX()+br.getX())/2., br.getY()-dec*2); path.moveTo(tl.getX()+dec*2, (tl.getY()+br.getY())/2.); path.lineTo(br.getX()-dec*2, (tl.getY()+br.getY())/2.); } protected void setPathO() { path.reset(); setPathOLikeDot(shape.getOGap()); } private void setPathOLikeDot(final double dec) { final IPoint tl = shape.getLazyTopLeftPoint(); LEllipseView.setEllipsePath(path, tl.getX()+dec/2., tl.getY()+dec/2., shape.getDiametre()-dec, shape.getDiametre()-dec); } protected void setPathBar() { final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); path.reset(); path.moveTo((tl.getX()+br.getX())/2., tl.getY()+shape.getBarThickness()/2.); path.lineTo((tl.getX()+br.getX())/2., br.getY()+shape.getBarGap()); } protected void setPathPlus() { final double plusGap= shape.getPlusGap(); final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); path.reset(); path.moveTo((tl.getX()+br.getX())/2., tl.getY()-plusGap); path.lineTo((tl.getX()+br.getX())/2., br.getY()+plusGap); path.moveTo(tl.getX()-plusGap, (tl.getY()+br.getY())/2.); path.lineTo(br.getX()+plusGap, (tl.getY()+br.getY())/2.); } protected void setPathSquare() { final double dec = shape.getDiametre()/IDot.THICKNESS_O_STYLE_FACTOR; final IPoint tl = shape.getLazyTopLeftPoint(); final double width = shape.getDiametre()-dec*3; final double x = tl.getX()+dec+dec/2.; final double y = tl.getY()+dec+dec/2.; path.reset(); path.moveTo(x, y); path.lineTo(x+width, y); path.lineTo(x+width, y+width); path.lineTo(x, y+width); path.closePath(); } protected void setPathX() { final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); final double crossGap= shape.getCrossGap(); path.reset(); path.moveTo(tl.getX()+crossGap, tl.getY()+crossGap); path.lineTo(br.getX()-crossGap, br.getY()-crossGap); path.moveTo(br.getX()-crossGap, tl.getY()+crossGap); path.lineTo(tl.getX()+crossGap, br.getY()-crossGap); } protected void setPathAsterisk() { final IPoint br = shape.getLazyBottomRightPoint(); final IPoint tl = shape.getLazyTopLeftPoint(); final double width = shape.getDiametre(); final double dec = width/IDot.THICKNESS_O_STYLE_FACTOR; final double xCenter = (tl.getX()+br.getX())/2.; final double yCenter = (tl.getY()+br.getY())/2.; final double radius = Math.abs(tl.getY()+width/10.-(br.getY()-width/10.))/2. + dec; path.reset(); path.moveTo(xCenter, tl.getY()+width/10.-dec); path.lineTo(xCenter, br.getY()-width/10.+dec); path.moveTo(Math.cos(Math.PI/6.)*radius+xCenter, radius/2. + yCenter); path.lineTo(Math.cos(7*Math.PI/6.)*radius+xCenter, Math.sin(7*Math.PI/6.)*radius+yCenter); path.moveTo(Math.cos(5*Math.PI/6.)*radius+xCenter, Math.sin(5*Math.PI/6.)*radius+yCenter); path.lineTo(Math.cos(11*Math.PI/6.)*radius+xCenter, Math.sin(11*Math.PI/6.)*radius+yCenter); } /** * Creates a diamond (one of the possibles shapes of a dot). */ protected void setPathDiamond() { final IPoint tl = shape.getLazyTopLeftPoint(); final IPoint br = shape.getLazyBottomRightPoint(); final double dec = shape.getDiametre()/IDot.THICKNESS_O_STYLE_FACTOR; // This diamond is a golden diamond // cf. http://mathworld.wolfram.com/GoldenRhombus.html final double midY = (tl.getY()+br.getY())/2; final double a = Math.abs(tl.getX()-br.getX())/(2.*Math.sin(IShape.GOLDEN_ANGLE)); final double p = 2.*a*Math.cos(IShape.GOLDEN_ANGLE); final double x1 = br.getX()-dec-.5*dec; final double x3 = tl.getX()+dec+.5*dec; path.reset(); path.moveTo((x1+x3)/2., midY+p/2.-dec-.5*dec); path.lineTo(x1, midY); path.lineTo((x1+x3)/2., midY-p/2.+dec+.5*dec); path.lineTo(x3, midY); path.closePath(); } /** * Creates a pentagon (one of the possibles shapes of a dot) */ protected void setPathPentagon() { final double dec = shape.getDiametre()/IDot.THICKNESS_O_STYLE_FACTOR; final IPoint tl = shape.getLazyTopLeftPoint(); final IPoint br = shape.getLazyBottomRightPoint(); final double yCenter= (tl.getY()+br.getY())/2. - dec; final double xCenter= (tl.getX()+br.getX())/2.; final double dist = Math.abs(tl.getY()-br.getY())/2. + dec; final double c1 = 0.25*(Math.sqrt(5)-1.)*dist; final double s1 = Math.sin(2*Math.PI/5.)*dist; final double c2 = 0.25*(Math.sqrt(5)+1.)*dist; final double s2 = Math.sin(4*Math.PI/5.)*dist; path.reset(); path.moveTo(xCenter, tl.getY()-dec); path.lineTo(s1 + xCenter, -c1 + yCenter + dec); path.lineTo(s2 + xCenter, c2 + yCenter + dec); path.lineTo(-s2 + xCenter, c2 + yCenter + dec); path.lineTo(-s1 + xCenter, -c1 + yCenter + dec); path.closePath(); } /** * Creates a triangle (one of the possibles shapes of a dot). */ protected void setPathTriangle() { final IPoint tl = shape.getLazyTopLeftPoint(); final double dec = shape.getDiametre()/IDot.THICKNESS_O_STYLE_FACTOR; final IPoint br = shape.getLazyBottomRightPoint(); path.reset(); path.moveTo((br.getX() + tl.getX())/2., tl.getY()-1.5*dec); path.lineTo(tl.getX()-0.3*dec, br.getY()-3*dec); path.lineTo(br.getX()+0.3*dec, br.getY()-3*dec); path.closePath(); } @Override public void updatePath() { switch(shape.getDotStyle()) { case ASTERISK : setPathAsterisk();break; case BAR : setPathBar(); break; case DIAMOND : setPathDiamond(); break; case O : case DOT : setPathO(); break; case FDIAMOND : setPathDiamond(); break; case PENTAGON : case FPENTAGON : setPathPentagon();break; case SQUARE : case FSQUARE : setPathSquare(); break; case TRIANGLE : case FTRIANGLE : setPathTriangle();break; case OPLUS : setPathOPlus(); break; case OTIMES : setPathOTime(); break; case PLUS : setPathPlus(); break; case X : setPathX(); break; } } @Override protected void updateDblePathInside() { // Nothing to do. } @Override protected void updateDblePathMiddle() { // Nothing to do. } @Override protected void updateDblePathOutside() { // Nothing to do. } @Override protected void updateGeneralPathInside() { // Nothing to do. } @Override protected void updateGeneralPathMiddle() { // Nothing to do. } @Override protected void updateGeneralPathOutside() { // Nothing to do. } } LEllipseView.java000066400000000000000000000100131321075051700357420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a view of the IEllipse model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/11/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LEllipseView extends LRectangularView { /** Used to compute the drawing of an ellipse. */ public static final double U = 2./3.*(Math.sqrt(2.)-1.); /** Used to compute the drawing of an ellipse. */ protected static final double POINTS[][] = { { 1.0, 0.5 + U, 0.5 + U, 1.0, 0.5, 1.0 }, { 0.5 - U, 1.0, 0.0, 0.5 + U, 0.0, 0.5 }, { 0.0, 0.5 - U, 0.5 - U, 0.0, 0.5, 0.0 }, { 0.5 + U, 0.0, 1.0, 0.5 - U, 1.0, 0.5 } }; /** * Creates an initialises the Java view of a LEllipse. * @param model The model to view. * @since 3.0 */ protected LEllipseView(final S model) { super(model); update(); } @Override public void updateBorder() { final double angle = shape.getRotationAngle(); if(LNumber.equalsDouble(angle, 0.)) super.updateBorder(); else { // See: http://math.stackexchange.com/questions/91132/how-to-get-the-limits-of-rotated-ellipse final IPoint gc = shape.getGravityCentre(); final double a = shape.getA()+getBorderGap(); final double b = shape.getB()+getBorderGap(); final double cosAngle = Math.cos(angle)*Math.cos(angle); final double sinAngle = Math.sin(angle)*Math.sin(angle); final double xMin = -Math.sqrt(a*a*cosAngle+b*b*sinAngle); final double yMin = -Math.sqrt(a*a*sinAngle+b*b*cosAngle); border.setFrame(xMin+gc.getX(), yMin+gc.getY(), -xMin*2., -yMin*2.); } } /** * Adds a "curveTo" segment to the given path. This segment is one of the four quarter of an ellipse. * @param tlx The top-left X-coordinate of the ellipse. * @param tly The top-left Y-coordinate of the ellipse. * @param width The width of the ellipse. * @param height The height of the ellipse. * @param path The path to complete. * @param points @see POINTS attribute. Contains values used to draw the ellipse quarter. * @throws NullPointerException If one of the given parameters is null. * @since 3.0 */ protected static void curveQuarter(final double tlx, final double tly, final double width, final double height, final Path2D path, final double[] points) { path.curveTo(tlx+points[0]*width, tly+points[1]*height, tlx+points[2]*width, tly+points[3]*height, tlx+points[4]*width, tly+points[5]*height); } @Override protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { setEllipsePath(path, tlx, tly, width, height); } /** * Creates an ellipse in the given path. * @param path The path to fill. * @param tlx The top left X-coordinate of the ellipse. * @param tly The top left Y-coordinate of the ellipse. * @param width The width of the ellipse. * @param height The height of the ellipse. * @since 3.0 */ public static void setEllipsePath(final Path2D path, final double tlx, final double tly, final double width, final double height) { if(path!=null) { final double w2 = width<1. && height<1. ? 1. : width; final double[] p = POINTS[3]; path.moveTo(tlx + p[4]*w2, tly + p[5]*height); for(byte cpt=1; cpt<5; cpt++) curveQuarter(tlx, tly, w2, height, path, POINTS[cpt-1]); path.closePath(); } } } LFreeHandView.java000066400000000000000000000103451321075051700360310ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; /** * Defines a view of the IFreeHand model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/13/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LFreeHandView extends LShapeView { /** * Creates and initialises a view of a free hand model. * @param model The model to view. * @since 3.0 */ protected LFreeHandView(final IFreehand model) { super(model); update(); } /** * Updates the Swing path of the freehand shape. * @since 3.0 */ protected void setPath() { path.reset(); if(shape.getNbPoints()>1) { switch(shape.getType()) { case CURVES: setPathCurves(); break; case LINES: setPathLines(); break; } if(!shape.isOpen()) path.closePath(); } } /** * Fills the path of curves. */ protected void setPathCurves() { final int interval = shape.getInterval(); final List pts = shape.getPoints(); final int size = pts.size(); double prevx = pts.get(size-1).getX(); double prevy = pts.get(size-1).getY(); double curx = pts.get(0).getX(); double cury = pts.get(0).getY(); double midx = (curx + prevx)/2.; double midy = (cury + prevy)/2.; int i; double x1; double x2; double y1; double y2; path.moveTo(curx, cury); // Starting the drawing of the shape with a line. if(size>interval) { prevx = curx; prevy = cury; curx = pts.get(interval).getX(); cury = pts.get(interval).getY(); midx = (curx + prevx) / 2.; midy = (cury + prevy) / 2.; path.lineTo(midx, midy); } // Adding curves for(i=interval*2; i pts = shape.getPoints(); final int size = pts.size(); IPoint pt = pts.get(0); int i; path.moveTo(pt.getX(), pt.getY()); for(i=interval; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/12/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LGridView extends LStandardGridView { /** The Java2D path used to draw the sub-grid. */ protected Path2D pathSubGrid; /** * Initialises the grid view. * @param grid The model of the grid. * @since 3.0 */ protected LGridView(final IGrid grid) { super(grid); pathSubGrid = new Path2D.Double(); update(); } @Override public void flush() { super.flush(); pathSubGrid = null; } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; final IPoint vectorTrans = beginRotation(g); // Drawing the sub grid. g.setColor(shape.getSubGridColour()); if(shape.getSubGridDots()>0) g.setStroke(new BasicStroke((float)shape.getSubGridWidth(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); else g.setStroke(new BasicStroke((float)shape.getSubGridWidth(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); g.draw(pathSubGrid); // Drawing the main grid. g.setColor(shape.getLineColour()); if(shape.getGridDots()>0) g.setStroke(new BasicStroke((float)shape.getGridWidth(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); else g.setStroke(new BasicStroke((float)shape.getGridWidth(), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); g.draw(path); // Drawing the labels. if(shape.getLabelsSize()>0) { g.setColor(shape.getGridLabelsColour()); g.fill(pathLabels); } if(vectorTrans!=null) endRotation(g, vectorTrans); } private void updatePathMainGridDots(final double unit, final double minX, final double maxX, final double minY, final double maxY, final double posX, final double posY, final double xStep, final double yStep, final double tlx, final double tly, final double brx, final double bry, final double absStep) { final int gridDots = shape.getGridDots(); final double dotStep = unit*IShape.PPC/gridDots; for(double k=minX, i=posX; k<=maxX; i+=xStep, k++) for(double m=tly, n=minY; n0) updatePathMainGridDots(unit, minX, maxX, minY, maxY, posX, posY, xStep, yStep, tlx, tly, brx, bry, absStep); else { for(k=minX, i=posX; k<=maxX; i+=xStep, k++) { path.moveTo(i, bry); path.lineTo(i, tly); } for(k=minY, i=posY; k<=maxY; i-=yStep, k++) { path.moveTo(tlx, i); path.lineTo(brx, i); } } } protected void updatePathSubGrid(final double unit, final double minX, final double maxX, final double minY, final double maxY, final double posX, final double posY, final double xStep, final double yStep, final double tlx, final double tly, final double brx, final double bry) { final double subGridDiv = shape.getSubGridDiv(); final double subGridDots= shape.getSubGridDots(); final double xSubStep = xStep/subGridDiv; final double ySubStep = yStep/subGridDiv; double i; double j; double n; double m; double k; // We draw the sub-grid if(subGridDots>0) { final double dotStep = unit*IShape.PPC/(subGridDots*subGridDiv); final double nbX = (maxX-minX)*subGridDiv; final double nbY = (maxY-minY)*subGridDiv; for(i=0, n=tlx; i1) { for(k=minX, i=posX; k=minY; i+=absStep, j--) { label = String.valueOf((int)j); x = isWest ? (float)(xorig-fontMetrics.stringWidth(label)-labelsSize/4.-width) : xGapNotWest; updateText(label, x, (float)i, font, frc); } } @Override public void updatePath() { final double minY = shape.getGridMinY(); final double maxY = shape.getGridMaxY(); final double minX = shape.getGridMinX(); final double maxX = shape.getGridMaxX(); final double unit = shape.getUnit(); double yStep = IShape.PPC*unit; double xStep = IShape.PPC*unit; xStep *= shape.getGridEndX() *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/16/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LGroupView extends LShapeView { /** The view that contains the drawing. */ protected List views; /** * Creates an initialises a drawing view. * @since 3.0 */ protected LGroupView() { this(ShapeFactory.createGroup()); } /** * Creates an initialises a drawing view. * @param model The model to view. * @since 3.0 */ protected LGroupView(final IGroup model) { super(model); views = new ArrayList<>(); for(final IShape s : model.getShapes()) views.add(View2DTK.getFactory().createView(s)); updateBorder(); } @Override public void flush() { super.flush(); for(final IViewShape v : views) v.flush(); views.clear(); } @Override public void update() { for(final IViewShape view : views) view.update(); super.update(); } @Override public boolean contains(final double x, final double y) { // We test the borders first to limit the computations. if(!border.contains(x, y)) return false; for(final IViewShape sh : views) if(sh.contains(x, y)) return true; return false; } /** * @return The number of views that has the drawing view. * @since 3.0 */ public int size() { return views.size(); } @Override public boolean intersects(final Rectangle2D r) { final int size = views.size(); int i=0; boolean again = true; while(ixMax) xMax = rec.getMaxX(); if(rec.getMaxY()>yMax) yMax = rec.getMaxY(); } border.setFrameFromDiagonal(xMin, yMin, xMax, yMax); } /** * @return the views. * @since 3.0 */ public List getViews() { return views; } @Override protected void updateDblePathInside() { // Nothing to do. } @Override protected void updateDblePathMiddle() { // Nothing to do. } @Override protected void updateDblePathOutside() { // Nothing to do. } @Override protected void updateGeneralPathInside() { // Nothing to do. } @Override protected void updateGeneralPathMiddle() { // Nothing to do. } @Override protected void updateGeneralPathOutside() { // Nothing to do. } } LModifiablePointsShapeView.java000066400000000000000000000056541321075051700405750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Rectangle2D; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewModifiablePtsShape; import net.sf.latexdraw.util.LNumber; /** * Defines an abstract view of the IModifiablePointsShape model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class LModifiablePointsShapeView extends LShapeView implements IViewModifiablePtsShape { /** * Initialises the view of a IModifiablePointsShape. */ protected LModifiablePointsShapeView(final S model) { super(model); } /** * Update the path of the multi-point shape. * @param close True: the shape will be closed. * @since 3.0 */ protected void setPath(final boolean close) { final List pts = shape.getPoints(); path.reset(); if(pts.size()>1) { final int size = pts.size(); IPoint pt = pts.get(0); final double firstX = pt.getX(); final double firstY = pt.getY(); path.moveTo(firstX, firstY); for(int i=1; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LPictureView extends LShapeView { /** * Initialises a view of a picture. * @param model The model to view. * @since 3.0 */ protected LPictureView(final IPicture model) { super(model); update(); } @Override public boolean intersects(final Rectangle2D r) { return border.intersects(r); } @Override public boolean contains(final double x, final double y) { return border.contains(x, y); } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; final IPoint vectorTrans = beginRotation(g); g.drawImage(shape.getImage(), (int)shape.getX(), (int)shape.getY(), null); if(vectorTrans!=null) endRotation(g, vectorTrans); } @Override public void updateBorder() { border.setFrame(shape.getX(), shape.getY(), shape.getWidth(), shape.getHeight()); if(!LNumber.equalsDouble(shape.getRotationAngle(), 0.)) border.setFrame(getRotatedShape2D(shape.getRotationAngle(), border, shape.getTopLeftPoint(), shape.getBottomRightPoint()).getBounds2D()); } @Override protected void updateDblePathInside() { // Nothing to do. } @Override protected void updateDblePathMiddle() { // Nothing to do. } @Override protected void updateDblePathOutside() { // Nothing to do. } @Override protected void updateGeneralPathInside() { // Nothing to do. } @Override protected void updateGeneralPathMiddle() { // Nothing to do. } @Override protected void updateGeneralPathOutside() { // Nothing to do. } } LPlotView.java000066400000000000000000000172711321075051700353000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.PlotViewHelper; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewPlot; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.util.LNumber; /** * Defines a view for ps plot figures.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2014-11-01
    * @author Arnaud BLOUIN * @since 3.3 */ public class LPlotView extends LShapeView implements IViewPlot { private LPolylineView lineView; private LPolygonView polygonView; private LBezierCurveView curveView; private List dotsView; /** * Creates a view of the given model and initialises the Java2D view. * @param model The shape model. * @throws IllegalArgumentException If model is null. */ protected LPlotView(final IPlot model) { super(model); update(); } @Override public void paint(final Graphics2D g, final Rectangle clip) { switch(shape.getPlotStyle()) { case LINE: lineView.paint(g, clip); break; case CURVE: curveView.paint(g, clip); break; case ECURVE: curveView.paint(g, clip); break; case CCURVE: curveView.paint(g, clip); break; case DOTS: final IPoint vectorTrans = beginRotation(g); for(LDotView v:dotsView) v.paint(g, clip); if(vectorTrans!=null) endRotation(g, vectorTrans); break; case POLYGON: polygonView.paint(g, clip); break; } } @Override public void updatePath() { final double minX = shape.getPlotMinX(); final double maxX = shape.getPlotMaxX(); final double step = shape.getPlottingStep(); final double posX = shape.getPosition().getX(); final double posY = shape.getPosition().getY(); switch(shape.getPlotStyle()) { case LINE: updateLine(posX, posY, minX, maxX, step); break; case CURVE: updateCurve(posX, posY, minX, maxX, step); break; case ECURVE: updateCurve(posX, posY, minX+step, maxX-step, step); break; case CCURVE: updateCurve(posX, posY, minX, maxX, step); break; case DOTS: updatePoints(posX, posY, minX, maxX, step); break; case POLYGON: updatePolygon(posX, posY, minX, maxX, step); break; } } private void updatePoints(final double posX, final double posY, final double minX, final double maxX, final double step) { if(dotsView==null) dotsView = new ArrayList<>(); else { for(LDotView v:dotsView) v.flush(); dotsView.clear(); } final List dots = PlotViewHelper.INSTANCE.updatePoints(shape, posX, posY, minX, maxX, step); for(IDot dot : dots) { LDotView v = new LDotView(dot); dotsView.add(v); v.update(); } } private void updatePolygon(final double posX, final double posY, final double minX, final double maxX, final double step) { polygonView = new LPolygonView(PlotViewHelper.INSTANCE.updatePolygon(shape, posX, posY, minX, maxX, step)); polygonView.update(); } private void updateLine(final double posX, final double posY, final double minX, final double maxX, final double step) { lineView = new LPolylineView(PlotViewHelper.INSTANCE.updateLine(shape, posX, posY, minX, maxX, step)); lineView.update(); } private void updateCurve(final double posX, final double posY, final double minX, final double maxX, final double step) { curveView = new LBezierCurveView(PlotViewHelper.INSTANCE.updateCurve(shape, posX, posY, minX, maxX, step)); curveView.update(); } @Override public Rectangle2D getBorder() { switch(shape.getPlotStyle()) { case CCURVE: return curveView.getBorder(); case CURVE: return curveView.getBorder(); case ECURVE: return curveView.getBorder(); case LINE: return lineView.getBorder(); case POLYGON: return polygonView.getBorder(); case DOTS: final double rota = shape.getRotationAngle(); Rectangle2D rec = dotsView.get(0).getBorder(); if(LNumber.equalsDouble(rota, 0.)) { for(int i=1, size=dotsView.size(); i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LPolygonView extends LModifiablePointsShapeView { /** * Creates an initialises the Java view of a LPolygon. * @param model The model to view. * @since 3.0 */ protected LPolygonView(final IPolygon model) { super(model); update(); } } LPolylineView.java000066400000000000000000000045441321075051700361540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.util.LNumber; /** * Defines a view of the IPolyline model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LPolylineView extends LModifiablePointsShapeView { /** * Creates an initialises the Java view of a LLines. * @param model The model to view. * @since 3.0 */ protected LPolylineView(final IPolyline model) { super(model); arrows = new ArrayList<>(); for(int i=0, size=shape.getNbArrows(); i pts = shape.getPoints(); path.reset(); if(pts.size()>1) { final int size = pts.size(); IPoint pt = pts.get(0); double firstX = pt.getX(); double firstY = pt.getY(); double[] coords = LBezierCurveView.updatePoint4Arrows(firstX, firstY, shape.getArrowAt(0)); firstX = coords[0]; firstY = coords[1]; path.moveTo(firstX, firstY); for(int i=1; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/16/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LRectangleView extends LRectangularView implements IViewRectangle { /** * Creates an initialises the Java view of a LRect. * @param model The model to view. * @since 3.0 */ protected LRectangleView(final IRectangle model) { super(model); update(); } @Override protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { final double w2 = Math.max(1., width); final double h2 = Math.max(1., height); if(shape.isRoundCorner()) { final double diameter = Math.max(1., shape.getLineArc() * Math.min(w2, h2)); final double radius = diameter/2.; path.moveTo(tlx + radius, tly); path.lineTo(tlx + w2 - radius, tly); LEllipseView.curveQuarter(tlx+w2-diameter, tly, diameter, diameter, path, LEllipseView.POINTS[3]); path.lineTo(tlx + width, tly + height - radius); LEllipseView.curveQuarter(tlx+w2-diameter, tly+height-diameter, diameter, diameter, path, LEllipseView.POINTS[0]); path.lineTo(tlx + radius, tly + height); LEllipseView.curveQuarter(tlx, tly+h2-diameter, diameter, diameter, path, LEllipseView.POINTS[1]); path.lineTo(tlx, tly + h2 - radius); path.lineTo(tlx, tly + radius); LEllipseView.curveQuarter(tlx, tly, diameter, diameter, path, LEllipseView.POINTS[2]); path.closePath(); } else { path.moveTo(tlx , tly); path.lineTo(tlx+w2, tly); path.lineTo(tlx+w2, tly+h2); path.lineTo(tlx , tly+h2); path.closePath(); } } } LRectangularView.java000066400000000000000000000061201321075051700366200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines a view of the IRectangularView model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/01/2010
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class LRectangularView extends LShapeView { /** * Initialises a rectangular view. * @param model The rectangular model. * @since 3.0 */ protected LRectangularView(final S model) { super(model); } protected double getBorderGap() { final double thickness = shape.getThickness(); switch(shape.getBordersPosition()) { case MID: return shape.hasDbleBord() ? thickness+shape.getDbleBordSep()/2. : thickness/2.; case OUT: return shape.hasDbleBord() ? thickness*2.+shape.getDbleBordSep() : thickness; case INTO:return 0.0; } return 0.0; } @Override protected void updateGeneralPathInside() { updateGeneralPath(shape.getThickness()); } @Override protected void updateGeneralPathMiddle() { updateGeneralPath(0.); } @Override protected void updateGeneralPathOutside() { updateGeneralPath(-shape.getThickness()); } /** * Update the path of the rectangular shape. * @param gap The value removed from the height and the width of the shape. Can equal 0. * @since 3.0 */ protected void updateGeneralPath(final double gap) { final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); path.reset(); setRectangularShape(path, tl.getX()+gap/2., tl.getY()+gap/2., br.getX()-tl.getX()-gap, br.getY()-tl.getY()-gap); } /** * Creates a rectangular shape in the given path using the given information. The path is not cleared. * @param path The path to fill. * @param tlx The X-coordinate of the top-left of the rectangular shape to draw. * @param tly The Y-coordinate of the top-left of the rectangular shape to draw. * @param width The width of the rectangular shape. * @param height The height of the rectangular shape. * @since 3.0 */ protected abstract void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height); @Override protected void updateDblePathInside() { updateGeneralPath(shape.getThickness()*2. + shape.getDbleBordSep()); } @Override protected void updateDblePathMiddle() { updateGeneralPath(0.); } @Override protected void updateDblePathOutside() { updateGeneralPath(-(shape.getThickness()*2. + shape.getDbleBordSep())); } } LRhombusView.java000066400000000000000000000025651321075051700360010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; /** * Defines a view of the IRhombus model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/19/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LRhombusView extends LRectangularView { /** * Creates an initialises the Java view of a LRhombus. * @param model The model to view. * @since 3.0 */ protected LRhombusView(final IRhombus model) { super(model); update(); } @Override protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { path.moveTo(tlx+width/2., tly); path.lineTo(tlx+width, tly+height/2.); path.lineTo(tlx+width/2., tly+height); path.lineTo(tlx , tly+height/2.); path.closePath(); } } LShapeView.java000066400000000000000000000514671321075051700354270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.glib.views.AbstractView; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewArrow; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.util.LNumber; import org.malai.picking.Picker; import java.awt.*; import java.awt.geom.*; import java.util.ArrayList; import java.util.List; /** * Defines a view of the LShape model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/16/2008
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class LShapeView extends AbstractView implements IViewShape { /** The Java2D path used to draw the shape. */ protected Path2D path; /** The view of the arrows of the shape. */ protected List arrows; /** * The border of the shape. This attribute must be used to compute * 'intersects', 'contains' operations, etc. operations. */ protected Rectangle2D border; /** * Creates a view of the given model and initialises the Java2D view. * @param model The shape model. * @throws IllegalArgumentException If model is null. */ protected LShapeView(final S model) { super(model); path = new Path2D.Double(); border = new Rectangle2D.Double(); arrows = new ArrayList<>(); } protected static Shape getRotatedShape2D(final double angle, final Shape shape, final IPoint tlPoint, final IPoint brPoint) { final Shape sh; if(LNumber.equalsDouble(angle, 0.)) sh = shape; else { final double cx = (tlPoint.getX()+brPoint.getX())/2.; final double cy = (tlPoint.getY()+brPoint.getY())/2.; final double c2x = Math.cos(angle)*cx - Math.sin(angle)*cy; final double c2y = Math.sin(angle)*cx + Math.cos(angle)*cy; final AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y); at.rotate(angle); sh = at.createTransformedShape(shape); } return sh; } @Override public Shape getRotatedShape2D() { return getRotatedShape2D(shape.getRotationAngle(), path, shape.getTopLeftPoint(), shape.getBottomRightPoint()); } @Override public Path2D getPath() { return path; } @Override public void updateBorder() { final Shape sh; if(LNumber.equalsDouble(shape.getRotationAngle(), 0.)) sh = path; else sh = getRotatedShape2D(); border.setFrame(getStroke().createStrokedShape(sh).getBounds2D()); } /** * Updates the borders of the shape as inside borders. * @since 3.0 */ protected abstract void updateGeneralPathInside(); /** * Updates the borders of the shape as middle borders. * @since 3.0 */ protected abstract void updateGeneralPathMiddle(); /** * Updates the borders of the shape as outside borders. * @since 3.0 */ protected abstract void updateGeneralPathOutside(); @Override public void updatePath() { if(shape.isBordersMovable()) if(shape.isDbleBorderable() && shape.hasDbleBord()) switch(shape.getBordersPosition()) { case INTO : updateDblePathInside(); break; case MID : updateDblePathMiddle(); break; case OUT : updateDblePathOutside(); break; } else switch(shape.getBordersPosition()) { case INTO : updateGeneralPathInside(); break; case MID : updateGeneralPathMiddle(); break; case OUT : updateGeneralPathOutside(); break; } else if(shape.isDbleBorderable() && shape.hasDbleBord()) updateDblePathMiddle(); else updateGeneralPathMiddle(); updatePathArrows(); } /** * Updates the path of the view of the arrows. */ protected void updatePathArrows() { for(final IViewArrow arrView : arrows) arrView.updatePath(); } /** * Updates the borders of the double boundary when position is outside. * @since 3.0 */ protected abstract void updateDblePathOutside(); /** * Updates the borders of the double boundary when position is inside. * @since 3.0 */ protected abstract void updateDblePathInside(); /** * Updates the borders of the double boundary when position is middle. * @since 3.0 */ protected abstract void updateDblePathMiddle(); @Override public void update() { updatePath(); updateBorder(); } @Override public void paintFilling(final Graphics2D g) { final FillingStyle fStyle = shape.getFillingStyle(); switch(fStyle) { case NONE: if(shape.hasShadow() && shape.shadowFillsShape()) { g.setColor(shape.getFillingCol()); g.fill(path); } break; case PLAIN: g.setColor(shape.getFillingCol()); if(shape.hasShadow()) { g.setStroke(new BasicStroke((float)getStrokeThickness())); g.draw(path); } g.fill(path); break; case GRAD: final GeneralPath p = new GeneralPath(path);//TODO checks if useful the create an other path final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); IPoint pt1 = ShapeFactory.createPoint((tl.getX()+br.getX())/2., tl.getY()); IPoint pt2 = ShapeFactory.createPoint((tl.getX()+br.getX())/2., br.getY()); double angle = shape.getGradAngle()%(2*Math.PI); double gradMidPt = shape.getGradMidPt(); p.setWindingRule(Path2D.WIND_NON_ZERO); if(angle<0.) angle = 2.*Math.PI + angle; if(angle>=Math.PI) { gradMidPt = 1. - gradMidPt; angle -= Math.PI; } if (LNumber.equalsDouble(angle, 0.)) { if (gradMidPt < 0.5) pt1.setY(pt2.getY() - Point2D.distance(pt2.getX(), pt2.getY(), (tl.getX() + br.getX()) / 2., br.getY())); pt2.setY(tl.getY() + (br.getY() - tl.getY()) * gradMidPt); } else { if (LNumber.equalsDouble(angle % (Math.PI / 2.), 0.)) { pt1 = ShapeFactory.createPoint(tl.getX(), (tl.getY() + br.getY()) / 2.); pt2 = ShapeFactory.createPoint(br.getX(), (tl.getY() + br.getY()) / 2.); if (gradMidPt < 0.5) pt1.setX(pt2.getX() - Point2D.distance(pt2.getX(), pt2.getY(), br.getX(), (tl.getY() + br.getY()) / 2.)); pt2.setX(tl.getX() + (br.getX() - tl.getX()) * gradMidPt); } else { final IPoint cg = shape.getGravityCentre(); final ILine l2; final ILine l; pt1 = pt1.rotatePoint(cg, -angle); pt2 = pt2.rotatePoint(cg, -angle); l = ShapeFactory.createLine(pt1, pt2); if (angle >= 0. && angle < Math.PI / 2.) l2 = l.getPerpendicularLine(tl); else l2 = l.getPerpendicularLine(ShapeFactory.createPoint(tl.getX(), br.getY())); pt1 = l.getIntersection(l2); final double distance = Point2D.distance(cg.getX(), cg.getY(), pt1.getX(), pt1.getY()); l.setX1(pt1.getX()); l.setY1(pt1.getY()); final IPoint[] pts = l.findPoints(pt1, 2 * distance * gradMidPt); pt2 = pts[0]; if (gradMidPt < 0.5) pt1 = pt1.rotatePoint(shape.getGravityCentre(), Math.PI); } }//if(angle!=0) g.setPaint(new GradientPaint( (float)pt1.getX(), (float)pt1.getY(), shape.getGradColStart(), (float)pt2.getX(), (float)pt2.getY(), shape.getGradColEnd(),true)); g.fill(p); break; case CLINES_PLAIN: case HLINES_PLAIN: case VLINES_PLAIN: case CLINES: case VLINES: case HLINES: final Shape oldClip = g.getClip(); final Rectangle2D bounds = path.getBounds2D(); g.setClip(path); if(shape.isFilled() || shape.hasShadow() && shape.shadowFillsShape()) { g.setColor(shape.getFillingCol()); g.fill(bounds); } final Stroke oldStroke = g.getStroke(); final double hAngle = shape.getHatchingsAngle(); if(fStyle==FillingStyle.VLINES || fStyle==FillingStyle.VLINES_PLAIN) paintHatchings2(g, hAngle, bounds); else if(fStyle==FillingStyle.HLINES || fStyle==FillingStyle.HLINES_PLAIN) paintHatchings2(g, hAngle>0?hAngle-Math.PI/2.:hAngle+Math.PI/2., bounds); else if(fStyle==FillingStyle.CLINES || fStyle==FillingStyle.CLINES_PLAIN) { paintHatchings2(g, hAngle, bounds); paintHatchings2(g, hAngle>0?hAngle-Math.PI/2.:hAngle+Math.PI/2., bounds); } g.setStroke(oldStroke); g.setClip(oldClip); break; } } @Override public boolean contains(final double x, final double y) { // We test the borders first to limit the computations. if(!border.contains(x, y)) return false; final Shape sh = LNumber.equalsDouble(shape.getRotationAngle(), 0.) ? path : getRotatedShape2D(); if(shape.isFilled() && sh.contains(x, y)) return true; final BasicStroke bc = getStroke(); // We test if the point is on the shape. return bc!=null && bc.createStrokedShape(sh).contains(x, y); } @Override public boolean contains(final IPoint pt) { return pt!=null && contains(pt.getX(), pt.getY()); } @Override public boolean intersects(final Rectangle2D rec) { if(rec==null || LNumber.equalsDouble(shape.getRotationAngle(), 0.) && !rec.contains(border) && !border.contains(rec) && !rec.intersects(border)) return false; final BasicStroke stroke = getStroke(); final Shape sh = LNumber.equalsDouble(shape.getRotationAngle(), 0.) ? path : getRotatedShape2D(); if(stroke==null) return sh.intersects(rec) || sh.contains(rec); return shape.isFilled() && sh.contains(rec) || stroke.createStrokedShape(sh).intersects(rec); } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; // We begin the rotation, if needed. final IPoint vectorTrans = beginRotation(g); final boolean isShowPts = shape.isShowPtsable() && shape.isShowPts(); // Lines of the show points option must be drawn before all. if(isShowPts) paintShowPointsLines(g); if(shape.isShadowable()) paintShadow(g); if(shape.isFillable()) paintFilling(g); paintBorders(g); // Painting the arrows of the shape. paintArrows(g, false); // Dots of the show points option must be drawn after all. if(isShowPts) paintShowPointsDots(g); // We close the rotation. if(vectorTrans!=null) endRotation(g, vectorTrans); } /** * Paints the arrows of the shape. * @since 3.0 */ protected void paintArrows(final Graphics2D g, final boolean asShadow) { final Color colour = asShadow ? shape.getShadowCol() : shape.getFillingCol(); for(final IViewArrow arrow : arrows) arrow.paint(g, colour, asShadow); } @Override public void paintBorders(final Graphics2D g) { if(shape.getLineStyle()==LineStyle.NONE) return; if(shape.hasDbleBord()) paintBordersDouble(g); else paintBordersSimple(g); } /** * Draws the double borders of the shape. * @param g The graphics to print into. * @since 3.0 */ private void paintBordersDouble(final Graphics2D g) { g.setStroke(getStroke()); g.setColor(shape.getLineColour()); g.draw(path); g.setColor(shape.getDbleBordCol()); g.setStroke(new BasicStroke((float) shape.getDbleBordSep())); g.draw(path); } /** * Draws the simple border (not with double borders). * @param g The graphics to print into. * @since 3.0 */ private void paintBordersSimple(final Graphics2D g) { g.setColor(shape.getLineColour()); g.setStroke(getStroke()); g.draw(path); } @Override public void paintShadow(final Graphics2D g) { if(shape.hasShadow()) { final double dx; final double dy; final IPoint gc = shape.getGravityCentre(); final IPoint shadowgc = ShapeFactory.createPoint(gc.getX()+shape.getShadowSize(), gc.getY()); shadowgc.setPoint(shadowgc.rotatePoint(gc, shape.getShadowAngle())); dx = shadowgc.getX() - gc.getX(); dy = gc.getY() - shadowgc.getY(); g.setStroke(new BasicStroke((float) getStrokeThickness(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); g.translate(dx, dy); g.setColor(shape.getShadowCol()); g.draw(path); if(shape.isFilled() || shape.shadowFillsShape()) g.fill(path); // Painting the arrows of the shadow. paintArrows(g, true); g.translate(-dx, -dy); } } @Override public void paintShowPointsLines(final Graphics2D g) { // TODO Auto-generated method stub } @Override public void paintShowPointsDots(final Graphics2D g) { // TODO Auto-generated method stub } /** * 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(final Graphics2D g, final double angle, final Rectangle2D clip) { if(g==null || clip==null) return ; double angle2 = angle%(Math.PI*2.); final float halphPI = (float)(Math.PI/2.); if(angle2>0) { if((float)angle2>3f*halphPI) angle2 -= Math.PI * 2.; else if((float)angle2>halphPI) angle2 -= Math.PI; } else if((float)angle2<-3f*halphPI) angle2 += Math.PI * 2.; else if((float)angle2<-halphPI) angle2 += Math.PI; final Line2D.Double line = new Line2D.Double(); final double val = shape.getHatchingsWidth()+shape.getHatchingsSep(); g.setStroke(new BasicStroke((float)shape.getHatchingsWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); g.setPaint(shape.getHatchingsCol()); if(LNumber.equalsDouble(angle2,0.0)) { line.y1 = clip.getMinY(); line.y2 = clip.getMaxY(); final double maxX = clip.getMaxX(); for(double x = clip.getMinX(); x0) { 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); } } } @Override public BasicStroke getStroke() { final float strokeTh = (float) getStrokeThickness(); final BasicStroke stroke; switch(shape.getLineStyle()) { case SOLID: stroke = new BasicStroke(strokeTh, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER); break; case DASHED: stroke = new BasicStroke(strokeTh, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1f, new float[] { (float)shape.getDashSepBlack(), (float)shape.getDashSepWhite() }, 0f); break; case DOTTED: final float thickness = (float)shape.getThickness(); // The size of the dots of the stroke depends on the thickness and eventually on the double borders size. final float dot = (float)shape.getDotSep() + (shape.hasDbleBord() ? thickness*2f + (float)shape.getDbleBordSep() : thickness); stroke = new BasicStroke(strokeTh, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER, 1f, new float[] { 0f, dot }, 0f); break; case NONE: default: stroke = null; break; } return stroke; } /** * @return The thickness of the stroke; The difference with shape.getThickness is that * the double borders and their size are took in account. * @since 3.0 */ protected double getStrokeThickness() { final double thickness = shape.getThickness(); return shape.hasDbleBord() ? thickness*2. + shape.getDbleBordSep() : thickness; } /** * Begins the rotation by modifying the Graphics2D using the rotation angle. * @param g The graphics to modify to draw rotated views. * @return The transition vector used to place the rotated view to its original location. * The rotation was made as the origin point, so as translation is needed to * place the view at the centre of the view. This point will be used to end the rotation. * Returns null if g is null or if the rotation angle is equal to 0. * @since 3.0 */ protected IPoint beginRotation(final Graphics2D g) { final double rotationAngle = shape.getRotationAngle(); IPoint p = null; if(!LNumber.equalsDouble(rotationAngle%(Math.PI*2.), 0.) && g!=null) { final IPoint tl = shape.getTopLeftPoint();//FIXME: should be border? final IPoint br = shape.getBottomRightPoint(); final double cx = (tl.getX() + br.getX()) / 2.; final double cy = (tl.getY() + br.getY()) / 2.; final double c2x = Math.cos(rotationAngle) * cx - Math.sin(rotationAngle)* cy; final double c2y = Math.sin(rotationAngle) * cx + Math.cos(rotationAngle)* cy; final double c3x = Math.cos(-rotationAngle) * (cx - c2x)- Math.sin(-rotationAngle) * (cy - c2y); final double c3y = Math.sin(-rotationAngle) * (cx - c2x)+ Math.cos(-rotationAngle) * (cy - c2y); g.rotate(rotationAngle); g.translate(c3x, c3y); p = ShapeFactory.createPoint(c3x, c3y); } return p; } /** * Ends the rotation of the view by modifying the Graphics2D using the rotation angle * of the model of the view, and the given translation vector. * @param g The graphics to un-rotate. * @param translation This translation vector is given by function beginRotation. It is * used to translate the graphics at the initial position. * @since 3.0 */ protected void endRotation(final Graphics2D g, final IPoint translation) { if(GLibUtilities.isValidPoint(translation) && g!=null) { g.translate(-translation.getX(), -translation.getY()); g.rotate(-shape.getRotationAngle()); } } /** * Gives the top-left and the bottom-right points of the rotated rectangle. * @param tlx The top-left x-coordinate of the rectangle to rotate. * @param tly The top-left y-coordinate of the rectangle to rotate. * @param width The width of the rectangle to rotate. * @param height The height of the rectangle to rotate. * @param angle The rotation angle. * @param gravityCentre The gravity centre used for the rotation. * @param tl The resulting top-left point. Must not be null. * @param br The resulting bottom-right point. Must not be null. * @since 3.0 */ protected static void getRotatedRectangle(final double tlx, final double tly, final double width, final double height, final double angle, final IPoint gravityCentre, final IPoint tl, final IPoint br) { final IPoint[] pts = new IPoint[4]; // Rotation of the four points of the rectangle. pts[0] = ShapeFactory.createPoint(tlx, tly).rotatePoint(gravityCentre, angle); pts[1] = ShapeFactory.createPoint(tlx+width, tly).rotatePoint(gravityCentre, angle); pts[2] = ShapeFactory.createPoint(tlx+width, tly+height).rotatePoint(gravityCentre, angle); pts[3] = ShapeFactory.createPoint(tlx, tly+height).rotatePoint(gravityCentre, angle); tl.setPoint(Double.MAX_VALUE, Double.MAX_VALUE); br.setPoint(-Double.MAX_VALUE, -Double.MAX_VALUE); // Defining the border of the rotated rectangle. for(final IPoint pt : pts) { if (pt.getX() < tl.getX()) tl.setX(pt.getX()); if (pt.getX() > br.getX()) br.setX(pt.getX()); if (pt.getY() < tl.getY()) tl.setY(pt.getY()); if (pt.getY() > br.getY()) br.setY(pt.getY()); } } @Override public Rectangle2D getBorder() { return border; } @Override public Picker getPicker() { return null; } @Override public void flush() { shape = null; path = null; border = null; if(arrows!=null) { arrows.clear(); arrows = null; } } } LSquareView.java000066400000000000000000000043501321075051700356140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import java.awt.geom.Path2D; /** * Defines a view of the LSquare model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/12/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LSquareView extends LRectangularView { /** * Creates an initialises the Java view of a LSquare. * @param model The model to view. * @since 3.0 */ protected LSquareView(final ISquare model) { super(model); update(); } @Override //FIXME idem que rectangle protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { final double w2 = Math.max(1., width); if(shape.isRoundCorner()) { final double diameter = Math.max(1., shape.getLineArc() * w2); final double radius = diameter/2.; path.moveTo(tlx + radius, tly); path.lineTo(tlx + w2 - radius, tly); LEllipseView.curveQuarter(tlx+w2-diameter, tly, diameter, diameter, path, LEllipseView.POINTS[3]); path.lineTo(tlx + width, tly + height - radius); LEllipseView.curveQuarter(tlx+w2-diameter, tly+height-diameter, diameter, diameter, path, LEllipseView.POINTS[0]); path.lineTo(tlx + radius, tly + height); LEllipseView.curveQuarter(tlx, tly+w2-diameter, diameter, diameter, path, LEllipseView.POINTS[1]); path.lineTo(tlx, tly + w2 - radius); path.lineTo(tlx, tly + radius); LEllipseView.curveQuarter(tlx, tly, diameter, diameter, path, LEllipseView.POINTS[2]); path.closePath(); } else { path.moveTo(tlx , tly); path.lineTo(tlx+w2, tly); path.lineTo(tlx+w2, tly+w2); path.lineTo(tlx , tly+w2); path.closePath(); } } } LStandardGridView.java000066400000000000000000000106611321075051700367240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import static java.lang.Math.cos; import static java.lang.Math.sin; import java.awt.Font; import java.awt.FontMetrics; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid; import net.sf.latexdraw.util.LNumber; import sun.font.FontDesignMetrics; /** * Defines an abstract view of the LAbstractGrid model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/12/2008
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class LStandardGridView extends LShapeView { /** The current font metrics of the text */ protected FontMetrics fontMetrics; /** The path containing the labels. */ protected Path2D pathLabels; /** * Creates and initialises an abstract grid view * @param grid The abstract grid to view. * @since 3.0 */ protected LStandardGridView(final S grid) { super(grid); pathLabels = new Path2D.Double(); } @Override public void flush() { super.flush(); fontMetrics = null; pathLabels = null; } @Override public void updateBorder() { final double angle = shape.getRotationAngle(); Rectangle2D rec = path.getBounds2D(); if(shape.getLabelsSize()>0) rec = rec.createUnion(pathLabels.getBounds2D()); if(LNumber.equalsDouble(angle, 0.)) border.setFrame(rec); else { final IPoint tl = ShapeFactory.createPoint(); final IPoint br = ShapeFactory.createPoint(); getRotatedRectangle(rec.getMinX(), rec.getMinY(), rec.getWidth(), rec.getHeight(), angle, shape.getGravityCentre(), tl, br); border.setFrameFromDiagonal(tl.getX(), tl.getY(), br.getX(), br.getY()); } } protected void updateText(final String text, final float x, final float y, final Font font, final FontRenderContext frc) { final char[] textChars = text.toCharArray(); final GlyphVector gv = font.layoutGlyphVector(frc, textChars, 0, textChars.length, 0); pathLabels.append(gv.getOutline(x, y), false); } @Override public void update() { updateFonts(); updatePath(); updateBorder(); } @Override public boolean intersects(final Rectangle2D r) { if(r==null) return false; final double rotationAngle = shape.getRotationAngle(); final boolean intersects; if(LNumber.equalsDouble(rotationAngle, 0.)) { intersects = path.intersects(r) || pathLabels.intersects(r); } else { final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double cx = (tl.getX()+br.getX())/2.; final double cy = (tl.getY()+br.getY())/2.; final double c2x = cos(rotationAngle)*cx - sin(rotationAngle)*cy; final double c2y = sin(rotationAngle)*cx + cos(rotationAngle)*cy; final AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y); at.rotate(rotationAngle); intersects = at.createTransformedShape(path).intersects(r) || at.createTransformedShape(pathLabels).intersects(r); } return intersects; } @Override public boolean contains(final IPoint p) { return p!=null && border.contains(p.getX(), p.getY()); } /** * Updates the font and the fontMetrics. */ protected void updateFonts() { fontMetrics = FontDesignMetrics.getMetrics(new Font(null, Font.PLAIN, shape.getLabelsSize())); } @Override protected void updateGeneralPathInside() { // Nothing to do. } @Override protected void updateGeneralPathMiddle() { // Nothing to do. } @Override protected void updateDblePathMiddle() { // Nothing to do. } @Override protected void updateDblePathOutside() { // Nothing to do. } @Override protected void updateGeneralPathOutside() { // Nothing to do. } @Override protected void updateDblePathInside() { // Nothing to do. } } LTextView.java000066400000000000000000000220761321075051700353050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Rectangle; import java.awt.Shape; import java.awt.font.TextLayout; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText; import net.sf.latexdraw.util.LNumber; import net.sf.latexdraw.util.LSystem; import sun.font.FontDesignMetrics; /** * Defines a view of the IText model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class LTextView extends LShapeView implements IViewText { /** Used to detect if the last version of the text is different from the view. It helps to update the picture. */ private String lastText; /** Used to detect if the last version of the text is different from the view. It helps to update the picture. */ private Color lastColour; /** Used to detect if the last version of the text is different from the view. It helps to update the picture. */ private TextPosition lastTextPos; public static final Font FONT = new Font("Dialog", Font.PLAIN, 18); //$NON-NLS-1$ public static final FontMetrics FONT_METRICS = FontDesignMetrics.getMetrics(FONT); /** * Creates and initialises a text view. * @param model The model to view. * @throws IllegalArgumentException If the given model is null. * @since 3.0 */ protected LTextView(final IText model) { super(model); lastText = ""; //$NON-NLS-1$ lastColour = model.getLineColour(); lastTextPos = model.getTextPosition(); update(); } @Override public void update() { final Image image = FlyweightThumbnail.getImage(this); final String log = FlyweightThumbnail.getLog(this); if(image==null && log.isEmpty() || !lastText.equals(shape.getText()) || !lastColour.equals(shape.getLineColour()) || lastTextPos!=shape.getTextPosition()) { updateImage(); lastText = shape.getText(); lastColour = shape.getLineColour(); lastTextPos = shape.getTextPosition(); } super.update(); } @Override protected void finalize() throws Throwable { super.finalize(); flush(); } @Override public void flush() { FlyweightThumbnail.notifyImageFlushed(this, lastText, lastColour); FlyweightThumbnail.notifyImageFlushed(this, shape.getText(), shape.getLineColour()); super.flush(); } @Override public void updateImage() { FlyweightThumbnail.notifyImageFlushed(this, lastText, lastColour); } @Override public Image getImage() { return FlyweightThumbnail.getImage(this); } @Override public boolean intersects(final Rectangle2D rec) { if(rec==null) return false; final Shape sh = getRotatedShape2D(shape.getRotationAngle(), border, ShapeFactory.createPoint(border.getMinX(), border.getMinY()), ShapeFactory.createPoint(border.getMaxX(), border.getMaxY())); return sh.contains(rec) || sh.intersects(rec); } @Override public boolean contains(final double x, final double y) { return border.contains(x, y); } private IPoint getTextPositionImage() { final Image image = FlyweightThumbnail.getImage(this); final double scale = FlyweightThumbnail.scaleImage(); if(image!=null) switch(shape.getTextPosition()) { case BOT : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/2./scale, shape.getY()-image.getHeight(null)/scale); case TOP : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/2./scale, shape.getY()); case BOT_LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()-image.getHeight(null)/scale); case TOP_LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()); case BOT_RIGHT : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/scale, shape.getY()-image.getHeight(null)/scale); case TOP_RIGHT : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/scale, shape.getY()); case LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()-image.getHeight(null)/scale/2.); case RIGHT : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/scale, shape.getY()-image.getHeight(null)/scale/2.); case BASE: case BASE_LEFT: case BASE_RIGHT: case CENTER : return ShapeFactory.createPoint(shape.getX()-image.getWidth(null)/2./scale, shape.getY()-image.getHeight(null)/scale/2.); } return null; } private IPoint getTextPositionText() { final TextLayout tl = new TextLayout(shape.getText(), FONT, FONT_METRICS.getFontRenderContext()); final Rectangle2D bounds = tl.getBounds(); switch(shape.getTextPosition()) { case BOT : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth()/2., shape.getY()); case TOP : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth()/2., shape.getY()+bounds.getHeight()); case BOT_LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()); case TOP_LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()+bounds.getHeight()); case BOT_RIGHT : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth(), shape.getY()); case TOP_RIGHT : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth(), shape.getY()+bounds.getHeight()); case LEFT : return ShapeFactory.createPoint(shape.getX(), shape.getY()+bounds.getHeight()/2.); case RIGHT : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth(), shape.getY()+bounds.getHeight()/2.); case BASE: case BASE_RIGHT: case BASE_LEFT: case CENTER : return ShapeFactory.createPoint(shape.getX()-bounds.getWidth()/2., shape.getY()+bounds.getHeight()/2.); } return null; } @Override public void paint(final Graphics2D g, final Rectangle clip) { if(clip!=null && !clip.contains(border) && !clip.intersects(border)) return; final Image image = FlyweightThumbnail.getImage(this); final IPoint p = beginRotation(g); final IPoint position = image==null ? getTextPositionText() : getTextPositionImage(); if(image==null) { g.setColor(shape.getLineColour()); g.setFont(FONT); g.drawString(shape.getText(), (int)position.getX(), (int)position.getY()); } else { final double scale = FlyweightThumbnail.scaleImage(); g.scale(1/scale, 1/scale); g.drawImage(image, (int)(position.getX()*scale), (int)(position.getY()*scale), null); g.scale(scale, scale); } if(p!=null) endRotation(g, p); } @Override public void updateBorder() { final Image image = FlyweightThumbnail.getImage(this); final IPoint position = image==null ? getTextPositionText() : getTextPositionImage(); final double angle = shape.getRotationAngle(); final double tlx; final double tly; final double widthBorder; final double heightBorder; if(image==null) { final TextLayout tl = new TextLayout(shape.getText(), FONT, FONT_METRICS.getFontRenderContext()); final Rectangle2D bounds = tl.getBounds(); tlx = position.getX(); tly = position.getY()-bounds.getHeight()+tl.getDescent(); widthBorder = tl.getAdvance(); heightBorder = bounds.getHeight(); } else { final double scale = FlyweightThumbnail.scaleImage(); tlx = position.getX(); tly = position.getY(); widthBorder = image.getWidth(null)*(1/scale); heightBorder = image.getHeight(null)*(1/scale); } if(LNumber.equalsDouble(angle, 0.)) border.setFrame(tlx, tly, widthBorder, heightBorder); else { final IPoint tl = ShapeFactory.createPoint(); final IPoint br = ShapeFactory.createPoint(); getRotatedRectangle(tlx, tly, widthBorder, heightBorder, angle, shape.getGravityCentre(), tl, br); // The border of the rotated rectangle is now the border of the rectangular view. border.setFrameFromDiagonal(tl.getX(), tl.getY(), br.getX(), br.getY()); } } @Override protected void updateDblePathInside() { // Nothing to do. } @Override protected void updateDblePathMiddle() { // Nothing to do. } @Override protected void updateDblePathOutside() { // Nothing to do. } @Override protected void updateGeneralPathInside() { // Nothing to do. } @Override protected void updateGeneralPathMiddle() { // Nothing to do. } @Override protected void updateGeneralPathOutside() { // Nothing to do. } @Override public boolean isToolTipVisible(final double x, final double y) { return border.contains(x, y); } @Override public String getToolTip() { return LSystem.INSTANCE.getLatexErrorMessageFromLog(FlyweightThumbnail.getLog(this)); } } LTriangleView.java000066400000000000000000000025131321075051700361200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import java.awt.geom.Path2D; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; /** * Defines a view of the ITriangle model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 03/19/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class LTriangleView extends LRectangularView { /** * Creates an initialises the Java view of a LTriangle. * @param model The model to view. * @since 3.0 */ protected LTriangleView(final ITriangle model) { super(model); update(); } @Override protected void setRectangularShape(final Path2D path, final double tlx, final double tly, final double width, final double height) { path.moveTo(tlx+width/2., tly); path.lineTo(tlx+width, tly+height); path.lineTo(tlx, tly+height); path.closePath(); } } LViewsFactory.java000066400000000000000000000116711321075051700361520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/implpackage net.sf.latexdraw.glib.views.Java2D.impl; import net.sf.latexdraw.glib.models.interfaces.shape.*; import net.sf.latexdraw.glib.views.CreateViewCmd; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewsFactory; /** * The factory that creates views from given models.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/10/08
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public class LViewsFactory implements IViewsFactory { /** The chain of responsibility used to reduce the complexity of the factory. */ private CreateView2DCmd createCmd; /** * Creates the factory. */ public LViewsFactory() { super(); initCommands(); } @Override public IViewShape createView(final IShape shape) { return shape==null ? null : createCmd.execute(shape); } /** * Initialises the chain of responsibility. */ private void initCommands() { CreateView2DCmd cmd = new CreateView2DCmd(null, IPicture.class) { @Override public IViewShape create(final IShape shape) { return new LPictureView((IPicture)shape); } }; cmd = new CreateView2DCmd(cmd, IFreehand.class) { @Override public IViewShape create(final IShape shape) { return new LFreeHandView((IFreehand)shape); } }; cmd = new CreateView2DCmd(cmd, IDot.class) { @Override public IViewShape create(final IShape shape) { return new LDotView((IDot)shape); } }; cmd = new CreateView2DCmd(cmd, IGrid.class) { @Override public IViewShape create(final IShape shape) { return new LGridView((IGrid)shape); } }; cmd = new CreateView2DCmd(cmd, IAxes.class) { @Override public IViewShape create(final IShape shape) { return new LAxesView((IAxes)shape); } }; cmd = new CreateView2DCmd(cmd, IBezierCurve.class){ @Override public IViewShape create(final IShape shape) { return new LBezierCurveView((IBezierCurve)shape); } }; cmd = new CreateView2DCmd(cmd, IPolygon.class) { @Override public IViewShape create(final IShape shape) { return new LPolygonView((IPolygon)shape); } }; // All the commands of the chain of responsibility are chained together. cmd = new CreateView2DCmd(cmd, IPolyline.class) { @Override public IViewShape create(final IShape shape) { return new LPolylineView((IPolyline)shape); } }; cmd = new CreateView2DCmd(cmd, IRhombus.class) { @Override public IViewShape create(final IShape shape) { return new LRhombusView((IRhombus)shape); } }; cmd = new CreateView2DCmd(cmd, ITriangle.class) { @Override public IViewShape create(final IShape shape) { return new LTriangleView((ITriangle)shape); } }; cmd = new CreateView2DCmd(cmd, IEllipse.class) { @Override public IViewShape create(final IShape shape) { return new LEllipseView<>((IEllipse)shape); } }; cmd = new CreateView2DCmd(cmd, ICircle.class) { @Override public IViewShape create(final IShape shape) { return new LCircleView((ICircle)shape); } }; cmd = new CreateView2DCmd(cmd, ICircleArc.class) { @Override public IViewShape create(final IShape shape) { return new LCircleArcView((ICircleArc)shape); } }; cmd = new CreateView2DCmd(cmd, IText.class) { @Override public IViewShape create(final IShape shape) { return new LTextView((IText)shape); } }; cmd = new CreateView2DCmd(cmd, IRectangle.class) { @Override public IViewShape create(final IShape shape) { return new LRectangleView((IRectangle)shape); } }; cmd = new CreateView2DCmd(cmd, ISquare.class) { @Override public IViewShape create(final IShape shape) { return new LSquareView((ISquare)shape); } }; cmd = new CreateView2DCmd(cmd, IPlot.class) { @Override public IViewShape create(final IShape shape) { return new LPlotView((IPlot)shape); } }; // The last created command is the first element of the chain. createCmd = new CreateView2DCmd(cmd, IGroup.class) { @Override public IViewShape create(final IShape shape) { return new LGroupView((IGroup)shape); } }; } /** * This class is a mix of the design patterns Command and Chain of responsibility. * The goal is to find the command which can create the view of the given shape. */ private abstract class CreateView2DCmd extends CreateViewCmd { /** * Creates the command. * @param next The next command in the chain of responsibility. Can be null. * @param classShape The type of the shape supported by the command. * @since 3.0 */ protected CreateView2DCmd(final CreateView2DCmd next, final Class classShape) { super(next, classShape); } } } interfaces/000077500000000000000000000000001321075051700337225ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2DIViewArc.java000066400000000000000000000014401321075051700362350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of an arc.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewArc extends IViewShape{ // Nothing more. } IViewArrow.java000066400000000000000000000022641321075051700366270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; import java.awt.Color; import java.awt.Graphics2D; /** * This interface defines a view of an arrow.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewArrow { /** * Paints the arrow. * @param g The graphics into which the arrow will be painted. * @param fColour The colour of the filling of the arrow. * @param asShadow True: it is the shadow of a shape. * @since 3.0 */ void paint(final Graphics2D g, final Color fColour, final boolean asShadow); /** * Updates the path of the arrow. * @since 3.0 */ void updatePath(); } IViewBezierCurve.java000066400000000000000000000014611321075051700377600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of a Bezier curve.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewBezierCurve extends IViewShape{ // Nothing more. } IViewDot.java000066400000000000000000000014411321075051700362570ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of a dot.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewDot extends IViewShape { // Nothing more. } IViewModifiablePtsShape.java000066400000000000000000000015201321075051700412320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of an shape which points can be modified.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewModifiablePtsShape extends IViewShape { // Nothing more. } IViewPlot.java000066400000000000000000000014411321075051700364470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of a plot.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2014-10-11br> * @author Arnaud BLOUIN * @since 3.3 */ public interface IViewPlot extends IViewShape { // Nothing more. } IViewRectangle.java000066400000000000000000000014551321075051700374420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This interface defines a view of a rectangle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewRectangle extends IViewShape { // Nothing more. } IViewShape.java000066400000000000000000000075271321075051700366040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Shape; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.IAbstractView; import org.malai.picking.Pickable; /** * This interface defines a view of a shape.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/14/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewShape extends IAbstractView, Pickable { /** * Draws the shape within a Java2D graphics. * @param g The graphics where the shape must be drawn. * @param clip The painted area. Can be null. * @throw NullPointerException If the given Graphics2D is null. * @since 3.1 */ void paint(final Graphics2D g, final Rectangle clip); /** * Draws the borders of the shape within a Java2D graphics. * @param g The graphics where the shape must be drawn. * @throw NullPointerException If the given Graphics2D is null. * @since 3.0 */ void paintBorders(final Graphics2D g); /** * Draws the shadow of the shape within a Java2D graphics. * @param g The graphics where the shape must be drawn. * @throw NullPointerException If the given Graphics2D is null. * @since 3.0 */ void paintShadow(final Graphics2D g); /** * Paints the lines of the option 'show points'. * @param g The graphics. * @throw NullPointerException If the given Graphics2D is null. * @since 3.0 */ void paintShowPointsLines(final Graphics2D g); /** * Paints the dots of the option 'show points'. * @param g The graphics. * @throw NullPointerException If the given Graphics2D is null. * @since 3.0 */ void paintShowPointsDots(final Graphics2D g); /** * Fills the shape within a Java2D graphics. * @param g The graphics where the shape must be drawn. * @throw NullPointerException If the given Graphics2D is null. * @since 3.0 */ void paintFilling(final Graphics2D g); /** * Allows to know if the point pt is in (or not) the shape. * @param pt The point. * @return True if the point is in the shape. */ boolean contains(final IPoint pt); @Override boolean contains(final double x, final double y); /** * @param rec The rectangle used to check the intersection. * @return True if the given rectangle intersects the view. * @since 3.0 */ boolean intersects(final Rectangle2D rec); /** * This function creates the corresponding rotated Java shape using the shape model. * @return The rotated shape. * @since 3.0 */ Shape getRotatedShape2D(); /** * @return The border of the view. * @since 3.0 */ Rectangle2D getBorder(); /** * @return The Java2D path of the view. * @since 3.0 */ Path2D getPath(); /** * Updates the path of the shape. * @since 3.0 */ void updatePath(); /** * Update the border of the shape view. * @since 3.0 */ void updateBorder(); /** * Creates and returns a stroke corresponding to the current parameters of the shape model. * @return The stroke based on the thickness, the double borders and so on, of the shape. Returns null * if the line style is NONE. * @since 3.0 */ BasicStroke getStroke(); /** * Removes and flushes the used resources and temporary documents. * @since 3.0 */ void flush(); } IViewText.java000066400000000000000000000016761321075051700364670ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; import java.awt.Image; /** * This interface defines a view of a text.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewText extends IViewShape, ToolTipable { /** * Updates the image. * @since 3.0 */ void updateImage(); /** * @return the image. * @since 3.0 */ Image getImage(); } IViewsFactory.java000066400000000000000000000020011321075051700373140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * This interface defines a factory of views.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public interface IViewsFactory { /** * Creates a view from a shape. * @param shape The shape used to create the view. * @return The created view or null. * @since 3.0 */ IViewShape createView(final IShape shape); } ToolTipable.java000066400000000000000000000023171321075051700370060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * Defines a type corresponding to shapes that support tooltips.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 01/19/2012
    * @author Arnaud BLOUIN * @since 3.0 */ public interface ToolTipable { /** * Tests if a tooltip can be displayed. The coordinates can be used to test * if the current pointer position points onto the tooltipable object. * @param x The X-coordinate to test. * @param y The Y-coordinate to test. * @return True if a tooltip can be displayed. * @since 3.0 */ boolean isToolTipVisible(final double x, final double y); /** * @return The tooltip to display. * @since 3.0 */ String getToolTip(); } View2DTK.java000066400000000000000000000023171321075051700361270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/Java2D/interfacespackage net.sf.latexdraw.glib.views.Java2D.interfaces; /** * This class permits the access to the current view factory.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/18/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public final class View2DTK { private View2DTK() { super(); } /** The current view factory. */ private static IViewsFactory factory; /** * Sets the view factory. * @param factory The new factory. Can be null. * @since 3.0 */ public static void setFactory(final IViewsFactory factory) { View2DTK.factory = factory; } /** * @return The current factory. Can be null. * @since 3.0 */ public static IViewsFactory getFactory() { return factory; } } PlotViewHelper.java000066400000000000000000000110761321075051700343110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/viewspackage net.sf.latexdraw.glib.views; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; public class PlotViewHelper { public static final PlotViewHelper INSTANCE = new PlotViewHelper(); private PlotViewHelper() { super(); } private IPoint getPolarPoint(final IPlot shape, final double x, final double xs, final double ys, final double posX, final double posY) { final double radius = shape.getY(x); final double angle = Math.toRadians(x); final double x1 = radius * Math.cos(angle); final double y1 = -radius * Math.sin(angle); return ShapeFactory.createPoint(x1 * IShape.PPC * xs + posX, y1 * IShape.PPC * ys + posY); } public void fillPoints(final IPlot shape, final IModifiablePointsShape sh, final double posX, final double posY, final double minX, final double maxX, final double step) { final double xs = shape.getXScale(); final double ys = shape.getYScale(); double x = minX; if(shape.isPolar()) { for(int i=0; i updatePoints(final IPlot shape, final double posX, final double posY, final double minX, final double maxX, final double step) { final IPolyline pl = ShapeFactory.createPolyline(); final List dots = new ArrayList<>(); fillPoints(shape, pl, posX, posY, minX, maxX, step); for(IPoint pt : pl.getPoints()) { IDot dot = ShapeFactory.createDot(pt); dot.copy(shape); dot.setRotationAngle(0.0); dots.add(dot); } return dots; } public IPolygon updatePolygon(final IPlot shape, final double posX, final double posY, final double minX, final double maxX, final double step) { final IPolygon pg = ShapeFactory.createPolygon(); fillPoints(shape, pg, posX, posY, minX, maxX, step); pg.copy(shape); return pg; } public IPolyline updateLine(final IPlot shape, final double posX, final double posY, final double minX, final double maxX, final double step) { final IPolyline pl = ShapeFactory.createPolyline(); fillPoints(shape, pl, posX, posY, minX, maxX, step); pl.copy(shape); return pl; } public IBezierCurve updateCurve(final IPlot shape, final double posX, final double posY, final double minX, final double maxX, final double step) { // The algorithm follows this definition: // https://stackoverflow.com/questions/15864441/how-to-make-a-line-curve-through-points final double scale = 0.33; final IBezierCurve bc = ShapeFactory.createBezierCurve(); fillPoints(shape, bc, posX, posY, minX, maxX, step); if(shape.getPlotStyle() == IPlotProp.PlotStyle.CCURVE) bc.setIsClosed(true); else bc.setIsClosed(false); bc.copy(shape); int i = 0; final int last = bc.getPoints().size() - 1; for(IPoint pt : bc.getPoints()) { final IPoint p1 = pt; if(i == 0) { final IPoint p2 = bc.getPtAt(i + 1); final IPoint tangent = p2.substract(p1); final IPoint q1 = p1.add(tangent.zoom(scale)); bc.setXFirstCtrlPt(q1.getX(), i); bc.setYFirstCtrlPt(q1.getY(), i); }else if(i == last) { final IPoint p0 = bc.getPtAt(i - 1); final IPoint tangent = p1.substract(p0); final IPoint q0 = p1.substract(tangent.zoom(scale)); bc.setXFirstCtrlPt(q0.getX(), i); bc.setYFirstCtrlPt(q0.getY(), i); }else { final IPoint p0 = bc.getPtAt(i - 1); final IPoint p2 = bc.getPtAt(i + 1); final IPoint tangent = p2.substract(p0).normalise(); final IPoint q0 = p1.substract(tangent.zoom(scale * p1.substract(p0).magnitude())); bc.setXFirstCtrlPt(q0.getX(), i); bc.setYFirstCtrlPt(q0.getY(), i); } i++; } bc.updateSecondControlPoints(); return bc; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/latex/000077500000000000000000000000001321075051700317245ustar00rootroot00000000000000DviPsColors.java000077500000000000000000000574321321075051700347350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/latexpackage net.sf.latexdraw.glib.views.latex; import java.awt.Color; import java.util.HashMap; import java.util.Map; /** * This class Defines colours used by pstricks.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 04/06/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class DviPsColors { public static final double MAX = 255.; public static final Color TEAL = new Color(0f, 0.5f, 0.5f); public static final Color LIME = new Color(0.75f, 1f, 0f); public static final Color GREEN_YELLOW = new Color(216,255, 79); public static final Color YELLOW = new Color(255,255, 0); public static final Color GOLDEN_ROD = new Color(255,229, 40); public static final Color DANDELION = new Color(255,181, 40); public static final Color APRICOT = new Color(255,173,122); public static final Color PEACH = new Color(216,127, 76); public static final Color MELON = new Color(255,137,127); public static final Color YELLOW_ORANGE = new Color(216,147, 0); public static final Color ORANGE = new Color(255, 99, 33); public static final Color BURNT_ORANGE = new Color(255,124, 0); public static final Color BITTERSWEET = new Color(193, 2, 0); public static final Color RED_ORANGE = new Color(255, 58, 33); public static final Color MAHOGANY = new Color(165, 0, 0); public static final Color MAROON = new Color(173, 0, 0); public static final Color BRICKRED = new Color(183, 0, 0); public static final Color RED = new Color(255, 0, 0); public static final Color ORANGERED = new Color(255, 0,127); public static final Color RUBINERED = new Color(255, 0,221); public static final Color WILDSTRAWBERRY = new Color(255, 10,155); public static final Color SALMON = new Color(255,119,158); public static final Color CARNATIONPINK = new Color(255, 94,255); public static final Color MAGENTA = new Color(255, 0,255); public static final Color VIOLETRED = new Color(255, 48,255); public static final Color RHODAMINE = new Color(255, 45,255); public static final Color MULBERRY = new Color(163, 20,149); public static final Color REDVIOLET = new Color(150, 0,168); public static final Color FUSHIA = new Color(114, 2,234); public static final Color LAVENDER = new Color(255,132,255); public static final Color THISTLE = new Color(224,104,255); public static final Color ORCHID = new Color(173, 91,255); public static final Color DARKORCHID = new Color(153, 51,204); public static final Color PURPLE = new Color(140, 35,255); public static final Color PLUM = new Color(127, 0,255); public static final Color VIOLET = new Color( 53, 30,255); public static final Color ROYALPURPLE = new Color( 63, 25,255); public static final Color BLUEVIOLET = new Color( 25, 12,244); public static final Color PERIWINKLE = new Color(109,114,255); public static final Color CADETBLUE = new Color(140, 35,255); public static final Color CORNFLOWERBLUE = new Color( 89,221,255); public static final Color MIDNIGHTBLUE = new Color( 0,112,145); public static final Color NAVYBLUE = new Color( 15,117,255); public static final Color ROYALBLUE = new Color( 0,127,255); public static final Color BLUE = new Color( 0, 0,255); public static final Color CERULEAN = new Color( 15,226,255); public static final Color CYAN = new Color( 0,255,255); public static final Color PROCESSBLUE = new Color( 10,255,255); public static final Color SKYBLUE = new Color( 96,255,224); public static final Color TURQUOISE = new Color( 38,255,204); public static final Color TEALBLUE = new Color( 30,249,163); public static final Color AQUAMARINE = new Color( 45,255,178); public static final Color BLUEGREEN = new Color( 38,255,170); public static final Color EMERALD = new Color( 0,255,127); public static final Color JUNGLEGREEN = new Color( 2,255,122); public static final Color SEAGREEN = new Color( 79,255,127); public static final Color GREEN = new Color( 0,255, 0); public static final Color FORESTGREEN = new Color( 0,224, 0); public static final Color PINEGREEN = new Color( 0,191, 40); public static final Color LIMEGREEN = new Color(127,255, 0); public static final Color YELLOWGREEN = new Color(142,255, 66); public static final Color SPRINGGREEN = new Color(188,255, 61); public static final Color OLIVEGREEN = new Color( 0,153, 0); public static final Color RAWSIENNA = new Color(140, 0, 0); public static final Color SEPIA = new Color( 76, 0, 0); public static final Color BROWN = new Color(102, 0, 0); public static final Color TAN = new Color(219,147,112); public static final Color GRAY = new Color(127,127,127); public static final Color BLACK = new Color( 0, 0, 0); public static final Color WHITE = new Color(255,255,255); public static final Color PINK = new Color(255,192,203); public static final Color OLIVE = new Color(0.5f, 0.5f, 0f); public static final String N_LIME = "lime"; //$NON-NLS-1$ public static final String N_TEAL = "teal"; //$NON-NLS-1$ public static final String N_GREEN_YELLOW = "GreenYellow"; //$NON-NLS-1$ public static final String N_YELLOW = "Yellow"; //$NON-NLS-1$ public static final String N_GOLDEN_ROD = "Goldenrod"; //$NON-NLS-1$ public static final String N_DANDELION = "Dandelion"; //$NON-NLS-1$ public static final String N_APRICOT = "Apricot"; //$NON-NLS-1$ public static final String N_PEACH = "Peach"; //$NON-NLS-1$ public static final String N_MELON = "Melon"; //$NON-NLS-1$ public static final String N_YELLOW_ORANGE = "YellowOrange"; //$NON-NLS-1$ public static final String N_ORANGE = "Orange"; //$NON-NLS-1$ public static final String N_BURNT_ORANGE = "BurntOrange"; //$NON-NLS-1$ public static final String N_BITTERSWEET = "Bittersweet"; //$NON-NLS-1$ public static final String N_RED_ORANGE = "RedOrange"; //$NON-NLS-1$ public static final String N_MAHOGANY = "Mahogany"; //$NON-NLS-1$ public static final String N_MAROON = "Maroon"; //$NON-NLS-1$ public static final String N_BRICKRED = "BrickRed"; //$NON-NLS-1$ public static final String N_RED = "Red"; //$NON-NLS-1$ public static final String N_ORANGERED = "OrangeRed"; //$NON-NLS-1$ public static final String N_RUBINERED = "RubineRed"; //$NON-NLS-1$ public static final String N_WILDSTRAWBERRY = "WildStrawberry"; //$NON-NLS-1$ public static final String N_SALMON = "Salmon"; //$NON-NLS-1$ public static final String N_CARNATIONPINK = "CarnationPink"; //$NON-NLS-1$ public static final String N_MAGENTA = "Magenta"; //$NON-NLS-1$ public static final String N_VIOLETRED = "VioletRed"; //$NON-NLS-1$ public static final String N_RHODAMINE = "Rhodamine"; //$NON-NLS-1$ public static final String N_MULBERRY = "Mulberry"; //$NON-NLS-1$ public static final String N_REDVIOLET = "RedViolet"; //$NON-NLS-1$ public static final String N_FUSHIA = "Fuchsia"; //$NON-NLS-1$ public static final String N_LAVENDER = "Lavender"; //$NON-NLS-1$ public static final String N_THISTLE = "Thistle"; //$NON-NLS-1$ public static final String N_ORCHID = "Orchid"; //$NON-NLS-1$ public static final String N_DARKORCHID = "DarkOrchid"; //$NON-NLS-1$ public static final String N_PURPLE = "Purple"; //$NON-NLS-1$ public static final String N_PLUM = "Plum"; //$NON-NLS-1$ public static final String N_VIOLET = "Violet"; //$NON-NLS-1$ public static final String N_ROYALPURPLE = "RoyalPurple"; //$NON-NLS-1$ public static final String N_BLUEVIOLET = "BlueViolet"; //$NON-NLS-1$ public static final String N_PERIWINKLE = "Periwinkle"; //$NON-NLS-1$ public static final String N_CADETBLUE = "CadetBlue"; //$NON-NLS-1$ public static final String N_CORNFLOWERBLUE = "CornflowerBlue"; //$NON-NLS-1$ public static final String N_MIDNIGHTBLUE = "MidnightBlue"; //$NON-NLS-1$ public static final String N_NAVYBLUE = "NavyBlue"; //$NON-NLS-1$ public static final String N_ROYALBLUE = "RoyalBlue"; //$NON-NLS-1$ public static final String N_BLUE = "Blue"; //$NON-NLS-1$ public static final String N_CERULEAN = "Cerulean"; //$NON-NLS-1$ public static final String N_CYAN = "Cyan"; //$NON-NLS-1$ public static final String N_PROCESSBLUE = "ProcessBlue"; //$NON-NLS-1$ public static final String N_SKYBLUE = "SkyBlue"; //$NON-NLS-1$ public static final String N_TURQUOISE = "Turquoise"; //$NON-NLS-1$ public static final String N_TEALBLUE = "TealBlue"; //$NON-NLS-1$ public static final String N_AQUAMARINE = "Aquamarine"; //$NON-NLS-1$ public static final String N_BLUEGREEN = "BlueGreen"; //$NON-NLS-1$ public static final String N_EMERALD = "Emerald"; //$NON-NLS-1$ public static final String N_JUNGLEGREEN = "JungleGreen"; //$NON-NLS-1$ public static final String N_SEAGREEN = "SeaGreen"; //$NON-NLS-1$ public static final String N_GREEN = "Green"; //$NON-NLS-1$ public static final String N_FORESTGREEN = "ForestGreen"; //$NON-NLS-1$ public static final String N_PINEGREEN = "PineGreen"; //$NON-NLS-1$ public static final String N_LIMEGREEN = "LimeGreen"; //$NON-NLS-1$ public static final String N_YELLOWGREEN = "YellowGreen"; //$NON-NLS-1$ public static final String N_SPRINGGREEN = "SpringGreen"; //$NON-NLS-1$ public static final String N_OLIVEGREEN = "OliveGreen"; //$NON-NLS-1$ public static final String N_RAWSIENNA = "RawSienna"; //$NON-NLS-1$ public static final String N_SEPIA = "Sepia"; //$NON-NLS-1$ public static final String N_BROWN = "Brown"; //$NON-NLS-1$ public static final String N_TAN = "Tan"; //$NON-NLS-1$ public static final String N_GRAY = "Gray"; //$NON-NLS-1$ public static final String N_BLACK = "Black"; //$NON-NLS-1$ public static final String N_WHITE = "White"; //$NON-NLS-1$ public static final String N_CYAN_2 = "cyan"; //$NON-NLS-1$ public static final String N_GRAY_2 = "gray"; //$NON-NLS-1$ public static final String N_BLACK_2 = "black"; //$NON-NLS-1$ public static final String N_WHITE_2 = "white"; //$NON-NLS-1$ public static final String N_YELLOW_2 = "yellow"; //$NON-NLS-1$ public static final String N_VIOLET_2 = "violet"; //$NON-NLS-1$ public static final String N_BLUE_2 = "blue"; //$NON-NLS-1$ public static final String N_PURPLE_2 = "purple"; //$NON-NLS-1$ public static final String N_RED_2 = "red"; //$NON-NLS-1$ public static final String N_ORANGE_2 = "orange"; //$NON-NLS-1$ public static final String N_GREEN_2 = "green"; //$NON-NLS-1$ public static final String N_MAGENTA_2 = "magenta"; //$NON-NLS-1$ public static final String N_BROWN_2 = "brown"; //$NON-NLS-1$ public static final String N_DARK_GRAY = "darkgray"; //$NON-NLS-1$ public static final String N_LIGHT_GRAY = "lightgray"; //$NON-NLS-1$ public static final String N_PINK = "pink"; //$NON-NLS-1$ public static final String N_OLIVE = "olive"; //$NON-NLS-1$ public static final DviPsColors INSTANCE = new DviPsColors(); private final Map colourHT = new HashMap<>(); private final Map nameColourHT = new HashMap<>(); /** The colours defined by the user and their name. */ private final Map userColourHT = new HashMap<>(); /** The colours defined by the user and their name. */ private final Map userNameColourHT = new HashMap<>(); /** The counter is used to name the user defined colours. */ private int ctColours; private DviPsColors() { super(); createColourHashTable(); createNameColourHashTable(); ctColours = 0; } /** * Creates the hashTable {@link #nameColourHT}. * @since 1.9.2 */ private void createColourHashTable() { colourHT.clear(); colourHT.put(N_LIME, LIME); colourHT.put(N_TEAL, TEAL); 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 void createNameColourHashTable() { nameColourHT.clear(); nameColourHT.put(LIME, N_LIME); nameColourHT.put(TEAL, N_TEAL); 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); } /** * @param name The name of the searched colour. * @return The corresponding predefined colour or null. * @since 3.0 */ public Color getPredefinedColour(final String name) { return colourHT.get(name); } /** * Allows to get the name of a given colour. * @param colour The colour that we want the name . * @return The name of the colour : null if it can not be found. */ public String getColourName(final Color colour) { if(colour==null) return null; String name = nameColourHT.get(colour); if(name==null) name = userNameColourHT.get(colour); return name; } /** * 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 Color getColour(final String name) { if(name==null || name.isEmpty()) return null; Color c = userColourHT.get(name); if(c==null) c = colourHT.get(name); return c; } /** * Adds a colour defined by the user. * @param colour The colour to add. * @return The name of this colour. */ public String addUserColour(final Color colour) { final String name; if(colour!=null) { name = generateColourName(); addUserColour(colour, name); }else name = null; return name; } /** * Adds a colour defined by the user. * @param colour The colour to add. * @param name The name of the colour. */ public void addUserColour(final Color colour, final String name) { if(colour!=null && name!=null && !name.isEmpty()) { userColourHT.put(name, colour); userNameColourHT.put(colour, name); } } /** * @return A unique name for a user defined colour. * @since 3.0 */ protected String generateColourName() { return "colour" + ctColours++; //$NON-NLS-1$ } /** * Allows to get the PSTricks code of a given colour. * @param colourName The name of the colour used to generate the code. * @return The code of the colour or an empty string if the given colour is not valid. */ public String getUsercolourCode(final String colourName) { final Color colour = getColour(colourName); final String code; if(colour==null) code = ""; //$NON-NLS-1$ else code = "\\definecolor{" + colourName + "}{rgb}{" + //$NON-NLS-1$ //$NON-NLS-2$ (float)(colour.getRed()/MAX) + ',' + (float)(colour.getGreen()/MAX) + ',' + (float)(colour.getBlue()/MAX) + "}"; //$NON-NLS-1$ return code; } /** * Converts an HTML (i.e. hexa) colour to an rgb one. * @param hexaCode The hexadecimal code of the colour. * @return The corresponding rgb colour. * @throws IllegalArgumentException If the given argument is not valid (null or its length lesser than 8 characters). * @since 3.0 */ public Color convertHTML2rgb(final String hexaCode) { if(hexaCode==null || hexaCode.length()<7) throw new IllegalArgumentException(hexaCode); return new Color(Integer.valueOf(hexaCode.substring(1, 3), 16), Integer.valueOf(hexaCode.substring(3, 5), 16), Integer.valueOf(hexaCode.substring(5), 16)); } /** * Converts an RGB [0-255] colour to an rgb [0-1] one. * @param r The red level between 0 and 255. * @param g The green level between 0 and 255. * @param b The blue level between 0 and 255. * @return The corresponding rgb colour. * @throws IllegalArgumentException If one of the given arguments is not valid. * @since 3.0 */ public Color convertRGB2rgb(final double r, final double g, final double b) { if(r<0 || g<0 || b<0) throw new IllegalArgumentException(r + " " + g + " " + b); //$NON-NLS-1$ //$NON-NLS-2$ final float factor = 1f/255f; return new Color((float)r*factor, (float)g*factor, (float)b*factor); } /** * Converts a CMYK colour to an 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 rgb colour. * @since 2.0.0 */ public Color convertcmyk2rgb(final double c, final double m, final double y, final 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 rgb one. * @param g The gray level between 0 an 1. * @return The corresponding rgb colour. * @since 2.0.0 */ public Color convertgray2rgb(final double g) { if(g < 0 || g > 1) throw new IllegalArgumentException(String.valueOf(g)); return new Color((float)g, (float)g, (float)g); } } LaTeXGenerator.java000066400000000000000000000456501321075051700353460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/latexpackage net.sf.latexdraw.glib.views.latex; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.filters.EPSFilter; import net.sf.latexdraw.filters.PDFFilter; import net.sf.latexdraw.filters.TeXFilter; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.views.pst.PSTCodeGenerator; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniserHandler; import net.sf.latexdraw.util.LFileUtils; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import net.sf.latexdraw.util.LSystem.OperatingSystem; import org.malai.mapping.ActiveUnary; import org.malai.mapping.IUnary; import org.malai.properties.Modifiable; /** * Defines an abstract LaTeX generator.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public abstract class LaTeXGenerator implements Modifiable { /** Defines the number of characters added at the beginning * of each lines of the comment (these characters are "% "). */ public static final int LGTH_START_LINE_COMMENT = 2; /** * The latex packages used when exporting using latex. * These packages are defined for the current document but not for all documents. */ protected static final IUnary PACKAGES = new ActiveUnary<>(""); //$NON-NLS-1$ /** * @param packages the packages to set. * @since 3.0 */ public static void setPackages(final String packages) { if(packages!=null && !packages.equals(getPackages())) LaTeXGenerator.PACKAGES.setValue(packages); } /** * @return the packages. * @since 3.0 */ public static String getPackages() { return PACKAGES.getValue(); } /** * @return The unary relation that contains the packages value. * @since 3.0 */ public static IUnary getPackagesUnary() { return PACKAGES; } /** * The different vertical positions. */ public enum VerticalPosition { TOP { @Override public String getToken() { return "t"; }//$NON-NLS-1$ }, BOTTOM { @Override public String getToken() { return "b"; }//$NON-NLS-1$ }, FLOATS_PAGE { @Override public String getToken() { return "p"; }//$NON-NLS-1$ }, HERE { @Override public String getToken() { return "h"; }//$NON-NLS-1$ }, HERE_HERE { @Override public String getToken() { return "H"; }//$NON-NLS-1$ }, NONE { @Override public String getToken() { return ""; }//$NON-NLS-1$ }; @Override public String toString() { return getToken(); } /** * @return The token corresponding to the placement. * @since 3.0 */ public abstract String getToken(); /** * @param pos The position token to check. * @return The corresponding vertical position. * @since 3.0 */ public static VerticalPosition getPosition(final String pos) { if(pos==null) return null; if(pos.equals(TOP.getToken())) return TOP; if(pos.equals(BOTTOM.getToken())) return BOTTOM; if(pos.equals(FLOATS_PAGE.getToken())) return FLOATS_PAGE; if(pos.equals(HERE.getToken())) return HERE; if(pos.equals(HERE_HERE.getToken())) return HERE_HERE; if(pos.equals(NONE.getToken())) return NONE; return null; } } /** The comment of the drawing. */ protected String comment; /** The label of the drawing. */ protected String label; /** The caption of the drawing. */ protected String caption; /** The token of the position of the drawing */ protected VerticalPosition positionVertToken; /** The horizontal position of the drawing */ protected boolean positionHoriCentre; /** Defined if the instrument has been modified. */ protected boolean modified; /** The scale of the drawing. */ protected double scale; /** * Initialises the abstract generator. * @since 3.0 */ protected LaTeXGenerator() { super(); modified= false; comment = ""; //$NON-NLS-1$ label = ""; //$NON-NLS-1$ caption = ""; //$NON-NLS-1$ positionHoriCentre = false; positionVertToken = VerticalPosition.NONE; scale = 1.; } /** * @return the scale of the drawing. * @since 3.0 */ public double getScale() { return scale; } /** * @param scale the scale to set. * @since 3.0 */ public void setScale(final double scale) { if(scale>=0.1) this.scale = scale; } /** * @return the comment. * @since 3.0 */ public String getComment() { return comment; } /** * @return The comments without any characters like "%" * at the start of each lines. (these characters are used like comment symbol by LaTeX). */ public String getCommentsWithoutTag() { int i=0; int j=0; final int lgth = comment.length(); final char[] buffer = new char[lgth]; boolean eol = true; while(i1 ? str.substring(0, str.length()-LResources.EOL.length()) : str; } @Override public boolean isModified() { return modified; } @Override public void setModified(final boolean modified) { this.modified = modified; } /** * @param newComments the comment to set. * @since 3.0 */ public void setComment(final String newComments) { if(newComments!=null && !newComments.isEmpty()) { int i; int j=0; final int lgth = newComments.length(); final char[] buffer = new char[lgth*3]; boolean eol = true; for(i=0; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/16/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTArcView extends PSTClassicalView { /** * Creates and initialises a LArc PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTArcView(final IArc model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); final double radiusX = shape.getWidth()/2.0; final double radiusY = shape.getHeight()/2.0; final double x = shape.getX()+radiusX - origin.getX(); final double y = origin.getY() - shape.getY()+radiusY; double startAngle = shape.getAngleStart(); double endAngle = shape.getAngleEnd(); final double yunit = radiusY/radiusX; final StringBuilder start = new StringBuilder(); final StringBuilder end = new StringBuilder(); final StringBuilder params = getPropertiesCode(ppc); final StringBuilder rotation = getRotationHeaderCode(ppc, origin); final StringBuilder arrowsStyle = getArrowsStyleCode(); if(startAngle>endAngle) { final double tmp = startAngle; startAngle = endAngle; endAngle = tmp; } if(rotation!=null) end.append('}'); if(!LNumber.equalsDouble(yunit, 1.)) { start.append("\\psscalebox{1 ").append(LNumber.getCutNumberFloat(yunit)).append('}').append('{'); //$NON-NLS-1$ end.append('}'); } if(rotation!=null) start.append(rotation); switch(shape.getArcStyle()) { case ARC: start.append("\\psarc"); //$NON-NLS-1$ break; case CHORD: final IPoint startPt= shape.getStartPoint(); final IPoint endPt = shape.getEndPoint(); start.append("\\psarc"); //$NON-NLS-1$ end.append(LResources.EOL).append("\\psline[").append(params).append(']').append('('); //$NON-NLS-1$ end.append(LNumber.getCutNumberFloat(startPt.getX()/ppc)).append(','); end.append(LNumber.getCutNumberFloat(startPt.getY()/ppc)).append(')').append('('); end.append(LNumber.getCutNumberFloat(endPt.getX()/ppc)).append(','); end.append(LNumber.getCutNumberFloat(endPt.getY()/ppc)).append(')'); break; case WEDGE: start.append("\\pswedge"); //$NON-NLS-1$ break; } cache.append(start); cache.append('[').append(params).append(']'); if(arrowsStyle!=null) cache.append(arrowsStyle); cache.append('('); cache.append(LNumber.getCutNumberFloat(x/ppc)).append(','); cache.append(LNumber.getCutNumberFloat(y/ppc)).append(')').append('{'); cache.append(LNumber.getCutNumberFloat(radiusX/ppc)).append('}').append('{'); cache.append(LNumber.getCutNumberFloat(Math.toDegrees(startAngle))).append('}').append('{'); cache.append(LNumber.getCutNumberFloat(Math.toDegrees(endAngle))).append('}'); cache.append(end); } } PSTAxesView.java000066400000000000000000000120431321075051700343230ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LAxes model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/17/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTAxesView extends PSTShapeView { /** * Creates and initialises a LAxes PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTAxesView(final IAxes model) { super(model); update(); } @Override public void updateCache(final IPoint origDrawing, final float ppc) { if(!GLibUtilities.isValidPoint(origDrawing) || ppc<1) return ; emptyCache(); final StringBuilder start = new StringBuilder(); final StringBuilder end = new StringBuilder(); final StringBuilder rot = getRotationHeaderCode(ppc, shape.getPosition()); final StringBuilder coord = new StringBuilder(); final StringBuilder arrowsStyle = getArrowsStyleCode(); final double gridEndx = shape.getGridEndX(); final double gridEndy = shape.getGridEndY(); final double positionx = shape.getPosition().getX(); final double positiony = shape.getPosition().getY(); final double gridStartx = shape.getGridStartX(); final double gridStarty = shape.getGridStartY(); if(!LNumber.equalsDouble(positionx, 0.) || !LNumber.equalsDouble(positiony, 0.)) { end.append('}'); start.append("\\rput(").append(LNumber.getCutNumberFloat((positionx-origDrawing.getX())/ppc)).append(','); //$NON-NLS-1$ start.append(LNumber.getCutNumberFloat((origDrawing.getY()-positiony)/ppc)).append(')').append('{'); } if(rot!=null) { start.append(rot); end.insert(0, '}'); } coord.append('(').append(0).append(',').append(0).append(')'); coord.append('(').append((int)gridStartx).append(','); coord.append((int)gridStarty).append(')').append('('); coord.append((int)gridEndx).append(',').append((int)gridEndy).append(')'); cache.append(start); cache.append("\\psaxes[");//$NON-NLS-1$ cache.append(updateParams(ppc)); cache.append(']'); if(arrowsStyle!=null) cache.append(arrowsStyle); cache.append(coord); cache.append(end); } protected StringBuilder updateParams(final float ppc) { final StringBuilder params = getLineCode(ppc); final double incrementx = shape.getIncrementX(); final double incrementy = shape.getIncrementY(); final double originx = shape.getOriginX(); final double originy = shape.getOriginY(); final double distLabelsX = shape.getDistLabelsX(); final double distLabelsY = shape.getDistLabelsY(); final boolean showOrigin = shape.isShowOrigin(); params.append(", tickstyle=").append(shape.getTicksStyle().getPSTToken());//$NON-NLS-1$ params.append(", axesstyle=").append(shape.getAxesStyle().getPSTToken());//$NON-NLS-1$ params.append(", labels=").append(shape.getLabelsDisplayed().getPSTToken());//$NON-NLS-1$ params.append(", ticks=").append(shape.getTicksDisplayed().getPSTToken());//$NON-NLS-1$ // params.append(", ticksize=").append((float)LNumber.getCutNumber(shape.getTicksSize()/ppc)).append(PSTricksConstants.TOKEN_CM);//$NON-NLS-1$ if(!LNumber.equalsDouble(distLabelsX, 0.)) params.append(", dx=").append(LNumber.getCutNumberFloat(distLabelsX)).append(PSTricksConstants.TOKEN_CM);//$NON-NLS-1$ if(!LNumber.equalsDouble(distLabelsY, 0.)) params.append(", dy=").append(LNumber.getCutNumberFloat(distLabelsY)).append(PSTricksConstants.TOKEN_CM);//$NON-NLS-1$ if(!LNumber.equalsDouble(incrementx, PSTricksConstants.DEFAULT_DX)) params.append(", Dx=").append(LNumber.equalsDouble(incrementx, incrementx) ? String.valueOf((int)incrementx): //$NON-NLS-1$ String.valueOf(LNumber.getCutNumberFloat(incrementx))); if(!LNumber.equalsDouble(incrementy, PSTricksConstants.DEFAULT_DY)) params.append(", Dy=").append(LNumber.equalsDouble(incrementy, incrementy) ? String.valueOf((int)incrementy): //$NON-NLS-1$ String.valueOf(LNumber.getCutNumberFloat(incrementy))); if(!LNumber.equalsDouble(originx, PSTricksConstants.DEFAULT_OX)) params.append(", Ox=").append((int)originx);//$NON-NLS-1$ if(!LNumber.equalsDouble(originy, PSTricksConstants.DEFAULT_OY)) params.append(", Oy=").append((int)originy);//$NON-NLS-1$ if(showOrigin!=PSTricksConstants.DEFAULT_SHOW_ORIGIN) params.append(", showorigin=").append(showOrigin);//$NON-NLS-1$ return params; } } PSTBezierCurveView.java000066400000000000000000000103731321075051700356540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.util.List; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LBezierCurve model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/16/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTBezierCurveView extends PSTClassicalView { /** * Creates and initialises a LBezierCurve PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTBezierCurveView(final IBezierCurve model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); int i; final int size = shape.getNbPoints(); IPoint pt; IPoint ctrlPt1; IPoint ctrlPt2; final StringBuilder arrowsStyle= getArrowsStyleCode(); final StringBuilder params = getPropertiesCode(ppc); final StringBuilder coord = new StringBuilder(); final List pts = shape.getPoints(); final List fCtrlPts = shape.getFirstCtrlPts(); final List sCtrlPts = shape.getSecondCtrlPts(); final double originx = origin.getX(); final double originy = origin.getY(); if(size<2) return ; coord.append('(').append(LNumber.getCutNumberFloat((pts.get(0).getX()-originx)/ppc)); coord.append(',').append(LNumber.getCutNumberFloat((originy-pts.get(0).getY())/ppc)); coord.append(')').append('(').append(LNumber.getCutNumberFloat((fCtrlPts.get(0).getX()-originx)/ppc)); coord.append(',').append(LNumber.getCutNumberFloat((originy-fCtrlPts.get(0).getY())/ppc)); coord.append(')').append('(').append(LNumber.getCutNumberFloat((fCtrlPts.get(1).getX()-originx)/ppc)); coord.append(',').append(LNumber.getCutNumberFloat((originy-fCtrlPts.get(1).getY())/ppc)); coord.append(')').append('(').append(LNumber.getCutNumberFloat((pts.get(1).getX()-originx)/ppc)); coord.append(',').append(LNumber.getCutNumber((originy-pts.get(1).getY())/ppc)); coord.append(')'); for(i=2; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 07/25/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTCircleView extends PSTClassicalView { /** * Creates an SVG generator for circles. * @param circle The circle used for the conversion in SVG. * @since 3.0 */ protected PSTCircleView(final ICircle circle) { super(circle); update(); } @Override public void updateCache(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return ; emptyCache(); final double radius = shape.getWidth()/2.; final StringBuilder rotation = getRotationHeaderCode(ppc, position); final double x = shape.getX()+radius - position.getX(); final double y = position.getY()+radius - shape.getY(); if(rotation!=null) cache.append(rotation); cache.append("\\pscircle["); //$NON-NLS-1$ cache.append(getPropertiesCode(ppc)); cache.append(']').append('('); cache.append(LNumber.getCutNumberFloat(x/ppc)).append(','); cache.append(LNumber.getCutNumberFloat(y/ppc)).append(')').append('{'); cache.append(LNumber.getCutNumberFloat(radius/ppc)).append('}'); if(rotation!=null) cache.append('}'); } } PSTClassicalView.java000066400000000000000000000036231321075051700353250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; /** * Defines methods for classical PSTricks views.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/15/2008
    * @author Arnaud BLOUIN * @since 3.0 */ abstract class PSTClassicalView extends PSTShapeView { /** * Creates and initialises an abstract PSTricks view for classical model. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTClassicalView(final S model) { super(model); } /** * @param ppc The number of pixels per centimetre. * @return The properties PSTricks code of the model. * @since 3.0 */ protected StringBuilder getPropertiesCode(final float ppc) { final StringBuilder params = new StringBuilder(); params.append(getLineCode(ppc)); addCode(params, getShadowCode(ppc)); addCode(params, getFillingCode(ppc)); addCode(params, getBorderPositionCode()); addCode(params, getDoubleBorderCode(ppc)); addCode(params, getShowPointsCode()); addCode(params, getArrowsParametersCode()); return params; } private void addCode(final StringBuilder mainCodeBuilder, final StringBuilder codeToAdd) { if(codeToAdd!=null) { if(mainCodeBuilder.length()>0) mainCodeBuilder.append(", "); //$NON-NLS-1$ mainCodeBuilder.append(codeToAdd); } } } PSTCodeGenerator.java000066400000000000000000000165301321075051700353160ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.util.HashMap; import java.util.Map; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.latex.DviPsColors; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniserHandler; import net.sf.latexdraw.util.LNumber; import net.sf.latexdraw.util.LResources; /** * Defines a PSTricks generator; it manages the PSTricks views and the latex additional code. *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class PSTCodeGenerator extends LaTeXGenerator { public static final String PACKAGE_PSTRICKS = "% \\usepackage[usenames,dvipsnames]{pstricks}" + LResources.EOL +//$NON-NLS-1$ "% \\usepackage{epsfig}" + LResources.EOL + "% \\usepackage{pst-grad} % For gradients" +//$NON-NLS-1$//$NON-NLS-2$ LResources.EOL + "% \\usepackage{pst-plot} % For axes" + LResources.EOL; //$NON-NLS-1$ public static final String PACKAGE_FOR_SPACE_PICTURE = "\\usepackage[space]{grffile} % For spaces in paths" + LResources.EOL + "\\usepackage{etoolbox} % For spaces in paths"+ LResources.EOL + "\\makeatletter % For spaces in paths" + LResources.EOL + "\\patchcmd\\Gread@eps{\\@inputcheck#1 }{\\@inputcheck\"#1\"\\relax}{}{}" + LResources.EOL + "\\makeatother" + LResources.EOL; /** The PSTricks views. */ protected PSTViewsSynchroniser synchro; /** The code cache. */ protected StringBuilder cache; /** Defines if the latex parameters (position, caption, etc.) must be generated. */ protected boolean withLatexParams; /** Defines if the comments must be generated. */ protected boolean withComments; /** * Creates and initialises the generator. * @param drawing The shapes used to generate PST code. * @param handler The handler that provides information to the generator. * @param withLatexParams Defines if the latex parameters (position, caption, etc.) must be generated. * @param withComments Defines if the comments must be generated. * @throws IllegalArgumentException If the given drawing parameter is null. * @since 3.0 */ public PSTCodeGenerator(final IDrawing drawing, final ViewsSynchroniserHandler handler, final boolean withLatexParams, final boolean withComments) { super(); if(drawing==null) throw new IllegalArgumentException(); this.withComments = withComments; this.withLatexParams = withLatexParams; synchro = new PSTViewsSynchroniser(handler, drawing); cache = new StringBuilder(); } /** * @return the cache. * @since 3.0 */ public StringBuilder getCache() { return cache; } @Override public void update() { emptyCache(); final IDrawing drawing = synchro.getDrawing(); StringBuilder code; String pkg = LaTeXGenerator.getPackages(); PSTShapeView pstView; final ViewsSynchroniserHandler handler = synchro.getHandler(); final IPoint origin = handler.getOriginDrawingPoint(); final IPoint tl = handler.getTopRightDrawingPoint(); final IPoint br = handler.getBottomLeftDrawingPoint(); final int ppc = handler.getPPCDrawing(); final Map addedColours = new HashMap<>(); final StringBuilder shapeCode = new StringBuilder(); final boolean hasBeginFigure; if(drawing.isEmpty()) return ; if(withComments && comment!=null && !comment.isEmpty()) cache.append(comment); cache.append(PACKAGE_PSTRICKS).append("% ").append(PACKAGE_FOR_SPACE_PICTURE.replaceAll(LResources.EOL, LResources.EOL+"% ")); if(!pkg.isEmpty()) { pkg = "% User Packages:" + LResources.EOL + "% " + pkg.replace(LResources.EOL, LResources.EOL + "% "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ cache.append(pkg).append(LResources.EOL); } cache.append(LResources.EOL); if(withLatexParams && (positionVertToken!=VerticalPosition.NONE || !caption.isEmpty() || !label.isEmpty())) { cache.append("\\begin{figure}"); //$NON-NLS-1$ if(positionVertToken==VerticalPosition.NONE) cache.append(LResources.EOL); else cache.append('[').append(positionVertToken.getToken()).append(']').append(LResources.EOL); hasBeginFigure = true; } else hasBeginFigure = false; if(withLatexParams && positionHoriCentre) cache.append("\\begin{center}").append(LResources.EOL);//$NON-NLS-1$ final float scaleF = LNumber.getCutNumberFloat(getScale()); cache.append("\\psscalebox{").append(scaleF).append(' ').append(scaleF).append("} % Change this value to rescale the drawing.");//$NON-NLS-1$ //$NON-NLS-2$ cache.append(LResources.EOL).append('{').append(LResources.EOL); cache.append("\\begin{pspicture}("); //$NON-NLS-1$ cache.append(0).append(',').append(LNumber.getCutNumberFloat((origin.getY()-br.getY())/ppc)).append(')').append('('); cache.append(LNumber.getCutNumberFloat((tl.getX()-origin.getX())/ppc)).append(',').append(LNumber.getCutNumberFloat((origin.getY()-tl.getY())/ppc)); cache.append(')').append(LResources.EOL); for(final IShape shape : drawing.getShapes()) { pstView = synchro.getView(shape); if(pstView!=null) { code = pstView.getCache(); if(code!=null) shapeCode.append(code).append(LResources.EOL); generateColourCode(pstView, addedColours); } } cache.append(shapeCode).append("\\end{pspicture}").append(LResources.EOL).append('}').append(LResources.EOL); //$NON-NLS-1$ if(withLatexParams) { if(positionHoriCentre) cache.append("\\end{center}").append(LResources.EOL);//$NON-NLS-1$ if(!label.isEmpty()) cache.append("\\label{").append(label).append('}').append(LResources.EOL);//$NON-NLS-1$ if(!caption.isEmpty()) cache.append("\\caption{").append(caption).append('}').append(LResources.EOL);//$NON-NLS-1$ if(hasBeginFigure) cache.append("\\end{figure}").append(LResources.EOL);//$NON-NLS-1$ } } /** * Adds the PST colour code to the cache. * @param pstView The shape which colour code will be generated. * @param addedColours The PST colours already generated. * @since 3.0 */ private void generateColourCode(final PSTShapeView pstView, final Map addedColours) { if(pstView.coloursName!=null) for(final String nameColour : pstView.coloursName) if(addedColours.get(nameColour)==null && DviPsColors.INSTANCE.getPredefinedColour(nameColour)==null) { addedColours.put(nameColour, nameColour); cache.append(DviPsColors.INSTANCE.getUsercolourCode(nameColour)).append(LResources.EOL); } } /** * Empties the cache. * @since 3.0 */ protected void emptyCache() { if(cache!=null) cache.delete(0, cache.length()); } /** * Updates the cache of every shapes and those of this generator. * @since 3.0 */ public void updateFull() { synchro.updateFull(); update(); } } PSTDotView.java000066400000000000000000000043311321075051700341520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LDot model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/15/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTDotView extends PSTClassicalView { /** * Creates and initialises a LDot PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTDotView(final IDot model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { final double x = shape.getX() - origin.getX(); final double y = origin.getY() - shape.getY(); final DotStyle style = shape.getDotStyle(); final StringBuilder params = getPropertiesCode(ppc); final StringBuilder rotation= getRotationHeaderCode(ppc, origin); emptyCache(); if(style!=DotStyle.DOT) params.append(", dotstyle=").append(style.getPSTToken()); //$NON-NLS-1$ params.append(", dotsize=").append((float)LNumber.getCutNumber(shape.getDiametre()/ppc)); //$NON-NLS-1$ if(rotation!=null) cache.append(rotation); cache.append("\\psdots["); //$NON-NLS-1$ cache.append(params); if(shape.isFillable()) cache.append(", fillcolor=").append(getColourName(shape.getFillingCol())); cache.append(']').append('('); cache.append(LNumber.getCutNumberFloat(x/ppc)).append(','); cache.append(LNumber.getCutNumberFloat(y/ppc)).append(')'); if(rotation!=null) cache.append('}'); } } PSTEllipseView.java000066400000000000000000000042471321075051700350270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LEllipse model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/15/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTEllipseView extends PSTClassicalView { /** * Creates and initialises a LEllipse PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTEllipseView(final IEllipse model) { super(model); update(); } @Override public void updateCache(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return ; emptyCache(); final StringBuilder rotation = getRotationHeaderCode(ppc, position); final float x = LNumber.getCutNumberFloat(shape.getX()+shape.getWidth()/2.0 - position.getX()); final float y = LNumber.getCutNumberFloat(position.getY()+shape.getHeight()/2.0 - shape.getY()); if(rotation!=null) cache.append(rotation); cache.append("\\psellipse["); //$NON-NLS-1$ cache.append(getPropertiesCode(ppc)); cache.append(']').append('('); cache.append(LNumber.getCutNumber(x/ppc)).append(','); cache.append(LNumber.getCutNumber(y/ppc)).append(')').append('('); cache.append(LNumber.getCutNumberFloat(shape.getWidth()/2.0/ppc)).append(','); cache.append(LNumber.getCutNumberFloat(shape.getHeight()/2.0/ppc)).append(')'); if(rotation!=null) cache.append('}'); } } PSTFreeHandView.java000066400000000000000000000150511321075051700351010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.util.List; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LFreeHand model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTFreeHandView extends PSTClassicalView { /** * Creates and initialises a LFreeHand PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTFreeHandView(final IFreehand model) { super(model); update(); } /** * Updates the cache with the code of the freehand shape having the Curve style. */ protected void updateCacheCurve(final StringBuilder coord, final double originx, final double originy, final double ppc) { final List pts = shape.getPoints(); int i; final int size = shape.getNbPoints(); final int interval = shape.getInterval(); float prevx; float prevy; float curx = (float)pts.get(0).getX(); float cury = (float)pts.get(0).getY(); float midx=0; float midy=0; coord.append("\\moveto(").append(LNumber.getCutNumberFloat(((curx-originx)/ppc)));//$NON-NLS-1$ coord.append(',').append(LNumber.getCutNumberFloat((originy-cury)/ppc)).append(')').append('\n'); if(pts.size()>interval) { prevx = curx; prevy = cury; curx = (float)pts.get(interval).getX(); cury = (float)pts.get(interval).getY(); midx = (curx + prevx) / 2.0f; midy = (cury + prevy) / 2.0f; coord.append("\\lineto(").append(LNumber.getCutNumberFloat(((midx-originx)/ppc)));//$NON-NLS-1$ coord.append(',').append(LNumber.getCutNumberFloat((originy-midy)/ppc)).append(')').append('\n'); } for(i=interval*2; i pts = shape.getPoints(); IPoint p = pts.get(0); int i; final int size = shape.getNbPoints(); final int interval = shape.getInterval(); coord.append("\\moveto(").append(LNumber.getCutNumberFloat((p.getX()-originx)/ppc));//$NON-NLS-1$ coord.append(',').append(LNumber.getCutNumberFloat((originy-p.getY())/ppc)).append(')').append('\n'); for(i=interval; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/17/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTGridView extends PSTShapeView { /** * Creates and initialises a LGrid PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTGridView(final IGrid model) { super(model); update(); } /** * Returns the PST code of the parameters of the grid. */ private StringBuilder getParamsCode(final float ppc, final double unit) { final Color gridLabelsColor = shape.getGridLabelsColour(); final Color subGridColor = shape.getSubGridColour(); final Color linesColor = shape.getLineColour(); final StringBuilder params = new StringBuilder(); params.append("gridwidth=").append(LNumber.getCutNumberFloat(shape.getGridWidth()/ppc)); //$NON-NLS-1$ params.append(", subgridwidth=").append(LNumber.getCutNumberFloat(shape.getSubGridWidth()/ppc)); //$NON-NLS-1$ params.append(", gridlabels=").append(LNumber.getCutNumber(shape.getLabelsSize()*0.6f)).append("pt"); //$NON-NLS-1$ //$NON-NLS-2$ if(shape.getSubGridDiv()!=PSTricksConstants.DEFAULT_SUBGRIDDIV) params.append(", subgriddiv=").append(shape.getSubGridDiv()); //$NON-NLS-1$ if(shape.getGridDots()!=PSTricksConstants.DEFAULT_GRIDDOTS) params.append(", griddots=").append(shape.getGridDots()); //$NON-NLS-1$ if(shape.getSubGridDots()!=PSTricksConstants.DEFAULT_SUBGRIDDOTS) params.append(", subgriddots=").append(shape.getSubGridDots()); //$NON-NLS-1$ if(!gridLabelsColor.equals(PSTricksConstants.DEFAULT_LABELGRIDCOLOR)) params.append(", gridlabelcolor=").append(getColourName(gridLabelsColor)); //$NON-NLS-1$ if(!LNumber.equalsDouble(unit, PSTricksConstants.DEFAULT_UNIT)) params.append(", unit=").append(LNumber.getCutNumberFloat(unit)).append(PSTricksConstants.TOKEN_CM); //$NON-NLS-1$ if(!linesColor.equals(PSTricksConstants.DEFAULT_GRIDCOLOR)) params.append(", gridcolor=").append(getColourName(linesColor)); //$NON-NLS-1$ params.append(", subgridcolor=").append(getColourName(subGridColor)); //$NON-NLS-1$ return params; } @Override public void updateCache(final IPoint pt, final float ppc) { if(!GLibUtilities.isValidPoint(pt) || ppc<1) return ; emptyCache(); final int startX; final int startY; final int endX; final int endY; final boolean isXLabelSouth = shape.isXLabelSouth(); final boolean isYLabelWest = shape.isYLabelWest(); final IPoint position = shape.getPosition(); final StringBuilder start = new StringBuilder(); final StringBuilder end = new StringBuilder(); final StringBuilder rot = getRotationHeaderCode(ppc, position); final StringBuilder coord = new StringBuilder(); final double unit = shape.getUnit(); final double gridStartx = shape.getGridStartX(); final double gridStarty = shape.getGridStartY(); final double gridEndx = shape.getGridEndX(); final double gridEndy = shape.getGridEndY(); if(isXLabelSouth) { startY = (int)gridStarty; endY = (int)gridEndy; } else { startY = (int)gridEndy; endY = (int)gridStarty; } if(isYLabelWest) { startX = (int)gridStartx; endX = (int)gridEndx; } else { startX = (int)gridEndx; endX = (int)gridStartx; } coord.append('(').append((int)shape.getOriginX()).append(',').append((int)shape.getOriginY()).append(')'); coord.append('(').append(startX).append(',').append(startY).append(')'); coord.append('(').append(endX).append(',').append(endY).append(')'); if(!LNumber.equalsDouble(unit, PSTricksConstants.DEFAULT_UNIT)) end.append("\n\\psset{unit=").append(PSTricksConstants.DEFAULT_UNIT).append(PSTricksConstants.TOKEN_CM).append('}');//$NON-NLS-1$ if(!LNumber.equalsDouble(position.getX(), 0.) || !LNumber.equalsDouble(position.getY(), 0.)) { final float posX = LNumber.getCutNumberFloat((position.getX()-pt.getX())/ppc); final float posY = LNumber.getCutNumberFloat((pt.getY()-position.getY())/ppc); end.append('}'); start.append("\\rput(").append(posX).append(',').append(posY).append(')').append('{');//$NON-NLS-1$ } if(rot!=null) { start.append(rot); end.insert(0, '}'); } cache.append(start); cache.append("\\psgrid[");//$NON-NLS-1$ cache.append(getParamsCode(ppc, unit)); cache.append(']'); cache.append(coord); cache.append(end); } } PSTGroupView.java000066400000000000000000000037241321075051700345250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.util.List; import java.util.stream.Collectors; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; /** * Defines a PSTricks view of the LDrawing model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/17/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTGroupView extends PSTShapeView { /** * Creates and initialises a LDrawing PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTGroupView(final IGroup model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); List> pstViews = shape.getShapes().stream().map(sh -> { PSTShapeView pstView = PSTViewsFactory.INSTANCE.createView(sh); pstView.updateCache(origin, ppc); return pstView; }).collect(Collectors.toList()); cache.append(pstViews.stream().map(view -> view.getCache()).collect(Collectors.joining("\n"))); coloursName = pstViews.stream().map(view -> view.coloursName).filter(col -> col!=null).flatMap(s -> s.stream()).collect(Collectors.toSet()); } @Override protected void emptyCache() { super.emptyCache(); coloursName = null; } } PSTLinesView.java000066400000000000000000000032251321075051700344770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; /** * Defines a PSTricks view of the LLines model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTLinesView extends PSTPolygonView { /** * Creates and initialises a LLines PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTLinesView(final IPolyline model) { super(model); update(); } @Override public void updateCache(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return ; emptyCache(); final StringBuilder points = getPointsCode(position, ppc); final StringBuilder arrowsStyle = getArrowsStyleCode(); cache.append("\\psline["); //$NON-NLS-1$ cache.append(getPropertiesCode(ppc)); cache.append(']'); if(arrowsStyle!=null) cache.append(arrowsStyle); cache.append(points); } } PSTPictureView.java000066400000000000000000000045721321075051700350460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPicture; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LFileUtils; import net.sf.latexdraw.util.LNumber; import net.sf.latexdraw.util.LResources; /** * Defines a PSTricks view of the LPicture model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTPictureView extends PSTShapeView { /** * Creates and initialises a LPicture PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTPictureView(final IPicture model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); String path = shape.getPathTarget(); final StringBuilder start = new StringBuilder(); final StringBuilder rot = getRotationHeaderCode(ppc, origin); path = path.replaceAll("\\\\", "/");//$NON-NLS-1$ //$NON-NLS-2$ if(path.contains(" "))//$NON-NLS-1$ start.append(LangTool.INSTANCE.getString16("Picture.0")).append(LResources.EOL); //$NON-NLS-1$ if(rot!=null) cache.append(rot); cache.append(start); cache.append("\\rput(");//$NON-NLS-1$ cache.append(LNumber.getCutNumberFloat((shape.getX()+shape.getWidth()/2.-origin.getX())/ppc)).append(','); cache.append(LNumber.getCutNumberFloat((origin.getY()-shape.getY()-shape.getHeight()/2.)/ppc)).append(')').append('{'); cache.append("\\includegraphics{"); //$NON-NLS-1$ cache.append(LFileUtils.INSTANCE.normalizeForLaTeX(path)); cache.append('}').append('}'); if(rot!=null) cache.append('}'); } } PSTPlotView.java000066400000000000000000000035711321075051700343470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp.PlotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; public class PSTPlotView extends PSTClassicalView{ protected PSTPlotView(final IPlot model) { super(model); update(); } @Override public void updateCache(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return; emptyCache(); final StringBuilder params = getPropertiesCode(ppc); final StringBuilder rotation = getRotationHeaderCode(ppc, position); if(rotation!=null) cache.append(rotation); cache.append("\\rput(");//$NON-NLS-1$ cache.append(LNumber.getCutNumberFloat((shape.getX()-position.getX())/ppc)).append(','); cache.append(LNumber.getCutNumberFloat((position.getY()-shape.getY())/ppc)).append(')').append('{'); cache.append("\\psplot["); //$NON-NLS-1$ cache.append(params).append(", plotstyle=").append(shape.getPlotStyle().getPSTToken()).append(", plotpoints="). append(shape.getNbPlottedPoints()).append(", xunit=").append(shape.getXScale()).append(", yunit="). append(shape.getYScale()).append(", polarplot=").append(shape.isPolar()); if(shape.getPlotStyle()==PlotStyle.DOTS) { cache.append(", dotstyle=").append(shape.getDotStyle().getPSTToken()). append(", dotsize=").append(LNumber.getCutNumberFloat(shape.getDiametre()/ppc)); if(shape.getDotStyle().isFillable()) cache.append(", fillcolor=").append(getColourName(shape.getFillingCol())); } cache.append("]{").append(shape.getPlotMinX()).append("}{").append(shape.getPlotMaxX()).append("}{"). append(shape.getPlotEquation()).append('}'); if(rotation!=null) cache.append('}'); cache.append('}'); } } PSTPolygonView.java000066400000000000000000000044741321075051700350630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LPolygon model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTPolygonView extends PSTClassicalView { /** * Creates and initialises a LRect PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTPolygonView(final IPolygon model) { super(model); update(); } /** * @param position The reference point of the PSTricks drawing. * @param ppc The number of pixels per centimetre. * @return The PSTricks code of the polygon coordinates. * @since 3.0 */ protected StringBuilder getPointsCode(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return null; IPoint p; int i; final int size = shape.getNbPoints(); final StringBuilder points = new StringBuilder(); for(i=0; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTRectView extends PSTClassicalView { /** * Creates and initialises a LRect PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTRectView(final IRectangle model) { super(model); update(); } @Override public void updateCache(final IPoint position, final float ppc) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return ; emptyCache(); final StringBuilder rotation; final StringBuilder params = getPropertiesCode(ppc); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double x1 = tl.getX() - position.getX(); final double x2 = br.getX() - position.getX(); final double y1 = position.getY() - tl.getY(); final double y2 = position.getY() - br.getY(); if(shape.isRoundCorner()) params.append(", framearc=").append(LNumber.getCutNumberFloat(shape.getLineArc())); //$NON-NLS-1$ rotation = getRotationHeaderCode(ppc, position); if(rotation!=null) cache.append(rotation); cache.append("\\psframe["); //$NON-NLS-1$ cache.append(params); cache.append(']').append('('); cache.append(LNumber.getCutNumberFloat(x2 / ppc)).append(','); cache.append(LNumber.getCutNumberFloat(y1 / ppc)).append(')').append('('); cache.append(LNumber.getCutNumberFloat(x1 / ppc)).append(','); cache.append(LNumber.getCutNumberFloat(y2 / ppc)).append(')'); if(rotation!=null) cache.append('}'); } } PSTRhombusView.java000066400000000000000000000046321321075051700350470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LRhombus model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTRhombusView extends PSTClassicalView { /** * Creates and initialises a LRhombus PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTRhombusView(final IRhombus model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double tlx = tl.getX(); final double tly = tl.getY(); final double brx = br.getX(); final double bry = br.getY(); final double xCenter = (tlx+brx)/2. - origin.getX(); final double yCenter = origin.getY() - (tly+bry)/2.; final StringBuilder params = getPropertiesCode(ppc); final double rotationAngle = Math.toDegrees(shape.getRotationAngle())%360; if(!LNumber.equalsDouble(rotationAngle, 0.)) params.append(", gangle=").append(LNumber.getCutNumberFloat(-rotationAngle));//$NON-NLS-1$ cache.append("\\psdiamond[");//$NON-NLS-1$ cache.append(params); cache.append(']').append('('); cache.append(LNumber.getCutNumberFloat(xCenter/ppc)).append(','); cache.append(LNumber.getCutNumberFloat(yCenter/ppc)).append(')').append('('); cache.append(LNumber.getCutNumberFloat((brx-tlx)/2f)/ppc).append(','); cache.append(LNumber.getCutNumberFloat((bry-tly)/2f)/ppc).append(')'); } } PSTShapeView.java000066400000000000000000000364151321075051700344740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.awt.Color; import java.util.HashSet; import java.util.Set; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.views.AbstractCodeView; import net.sf.latexdraw.glib.views.latex.DviPsColors; import net.sf.latexdraw.util.LNumber; import static java.lang.Math.toDegrees; /** * Defines a PSTricks view of the LShape model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/15/2008
    * @author Arnaud BLOUIN * @param The type of the shape to generate the PST code. * @since 3.0 */ public abstract class PSTShapeView extends AbstractCodeView { /** The list of name of the colours added to the generated code. Useful when generating * the code to define the colours in the latex document. */ protected Set coloursName; /** * Creates and initialises an abstract PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTShapeView(final S model) { super(model); } /** * Saves a colour coming from the generated code. * @param name The name of the generated colour. * @since 3.0 */ protected void addColour(final String name) { if(name!=null) { if(coloursName==null) coloursName = new HashSet<>(); if(!coloursName.contains(name)) coloursName.add(name); } } @Override public void update() { // } /** * Updates the cache. * @param origin The origin point of the PST drawing. * @param ppc The number of point per centimetre. * @since 3.0 */ public abstract void updateCache(final IPoint origin, final float ppc); /** * @return The PST code corresponding to the arrow parameters of the shape. Or null if no arrow. * @since 3.0 */ protected StringBuilder getArrowsParametersCode() { StringBuilder code = null; if(shape instanceof IArrowableShape) {//FIXME scala trait final IArrowableShape arr = (IArrowableShape)shape; final ArrowStyle style1 = arr.getArrowStyle(0); final ArrowStyle style2 = arr.getArrowStyle(-1); if(style1==ArrowStyle.NONE) { if(style2!=ArrowStyle.NONE) code = getArrowParametersCode(arr.getArrowAt(-1)); } else if(style2==ArrowStyle.NONE) code = getArrowParametersCode(arr.getArrowAt(0)); else if(style1.isSameKind(style2)) code = getArrowParametersCode(arr.getArrowAt(0)); else { code = getArrowParametersCode(arr.getArrowAt(0)); code.append(',').append(getArrowParametersCode(arr.getArrowAt(-1))); } } return code; } /** * @return The PST code corresponding to the parameter of the style of the given arrow. The style of the * given arrow must not be NONE. */ private StringBuilder getArrowParametersCode(final IArrow arrow) { final StringBuilder code = new StringBuilder(); final ArrowStyle style = arrow.getArrowStyle(); if(style.isBar() || style.isRoundBracket() || style.isSquareBracket()) { code.append("tbarsize=").append(LNumber.getCutNumberFloat(arrow.getTBarSizeDim()/IShape.PPC)).append(PSTricksConstants.TOKEN_CM).append(' '). //$NON-NLS-1$ append(LNumber.getCutNumberFloat(arrow.getTBarSizeNum())); if(style.isSquareBracket()) code.append(",bracketlength=").append(LNumber.getCutNumberFloat(arrow.getBracketNum())); //$NON-NLS-1$ else if(style.isRoundBracket()) code.append(",rbracketlength=").append(LNumber.getCutNumberFloat(arrow.getRBracketNum())); //$NON-NLS-1$ } else if(style.isArrow()) code.append("arrowsize=").append(LNumber.getCutNumberFloat(arrow.getArrowSizeDim()/IShape.PPC)).append(PSTricksConstants.TOKEN_CM).append(' '). //$NON-NLS-1$ append(LNumber.getCutNumberFloat(arrow.getArrowSizeNum())).append(",arrowlength="). //$NON-NLS-1$ append(LNumber.getCutNumberFloat(arrow.getArrowLength())).append(",arrowinset=").append(LNumber.getCutNumberFloat(arrow.getArrowInset())); //$NON-NLS-1$ else code.append("dotsize=").append(LNumber.getCutNumberFloat(arrow.getDotSizeDim()/IShape.PPC)).append(PSTricksConstants.TOKEN_CM).append(' '). //$NON-NLS-1$ append(LNumber.getCutNumberFloat(arrow.getDotSizeNum())); return code; } /** * @return The PST code corresponding to the style of the arrows (e.g. {|->}). * @since 3.0 */ protected StringBuilder getArrowsStyleCode() { final StringBuilder code; if(shape instanceof IArrowableShape) {//FIXME scala trait final IArrowableShape arr = (IArrowableShape)shape; final ArrowStyle style1 = arr.getArrowStyle(0); final ArrowStyle style2 = arr.getArrowStyle(-1); if(style1==ArrowStyle.NONE && style2==ArrowStyle.NONE) code = null; else code = new StringBuilder().append('{').append(style1.getPSTToken()).append('-').append(style2.getPSTToken()).append('}'); } else code = null; return code; } /** * @return The PSTricks code of the show-points option or null. * @since 3.0 */ protected StringBuilder getShowPointsCode() { final StringBuilder code; if(shape.isShowPts()) { code = new StringBuilder(); code.append("showpoints=true"); //$NON-NLS-1$ //TODO add arrow params } else code = null; return code; } /** * @param ppc The number of pixels per centimetre. * @param position The reference point of the PSTricks drawing. * @return The header of the PSTricks rotation code. * @since 3.0 */ protected StringBuilder getRotationHeaderCode(final float ppc, final IPoint position) { if(ppc<1 || !GLibUtilities.isValidPoint(position)) return null; final StringBuilder code; final double angle = shape.getRotationAngle(); if (LNumber.equalsDouble(angle, 0.)) code = null; else { final IPoint gravityCenter = shape.getGravityCentre(); final double cx = (gravityCenter.getX() - position.getX()) / ppc; final double cy = (position.getY() - gravityCenter.getY()) / ppc; final double x = LNumber.getCutNumberFloat(-Math.cos(-angle) * cx + Math.sin(-angle) * cy + cx); final double y = LNumber.getCutNumberFloat(-Math.sin(-angle) * cx - Math.cos(-angle) * cy + cy); code = new StringBuilder(); code.append("\\rput{").append(LNumber.getCutNumberFloat(-Math.toDegrees(shape.getRotationAngle()) % 360)).append('}').append('('); //$NON-NLS-1$ code.append((float) x).append(',').append((float) y).append(')').append('{'); } return code; } /** * @param colour The colour which name is looking for. If the colour does * not exist yet, it is created. * @return The name of a predefined or a newly generated colour. * @since 3.0 */ protected String getColourName(final Color colour) { String name = DviPsColors.INSTANCE.getColourName(colour); if(name==null) name = DviPsColors.INSTANCE.addUserColour(colour); addColour(name); return name; } /** * @param ppc The number of pixels per centimetre. * @return The PSTricks code of the double border of the shape. * @since 3.0 */ protected StringBuilder getDoubleBorderCode(final float ppc) { final StringBuilder code; if(shape.hasDbleBord()) { final Color doubleColor = shape.getDbleBordCol(); code = new StringBuilder(); code.append("doubleline=true, doublesep=");//$NON-NLS-1$ code.append(LNumber.getCutNumberFloat(shape.getDbleBordSep()/ppc)); if(!doubleColor.equals(PSTricksConstants.DEFAULT_DOUBLE_COLOR)) code.append(", doublecolor=").append(getColourName(doubleColor)); //$NON-NLS-1$ } else code = null; return code; } /** * @return The PSTricks code of the border position. * @since 3.0 */ protected StringBuilder getBorderPositionCode() { final StringBuilder code; if(shape.isBordersMovable()) switch(shape.getBordersPosition()) { case INTO: code = new StringBuilder().append("dimen=").append(PSTricksConstants.BORDERS_INSIDE); //$NON-NLS-1$ break; case MID: code = new StringBuilder().append("dimen=").append(PSTricksConstants.BORDERS_MIDDLE); //$NON-NLS-1$ break; case OUT: code = new StringBuilder().append("dimen=").append(PSTricksConstants.BORDERS_OUTSIDE); //$NON-NLS-1$ break; default: code = null; break; } else code = null; return code; } /** * @param ppc The number of pixels per centimetre. * @return The PSTricks code of the line style. * @since 1.7 */ protected StringBuilder getLineCode(final float ppc) { final StringBuilder code = new StringBuilder(); final Color linesColor = shape.getLineColour(); code.append("linecolor=").append(getColourName(linesColor)); //$NON-NLS-1$ if(shape.isThicknessable()) code.append(", linewidth=").append(LNumber.getCutNumberFloat(shape.getThickness()/ppc));//$NON-NLS-1$ if(linesColor.getAlpha()<255) code.append(", strokeopacity=").append(LNumber.getCutNumberFloat(linesColor.getAlpha()/255f)); //$NON-NLS-1$ switch(shape.getLineStyle()) { case DOTTED: code.append(", linestyle=");//$NON-NLS-1$ code.append(PSTricksConstants.LINE_DOTTED_STYLE); code.append(", dotsep=");//$NON-NLS-1$ code.append(LNumber.getCutNumberFloat(shape.getDotSep()/ppc)); code.append(PSTricksConstants.TOKEN_CM); break; case DASHED: code.append(", linestyle=");//$NON-NLS-1$ code.append(PSTricksConstants.LINE_DASHED_STYLE); code.append(", dash=");//$NON-NLS-1$ code.append(LNumber.getCutNumberFloat(shape.getDashSepBlack()/ppc)); code.append(PSTricksConstants.TOKEN_CM).append(' '); code.append(LNumber.getCutNumberFloat(shape.getDashSepWhite()/ppc)); code.append(PSTricksConstants.TOKEN_CM); break; case SOLID: case NONE: } return code; } /** * @return The PST code of the filling with parameter "plain". * @since 3.0 */ private StringBuilder getFillingPlain() { final Color interiorColor = shape.getFillingCol(); final StringBuilder code = new StringBuilder("fillstyle=solid"); //$NON-NLS-1$ if(!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR)) code.append(",fillcolor=").append(getColourName(interiorColor)); //$NON-NLS-1$ if(interiorColor.getAlpha()<255) code.append(", opacity=").append(LNumber.getCutNumberFloat(interiorColor.getAlpha()/255f)); //$NON-NLS-1$ return code; } /** * @return The PST code of the filling with parameter "gradient". * @since 3.0 */ private StringBuilder getFillingGrad() { final Color gradStartCol = shape.getGradColStart(); final Color gradEndCol = shape.getGradColEnd(); final float gradMidPt = LNumber.getCutNumberFloat(shape.getGradMidPt()); final float gradAngle = LNumber.getCutNumberFloat(shape.getGradAngle()); final StringBuilder code = new StringBuilder("fillstyle=gradient, gradlines=2000");//$NON-NLS-1$ if(!gradStartCol.equals(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR)) code.append(", gradbegin=").append(getColourName(gradStartCol)); //$NON-NLS-1$ if(!gradEndCol.equals(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR)) code.append(", gradend=").append(getColourName(gradEndCol)); //$NON-NLS-1$ if(!LNumber.equalsDouble(gradMidPt, PSTricksConstants.DEFAULT_GRADIENT_MID_POINT)) code.append(", gradmidpoint=").append(gradMidPt);//$NON-NLS-1$ if(!LNumber.equalsDouble(toDegrees(gradAngle), PSTricksConstants.DEFAULT_GRADIENT_ANGLE)) code.append(", gradangle=").append(LNumber.getCutNumberFloat(toDegrees(gradAngle)));//$NON-NLS-1$ return code; } /** * @return The PST code of the filling with parameter "hlines" or "vlines" etc. * @since 3.0 */ private StringBuilder getFillingHatchings(final float ppc) { final Color hatchingsCol = shape.getHatchingsCol(); final StringBuilder code = new StringBuilder(); final FillingStyle fillingStyle = shape.getFillingStyle(); if(fillingStyle==FillingStyle.CLINES || fillingStyle==FillingStyle.CLINES_PLAIN) code.append("fillstyle=crosshatch"); //$NON-NLS-1$ else if(fillingStyle==FillingStyle.HLINES || fillingStyle==FillingStyle.HLINES_PLAIN) code.append("fillstyle=hlines"); //$NON-NLS-1$ else code.append("fillstyle=vlines"); //$NON-NLS-1$ if(shape.isFilled()) code.append('*'); code.append(", hatchwidth="); //$NON-NLS-1$ code.append(LNumber.getCutNumberFloat(shape.getHatchingsWidth()/ppc)); code.append(", hatchangle=").append(LNumber.getCutNumberFloat(Math.toDegrees(shape.getHatchingsAngle()))); //$NON-NLS-1$ code.append(", hatchsep="); //$NON-NLS-1$ code.append(LNumber.getCutNumberFloat(shape.getHatchingsSep()/ppc)); if(!hatchingsCol.equals(PSTricksConstants.DEFAULT_HATCHING_COLOR)) code.append(", hatchcolor=").append(getColourName(hatchingsCol)); //$NON-NLS-1$ return code; } /** * @param ppc The number of pixels per centimetre. * @return The PSTricks code for the filling of the shape. Null if there is no filling. * @since 1.7 */ protected StringBuilder getFillingCode(final float ppc) { StringBuilder code; final Color interiorColor = shape.getFillingCol(); switch(shape.getFillingStyle()) { case NONE: code = null; break; case PLAIN: code = getFillingPlain(); break; case GRAD: code = getFillingGrad(); break; case CLINES: case CLINES_PLAIN: case HLINES: case HLINES_PLAIN: case VLINES: case VLINES_PLAIN: code = getFillingHatchings(ppc); break; default: code = null; break; } if(!shape.isFilled() && shape.hasShadow() && shape.shadowFillsShape() && !interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR)) { if(code==null) code = new StringBuilder(); else code.append(',').append(' '); code.append("fillcolor=").append(getColourName(interiorColor)); //$NON-NLS-1$ } return code; } /** * @param ppc The number of pixels per centimetre. * @return The code of the shape shadow or null if there is no shadow. * @since 3.0 */ protected StringBuilder getShadowCode(final float ppc) { final StringBuilder code; if(shape.hasShadow()) { final Color shadowColor = shape.getShadowCol(); code = new StringBuilder(); code.append("shadow=true");//$NON-NLS-1$ if(!LNumber.equalsDouble(Math.toDegrees(shape.getShadowAngle()), PSTricksConstants.DEFAULT_SHADOW_ANGLE)) code.append(",shadowangle=").append(LNumber.getCutNumberFloat(Math.toDegrees(shape.getShadowAngle())));//$NON-NLS-1$ code.append(",shadowsize=").append(LNumber.getCutNumberFloat(shape.getShadowSize() / ppc));//$NON-NLS-1$ if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR)) code.append(",shadowcolor=").append(getColourName(shadowColor)); //$NON-NLS-1$ } else code = null; return code; } } PSTSquareView.scala000066400000000000000000000026521321075051700350320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst import net.sf.latexdraw.glib.models.interfaces.shape.ISquare import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.GLibUtilities import net.sf.latexdraw.util.LNumber /** * Defines a PSTricks view of the LSquare model. * @author Arnaud Blouin */ class PSTSquareView(sq:ISquare) extends PSTClassicalView[ISquare](sq){ update override def updateCache(position:IPoint, ppc:Float) { if(!GLibUtilities.isValidPoint(position) || ppc<1) return emptyCache val params = getPropertiesCode(ppc) val tl = shape.getTopLeftPoint val br = shape.getBottomRightPoint val x1 = tl.getX - position.getX val x2 = br.getX - position.getX val y1 = position.getY - tl.getY val y2 = position.getY - br.getY if(shape.isRoundCorner) params.append(", framearc=").append(LNumber.getCutNumberFloat(shape.getLineArc)) //$NON-NLS-1$ val rotation = getRotationHeaderCode(ppc, position) if(rotation!=null) cache.append(rotation) cache.append("\\psframe[") //$NON-NLS-1$ cache.append(params) cache.append(']').append('(') cache.append(LNumber.getCutNumberFloat(x2 / ppc)).append(',') cache.append(LNumber.getCutNumberFloat(y1 / ppc)).append(')').append('(') cache.append(LNumber.getCutNumberFloat(x1 / ppc)).append(',') cache.append(LNumber.getCutNumberFloat(y2 / ppc)).append(')') if(rotation!=null) cache.append('}') } }PSTTextView.java000066400000000000000000000047051321075051700343550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.awt.Color; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LText model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTTextView extends PSTShapeView { /** * Creates and initialises a LText PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTTextView(final IText model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; final StringBuilder rot = getRotationHeaderCode(ppc, origin); emptyCache(); if(rot!=null) cache.append(rot); final String colorName; final Color lineCol = shape.getLineColour(); if(lineCol.equals(PSTricksConstants.DEFAULT_LINE_COLOR)) colorName = null; else { colorName = getColourName(shape.getLineColour()); addColour(colorName); } final String tokenPosition = shape.getTextPosition().getLatexToken(); if(tokenPosition==null || tokenPosition.isEmpty()) cache.append("\\rput("); //$NON-NLS-1$ else cache.append("\\rput[").append(shape.getTextPosition().getLatexToken()).append(']').append('('); //$NON-NLS-1$ cache.append(LNumber.getCutNumberFloat((shape.getX()-origin.getX())/ppc)).append(','); cache.append(LNumber.getCutNumberFloat((origin.getY()-shape.getY())/ppc)).append(')').append('{'); if(colorName!=null) cache.append("\\textcolor{").append(colorName).append('}').append('{'); //$NON-NLS-1$ cache.append(shape.getText()).append('}'); if(colorName!=null) cache.append('}'); if(rot!=null) cache.append('}'); } } PSTTriangleView.java000066400000000000000000000042421321075051700351720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import net.sf.latexdraw.util.LNumber; /** * Defines a PSTricks view of the LTriangle model.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 04/18/2008
    * @author Arnaud BLOUIN * @since 3.0 */ class PSTTriangleView extends PSTClassicalView { /** * Creates and initialises a LTriangle PSTricks view. * @param model The model to view. * @throws IllegalArgumentException If the given model is not valid. * @since 3.0 */ protected PSTTriangleView(final ITriangle model) { super(model); update(); } @Override public void updateCache(final IPoint origin, final float ppc) { if(!GLibUtilities.isValidPoint(origin) || ppc<1) return ; emptyCache(); final IPoint tl = shape.getTopLeftPoint(); final IPoint br = shape.getBottomRightPoint(); final double tlx = tl.getX(); final double brx = br.getX(); final double bry = br.getY(); final StringBuilder rot = getRotationHeaderCode(ppc, origin); if(rot!=null) cache.append(rot); cache.append("\\pstriangle[");//$NON-NLS-1$ cache.append(getPropertiesCode(ppc)).append(']').append('('); cache.append(LNumber.getCutNumberFloat(((tlx+brx)/2. - origin.getX())/ppc)).append(','); cache.append(LNumber.getCutNumberFloat((origin.getY()-bry)/ppc)).append(')').append('('); cache.append(LNumber.getCutNumberFloat((brx-tlx)/ppc)).append(','); cache.append(LNumber.getCutNumberFloat((bry-tl.getY())/ppc)).append(')'); if(rot!=null) cache.append('}'); } } PSTViewsFactory.java000066400000000000000000000122051321075051700352150ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.glib.models.interfaces.shape.*; import net.sf.latexdraw.glib.views.CreateViewCmd; /** * Defines a generator that generates PSTricks views from given models.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 04/15/08
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public final class PSTViewsFactory { /** The singleton. */ public static final PSTViewsFactory INSTANCE = new PSTViewsFactory(); /** The chain of responsibility used to reduce the complexity of the factory. */ private CreateViewPSTCmd createCmd; private PSTViewsFactory() { super(); initCommands(); } /** * Creates a view from a shape. * @param shape The shape used to create the view. * @return The created view or null. * @since 3.0 */ public PSTShapeView createView(final IShape shape) { return shape==null ? null : createCmd.execute(shape); } /** * Initialises the chain of responsibility. */ private void initCommands() { CreateViewPSTCmd cmd = new CreateViewPSTCmd(null, IPicture.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTPictureView((IPicture)shape); } }; cmd = new CreateViewPSTCmd(cmd, IFreehand.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTFreeHandView((IFreehand)shape); } }; cmd = new CreateViewPSTCmd(cmd, IDot.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTDotView((IDot)shape); } }; cmd = new CreateViewPSTCmd(cmd, IGrid.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTGridView((IGrid)shape); } }; cmd = new CreateViewPSTCmd(cmd, IAxes.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTAxesView((IAxes)shape); } }; cmd = new CreateViewPSTCmd(cmd, IBezierCurve.class){ @Override public PSTShapeView create(final IShape shape) { return new PSTBezierCurveView((IBezierCurve)shape); } }; cmd = new CreateViewPSTCmd(cmd, IPolygon.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTPolygonView((IPolygon)shape); } }; // All the commands of the chain of responsibility are chained together. cmd = new CreateViewPSTCmd(cmd, IPolyline.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTLinesView((IPolyline)shape); } }; cmd = new CreateViewPSTCmd(cmd, IRhombus.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTRhombusView((IRhombus)shape); } }; cmd = new CreateViewPSTCmd(cmd, ITriangle.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTTriangleView((ITriangle)shape); } }; cmd = new CreateViewPSTCmd(cmd, IEllipse.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTEllipseView((IEllipse)shape); } }; cmd = new CreateViewPSTCmd(cmd, ICircle.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTCircleView((ICircle)shape); } }; cmd = new CreateViewPSTCmd(cmd, ICircleArc.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTArcView((IArc)shape); } }; cmd = new CreateViewPSTCmd(cmd, IText.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTTextView((IText)shape); } }; cmd = new CreateViewPSTCmd(cmd, IRectangle.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTRectView((IRectangle)shape); } }; cmd = new CreateViewPSTCmd(cmd, ISquare.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTSquareView((ISquare)shape); } }; cmd = new CreateViewPSTCmd(cmd, IPlot.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTPlotView((IPlot)shape); } }; // The last created command is the first element of the chain. createCmd = new CreateViewPSTCmd(cmd, IGroup.class) { @Override public PSTShapeView create(final IShape shape) { return new PSTGroupView((IGroup)shape); } }; } /** * This class is a mix of the design patterns Command and Chain of responsibility. * The goal is to find the command which can create the PST view of the given shape. */ private abstract class CreateViewPSTCmd extends CreateViewCmd, CreateViewPSTCmd> { /** * Creates the command. * @param next The next command in the chain of responsibility. Can be null. * @param classShape The type of the shape supported by the command. * @since 3.0 */ protected CreateViewPSTCmd(final CreateViewPSTCmd next, final Class classShape) { super(next, classShape); } } } PSTViewsSynchroniser.java000066400000000000000000000054251321075051700363020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniser; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniserHandler; /** * Defines a synchroniser between a sets of Java2D views and their * PSTricks views.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class PSTViewsSynchroniser extends ViewsSynchroniser { /** * Creates and launches the synchronisation of the synchroniser. * @param drawing The shapes to synchronise. * @param h The object called for several operations needed by the synchroniser. * @since 3.0 */ public PSTViewsSynchroniser(final ViewsSynchroniserHandler h, final IDrawing drawing) { super(h, drawing); synchronise(); } @Override public void synchronise() { if(drawing.isEmpty()) { viewsCode.clear(); return ; } PSTShapeView pstView; for(final IShape shape : drawing.getShapes()) if(getView(shape)==null) { pstView = PSTViewsFactory.INSTANCE.createView(shape); if(pstView!=null) { pstView.updateCache(handler.getOriginDrawingPoint(), handler.getPPCDrawing()); viewsCode.put(shape, pstView); } } if(viewsCode.size() getView(final IShape shape) { return (PSTShapeView) super.getView(shape); } @Override public PSTShapeView getViewAt(final int position) { return (PSTShapeView) super.getViewAt(position); } @Override public boolean updateCode(final IShape view) { if(view!=null && drawing.contains(view)) { final PSTShapeView pst = getView(view); if(pst==null) synchronise(); else pst.updateCache(handler.getOriginDrawingPoint(), handler.getPPCDrawing()); return true; } return false; } /** * Updates the cache of every shapes. * @since 3.0 */ public void updateFull() { synchronise(); for(final IShape shape : drawing.getShapes()) updateCode(shape); } } PSTricksConstants.java000077500000000000000000000453521321075051700356140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/pstpackage net.sf.latexdraw.glib.views.pst; import java.awt.Color; import java.awt.geom.Point2D; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; /** * This class contains several constants of pstricks
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 06/06/06
    * @author Arnaud BLOUIN * @version 2.0.0
    */ public final 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 = 4./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_NONE = "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 AxesStyle DEFAULT_AXES_STYLE = AxesStyle.AXES; public static final TicksStyle DEFAULT_TICKS_STYLE = TicksStyle.FULL; public static final PlottingStyle DEFAULT_LABELS_DISPLAYED = PlottingStyle.ALL; public static final PlottingStyle DEFAULT_TICKS_DISPLAYED = PlottingStyle.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 double DEFAULT_VALUE_MISSING_COORDINATE = 1.; /** gangle is the angle of rotation of a diamond and a triangle * around their centre. */ public static final double DEFAULT_GANGLE = 0; /** 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 = "*"; //$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)
    * The radius is compute with :
    * 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)
    * 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 DotStyle DEFAULT_DOT_STYLE = DotStyle.DOT; /** 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 BorderPos DEFAULT_BORDERS_POS = BorderPos.INTO; /** 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; /** 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 line(s) of the figure are solid */ public static final String LINE_SOLID_STYLE = "solid"; //$NON-NLS-1$ /** The style of the lines by default */ public static final LineStyle DEFAULT_LINE_STYLE = LineStyle.SOLID; /** 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 FillingStyle DEFAULT_FILL_STYLE = FillingStyle.NONE; /** 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 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$ /** 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; /** 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 kind of filling is valid or not. * @param style The style to check. * @return True is the style is valid. */ public static boolean isValidFillStyle(final String style) { return style != null && (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)); } private PSTricksConstants() { super(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/synchroniser/000077500000000000000000000000001321075051700333355ustar00rootroot00000000000000ViewsSynchroniser.java000066400000000000000000000065241321075051700376340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/synchroniserpackage net.sf.latexdraw.glib.views.synchroniser; import java.util.HashMap; import java.util.Map; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.AbstractCodeView; /** * Defines an abstract synchroniser between a sets of Java2D views and other views.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/25/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public abstract class ViewsSynchroniser { /** The handler thats provides information to the synchroniser. */ protected ViewsSynchroniserHandler handler; /** The shapes to synchronise. */ protected IDrawing drawing; /** The code views to synchronise. */ protected Map> viewsCode; /** * Creates and initialises the synchroniser. * @param h The handler. * @param drawing The shapes to handle. * @throws IllegalArgumentException If the given views or handler is null. * @since 3.0 */ protected ViewsSynchroniser(final ViewsSynchroniserHandler h, final IDrawing drawing) { super(); handler = Objects.requireNonNull(h); this.drawing = Objects.requireNonNull(drawing); viewsCode = new HashMap<>(); } /** * Synchronises the Java2D views with their PSTricks views. * @since 3.0 */ public abstract void synchronise(); /** * Updates the code corresponding to the given shape. * @param shape The shape to updated. * @return True if the code has been updated. * @since 3.0 */ public abstract boolean updateCode(final IShape shape); /** * @param shape The shape that the researched view contains. * @return The corresponding code view or null. * @since 3.0 */ public AbstractCodeView getView(final IShape shape) { return shape==null ? null : viewsCode.get(shape); } /** * @param position The position of the researched views. * @return The corresponding code view at the given position or null. * @since 3.0 */ public AbstractCodeView getViewAt(final int position) { return position<0 && position>=drawing.size() ? null : getView(drawing.getShapeAt(position)); } /** * @return The handler thats provides information to the synchroniser. * @since 3.0 */ public ViewsSynchroniserHandler getHandler() { return handler; } /** * @param handler The new handler thats provides information to the synchroniser. * @since 3.0 */ public void setHandler(final ViewsSynchroniserHandler handler) { if(handler!=null) this.handler = handler; } /** * @return the drawing. * @since 3.0 */ public IDrawing getDrawing() { return drawing; } /** * @param drawing The drawing used to generate the code. Must not be null. * @since 3.0 */ public void setViews2D(final IDrawing drawing) { if(drawing!=null) this.drawing = drawing; } } ViewsSynchroniserHandler.java000066400000000000000000000024661321075051700411330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/views/synchroniserpackage net.sf.latexdraw.glib.views.synchroniser; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; /** * Defines a handler that provides information to a views synchroniser.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/29/2008
    * @author Arnaud BLOUIN * @since 3.0 */ public interface ViewsSynchroniserHandler { /** * @return The top right point of the current drawing. * @since 3.0 */ IPoint getTopRightDrawingPoint(); /** * @return The bottom left point of the current drawing. * @since 3.0 */ IPoint getBottomLeftDrawingPoint(); /** * @return The origin point of the current drawing. * @since 3.0 */ IPoint getOriginDrawingPoint(); /** * @return The number of pixels per centimetre of the current drawing. * @since 3.0 */ int getPPCDrawing(); } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/000077500000000000000000000000001321075051700311305ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/Border.scala000066400000000000000000000527301321075051700333610ustar00rootroot00000000000000package net.sf.latexdraw.instruments import java.awt.{BasicStroke, Color, Cursor, Graphics2D} import java.awt.geom.Rectangle2D import net.sf.latexdraw.actions.shape._ import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.handlers._ import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.ShapeFactory.Point2IPoint import net.sf.latexdraw.glib.models.interfaces.shape._ import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position import net.sf.latexdraw.glib.ui.ICanvas import net.sf.latexdraw.glib.views.Java2D.interfaces.{IViewArc, IViewBezierCurve, IViewModifiablePtsShape, IViewShape} import net.sf.latexdraw.mapping.Shape2BorderMapping import net.sf.latexdraw.util.LNumber import org.malai.action.Action import org.malai.instrument.InteractorImpl import org.malai.mapping.MappingRegistry import org.malai.picking.{Pickable, Picker} import org.malai.swing.interaction.library.DnD import scala.collection.mutable.ListBuffer /** * This instrument manages the selected views.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-20
    * @author Arnaud BLOUIN * @version 3.0 */ class Border(canvas : ICanvas) extends CanvasInstrument(canvas) with Picker { /** The stroke uses by the border to display its bounding rectangle. */ val stroke = new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1f, Array(7, 7), 0) /** The selected views. */ val _selection : ListBuffer[IViewShape] = new ListBuffer() /** The rectangle uses to show the selection. */ val _border : Rectangle2D = new Rectangle2D.Double() /** The handlers that scale shapes. */ val _scaleHandlers : ListBuffer[ScaleHandler] = new ListBuffer() /** The handlers that move points. */ lazy val _mvPtHandlers : ListBuffer[MovePtHandler] = new ListBuffer() /** The handlers that move first control points. */ lazy val _ctrlPt1Handlers : ListBuffer[CtrlPointHandler] = new ListBuffer() /** The handlers that move second control points. */ lazy val _ctrlPt2Handlers : ListBuffer[CtrlPointHandler] = new ListBuffer() // /** The handler that sets the arc frame. */ // protected lazy val frameArcHandler : FrameArcHandler = new FrameArcHandler() /** The handler that sets the start angle of an arc. */ lazy val _arcHandlerStart : ArcAngleHandler = new ArcAngleHandler(true) /** The handler that sets the end angle of an arc. */ lazy val _arcHandlerEnd : ArcAngleHandler = new ArcAngleHandler(false) /** The handler that rotates shapes. */ val _rotHandler : RotationHandler = new RotationHandler() var _metaCustomiser : MetaShapeCustomiser = _ // Initialisation of the handlers that are always used. _scaleHandlers += new ScaleHandler(Position.NW) _scaleHandlers += new ScaleHandler(Position.NORTH) _scaleHandlers += new ScaleHandler(Position.NE) _scaleHandlers += new ScaleHandler(Position.WEST) _scaleHandlers += new ScaleHandler(Position.EAST) _scaleHandlers += new ScaleHandler(Position.SW) _scaleHandlers += new ScaleHandler(Position.SOUTH) _scaleHandlers += new ScaleHandler(Position.SE) def scaleHandlers = _scaleHandlers def mvPtHandlers = _mvPtHandlers def ctrlPt1Handlers = _ctrlPt1Handlers def ctrlPt2Handlers = _ctrlPt2Handlers def arcHandlerStart = _arcHandlerStart def arcHandlerEnd = _arcHandlerEnd def rotHandler = _rotHandler def border = _border def setMetaCustomiser(metaCustomiser:MetaShapeCustomiser) { _metaCustomiser = metaCustomiser } override def reinit() { _selection.clear _border.setFrame(0, 0, 1, 1) } override def interimFeedback() { canvas.setCursor(Cursor.getDefaultCursor) } override def onActionDone(action:Action) { action match { case _:RotateShapes => _metaCustomiser.rotationCustomiser.update() case _:ModifyShapeProperty => _metaCustomiser.arcCustomiser.update() case _:MoveCtrlPoint => _metaCustomiser.dimPosCustomiser.update() case _:MovePointShape => _metaCustomiser.dimPosCustomiser.update() case _:ScaleShapes => _metaCustomiser.dimPosCustomiser.update() case _ => } } /** * Updates the bounding rectangle using the selected views. * @since 3.0 */ def update() { if(!isActivated) return if(_selection.isEmpty) _border.setFrame(0, 0, 1, 1) else { val zoomLevel = canvas.getZoom var minX = Double.MaxValue var minY = Double.MaxValue var maxX = Double.MinValue var maxY = Double.MinValue _selection.foreach{view => val bounds = view.getBorder if(bounds.getMinXmaxX) maxX = bounds.getMaxX if(bounds.getMaxY>maxY) maxY = bounds.getMaxY } _border.setFrame(minX*zoomLevel, minY*zoomLevel, (maxX-minX)*zoomLevel, (maxY-minY)*zoomLevel) updateHandlersPosition } } /** * Updates the position of the handlers. * @since 3.0 */ private def updateHandlersPosition() { _scaleHandlers.foreach(_.updateFromShape(_border)) _rotHandler.setPoint(_border.getMaxX, _border.getMinY) // if(isFrameArcHandlerShowable()) // frameArcHandler.updateFromLineArcShape((ILineArcShape)selection.get(0).getShape()) updateArcHandlers updateMvHandlers updateCtrlMvHandlers } /** * Updates the arc handlers. * @since 3.0 */ private def updateArcHandlers() { if(isArcHandlerShowable) { val sh = _selection.head.getShape sh match { case arc: IArc => _arcHandlerStart.update(arc, canvas.getZoom) _arcHandlerEnd.update(arc, canvas.getZoom) case _ => } } } /** * Updates the handlers that move control points. * @since 3.0 */ private def updateCtrlMvHandlers() { if(isCtrlPtMvHandlersShowable) { val sh = _selection.head.getShape sh match { case cps: IControlPointShape => initialiseCtrlMvHandlers(cps) case _ => } } } private def initialiseCtrlMvHandlers(cps : IControlPointShape) { val zoom = canvas.getZoom val nbPts = cps.getNbPoints // Adding missing handlers. if(_ctrlPt1Handlers.sizenbPts) { _ctrlPt1Handlers.remove(_ctrlPt1Handlers.size-1) _ctrlPt2Handlers.remove(_ctrlPt2Handlers.size-1) } // Updating handlers. for(i <- _ctrlPt1Handlers.indices) { val pt1 = cps.getFirstCtrlPtAt(i) _ctrlPt1Handlers(i).setPoint(pt1.getX*zoom, pt1.getY*zoom) val pt2 = cps.getSecondCtrlPtAt(i) _ctrlPt2Handlers(i).setPoint(pt2.getX*zoom, pt2.getY*zoom) } } /** * Updates the handlers that move points. * @since 3.0 */ private def updateMvHandlers() { if(isPtMvHandlersShowable) { val sh = _selection.head.getShape sh match { case pts: IModifiablePointsShape => val nbPts = pts.getNbPoints val zoom = canvas.getZoom if (_mvPtHandlers.size < nbPts) for (i <- _mvPtHandlers.size until nbPts) _mvPtHandlers += new MovePtHandler(i) else while (_mvPtHandlers.size > nbPts) _mvPtHandlers.remove(_mvPtHandlers.size - 1) for (i <- _mvPtHandlers.indices) { val pt = pts.getPtAt(i) _mvPtHandlers(i).setPoint(pt.getX * zoom, pt.getY * zoom) } case _ => } } } /** * Paints the border if activated. * @param g The graphics in which the border is painted. * @since 3.0 */ def paint(g : Graphics2D) { if(isActivated) { g.setColor(Color.GRAY) g.setStroke(stroke) g.draw(_border) paintHandlers(g) } } /** * Paints the required handlers. */ private def paintHandlers(g : Graphics2D) { _scaleHandlers.foreach(_.paint(g)) _rotHandler.paint(g) // if(isFrameArcHandlerShowable()) // frameArcHandler.paint(g) if(isArcHandlerShowable) { _arcHandlerStart.paint(g) _arcHandlerEnd.paint(g) } if(isPtMvHandlersShowable) { _mvPtHandlers.foreach(_.paint(g)) if(isCtrlPtMvHandlersShowable) { _ctrlPt1Handlers.foreach(_.paint(g)) _ctrlPt2Handlers.foreach(_.paint(g)) } } } /** @return True if the control move point handlers can be painted. */ protected def isCtrlPtMvHandlersShowable = _selection.size==1 && _selection.head.isInstanceOf[IViewBezierCurve] /** @return True if the move point handlers can be painted. */ protected def isPtMvHandlersShowable = _selection.size==1 && _selection.head.isInstanceOf[IViewModifiablePtsShape] /** @return True if the arc handlers can be painted. */ protected def isArcHandlerShowable = _selection.size==1 && _selection.head.isInstanceOf[IViewArc] // /** // * @return True if the frame arc handler can be painted. // */ // protected boolean isFrameArcHandlerShowable() { // return selection.size()==1 && selection.get(0).getShape() instanceof ILineArcShape // } /** * Adds the given shape to the selection. If the instrument is * activated and the addition is performed, the instrument is updated. * @param view The view to add. If null, nothing is done. * @since 3.0 */ def add(view : IViewShape) { if(view!=null) { _selection += view if(isActivated) { // The border is updated only if the view has been added and // the border is activated. update MappingRegistry.REGISTRY.addMapping(new Shape2BorderMapping(MappingRegistry.REGISTRY.getSourceFromTarget(view, classOf[IShape]), this)) } } } /** * Removes the given view from the selection. If the instrument is * activated and the removal is performed, the instrument is updated. * @param view The view to remove. If null or it is not * already in the selection, nothing is performed. * @since 3.0 */ def remove(view : IViewShape) { if(view!=null) { _selection -= view MappingRegistry.REGISTRY.removeMappingsUsingSource(MappingRegistry.REGISTRY.getSourceFromTarget(view, classOf[IShape]), classOf[Shape2BorderMapping]) update } } /** * @return the selected views. Cannot be null. * @since 3.0 */ def selection = _selection override def initialiseInteractors() { try{ addInteractor(new DnD2Scale(this)) addInteractor(new DnD2MovePoint(this)) addInteractor(new DnD2MoveCtrlPoint(this)) addInteractor(new DnD2Rotate(this)) addInteractor(new DnD2ArcAngle(this)) }catch{case ex: Throwable => BadaboomCollector.INSTANCE.add(ex)} } /** * Removes all the selected views. * @since 3.0 */ def clear() { if(selection.nonEmpty) { selection.foreach{view => MappingRegistry.REGISTRY.removeMappingsUsingSource(MappingRegistry.REGISTRY.getSourceFromTarget(view, classOf[IShape]), classOf[Shape2BorderMapping])} selection.clear setActivated(false) } } override def getPickableAt(x : Double, y : Double) : Pickable = { if(activated) { var pickable : Option[Pickable] = getHandlerAt(x, y, _scaleHandlers) if(pickable.isEmpty && _rotHandler.contains(x, y)) pickable = Some(_rotHandler) if(pickable.isEmpty) pickable = getHandlerAt(x, y, _mvPtHandlers) if(pickable.isEmpty) pickable = getHandlerAt(x, y, _ctrlPt1Handlers) if(pickable.isEmpty) pickable = getHandlerAt(x, y, _ctrlPt2Handlers) // if(pickable.isEmpty && _frameArcHandler!=null && _frameArcHandler.contains(x2, y2)) // pickable = Some(_frameArcHandler) if(pickable.isEmpty && _arcHandlerStart.contains(x, y)) pickable = Some(_arcHandlerStart) if(pickable.isEmpty && _arcHandlerEnd.contains(x, y)) pickable = Some(_arcHandlerEnd) return pickable.orNull } return null } private def getHandlerAt[T <: IHandler[_]](x : Double, y : Double, handlers : ListBuffer[T]) : Option[T] = handlers.find{handler => handler.contains(x, y)} override def getPickerAt(x : Double, y : Double) : Picker = null // Supposing that there is no handler outside the border. override def contains(obj : Object) = obj.isInstanceOf[IHandler[_]] } /** Maps a DnD interaction to an action that changes the arc angles. */ private sealed class DnD2ArcAngle(ins : Border) extends InteractorImpl[ModifyShapeProperty, DnD, Border](ins, true, classOf[ModifyShapeProperty], classOf[DnD]) { /** The gravity centre used for the rotation. */ var gc : IPoint = _ /** Defines whether the current handled shape is rotated. */ var isRotated = false /** The current handled shape. */ var shape : IShape = _ var gap : IPoint = ShapeFactory.createPoint def initAction() { val drawing = instrument.canvas.getDrawing if(drawing.getSelection.size==1) { shape = drawing.getSelection.getShapeAt(0) val rotAngle = shape.getRotationAngle var pCentre = interaction.getStartObject.asInstanceOf[IHandler[_]].getCentre var pt : IPoint = interaction.getStartPt gc = instrument.getAdaptedOriginPoint(shape.getGravityCentre) if(LNumber.equalsDouble(rotAngle, 0.0)) isRotated = false else { pt = pt.rotatePoint(gc, -rotAngle) pCentre = pCentre.rotatePoint(gc, -rotAngle) isRotated = true } gap.setPoint(pt.getX-pCentre.getX, pt.getY-pCentre.getY) if(interaction.getStartObject==instrument.arcHandlerStart) action.setProperty(ShapeProperties.ARC_START_ANGLE) else action.setProperty(ShapeProperties.ARC_END_ANGLE) action.setGroup(drawing.getSelection.duplicateDeep(false)) } } override def updateAction() { var pt : IPoint = instrument.getAdaptedOriginPoint(interaction.getEndPt) if(isRotated) pt = pt.rotatePoint(gc, -shape.getRotationAngle) action.setValue(computeAngle(ShapeFactory.createPoint(pt.getX-gap.getX, pt.getY-gap.getY))) } private def computeAngle(position : IPoint) : Double = { val angle = math.acos((position.getX-gc.getX)/position.distance(gc)) if(position.getY>gc.getY) 2*math.Pi - angle else angle } override def isConditionRespected = interaction.getStartObject==instrument.arcHandlerEnd || interaction.getStartObject==instrument.arcHandlerStart } /** * This link maps a DnD interaction on a rotation handler to an action that rotates the selected shapes. */ private sealed class DnD2Rotate(ins : Border) extends InteractorImpl[RotateShapes, DnD, Border](ins, true, classOf[RotateShapes], classOf[DnD]) { /** The point corresponding to the 'press' position. */ var p1 : IPoint = _ /** The gravity centre used for the rotation. */ var gc : IPoint = _ def initAction() { val drawing = instrument.canvas.getDrawing p1 = instrument.getAdaptedOriginPoint(interaction.getStartPt) gc = drawing.getSelection.getGravityCentre action.setGravityCentre(gc) action.setShape(drawing.getSelection.duplicateDeep(false)) } override def updateAction() { action.setRotationAngle(gc.computeRotationAngle(p1, instrument.getAdaptedOriginPoint(interaction.getEndPt))) } override def isConditionRespected = interaction.getStartObject==instrument.rotHandler } /** * This link maps a DnD interaction on a move control point handler to an action that moves the selected control point. */ private sealed class DnD2MoveCtrlPoint(ins : Border) extends InteractorImpl[MoveCtrlPoint, DnD, Border](ins, true, classOf[MoveCtrlPoint], classOf[DnD]) { /** The original coordinates of the moved point. */ var sourcePt : IPoint = _ override def initAction() { val group = instrument.canvas.getDrawing.getSelection if(group.size==1 && group.getShapeAt(0).isInstanceOf[IControlPointShape]) { val handler = ctrlPtHandler.get sourcePt = ShapeFactory.createPoint(handler.getCentre) action.setIndexPt(handler.getIndexPt) action.setShape(group.getShapeAt(0).asInstanceOf[IControlPointShape]) action.setIsFirstCtrlPt(instrument.ctrlPt1Handlers.contains(interaction.getStartObject)) } } override def updateAction() { super.updateAction val startPt = interaction.getStartPt val endPt = interaction.getEndPt val x = sourcePt.getX + endPt.getX-startPt.getX val y = sourcePt.getY + endPt.getY-startPt.getY action.setNewCoord(instrument.getAdaptedGridPoint(ShapeFactory.createPoint(x, y))) } override def isConditionRespected = ctrlPtHandler.isDefined /** * @return The selected move control point handler or null. * @since 3.0 */ private def ctrlPtHandler : Option[CtrlPointHandler] = { val obj = interaction.getStartObject obj.isInstanceOf[CtrlPointHandler] && (instrument.ctrlPt1Handlers.contains(obj) || instrument.ctrlPt2Handlers.contains(obj)) match { case true => Some(obj.asInstanceOf[CtrlPointHandler]) case false => None } } } /** * This link maps a DnD interaction on a move point handler to an action that moves the selected point. */ private sealed class DnD2MovePoint(ins : Border) extends InteractorImpl[MovePointShape, DnD, Border](ins, true, classOf[MovePointShape], classOf[DnD]) { /** The original coordinates of the moved point. */ var sourcePt : IPoint = _ override def initAction() { val group = instrument.canvas.getDrawing.getSelection if(group.size==1 && group.getShapeAt(0).isInstanceOf[IModifiablePointsShape]) { val handler = movePtHandler.get sourcePt = ShapeFactory.createPoint(handler.getCentre) action.setIndexPt(handler.getIndexPt) action.setShape(group.getShapeAt(0).asInstanceOf[IModifiablePointsShape]) } } override def updateAction() { super.updateAction val startPt = interaction.getStartPt val endPt = interaction.getEndPt val x = sourcePt.getX + endPt.getX-startPt.getX val y = sourcePt.getY + endPt.getY-startPt.getY action.setNewCoord(instrument.getAdaptedGridPoint(ShapeFactory.createPoint(x, y))) } override def isConditionRespected = movePtHandler.isDefined /** * @return The selected move point handler or null. * @since 3.0 */ private def movePtHandler : Option[MovePtHandler] = { val obj = interaction.getStartObject obj.isInstanceOf[MovePtHandler] && instrument.mvPtHandlers.contains(obj) match { case true => Some(obj.asInstanceOf[MovePtHandler]) case false => None } } } /** * This link maps a DnD interaction on a scale handler to an action that scales the selection. */ private sealed class DnD2Scale(ins : Border) extends InteractorImpl[ScaleShapes, DnD, Border](ins, true, classOf[ScaleShapes], classOf[DnD]) { /** The point corresponding to the 'press' position. */ var p1 : IPoint = _ /** The x gap (gap between the pressed position and the targeted position) of the X-scaling. */ var xGap : Double = _ /** The y gap (gap between the pressed position and the targeted position) of the Y-scaling. */ var yGap : Double = _ private def setXGap(refPosition : Position, tl : IPoint, br : IPoint) { refPosition match { case Position.NW | Position.SW | Position.WEST => xGap = p1.getX - br.getX case Position.NE | Position.SE | Position.EAST => xGap = tl.getX - p1.getX case _ => xGap = 0.0 } } private def setYGap(refPosition : Position, tl : IPoint, br : IPoint) { refPosition match { case Position.NW | Position.NE | Position.NORTH => yGap = p1.getY - br.getY case Position.SW | Position.SE | Position.SOUTH => yGap = tl.getY - p1.getY case _ => yGap = 0.0 } } override def initAction() { val drawing = instrument.canvas.getDrawing val refPosition = scaleHandler.get.getPosition.getOpposite val br = drawing.getSelection.getBottomRightPoint val tl = drawing.getSelection.getTopLeftPoint p1 = instrument.canvas.getMagneticGrid.getTransformedPointToGrid(instrument.canvas.getZoomedPoint(interaction.getStartPt)) setXGap(refPosition, tl, br) setYGap(refPosition, tl, br) action.setDrawing(drawing) action.setShape(drawing.getSelection.duplicateDeep(false)) action.refPosition = refPosition } override def updateAction() { super.updateAction val pt = instrument.getAdaptedGridPoint(interaction.getEndPt) val refPosition = action.refPosition.get if(refPosition.isSouth) action.newY = pt.getY + yGap else if(refPosition.isNorth) action.newY = pt.getY - yGap if(refPosition.isWest) action.newX = pt.getX - xGap else if(refPosition.isEast) action.newX = pt.getX + xGap } override def isConditionRespected = scaleHandler.isDefined override def interimFeedback() { super.interimFeedback action.refPosition.get match { case Position.EAST => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)) case Position.NE => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR)) case Position.NORTH => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR)) case Position.NW => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)) case Position.SE => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR)) case Position.SOUTH => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)) case Position.SW => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR)) case Position.WEST => instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)) } } private def scaleHandler : Option[ScaleHandler] = { val obj = interaction.getStartObject obj.isInstanceOf[ScaleHandler] && instrument.scaleHandlers.contains(obj) match { case true => Some(obj.asInstanceOf[ScaleHandler]) case false => None } } } CanvasInstrument.scala000066400000000000000000000026501321075051700353650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments import java.awt.Point import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.ui.ICanvas import org.malai.swing.instrument.SwingInstrument /** * This abstract instrument encapsulates common operations dealing with a canvas. * @since 3.1 */ abstract class CanvasInstrument(val canvas : ICanvas) extends SwingInstrument { /** * Computes the point depending on the the zoom level and the origin of the canvas. * @param pt The point to adapted. * @return The computed point. * @since 3.0 */ def getAdaptedOriginPoint(pt:IPoint) = { val pt2 = canvas.convertToOrigin(pt) ShapeFactory.createPoint(canvas.getZoomedPoint(pt2.getX, pt2.getY)) } /** * Computes the point depending on the the zoom level and the magnetic grid. * @param pt The point to adapted. * @return The computed point. * @since 3.1 */ def getAdaptedGridPoint(pt:IPoint) = canvas.getMagneticGrid.getTransformedPointToGrid(canvas.getZoomedPoint(pt.getX, pt.getY)) /** * Computes the point depending on the the zoom level and the magnetic grid. * @param pt The point to adapted. * @return The computed point. * @since 3.0 */ def getAdaptedPoint(pt:Point) = { val pt2 = canvas.convertToOrigin(canvas.getMagneticGrid.getTransformedPointToGrid(pt)) ShapeFactory.createPoint(canvas.getZoomedPoint(pt2.getX, pt2.getY)) } } CodeInserter.scala000066400000000000000000000075341321075051700344550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments import java.awt.Frame import javax.swing.JLabel import net.sf.latexdraw.actions.{CheckPSTCode, InsertPSTCode} import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.ui.ICanvas import net.sf.latexdraw.ui.dialog.InsertCodeDialog import org.malai.action.library.InactivateInstrument import org.malai.instrument.InteractorImpl import org.malai.swing.instrument.SwingInstrument import org.malai.swing.interaction.library.{ButtonPressed, WindowClosed} /** * This instrument converts PST code into graphical shapes.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2013-02-07
    * @author Arnaud BLOUIN * @version 3.0 */ class CodeInserter(parent: Frame, val canvas : ICanvas, val statusBar : JLabel) extends SwingInstrument { /** The dialogue box used to insert code. */ lazy val _insertCodeDialog : InsertCodeDialog = new InsertCodeDialog(parent, this) /** Accessor for the code insertion dialogue box. */ def insertCodeDialog() : InsertCodeDialog = _insertCodeDialog override def initialiseInteractors() { try{ addInteractor(new KeyToCheckCode(this)) addInteractor(new CloseDialogue2InactivateIns(this)) addInteractor(new ButtonPressed2InsertCode(this)) addInteractor(new ButtonPressed2InactivateIns(this)) }catch{case ex: Throwable => BadaboomCollector.INSTANCE.add(ex)} } override def setActivated(activated : Boolean) { super.setActivated(activated) _insertCodeDialog.setVisible(activated) } } class KeyToCheckCode(ins : CodeInserter) extends InteractorImpl[CheckPSTCode, KeyTypedWithTimer, CodeInserter](ins, false, classOf[CheckPSTCode], classOf[KeyTypedWithTimer]){ override def initAction() { action.setDialog(instrument._insertCodeDialog) } override def isConditionRespected: Boolean = true } /** * This link maps a pressure on the close button of the preferences frame to an action saving the preferences. */ class ButtonPressed2InsertCode(ins : CodeInserter) extends InteractorImpl[InsertPSTCode, ButtonPressed, CodeInserter](ins, false, classOf[InsertPSTCode], classOf[ButtonPressed]){ override def initAction() { action.setDrawing(instrument.canvas.getDrawing) action.setCode(instrument.insertCodeDialog.getText) action.setStatusBar(instrument.statusBar) } override def isConditionRespected = interaction.getButton==instrument.insertCodeDialog.getOkButton } /** * This link maps a pressure on the close button of the preferences frame to an action saving the preferences. */ class ButtonPressed2InactivateIns(ins : CodeInserter) extends InteractorImpl[InactivateInstrument, ButtonPressed, CodeInserter](ins, false, classOf[InactivateInstrument], classOf[ButtonPressed]){ override def initAction() { action.setInstrument(getInstrument) } override def isConditionRespected = interaction.getButton==instrument.insertCodeDialog.getOkButton || interaction.getButton==instrument.insertCodeDialog.getCancelButton } /** * This link maps a pressure on the close button of the preferences frame to an action saving the preferences. */ class CloseDialogue2InactivateIns(ins : CodeInserter) extends InteractorImpl[InactivateInstrument, WindowClosed, CodeInserter](ins, false, classOf[InactivateInstrument], classOf[WindowClosed]){ override def initAction() { action.setInstrument(getInstrument) } override def isConditionRespected = true } CopierCutterPaster.java000066400000000000000000000234431321075051700355110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.shape.CopyShapes; import net.sf.latexdraw.actions.shape.CutShapes; import net.sf.latexdraw.actions.shape.PasteShapes; import net.sf.latexdraw.actions.shape.SelectShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.ui.LMagneticGrid; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import org.malai.action.Action; import org.malai.action.ActionsRegistry; import org.malai.instrument.InteractorImpl; import org.malai.interaction.Interaction; import org.malai.swing.interaction.library.KeysPressure; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.MenuItemPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MMenuItem; import java.awt.event.KeyEvent; import java.util.Objects; /** * This instrument permits to copy, cut and paste the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 06/03/2011
    * @author Arnaud BLOUIN, Jan-Cornelius MOLNAR * @since 3.0 */ public class CopierCutterPaster extends WidgetInstrument { /** The menu item to copy the shapes. */ protected MMenuItem copyMenu; /** The menu item to paste the shapes. */ protected MMenuItem pasteMenu; /** The menu item to cut the shapes. */ protected MMenuItem cutMenu; /** The drawing that contains the shapes. */ protected IDrawing drawing; protected LMagneticGrid grid; /** * Creates the instrument. * @param drawg The drawg that contains the shapes. * @param composerUI The composerUI that manages the widgets of the instrument. * @param magnGrid THe magnetic magnGrid used when pasting shapes. * @throws NullPointerException If the given drawg is null. * @since 3.0 */ public CopierCutterPaster(final SwingUIComposer composerUI, final IDrawing drawg, final LMagneticGrid magnGrid) { super(composerUI); drawing = Objects.requireNonNull(drawg); grid = Objects.requireNonNull(magnGrid); initialiseWidgets(); ActionsRegistry.INSTANCE.addHandler(this); } @Override protected void initialiseWidgets() { copyMenu = new MMenuItem(LResources.LABEL_COPY, KeyEvent.VK_C); copyMenu.setIcon(LResources.COPY_ICON); copyMenu.setEnabled(false); cutMenu = new MMenuItem(LResources.LABEL_CUT, KeyEvent.VK_X); cutMenu.setIcon(LResources.CUT_ICON); cutMenu.setEnabled(false); pasteMenu = new MMenuItem(LResources.LABEL_PASTE, KeyEvent.VK_V); pasteMenu.setIcon(LResources.PASTE_ICON); pasteMenu.setEnabled(false); } @Override public void setActivated(final boolean activated) { super.setActivated(activated); updateWidgets(null); } /** * Updates the widgets of the instrument. * @param executedAction The action currently executed. Can be null. * @since 3.0 */ protected void updateWidgets(final Action executedAction) { final SelectShapes sa = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); final boolean validSelectAction = sa!=null && !sa.shapes().isEmpty(); copyMenu.setEnabled(activated && validSelectAction); cutMenu.setEnabled(activated && copyMenu.isEnabled()); pasteMenu.setEnabled(activated && (executedAction instanceof CopyShapes || ActionsRegistry.INSTANCE.getAction(CopyShapes.class)!=null || ActionsRegistry.INSTANCE.getAction(CutShapes.class)!=null)); } @Override protected void initialiseInteractors() { try{ addInteractor(new MenuItem2PasteShapes(this)); addInteractor(new Shortcut2PasteShapes(this)); addInteractor(new MenuItem2CopyShapes(this)); addInteractor(new Shortcut2CopyShapes(this)); addInteractor(new MenuItem2CutShapes(this)); addInteractor(new Shortcut2CutShapes(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The menu item used to copy selected shapes. * @since 3.0 */ public MMenuItem getCopyMenu() { return copyMenu; } /** * @return The menu item used to paste selected shapes. * @since 3.0 */ public MMenuItem getPasteMenu() { return pasteMenu; } /** * @return The menu item used to cut selected shapes. * @since 3.0 */ public MMenuItem getCutMenu() { return cutMenu; } @Override public void onActionAdded(final Action action) { updateWidgets(action); } } /** * This link maps an menu item interaction to an action dedicated to a shape copy. */ abstract class Interaction2AbstractCopy extends InteractorImpl { /** * Creates the link. */ protected Interaction2AbstractCopy(final CopierCutterPaster ins, final Class classAction, final Class classInteraction) throws InstantiationException, IllegalAccessException { super(ins, false, classAction, classInteraction); } @Override public void initAction() { final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); if(act!=null) action.setSelection(act); } } /** * This link maps a shortcut interaction to a copy action. */ class Shortcut2CopyShapes extends Interaction2AbstractCopy { /** * Creates the link. */ protected Shortcut2CopyShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, CopyShapes.class, KeysPressure.class); } @Override public boolean isConditionRespected() { return getInteraction().getKeys().size()==2 && getInteraction().getKeys().contains(KeyEvent.VK_C) && getInteraction().getKeys().contains(LSystem.INSTANCE.getControlKey()); } } /** * This link maps a shortcut interaction to a cut action. */ class Shortcut2CutShapes extends Interaction2AbstractCopy { /** * Creates the link. */ protected Shortcut2CutShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, CutShapes.class, KeysPressure.class); } @Override public boolean isConditionRespected() { return getInteraction().getKeys().size()==2 && getInteraction().getKeys().contains(KeyEvent.VK_X) && getInteraction().getKeys().contains(LSystem.INSTANCE.getControlKey()); } } /** * This link maps an menu item interaction to a cut action. */ class MenuItem2CutShapes extends Interaction2AbstractCopy { /** * Creates the link. */ protected MenuItem2CutShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, CutShapes.class, MenuItemPressed.class); } @Override public boolean isConditionRespected() { final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); return act != null && !act.shapes().isEmpty() && getInteraction().getMenuItem()==getInstrument().cutMenu; } } /** * This link maps an menu item interaction to a copy action. */ class MenuItem2CopyShapes extends Interaction2AbstractCopy { /** * Creates the link. */ protected MenuItem2CopyShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, CopyShapes.class, MenuItemPressed.class); } @Override public boolean isConditionRespected() { final SelectShapes act = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); final boolean okSelection = act != null && !act.shapes().isEmpty(); return okSelection && getInteraction().getMenuItem()==getInstrument().copyMenu; } } /** * This abstract link maps an interaction to a paste action. */ abstract class Interaction2PasteShapes extends InteractorImpl { /** * Creates the link. */ protected Interaction2PasteShapes(final CopierCutterPaster ins, final Class clazzInteraction) throws InstantiationException, IllegalAccessException { super(ins, false, PasteShapes.class, clazzInteraction); } @Override public void initAction() { CopyShapes act = ActionsRegistry.INSTANCE.getAction(CopyShapes.class); if(act==null) act = ActionsRegistry.INSTANCE.getAction(CutShapes.class); if(act != null) { action.setCopy(act); action.setDrawing(instrument.drawing); action.setGrid(instrument.grid); } } } /** * This link maps a shortcut interaction to a paste action. */ class Shortcut2PasteShapes extends Interaction2PasteShapes { /** * Creates the link. */ protected Shortcut2PasteShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, KeysPressure.class); } @Override public boolean isConditionRespected() { return getInteraction().getKeys().size()==2 && getInteraction().getKeys().contains(KeyEvent.VK_V) && getInteraction().getKeys().contains(LSystem.INSTANCE.getControlKey()); } } /** * This link maps an menu item interaction to paste action. */ class MenuItem2PasteShapes extends Interaction2PasteShapes { /** * Creates the link. */ protected MenuItem2PasteShapes(final CopierCutterPaster ins) throws InstantiationException, IllegalAccessException { super(ins, MenuItemPressed.class); } @Override public boolean isConditionRespected() { return getInteraction().getMenuItem()==getInstrument().pasteMenu && (ActionsRegistry.INSTANCE.getAction(CopyShapes.class)!=null || ActionsRegistry.INSTANCE.getAction(CutShapes.class)!=null); } } DrawingPropertiesCustomiser.java000066400000000000000000000247211321075051700374500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyLatexProperties; import net.sf.latexdraw.actions.ModifyLatexProperties.LatexProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator.VerticalPosition; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LPath; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.CheckBoxModified; import org.malai.swing.interaction.library.ListSelectionModified; import org.malai.swing.interaction.library.SpinnerModified; import org.malai.swing.interaction.library.TextChanged; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MTextField; import org.malai.undo.Undoable; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.swing.*; import java.util.Objects; /** * This instrument modifies the properties of the drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-01
    * @author Arnaud BLOUIN * @since 3.0 */ public class DrawingPropertiesCustomiser extends WidgetInstrument { /** The field that changes the title of the drawing. */ protected MTextField titleField; /** The field that changes the label of the drawing. */ protected MTextField labelField; /** The LaTeX code generator. */ protected LaTeXGenerator latexGen; /** Defines if the horizontal position of the drawing must be centred. */ protected MCheckBox middleHorizPosCB; /** Defines the position of the drawing. */ protected MComboBox positionCB; /** Defines the scale of the drawing. */ protected MSpinner scaleField; /** * Creates the instrument. * @param composerUI The composerUI that manages the widgets of the instrument. * @param gen The LaTeX code generator. * @since 3.0 */ public DrawingPropertiesCustomiser(final SwingUIComposer composerUI, final LaTeXGenerator gen) { super(composerUI); latexGen = Objects.requireNonNull(gen); initialiseWidgets(); } @Override public void onUndoableUndo(final Undoable undoable) { super.onUndoableUndo(undoable); updateWidgets(); } @Override public void onUndoableRedo(final Undoable undoable) { super.onUndoableRedo(undoable); updateWidgets(); } @Override public void reinit() { super.reinit(); latexGen.setCaption(""); //$NON-NLS-1$ latexGen.setLabel(""); //$NON-NLS-1$ latexGen.setPositionHoriCentre(false); latexGen.setPositionVertToken(VerticalPosition.NONE); updateWidgets(); } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { super.save(generalPreferences, nsURI, document, root); if(document==null || root==null) return ; Element elt; if(!generalPreferences) { final String ns = LPath.INSTANCE.getNormaliseNamespaceURI(nsURI); if(!latexGen.getCaption().isEmpty()) { elt = document.createElement(ns + LNamespace.XML_CAPTION); elt.appendChild(document.createTextNode(latexGen.getCaption())); root.appendChild(elt); } if(!latexGen.getLabel().isEmpty()) { elt = document.createElement(ns + LNamespace.XML_LABEL); elt.appendChild(document.createTextNode(latexGen.getLabel())); root.appendChild(elt); } if(latexGen.isPositionHoriCentre()) { elt = document.createElement(ns + LNamespace.XML_POSITION_HORIZ); elt.setTextContent(String.valueOf(latexGen.isPositionHoriCentre())); root.appendChild(elt); } if(latexGen.getPositionVertToken()!=VerticalPosition.NONE) { elt = document.createElement(ns + LNamespace.XML_POSITION_VERT); elt.setTextContent(latexGen.getPositionVertToken().toString()); root.appendChild(elt); } } } @Override public void load(final boolean generalPreferences, final String nsURI, final Element root) { super.load(generalPreferences, nsURI, root); final String name = root.getNodeName(); if(name.endsWith(LNamespace.XML_CAPTION)) latexGen.setCaption(root.getTextContent()); else if(name.endsWith(LNamespace.XML_LABEL)) latexGen.setLabel(root.getTextContent()); else if(name.endsWith(LNamespace.XML_POSITION_HORIZ)) latexGen.setPositionHoriCentre(Boolean.parseBoolean(root.getTextContent())); else if(name.endsWith(LNamespace.XML_POSITION_VERT)) latexGen.setPositionVertToken(VerticalPosition.getPosition(root.getTextContent())); } @Override protected void initialiseWidgets() { titleField = new MTextField(); labelField = new MTextField(); middleHorizPosCB = new MCheckBox(LangTool.INSTANCE.getStringActions("Instruments.1")); //$NON-NLS-1$ positionCB = new MComboBox<>(VerticalPosition.values(), new JLabel(LangTool.INSTANCE.getStringActions("Instruments.2"))); //$NON-NLS-1$ scaleField = new MSpinner(new MSpinner.MSpinnerNumberModel(1., 0.1, 100., 0.1), new JLabel(LangTool.INSTANCE.getStringActions("Instruments.3"))); //$NON-NLS-1$ } protected void updateWidgets() { titleField.setText(latexGen.getCaption()); labelField.setText(latexGen.getLabel()); middleHorizPosCB.setSelected(latexGen.isPositionHoriCentre()); positionCB.setSelectedItemSafely(latexGen.getPositionVertToken()); scaleField.setValue(latexGen.getScale()); } @Override public void setActivated(final boolean isactivated) { super.setActivated(isactivated); if(isactivated) updateWidgets(); } /** * @return The spinner that sets the scale of the drawing. * @since 3.0 */ public MSpinner getScaleSpinner() { return scaleField; } /** * @return The combo-box that defines the position of the drawing. * @since 3.0 */ public final MComboBox getPositionCB() { return positionCB; } /** * @return The field that define if the horizontal position of the drawing must be centred. * @since 3.0 */ public final MCheckBox getMiddleHorizPosCB() { return middleHorizPosCB; } /** * @return The field that changes the title of the drawing. * @since 3.0 */ public final MTextField getTitleField() { return titleField; } /** * @return The field that changes the label of the drawing. * @since 3.0 */ public final MTextField getLabelField() { return labelField; } @Override protected void initialiseInteractors() { try { addInteractor(new TextField2CustDrawing(this)); addInteractor(new CheckBox2CustDrawing(this)); addInteractor(new ComboBox2CustDrawing(this)); addInteractor(new Spinner2CustDrawing(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** The link that maps a combo box to action that modifies the drawing's properties. */ protected static class Spinner2CustDrawing extends InteractorImpl { protected Spinner2CustDrawing(final DrawingPropertiesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyLatexProperties.class, SpinnerModified.class); } @Override public void initAction() { action.setProperty(LatexProperties.SCALE); action.setGenerator(instrument.latexGen); } @Override public void updateAction() { action.setValue(instrument.scaleField.getValue()); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.scaleField; } } /** The link that maps a combo box to action that modifies the drawing's properties. */ protected static class ComboBox2CustDrawing extends InteractorImpl { protected ComboBox2CustDrawing(final DrawingPropertiesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyLatexProperties.class, ListSelectionModified.class); } @Override public void initAction() { action.setProperty(LatexProperties.POSITION_VERTICAL); action.setGenerator(instrument.latexGen); action.setValue(instrument.positionCB.getSelectedItem()); } @Override public boolean isConditionRespected() { return interaction.getList()==instrument.positionCB; } } /** The link that maps a check box to action that modifies the drawing's properties. */ protected static class CheckBox2CustDrawing extends InteractorImpl { protected CheckBox2CustDrawing(final DrawingPropertiesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyLatexProperties.class, CheckBoxModified.class); } @Override public void initAction() { action.setProperty(LatexProperties.POSITION_HORIZONTAL); action.setGenerator(instrument.latexGen); action.setValue(instrument.middleHorizPosCB.isSelected()); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.middleHorizPosCB; } } /** The link that maps text fields to action that modifies the drawing's properties. */ protected static class TextField2CustDrawing extends InteractorImpl { protected TextField2CustDrawing(final DrawingPropertiesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyLatexProperties.class, TextChanged.class); } @Override public void initAction() { if(interaction.getTextComp()==instrument.labelField) action.setProperty(LatexProperties.LABEL); else action.setProperty(LatexProperties.CAPTION); action.setGenerator(instrument.latexGen); } @Override public void updateAction() { super.updateAction(); action.setValue(interaction.getText()); } @Override public boolean isConditionRespected() { return interaction.getTextComp()==instrument.labelField || interaction.getTextComp()==instrument.titleField; } } } EditingSelector.java000066400000000000000000000516041321075051700350060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.util.HashMap; import java.util.Map; import java.util.Objects; import javax.swing.AbstractButton; import net.sf.latexdraw.actions.ModifyPencilStyle; import net.sf.latexdraw.actions.shape.AddShape; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.action.Action; import org.malai.instrument.InteractorImpl; import org.malai.swing.action.library.ActivateInactivateInstruments; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; import org.malai.swing.widget.MToggleButton; /** * This instrument selects the pencil or the hand.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/09/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class EditingSelector extends WidgetInstrument { /** The instrument that converts PST code into shapes. */ protected CodeInserter codeInserter; /** The button that allows to select the instrument Hand. */ protected MToggleButton handB; /** The button that allows to select the instrument Pencil to draw dots. */ protected MToggleButton dotB; /** The button that allows to select the instrument Pencil to draw free hand shapes. */ protected MToggleButton freeHandB; /** The button that allows to select the instrument Pencil to add texts. */ protected MToggleButton textB; /** The button that allows to select the instrument Pencil to add rectangles. */ protected MToggleButton recB; /** The button that allows to select the instrument Pencil to add squares. */ protected MToggleButton squareB; /** The button that allows to select the instrument Pencil to add ellipses. */ protected MToggleButton ellipseB; /** The button that allows to select the instrument Pencil to add circles. */ protected MToggleButton circleB; /** The button that allows to select the instrument Pencil to add lines. */ protected MToggleButton linesB; /** The button that allows to select the instrument Pencil to add polygons. */ protected MToggleButton polygonB; /** The button that allows to select the instrument Pencil to add bezier curves. */ protected MToggleButton bezierB; /** The button that allows to select the instrument Pencil to add closed bezier curves. */ protected MToggleButton bezierClosedB; /** The button that allows to select the instrument Pencil to add grids. */ protected MToggleButton gridB; /** The button that allows to select the instrument Pencil to add axes. */ protected MToggleButton axesB; /** The button that allows to select the instrument Pencil to add rhombuses. */ protected MToggleButton rhombusB; /** The button that allows to select the instrument Pencil to add triangles. */ protected MToggleButton triangleB; /** The button that allows to select the instrument Pencil to add arcs. */ protected MToggleButton arcB; /** The button that allows to select the instrument Pencil to add pictures. */ protected MToggleButton picB; /** The button that allows to select the instrument Pencil to add plotted curves. */ protected MToggleButton plotB; /** The button that allows to insert some code (converted in shapes). */ protected MButton codeB; /** The instrument Hand. */ protected Hand hand; /** The instrument Pencil. */ protected Pencil pencil; /** The instrument that manages instruments that customise shapes and the pencil. */ protected MetaShapeCustomiser metaShapeCustomiser; /** The instrument that manages selected shapes. */ protected Border border; /** The instrument used to delete shapes. */ protected ShapeDeleter deleter; protected Map button2EditingChoiceMap; /** * Creates the instruments selector. * @param composerUI The composerUI that manages the widgets of the instrument. * @param pen The pen to select. * @param theHand The theHand to select. * @param theBorder The instrument that manages selected shapes. * @param customiser The instrument that manages instruments that customise shapes and the pen. * @param theDeleter The instrument used to delete shapes. * @param theInserter The instrument that converts PST code into shapes. * @throws IllegalArgumentException If one of the given parameter is null. * @since 3.0 */ public EditingSelector(final SwingUIComposer composerUI, final Pencil pen, final Hand theHand, final MetaShapeCustomiser customiser, final Border theBorder, final ShapeDeleter theDeleter, final CodeInserter theInserter) { super(composerUI); codeInserter = Objects.requireNonNull(theInserter); deleter = Objects.requireNonNull(theDeleter); border = Objects.requireNonNull(theBorder); pencil = Objects.requireNonNull(pen); hand = Objects.requireNonNull(theHand); metaShapeCustomiser = Objects.requireNonNull(customiser); initialiseWidgets(); initialiseEditingChoiceMap(); codeInserter.setActivated(false); theHand.setActivated(true); pen.setActivated(false); } private void initialiseEditingChoiceMap() { button2EditingChoiceMap = new HashMap<>(); button2EditingChoiceMap.put(dotB, EditionChoice.DOT); button2EditingChoiceMap.put(textB, EditionChoice.TEXT); button2EditingChoiceMap.put(freeHandB, EditionChoice.FREE_HAND); button2EditingChoiceMap.put(arcB, EditionChoice.CIRCLE_ARC); button2EditingChoiceMap.put(axesB, EditionChoice.AXES); button2EditingChoiceMap.put(bezierB, EditionChoice.BEZIER_CURVE); button2EditingChoiceMap.put(bezierClosedB, EditionChoice.BEZIER_CURVE_CLOSED); button2EditingChoiceMap.put(circleB, EditionChoice.CIRCLE); button2EditingChoiceMap.put(ellipseB, EditionChoice.ELLIPSE); button2EditingChoiceMap.put(gridB, EditionChoice.GRID); button2EditingChoiceMap.put(linesB, EditionChoice.LINES); button2EditingChoiceMap.put(polygonB, EditionChoice.POLYGON); button2EditingChoiceMap.put(recB, EditionChoice.RECT); button2EditingChoiceMap.put(rhombusB, EditionChoice.RHOMBUS); button2EditingChoiceMap.put(squareB, EditionChoice.SQUARE); button2EditingChoiceMap.put(triangleB, EditionChoice.TRIANGLE); button2EditingChoiceMap.put(picB, EditionChoice.PICTURE); button2EditingChoiceMap.put(plotB, EditionChoice.PLOT); } @Override protected void initialiseWidgets() { /* Creation of the widgets of the instrument. */ handB = new MToggleButton(LResources.SELECT_ICON); handB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.136") + //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.137") + //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.138")); //$NON-NLS-1$ dotB = new MToggleButton(LResources.DOT_ICON); dotB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.117")); //$NON-NLS-1$ freeHandB = new MToggleButton(LResources.FREE_HAND_ICON); freeHandB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.7")); //$NON-NLS-1$ textB = new MToggleButton(LResources.TEXT_ICON); textB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.60")); //$NON-NLS-1$ recB = new MToggleButton(LResources.RECT_ICON); recB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.119")); //$NON-NLS-1$ squareB = new MToggleButton(LResources.SQUARE_ICON); squareB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.120")); //$NON-NLS-1$ ellipseB = new MToggleButton(LResources.ELLIPSE_ICON); ellipseB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.125")); //$NON-NLS-1$ circleB = new MToggleButton(LResources.CIRCLE_ICON); circleB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.127")); //$NON-NLS-1$ axesB = new MToggleButton(LResources.AXES_ICON); axesB.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.17")); //$NON-NLS-1$ gridB = new MToggleButton(LResources.GRID_ICON); gridB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.133")); //$NON-NLS-1$ bezierB = new MToggleButton(LResources.BEZIER_CURVE_ICON); bezierB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.132")); //$NON-NLS-1$ bezierClosedB = new MToggleButton(LResources.CLOSED_BEZIER_ICON); bezierClosedB.setToolTipText(LangTool.INSTANCE.getString19("LaTeXDrawFrame.11")); //$NON-NLS-1$ arcB = new MToggleButton(LResources.ARC_ICON); arcB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.128")); //$NON-NLS-1$ triangleB = new MToggleButton(LResources.TRIANGLE_ICON); triangleB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.124")); //$NON-NLS-1$ rhombusB = new MToggleButton(LResources.RHOMBUS_ICON); rhombusB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.123")); //$NON-NLS-1$ polygonB = new MToggleButton(LResources.POLYGON_ICON); polygonB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.121")); //$NON-NLS-1$ linesB = new MToggleButton(LResources.LINES_ICON); linesB.setToolTipText(LangTool.INSTANCE.getStringActions("Instruments.4")); //$NON-NLS-1$ picB = new MToggleButton(LResources.INSERT_PIC_ICON); picB.setToolTipText(LangTool.INSTANCE.getString16("LaTeXDrawFrame.1")); //$NON-NLS-1$ plotB = new MToggleButton(LResources.PLOT_ICON); plotB.setToolTipText(LangTool.INSTANCE.getStringActions("Instruments.5")); //$NON-NLS-1$ codeB = new MButton(LResources.TEX_EDITOR_ICON); codeB.setToolTipText(LangTool.INSTANCE.getString16("LaTeXDrawFrame.0")); //$NON-NLS-1$ } @Override public void interimFeedback() { if(hand.isActivated()) { handB.setSelected(true); textB.setSelected(false); freeHandB.setSelected(false); recB.setSelected(false); squareB.setSelected(false); ellipseB.setSelected(false); arcB.setSelected(false); circleB.setSelected(false); axesB.setSelected(false); gridB.setSelected(false); dotB.setSelected(false); polygonB.setSelected(false); linesB.setSelected(false); rhombusB.setSelected(false); triangleB.setSelected(false); bezierB.setSelected(false); bezierClosedB.setSelected(false); picB.setSelected(false); plotB.setSelected(false); } else if(pencil.isActivated()){ final EditionChoice ec = pencil.currentChoice(); recB.setSelected(ec==EditionChoice.RECT); squareB.setSelected(ec==EditionChoice.SQUARE); ellipseB.setSelected(ec==EditionChoice.ELLIPSE); arcB.setSelected(ec==EditionChoice.CIRCLE_ARC); circleB.setSelected(ec==EditionChoice.CIRCLE); axesB.setSelected(ec==EditionChoice.AXES); gridB.setSelected(ec==EditionChoice.GRID); dotB.setSelected(ec==EditionChoice.DOT); polygonB.setSelected(ec==EditionChoice.POLYGON); linesB.setSelected(ec==EditionChoice.LINES); rhombusB.setSelected(ec==EditionChoice.RHOMBUS); triangleB.setSelected(ec==EditionChoice.TRIANGLE); bezierB.setSelected(ec==EditionChoice.BEZIER_CURVE); bezierClosedB.setSelected(ec==EditionChoice.BEZIER_CURVE_CLOSED); textB.setSelected(ec==EditionChoice.TEXT); freeHandB.setSelected(ec==EditionChoice.FREE_HAND); picB.setSelected(ec==EditionChoice.PICTURE); plotB.setSelected(ec==EditionChoice.PLOT); handB.setSelected(false); } } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonPressed2AddText(this)); addInteractor(new ButtonPressed2DefineStylePencil(this)); addInteractor(new ButtonPressed2ActivateIns(this)); addInteractor(new ButtonPressed2LaunchCodeInserter(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } @Override public void setActivated(final boolean isActivated) { super.setActivated(isActivated); composer.setWidgetVisible(arcB, isActivated); composer.setWidgetVisible(axesB, isActivated); composer.setWidgetVisible(bezierB, isActivated); composer.setWidgetVisible(bezierClosedB, isActivated); composer.setWidgetVisible(circleB, isActivated); composer.setWidgetVisible(recB, isActivated); composer.setWidgetVisible(squareB, isActivated); composer.setWidgetVisible(ellipseB, isActivated); composer.setWidgetVisible(gridB, isActivated); composer.setWidgetVisible(polygonB, isActivated); composer.setWidgetVisible(dotB, isActivated); composer.setWidgetVisible(linesB, isActivated); composer.setWidgetVisible(rhombusB, isActivated); composer.setWidgetVisible(triangleB, isActivated); composer.setWidgetVisible(textB, isActivated); composer.setWidgetVisible(freeHandB, isActivated); composer.setWidgetVisible(handB, isActivated); composer.setWidgetVisible(picB, isActivated); composer.setWidgetVisible(codeB, isActivated); composer.setWidgetVisible(plotB, isActivated); } /** * @param ab The widget to test. * @return True if the given widget is a widget of the instrument. * @since 3.0 */ public boolean isWidget(final Object ab) { return ab!=null && (button2EditingChoiceMap.get(ab)!=null || ab==handB || ab==codeB); } /** * @return The button that allows to insert PST code. * @since 3.0 */ public MButton getCodeB() { return codeB; } /** * @return The button that allows the select instrument Hand. * @since 3.0 */ public MToggleButton getHandB() { return handB; } /** * @return The button that allows the select instrument Pencil to draw free hand shapes. * @since 3.0 */ public MToggleButton getFreeHandB() { return freeHandB; } /** * @return The button that allows the select instrument Pencil to add texts. * @since 3.0 */ public MToggleButton getTextB() { return textB; } /** * @return The button that allows the select instrument Pencil to draw dots. * @since 3.0 */ public MToggleButton getDotB() { return dotB; } /** * @return The button that allows the select instrument Pencil to draw rectangles. * @since 3.0 */ public MToggleButton getRecB() { return recB; } /** * @return The button that allows the select instrument Pencil to draw squares. * @since 3.0 */ public MToggleButton getSquareB() { return squareB; } /** * @return The button that allows the select instrument Pencil to draw ellipses. * @since 3.0 */ public MToggleButton getEllipseB() { return ellipseB; } /** * @return The button that allows the select instrument Pencil to draw circles. * @since 3.0 */ public MToggleButton getCircleB() { return circleB; } /** * @return The button that allows the select instrument Pencil to draw lines. * @since 3.0 */ public MToggleButton getLinesB() { return linesB; } /** * @return The button that allows the select instrument Pencil to draw polygons. * @since 3.0 */ public MToggleButton getPolygonB() { return polygonB; } /** * @return The button that allows the select instrument Pencil to draw bezier curves. * @since 3.0 */ public MToggleButton getBezierB() { return bezierB; } /** * @return The button that allows the select instrument Pencil to draw closed bezier curves. * @since 3.0 */ public MToggleButton getBezierClosedB() { return bezierClosedB; } /** * @return The button that allows the select instrument Pencil to draw grids. * @since 3.0 */ public MToggleButton getGridB() { return gridB; } /** * @return The button that allows the select instrument Pencil to draw axes. * @since 3.0 */ public MToggleButton getAxesB() { return axesB; } /** * @return The button that allows the select instrument Pencil to draw rhombuses. * @since 3.0 */ public MToggleButton getRhombusB() { return rhombusB; } /** * @return The button that allows the select instrument Pencil to draw triangles. * @since 3.0 */ public MToggleButton getTriangleB() { return triangleB; } /** * @return The button that allows the select instrument Pencil to draw arcs. * @since 3.0 */ public MToggleButton getArcB() { return arcB; } /** * @return The button that allows the select instrument Pencil to add pictures. * @since 3.0 */ public MToggleButton getPicB() { return picB; } /** @return The button that allows the select instrument Pencil to add pictures. */ public MToggleButton getPlotB() { return plotB; } @Override public void onActionDone(final Action action) { super.onActionDone(action); hand.canvas().requestFocus(); } } /** * This link allows to activate the code inserter instrument. */ class ButtonPressed2LaunchCodeInserter extends InteractorImpl { ButtonPressed2LaunchCodeInserter(final EditingSelector ins) throws InstantiationException, IllegalAccessException { super(ins, false, ActivateInactivateInstruments.class, ButtonPressed.class); } @Override public void initAction() { action.addInstrumentToActivate(instrument.codeInserter); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.codeB; } } /** * This link allows the modify the link of shape the pencil will create using a ButtonPressed interaction. */ class ButtonPressed2DefineStylePencil extends InteractorImpl { protected ButtonPressed2DefineStylePencil(final EditingSelector ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyPencilStyle.class, ButtonPressed.class); } @Override public void initAction() { action.setEditingChoice(instrument.button2EditingChoiceMap.get(interaction.getButton())); action.setPencil(instrument.pencil); action.setStatusBar(instrument.codeInserter.statusBar()); } @Override public boolean isConditionRespected() { return instrument.button2EditingChoiceMap.get(interaction.getButton())!=null; } } /** * When the user types a text using the text field (instrument text setter) and then he * selects another kind of editing, the typed text must be added to the canvas. */ class ButtonPressed2AddText extends InteractorImpl { protected ButtonPressed2AddText(final EditingSelector ins) throws InstantiationException, IllegalAccessException { super(ins, false, AddShape.class, ButtonPressed.class); } @Override public void initAction() { action.setDrawing(instrument.pencil.canvas().getDrawing()); action.setShape(ShapeFactory.createText(ShapeFactory.createPoint(instrument.pencil.textSetter().relativePoint), instrument.pencil.textSetter().getTextField().getText())); } @Override public boolean isConditionRespected() { return instrument.pencil.textSetter().isActivated() && !instrument.pencil.textSetter().getTextField().getText().isEmpty() && interaction.getButton()==instrument.textB; } } /** * This link maps a ButtonPressed interaction to an action that activates/desactivates instruments. */ class ButtonPressed2ActivateIns extends InteractorImpl { protected ButtonPressed2ActivateIns(final EditingSelector ins) throws InstantiationException, IllegalAccessException { super(ins, false, ActivateInactivateInstruments.class, ButtonPressed.class); } @Override public void initAction() { final AbstractButton ab = interaction.getButton(); action.setActivateFirst(false); if(ab!=instrument.textB) action.addInstrumentToInactivate(instrument.pencil.textSetter()); /* Selection of the instruments to activate/desactivate. */ if(ab==instrument.handB) { final boolean noSelection = instrument.hand.canvas().getDrawing().getSelection().isEmpty(); action.addInstrumentToActivate(instrument.hand); if(!noSelection) action.addInstrumentToActivate(instrument.deleter); action.addInstrumentToInactivate(instrument.pencil); if(noSelection) { action.addInstrumentToInactivate(instrument.metaShapeCustomiser); action.addInstrumentToInactivate(instrument.border); } else { action.addInstrumentToActivate(instrument.metaShapeCustomiser); action.addInstrumentToActivate(instrument.border); } } else { action.addInstrumentToInactivate(instrument.hand); action.addInstrumentToInactivate(instrument.border); action.addInstrumentToInactivate(instrument.deleter); action.addInstrumentToActivate(instrument.pencil); action.addInstrumentToActivate(instrument.metaShapeCustomiser); } } @Override public boolean isConditionRespected() { /* The pressed button must be a button of the instrument. */ return instrument.codeB!=interaction.getButton() && instrument.isWidget(interaction.getButton()); } } EditionChoice.java000066400000000000000000000165211321075051700344270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IPicture; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import net.sf.latexdraw.lang.LangTool; /** * Defines the choices of edition of the canvas.
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/14/10
    * @author Arnaud BLOUIN * @version 3.0 * @since 3.0 */ public enum EditionChoice { RECT { @Override public IRectangle createShapeInstance() { return ShapeFactory.newShape(IRectangle.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, DOT { @Override public IDot createShapeInstance() {return ShapeFactory.newShape(IDot.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.9"); } }, SQUARE { @Override public ISquare createShapeInstance() {return ShapeFactory.newShape(ISquare.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, RHOMBUS { @Override public IRhombus createShapeInstance() {return ShapeFactory.newShape(IRhombus.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, FREE_HAND { @Override public IFreehand createShapeInstance() {return ShapeFactory.newShape(IFreehand.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, TRIANGLE { @Override public ITriangle createShapeInstance() {return ShapeFactory.newShape(ITriangle.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, LINES { @Override public IPolyline createShapeInstance() {return ShapeFactory.newShape(IPolyline.class).get();} @Override public String getExplanations() { return "Right-click to add points. Left-click to add the last point."; } }, CIRCLE { @Override public ICircle createShapeInstance() {return ShapeFactory.newShape(ICircle.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, GRID { @Override public IGrid createShapeInstance() {return ShapeFactory.newShape(IGrid.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.6"); } }, AXES { @Override public IAxes createShapeInstance() {return ShapeFactory.newShape(IAxes.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.7"); } }, ELLIPSE { @Override public IEllipse createShapeInstance() {return ShapeFactory.newShape(IEllipse.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, POLYGON { @Override public IPolygon createShapeInstance() {return ShapeFactory.newShape(IPolygon.class).get();} @Override public String getExplanations() { return "Right-click to add points. Left-click to add the last point."; } }, WEDGE { @Override public IArc createShapeInstance() { final IArc shape = ShapeFactory.newShape(IArc.class).get(); shape.setArcStyle(ArcStyle.WEDGE); return shape; } @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, CIRCLE_ARC { @Override public ICircleArc createShapeInstance() { final ICircleArc shape = ShapeFactory.newShape(ICircleArc.class).get(); shape.setArcStyle(ArcStyle.ARC); return shape; } @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, CHORD { @Override public IArc createShapeInstance() { final IArc shape = ShapeFactory.newShape(IArc.class).get(); shape.setArcStyle(ArcStyle.CHORD); return shape; } @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.8"); } }, BEZIER_CURVE { @Override public IBezierCurve createShapeInstance() { final IBezierCurve shape = ShapeFactory.newShape(IBezierCurve.class).get(); shape.setIsClosed(false); return shape; } @Override public String getExplanations() { return "Right-click to add points. Left-click to add the last point."; } }, BEZIER_CURVE_CLOSED { @Override public IBezierCurve createShapeInstance() { final IBezierCurve shape = ShapeFactory.newShape(IBezierCurve.class).get(); shape.setIsClosed(true); return shape; } @Override public String getExplanations() { return "Right-click to add points. Left-click to add the last point."; } }, TEXT { @Override public IText createShapeInstance() {return ShapeFactory.newShape(IText.class).get();} @Override public String getExplanations() { return LangTool.INSTANCE.getString19("MenusListener.5"); } }, PICTURE { @Override public IPicture createShapeInstance() {return ShapeFactory.newShape(IPicture.class).get();} @Override public String getExplanations() { return "Left-click to show the file dialogue to select the picture to insert."; } }, PLOT { @Override public IPlot createShapeInstance() {return ShapeFactory.newShape(IPlot.class).get();} @Override public String getExplanations() { return "Left-click to show the text field to enter the formula. Then, press 'enter' to validate or 'escape' to cancel."; } }; /** * @return A new shape instance corresponding to the editing choice. * @since 3.0 */ public abstract IShape createShapeInstance(); /** * @return The explanations to draw the shape. */ public abstract String getExplanations(); } ExceptionsManager.java000066400000000000000000000062631321075051700353370ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import javax.swing.Timer; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.badaboom.BadaboomHandler; import net.sf.latexdraw.badaboom.BadaboomManager; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.action.library.ShowWidget; import org.malai.swing.instrument.SwingInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.widget.MButton; /** * This instrument allows to see exceptions launched during the execution of the program.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/05/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class ExceptionsManager extends SwingInstrument implements BadaboomHandler { /** The button used to shows the panel of exceptions. */ protected MButton exceptionB; /** The frame to show when exceptions occur. */ protected BadaboomManager frame; /** * Creates the instrument. * @since 3.0 */ public ExceptionsManager() { super(); frame = new BadaboomManager(); exceptionB = new MButton(); setActivated(false); BadaboomCollector.INSTANCE.addHandler(this); Timer timer = new Timer(2000, e -> exceptionB.setIcon(exceptionB.getIcon()==LResources.ERR_ICON ? LResources.EMPTY_ICON : LResources.ERR_ICON)); timer.start(); } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonPress2ShowExceptionFrame(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } @Override public void notifyEvent(final Throwable ex) { setActivated(true); } @Override public void setActivated(final boolean isActivated) { super.setActivated(isActivated); exceptionB.setVisible(isActivated); } /** * @return The button used to shows the panel of exceptions. * @since 3.0 */ public MButton getExceptionB() { return exceptionB; } @Override public void notifyEvents() { setActivated(!BadaboomCollector.INSTANCE.isEmpty()); } } /** * Links a button pressed interaction to an action that show the exceptions frame. */ class ButtonPress2ShowExceptionFrame extends InteractorImpl { /** * Creates the link. */ protected ButtonPress2ShowExceptionFrame(final ExceptionsManager ins) throws InstantiationException, IllegalAccessException { super(ins, false, ShowWidget.class, ButtonPressed.class); } @Override public void initAction() { action.setComponent(instrument.frame); action.setVisible(true); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.exceptionB; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/Exporter.java000066400000000000000000000321271321075051700336100ustar00rootroot00000000000000package net.sf.latexdraw.instruments; import java.awt.event.KeyEvent; import java.io.File; import java.util.Objects; import javax.swing.JLabel; import javax.swing.JMenuItem; import net.sf.latexdraw.actions.Export; import net.sf.latexdraw.actions.Export.ExportFormat; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.ui.ICanvas; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.glib.views.pst.PSTCodeGenerator; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.dialog.ExportDialog; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LPath; import net.sf.latexdraw.util.LResources; import org.malai.action.Action; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.interaction.library.MenuItemPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; import org.malai.swing.widget.MMenu; import org.malai.swing.widget.MMenuItem; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * This instrument exports a drawing in different formats.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/23/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class Exporter extends WidgetInstrument { /** The title of the dialog box used to export drawings. */ public static final String TITLE_DIALOG_EXPORT = LangTool.INSTANCE.getStringDialogFrame("Exporter.1"); //$NON-NLS-1$ /** The label of the exportAsBMPFile item */ public static final String LABEL_EXPORT_BMP = LangTool.INSTANCE.getString16("LaTeXDrawFrame.6"); //$NON-NLS-1$ /** The label of the exportAsPNGFile item */ public static final String LABEL_EXPORT_PNG = LangTool.INSTANCE.getString16("LaTeXDrawFrame.7"); //$NON-NLS-1$ /** The label of the exportCodeMenu item */ public static final String LABEL_EXPORT_TRICKS = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.19"); //$NON-NLS-1$ /** The label of the exportDrawMenu item */ public static final String LABEL_EXPORT_JPG = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.20"); //$NON-NLS-1$ /** The label of the menu export as */ public static final String LABEL_EXPORT_AS = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.16"); //$NON-NLS-1$ /** The canvas that contains the shapes to export. The canvas is used instead of the drawing * because to export as picture, we paint the views into a graphics. */ protected ICanvas canvas; /** The PST generator. */ protected PSTCodeGenerator pstGen; /** The button used to export the drawing as a pdf document. */ protected MButton pdfButton; /** The export menu that contains all the export menu item. */ protected MMenu exportMenu; /** The menu item that export as PST code. */ protected MMenuItem menuItemPST; /** The menu item that export as JPG picture. */ protected MMenuItem menuItemJPG; /** The menu item that export as PNG picture. */ protected MMenuItem menuItemPNG; /** The menu item that export as BMP picture. */ protected MMenuItem menuItemBMP; /** The menu item that export as PDF document. */ protected MMenuItem menuItemPDF; /** The menu item that export as PS (using latex) document. */ protected MMenuItem menuItemEPSLatex; /** The menu item that export as PDF (using pdfcrop) document. */ protected MMenuItem menuItemPDFcrop; /** The dialog box that allows to define where the drawing must be exported. */ protected ExportDialog fileChooserExport; /** The default location of the exports. */ protected String pathExport; /** * The latex packages that the interactive system saves by default. * These packages should by set by the user and must be general, i.e. * independent of any document. */ protected String defaultPackages; /** The field where messages are displayed. */ protected JLabel statusBar; protected FileLoaderSaver loader; /** * Creates the instrument. * @param composerUI The composerUI that manages the widgets of the instrument. * @param theCanvas The theCanvas that contains the views to export (for pictures). * @param bar The status bar where messages are displayed. * @param gen The PST generator to use. * @param fls The file loader/saver instrument. * @throws IllegalArgumentException If one of the given arguments is null. * @since 3.0 */ public Exporter(final SwingUIComposer composerUI, final ICanvas theCanvas, final JLabel bar, final PSTCodeGenerator gen, final FileLoaderSaver fls) { super(composerUI); defaultPackages = ""; //$NON-NLS-1$ statusBar = Objects.requireNonNull(bar); canvas = Objects.requireNonNull(theCanvas); pstGen = Objects.requireNonNull(gen); loader = fls; initialiseWidgets(); reinit(); } @Override protected void initialiseWidgets() { // Widgets initialisation pdfButton = new MButton(LResources.PDF_ICON); exportMenu = new MMenu(LABEL_EXPORT_AS, true); menuItemBMP = new MMenuItem(LABEL_EXPORT_BMP, KeyEvent.VK_B); menuItemEPSLatex= new MMenuItem(LangTool.INSTANCE.getStringDialogFrame("Exporter.2"), KeyEvent.VK_S); //$NON-NLS-1$ menuItemJPG = new MMenuItem(LABEL_EXPORT_JPG, KeyEvent.VK_J); menuItemPDF = new MMenuItem(LangTool.INSTANCE.getStringDialogFrame("Exporter.3"), KeyEvent.VK_F); //$NON-NLS-1$ menuItemPDFcrop = new MMenuItem(LangTool.INSTANCE.getStringDialogFrame("Exporter.4"), KeyEvent.VK_C); //$NON-NLS-1$ menuItemPNG = new MMenuItem(LABEL_EXPORT_PNG, KeyEvent.VK_P); menuItemPST = new MMenuItem(LABEL_EXPORT_TRICKS, KeyEvent.VK_T); exportMenu.add(menuItemPST); exportMenu.add(menuItemJPG); exportMenu.add(menuItemPNG); exportMenu.add(menuItemBMP); exportMenu.add(menuItemPDF); exportMenu.add(menuItemEPSLatex); exportMenu.add(menuItemPDFcrop); } @Override public void reinit() { LaTeXGenerator.setPackages(defaultPackages); } @Override public void load(final boolean generalPreferences, final String nsURI, final Element root) { super.load(generalPreferences, nsURI, root); final String name = root.getNodeName(); if(name.endsWith(LNamespace.XML_LATEX_INCLUDES)) { final String[] lines = root.getTextContent().split(LResources.EOL); final String pkgs = LaTeXGenerator.getPackages(); final StringBuilder build = new StringBuilder(LaTeXGenerator.getPackages()); for(final String line : lines) if(!pkgs.contains(line)) build.append(LResources.EOL).append(line); LaTeXGenerator.setPackages(build.toString()); } } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { super.save(generalPreferences, nsURI, document, root); if(document==null || root==null) return ; Element elt; if(generalPreferences) { elt = document.createElement(LNamespace.XML_PATH_EXPORT); elt.setTextContent(pathExport); root.appendChild(elt); elt = document.createElement(LNamespace.XML_LATEX_INCLUDES); elt.setTextContent(defaultPackages); root.appendChild(elt); }else { final String ns = LPath.INSTANCE.getNormaliseNamespaceURI(nsURI); elt = document.createElement(ns + LNamespace.XML_LATEX_INCLUDES); elt.appendChild(document.createTextNode(LaTeXGenerator.getPackages())); root.appendChild(elt); } } @Override public void setActivated(final boolean isActivated, final boolean hide) { super.setActivated(isActivated); exportMenu.setVisible(isActivated || !hide); pdfButton.setVisible(isActivated || !hide); exportMenu.setEnabled(isActivated); pdfButton.setEnabled(isActivated); } @Override public void setActivated(final boolean activated) { setActivated(activated, false); } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonPressed2Export(this)); addInteractor(new MenuPressed2Export(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The button used to export the drawing as a pdf document. * @since 3.0 */ public MButton getPdfButton() { return pdfButton; } /** * @return The export menu that contains all the export menu item. * @since 3.0 */ public MMenu getExportMenu() { return exportMenu; } /** * @param format The format of the document to export. * @return The export dialog to select a path. * @since 3.0 */ protected ExportDialog getExportDialog(final ExportFormat format) { if(fileChooserExport==null) fileChooserExport = new ExportDialog(pathExport);// currentFile==null ? pathExport : currentFile.getPath()); // Setting the dialog. fileChooserExport.removeChoosableFileFilter(fileChooserExport.getFileFilter()); fileChooserExport.setFileFilter(fileChooserExport.getAcceptAllFileFilter()); fileChooserExport.setFileFilter(format.getFilter()); fileChooserExport.setDialogTitle(Exporter.TITLE_DIALOG_EXPORT); if(loader.currentFile!=null) { String path = loader.currentFile.getPath(); if(path.contains(".")) path = path.substring(0, path.lastIndexOf('.')); //$NON-NLS-1$ path += format.getFileExtension(); fileChooserExport.setSelectedFile(new File(path)); } return fileChooserExport; } @Override public void onActionExecuted(final Action action) { if(action instanceof Export) { final Export export = (Export) action; switch(export.getExported()) { case OK: statusBar.setText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.184")); //$NON-NLS-1$ break; case FAIL: statusBar.setText("The export failed. Check you can write in the targetted folder and your LaTeX installation is ok. The error is: " + "'" + export.getLog() + "'"); break; } } } /** * @param defaultPkgs The latex packages that the interactive system saves by default. * These packages should by set by the user and must be general, i.e. independent of any document. * Packages for a given document should by set using setPackages(String). * @since 3.0 */ public void setDefaultPackages(final String defaultPkgs) { if(defaultPkgs!=null) { if(this.defaultPackages.isEmpty()) LaTeXGenerator.setPackages(defaultPkgs +LResources.EOL+LaTeXGenerator.getPackages()); defaultPackages = defaultPkgs; } } /** * @param path The path where files are exported. * @since 3.0 */ public void setPathExport(final String path) { if(path!=null) pathExport = path; } } /** * This link maps menus to an export action. */ class MenuPressed2Export extends InteractorImpl { /** * Initialises the link. * @param ins The exporter. */ protected MenuPressed2Export(final Exporter ins) throws InstantiationException, IllegalAccessException { super(ins, false, Export.class, MenuItemPressed.class); } @Override public void initAction() { final JMenuItem item = interaction.getMenuItem(); final ExportFormat format; if(item==instrument.menuItemPDF) format = ExportFormat.PDF; else if(item==instrument.menuItemPDFcrop) format = ExportFormat.PDF_CROP; else if(item==instrument.menuItemEPSLatex) format = ExportFormat.EPS_LATEX; else if(item==instrument.menuItemJPG) format = ExportFormat.JPG; else if(item==instrument.menuItemPST) format = ExportFormat.TEX; else if(item==instrument.menuItemPNG) format = ExportFormat.PNG; else if(item==instrument.menuItemBMP) format = ExportFormat.BMP; else format = null; if(format!=null){ action.setDialogueBox(instrument.getExportDialog(format)); action.setCanvas(instrument.canvas); action.setFormat(format); action.setPstGen(instrument.pstGen); } } @Override public boolean isConditionRespected() { final JMenuItem item = interaction.getMenuItem(); return item==instrument.menuItemPDF || item==instrument.menuItemPDFcrop || item==instrument.menuItemEPSLatex || item==instrument.menuItemJPG || item==instrument.menuItemPNG || item==instrument.menuItemPST || item==instrument.menuItemBMP; } } /** * This link maps buttons to an export action. */ class ButtonPressed2Export extends InteractorImpl { /** * Initialises the link. * @param ins The exporter. */ protected ButtonPressed2Export(final Exporter ins) throws InstantiationException, IllegalAccessException { super(ins, false, Export.class, ButtonPressed.class); } @Override public void initAction() { action.setDialogueBox(instrument.getExportDialog(ExportFormat.PDF)); action.setCanvas(instrument.canvas); action.setFormat(ExportFormat.PDF); action.setPstGen(instrument.pstGen); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.pdfButton; } } FileLoaderSaver.java000066400000000000000000000526531321075051700347360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.LoadDrawing; import net.sf.latexdraw.actions.NewDrawing; import net.sf.latexdraw.actions.SaveDrawing; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.filters.SVGFilter; import net.sf.latexdraw.generators.svg.SVGDocumentGenerator; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LFrame; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import org.malai.action.Action; import org.malai.instrument.InteractorImpl; import org.malai.interaction.Interaction; import org.malai.swing.interaction.library.KeysPressure; import org.malai.swing.action.library.IOAction; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.interaction.library.MenuItemPressed; import org.malai.swing.interaction.library.WindowClosed; import org.malai.swing.widget.MButton; import org.malai.swing.widget.MMenu; import org.malai.swing.widget.MMenuItem; import org.malai.swing.widget.MProgressBar; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.swing.*; import java.awt.event.KeyEvent; import java.io.File; import java.util.List; import java.util.Objects; /** * This instrument saves and loads documents.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 06/01/2010
    * @author Arnaud BLOUIN, Jan-Cornelius MOLNAR * @since 3.0 */ public class FileLoaderSaver extends WidgetInstrument { /** The label of the saveMenu item */ public static final String LABEL_SAVE = LangTool.INSTANCE.getStringActions("FileLoaderSaver.1"); //$NON-NLS-1$ /** The label of the saveAsMenu item */ public static final String LABEL_SAVE_AS = LangTool.INSTANCE.getStringActions("FileLoaderSaver.2"); //$NON-NLS-1$ /** The label of the openMenu item */ public static final String LABEL_OPEN = LangTool.INSTANCE.getStringActions("FileLoaderSaver.3"); //$NON-NLS-1$ /** The path where documents are saved. */ protected String pathSave; /** The current file loaded or saved. */ protected File currentFile; /** The current working folder. */ protected File currentFolder; /** The button used to save documents. */ protected MButton saveButton; /** The button used to load documents. */ protected MButton loadButton; /** The button used to create a new document. */ protected MButton newButton; /** The menu item used to save as a document. */ protected MMenuItem saveAsMenu; /** The menu used to save documents. */ protected MMenuItem saveMenu; /** The menu used to load documents. */ protected MMenuItem loadMenu; /** The menu used to create a new document. */ protected MMenuItem newMenu; /** The menu that contains the menu item corresponding to the recent documents. */ protected MMenu recentFilesMenu; /** The fileChooser used to save drawings. */ protected JFileChooser fileChooser; /** The UI to save/open. */ protected LFrame ui; /** The field where messages are displayed. */ protected JLabel statusBar; /** The instrument used to manage preferences. */ protected PreferencesSetter prefSetter; /** The progress bar used to show the progress of loading and saving operations. */ protected MProgressBar progressBar; /** * Creates the file loader/saver. * @param ui The user interface that contains the presentations and the instruments to save/load. * @param statusBar The status bar where messages are displayed. * @param prefSetter The instrument used to manage preferences. * @throws IllegalArgumentException If one of the given parameters is null. * @throws NullPointerException If the given UI is null. * @since 3.0 */ public FileLoaderSaver(final LFrame ui, final JLabel statusBar, final PreferencesSetter prefSetter) { super(ui.getComposer()); this.statusBar = Objects.requireNonNull(statusBar); this.ui = ui; this.prefSetter = Objects.requireNonNull(prefSetter); initialiseWidgets(); reinit(); } @Override public void reinit() { currentFile = null; fileChooser = null; } @Override public void onActionDone(final Action action) { super.onActionDone(action); if(action!=null && action.hadEffect()) { final File file = fileChooser==null ? null : fileChooser.getSelectedFile(); if(file!=null) { currentFolder = file.getParentFile(); currentFile = file; if(!currentFile.getPath().endsWith(SVGFilter.SVG_EXTENSION)) currentFile = new File(currentFile.getPath()+SVGFilter.SVG_EXTENSION); } // Updating the recent files on I/O actions. if(action instanceof IOAction) { prefSetter.addRecentFile(((IOAction)action).getFile().getPath()); updateRecentMenuItems(prefSetter.recentFilesName); } } } @Override public void setActivated(final boolean activated, final boolean hide) { super.setActivated(activated); final boolean showButtons = activated || !hide; newMenu.setVisible(showButtons); newButton.setVisible(showButtons); saveAsMenu.setVisible(showButtons); saveButton.setVisible(showButtons); saveMenu.setVisible(showButtons); loadButton.setVisible(showButtons); loadMenu.setVisible(showButtons); if(showButtons) { newMenu.setEnabled(activated); newButton.setEnabled(activated); saveAsMenu.setEnabled(activated); saveButton.setEnabled(activated); saveMenu.setEnabled(activated); loadButton.setEnabled(activated); loadMenu.setEnabled(activated); } } @Override public void setActivated(final boolean activated) { setActivated(activated, true); } @Override protected void initialiseWidgets() { newMenu = new MMenuItem(LResources.LABEL_NEW, KeyEvent.VK_N); newMenu.setIcon(LResources.NEW_ICON); newButton = new MButton(LResources.NEW_ICON); newButton.setToolTipText(LangTool.INSTANCE.getStringActions("FileLoaderSaver.4")); //$NON-NLS-1$ loadButton = new MButton(LResources.OPEN_ICON); loadButton.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.200")); //$NON-NLS-1$ saveButton = new MButton(LResources.SAVE_ICON); saveButton.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.188")); //$NON-NLS-1$ loadMenu = new MMenuItem(LABEL_OPEN, KeyEvent.VK_O); loadMenu.setIcon(LResources.OPEN_ICON); saveMenu = new MMenuItem(LABEL_SAVE, KeyEvent.VK_S); saveMenu.setIcon(LResources.SAVE_ICON); saveAsMenu = new MMenuItem(LABEL_SAVE_AS, KeyEvent.VK_A); saveAsMenu.setIcon(LResources.SAVE_AS_ICON); recentFilesMenu = new MMenu(LangTool.INSTANCE.getString19("LaTeXDrawFrame.0"), true);//$NON-NLS-1$ progressBar = new MProgressBar(0, 100); progressBar.setVisible(false); } @Override public void onActionExecuted(final Action action) { if(action instanceof LoadDrawing) { currentFile = ((LoadDrawing)action).getFile(); if(currentFile!=null) currentFolder = currentFile.getParentFile(); } } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonClose2SaveInteractor(this)); addInteractor(new Shortcut2SavePrefInteractor(this)); addInteractor(new Button2SaveInteractor(this)); addInteractor(new Menu2SaveInteractor(this)); addInteractor(new Shortcut2SaveInteractor(this)); addInteractor(new Menu2SaveAsInteractor(this)); addInteractor(new Menu2LoadInteractor(this)); addInteractor(new Button2LoadInteractor(this)); addInteractor(new Shortcut2LoadInteractor(this)); addInteractor(new Menu2NewInteractor(this)); addInteractor(new Button2NewInteractor(this)); addInteractor(new Shortcut2NewInteractor(this)); addInteractor(new RecentMenuItem2LoadInteractor(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * Sets the path where documents are saved. * @param pathSave The path where documents are saved. * @since 3.0 */ public void setPathSave(final String pathSave) { if(pathSave!=null) this.pathSave = pathSave; } /** * @return The button used to save documents. * @since 3.0 */ public MButton getSaveButton() { return saveButton; } /** * @return The button used to load documents. * @since 3.0 */ public MButton getLoadButton() { return loadButton; } /** * @return The menu that permits to load recent documents. * @since 3.0 */ public MMenu getRecentFilesMenu() { return recentFilesMenu; } /** * @return The progress bar used to show the progress of the loading and saving operations. * @since 3.0 */ public MProgressBar getProgressBar() { return progressBar; } /** * Updates the recent menu items. * @param recentDocs The list of recent documents. * @since 3.0 */ public void updateRecentMenuItems(final List recentDocs) { recentFilesMenu.removeAll(); if(recentDocs!=null && !recentDocs.isEmpty()) { MMenuItem item; for(final String fileName : recentDocs) { item = new MMenuItem(fileName.substring(fileName.lastIndexOf(LResources.FILE_SEP)+1)); item.setToolTipText(fileName); recentFilesMenu.add(item); } } recentFilesMenu.setEnabled(recentFilesMenu.getMenuComponentCount()>0); } /** * @param save True: the dialogue box will be configured for saving prupose. Otherwose, for opening purpose. * @return The dialogue box to open or save drawings. * @since 3.0 */ public JFileChooser getDialog(final boolean save) { if(fileChooser==null) { fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChooser.addChoosableFileFilter(new SVGFilter()); fileChooser.setMultiSelectionEnabled(false); } if(save) fileChooser.setDialogTitle(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"));//$NON-NLS-1$ else fileChooser.setDialogTitle(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.200")); //$NON-NLS-1$ return fileChooser; } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { super.save(generalPreferences, nsURI, document, root); if(generalPreferences && document!=null && root!=null) { final Element elt = document.createElement(LNamespace.XML_PATH_OPEN); elt.setTextContent(pathSave); root.appendChild(elt); } } /** * @return The menu item used to save as a document. * @since 3.0 */ public MMenuItem getSaveAsMenu() { return saveAsMenu; } /** * @return The menu item used to save a document. * @since 3.0 */ public MMenuItem getSaveMenu() { return saveMenu; } /** * @return The menu item used to load a document. * @since 3.0 */ public MMenuItem getLoadMenu() { return loadMenu; } /** * @return The button used to create a new document. */ public MButton getNewButton() { return newButton; } /** * @return The menu used to create a new document. */ public MMenuItem getNewMenu() { return newMenu; } } abstract class Interaction2NewInteractor extends InteractorImpl { protected Interaction2NewInteractor(final FileLoaderSaver ins, final Class interaction) throws InstantiationException, IllegalAccessException { super(ins, false, NewDrawing.class, interaction); } @Override public void initAction() { action.setPrefSetter(instrument.prefSetter); action.setUi(instrument.ui); action.setOpenSaveManager(SVGDocumentGenerator.INSTANCE); action.setFileChooser(instrument.getDialog(false)); action.setCurrentFolder(instrument.currentFolder); } } class Button2NewInteractor extends Interaction2NewInteractor { protected Button2NewInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, ButtonPressed.class); } @Override public boolean isConditionRespected() { return getInteraction().getButton()==instrument.newButton; } } class Menu2NewInteractor extends Interaction2NewInteractor { protected Menu2NewInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, MenuItemPressed.class); } @Override public boolean isConditionRespected() { return interaction.getMenuItem()==instrument.newMenu; } } class Shortcut2NewInteractor extends Interaction2NewInteractor { protected Shortcut2NewInteractor(final FileLoaderSaver ins) throws InstantiationException, IllegalAccessException { super(ins, KeysPressure.class); } @Override public boolean isConditionRespected() { final List keys = getInteraction().getKeys(); return keys.size()==2 && keys.contains(KeyEvent.VK_N) && keys.contains(LSystem.INSTANCE.getControlKey()); } } /** * This link maps a keyboard shortcut to an action that saves the preferences. */ class Shortcut2SavePrefInteractor extends Interaction2SaveInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Shortcut2SavePrefInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, KeysPressure.class); } @Override public void initAction() { super.initAction(); action.setSaveAs(true); action.setFileChooser(instrument.getDialog(true)); action.setCurrentFolder(instrument.currentFolder); action.setSaveOnClose(true); } @Override public boolean isConditionRespected() { final List keys = getInteraction().getKeys(); return keys.size()==2 && keys.contains(KeyEvent.VK_W) && keys.contains(LSystem.INSTANCE.getControlKey()); } } /** * This link maps the close button of the main frame to an action that saves the drawing. */ class ButtonClose2SaveInteractor extends Interaction2SaveInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected ButtonClose2SaveInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, WindowClosed.class); } @Override public void initAction() { super.initAction(); action.setFileChooser(instrument.getDialog(true)); action.setCurrentFolder(instrument.currentFolder); action.setSaveAs(true); action.setSaveOnClose(true); } @Override public boolean isConditionRespected() { return getInteraction().getFrame()==getInstrument().ui; } } /** * This link maps a menu item to a save action. */ class Menu2SaveAsInteractor extends Interaction2SaveInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Menu2SaveAsInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, MenuItemPressed.class); } @Override public void initAction() { super.initAction(); action.setFileChooser(instrument.getDialog(true)); action.setCurrentFolder(instrument.currentFolder); action.setSaveAs(true); action.setSaveOnClose(false); action.setFile(null); } @Override public boolean isConditionRespected() { return interaction.getMenuItem()==instrument.saveAsMenu; } } /** * This link maps a keyboard shortcut to a save action. */ class Shortcut2SaveInteractor extends Interaction2SaveInteractor { /** * Creates the link. */ protected Shortcut2SaveInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, KeysPressure.class); } @Override public boolean isConditionRespected() { final List keys = getInteraction().getKeys(); return keys.size()==2 && keys.contains(KeyEvent.VK_S) && keys.contains(LSystem.INSTANCE.getControlKey()); } @Override public void initAction() { super.initAction(); action.setSaveAs(false); action.setSaveOnClose(false); } } /** * This link maps a menu item to a save action. */ class Menu2SaveInteractor extends Interaction2SaveInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Menu2SaveInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, MenuItemPressed.class); } @Override public void initAction() { super.initAction(); action.setSaveOnClose(false); action.setSaveAs(false); } @Override public boolean isConditionRespected() { return interaction.getMenuItem()==instrument.saveMenu; } } /** * This link maps a button to a save action. */ class Button2SaveInteractor extends Interaction2SaveInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Button2SaveInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, ButtonPressed.class); } @Override public void initAction() { super.initAction(); action.setSaveOnClose(false); action.setSaveAs(false); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.saveButton; } } abstract class Interaction2IOInteractor
    , I extends Interaction> extends InteractorImpl { protected Interaction2IOInteractor(final FileLoaderSaver fileLoader, final Class action, final Class interaction) throws InstantiationException, IllegalAccessException { super(fileLoader, false, action, interaction); } @Override public void initAction() { action.setStatusWidget(instrument.statusBar); action.setProgressBar(instrument.progressBar); action.setUi(instrument.ui); action.setOpenSaveManager(SVGDocumentGenerator.INSTANCE); } } /** * This abstract link maps an interaction to a save action. */ abstract class Interaction2SaveInteractor extends Interaction2IOInteractor { protected Interaction2SaveInteractor(final FileLoaderSaver fileLoader, final Class interaction) throws InstantiationException, IllegalAccessException { super(fileLoader, SaveDrawing.class, interaction); } @Override public void initAction() { super.initAction(); action.setPrefSetter(instrument.prefSetter); action.setFileChooser(instrument.getDialog(true)); action.setFile(instrument.currentFile); action.setCurrentFolder(instrument.currentFolder); } } /** * This abstract link maps an interaction to a load action. */ abstract class Interaction2LoadInteractor extends Interaction2IOInteractor { protected Interaction2LoadInteractor(final FileLoaderSaver fileLoader, final Class interaction) throws InstantiationException, IllegalAccessException { super(fileLoader, LoadDrawing.class, interaction); } @Override public void initAction() { super.initAction(); action.setFileChooser(instrument.getDialog(false)); action.setCurrentFolder(instrument.currentFolder); } } /** The link maps recent menu items to an action that loads documents. */ class RecentMenuItem2LoadInteractor extends Interaction2LoadInteractor { protected RecentMenuItem2LoadInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, MenuItemPressed.class); } @Override public void initAction() { super.initAction(); action.setFile(new File(interaction.getMenuItem().getToolTipText())); } @Override public boolean isConditionRespected() { return instrument.recentFilesMenu.contains(interaction.getMenuItem()); } } /** * This link maps a keyboard shortcut to a load action. */ class Shortcut2LoadInteractor extends Interaction2LoadInteractor { /** * Creates the link. */ protected Shortcut2LoadInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, KeysPressure.class); } @Override public boolean isConditionRespected() { final List keys = getInteraction().getKeys(); return keys.size()==2 && keys.contains(KeyEvent.VK_O) && keys.contains(KeyEvent.VK_CONTROL); } } /** * This link maps a button to a load action. */ class Button2LoadInteractor extends Interaction2LoadInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Button2LoadInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, ButtonPressed.class); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.loadButton; } } /** * This link maps a menu item to a load action. */ class Menu2LoadInteractor extends Interaction2LoadInteractor { /** * The constructor by default. * @param fileLoader The file loader/saver; * @since 3.0 */ protected Menu2LoadInteractor(final FileLoaderSaver fileLoader) throws InstantiationException, IllegalAccessException { super(fileLoader, MenuItemPressed.class); } @Override public boolean isConditionRespected() { return interaction.getMenuItem()==instrument.loadMenu; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/Hand.scala000066400000000000000000000302051321075051700330070ustar00rootroot00000000000000/* * This file is part of LaTeXDraw * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.instruments import java.awt.Cursor import java.awt.event.{KeyEvent, MouseEvent} import java.awt.geom.Rectangle2D import java.util.ArrayList import net.sf.latexdraw.actions.shape._ import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.ShapeFactory._ import net.sf.latexdraw.glib.models.interfaces.shape.{IPlot, IPoint, IShape, IText} import net.sf.latexdraw.glib.ui.{ICanvas, LCanvas} import net.sf.latexdraw.glib.views.Java2D.interfaces.{IViewPlot, IViewShape, IViewText} import org.malai.action.Action import org.malai.instrument.{Instrument, InteractorImpl} import org.malai.interaction.Interaction import org.malai.mapping.MappingRegistry import org.malai.swing.action.library.{ActivateInactivateInstruments, MoveCamera} import org.malai.swing.interaction.library.{DoubleClick, _} import scala.collection.JavaConversions.asScalaBuffer import scala.collection.mutable.Buffer /** * This instrument allows to manipulate (e.g. move or select) shapes. * @author Arnaud BLOUIN */ class Hand(canvas : ICanvas, val textSetter : TextSetter) extends CanvasInstrument(canvas) { var _metaCustomiser : MetaShapeCustomiser = _ override protected def initialiseInteractors() { try{ addInteractor(new Press2Select(this)) addInteractor(new DnD2Select(this)) addInteractor(new DnD2Translate(this)) addInteractor(new DnD2MoveViewport(canvas, this)) addInteractor(new DoubleClick2InitTextSetter(this)) addInteractor(new F2ToInitTextSetter(this)) addInteractor(new CtrlA2SelectAllShapes(this)) addInteractor(new CtrlU2UpdateShapes(this)) addInteractor(new Press2SetText(this)) addInteractor(new Press2DeactivateTextSetter(this)) }catch{case ex: Throwable => BadaboomCollector.INSTANCE.add(ex)} } override def setActivated(activated : Boolean) { if(this.activated!=activated) super.setActivated(activated) } override def interimFeedback() { // The rectangle used for the interim feedback of the selection is removed. canvas.setTempUserSelectionBorder(null) canvas.setCursor(Cursor.getDefaultCursor) } def setMetaCustomiser(metaCustomiser:MetaShapeCustomiser) { _metaCustomiser = metaCustomiser } override def onActionDone(action:Action) { action match { case _:TranslateShapes => _metaCustomiser.dimPosCustomiser.update() case _:ActivateInactivateInstruments => canvas.requestFocus() case _ => } } } private sealed class Press2SetText(ins:Hand) extends InteractorImpl[ModifyShapeProperty, Press, Hand](ins, false, classOf[ModifyShapeProperty], classOf[Press]) { override def initAction { action.setGroup(ShapeFactory.createGroup(instrument.textSetter.text)) action.setProperty(ShapeProperties.TEXT) action.setValue(instrument.textSetter.textField.getText()) } override def isConditionRespected = instrument.textSetter.isActivated && !instrument.textSetter.getTextField.getText.isEmpty } private sealed class Press2DeactivateTextSetter(ins:Hand) extends InteractorImpl[ActivateInactivateInstruments, Press, Hand](ins, false, classOf[ActivateInactivateInstruments], classOf[Press]) { def initAction { action.addInstrumentToInactivate(instrument.textSetter) } def isConditionRespected: Boolean = { return instrument.textSetter.textField.isValidText && !instrument.textSetter.textField.getText.isEmpty } } private sealed class CtrlU2UpdateShapes(ins:Hand) extends InteractorImpl[UpdateToGrid, KeysPressure, Hand](ins, false, classOf[UpdateToGrid], classOf[KeysPressure]) { override def initAction() { action.setShape(instrument.canvas.getDrawing.getSelection.duplicateDeep(false)) action.setGrid(instrument.canvas.getMagneticGrid) } override def isConditionRespected = instrument.canvas.getMagneticGrid.isMagnetic && interaction.getKeys.size==2 && interaction.getKeys.contains(KeyEvent.VK_U) && interaction.getKeys.contains(KeyEvent.VK_CONTROL) } private sealed class CtrlA2SelectAllShapes(ins:Hand) extends InteractorImpl[SelectShapes, KeysPressure, Hand](ins, false, classOf[SelectShapes], classOf[KeysPressure]) { override def initAction() { instrument.canvas.getDrawing.getShapes.foreach{sh => action.addShape(sh)} action.setDrawing(instrument.canvas.getDrawing) } override def isConditionRespected = interaction.getKeys.size==2 && interaction.getKeys.contains(KeyEvent.VK_A) && interaction.getKeys.contains(KeyEvent.VK_CONTROL) } private abstract sealed class Interaction2InitTextSetter[I <: Interaction](ins:Hand, clazz:Class[I]) extends InteractorImpl[InitTextSetter, I, Hand](ins, false, classOf[InitTextSetter], clazz) { protected def setAction(sh:Object) { var pos:Option[IPoint] = None sh match { case plot:IPlot => action.setPlotShape(plot) pos = Some(plot.getPosition) case txt:IText => action.setTextShape(txt) pos = Some(txt.getPosition) case _ => } pos match { case Some(position) => val screen = instrument.canvas.asInstanceOf[LCanvas].getVisibleRect val zoom = instrument.canvas.getZoom val x = instrument.canvas.getOrigin.getX - screen.getX + position.getX * zoom val y = instrument.canvas.getOrigin.getY - screen.getY + position.getY * zoom action.setInstrument(instrument.textSetter) action.setTextSetter(instrument.textSetter) action.setAbsolutePoint(ShapeFactory.createPoint(x, y)) action.setRelativePoint(ShapeFactory.createPoint(position)) case None => } } } private sealed class F2ToInitTextSetter(ins:Hand) extends Interaction2InitTextSetter[KeysPressure](ins, classOf[KeysPressure]) { override def initAction() { setAction(instrument.canvas.getDrawing.getSelection.getShapeAt(0)) } override def isConditionRespected:Boolean = interaction.getKeys.size()==1 && interaction.getKeys.get(0)==KeyEvent.VK_F2 && instrument.canvas.getDrawing.getSelection.size()==1 && (instrument.canvas.getDrawing.getSelection.getShapeAt(0).isInstanceOf[IText] || instrument.canvas.getDrawing.getSelection.getShapeAt(0).isInstanceOf[IPlot]) } private sealed class DoubleClick2InitTextSetter(ins : Hand) extends Interaction2InitTextSetter[DoubleClick](ins, classOf[DoubleClick]) { override def initAction() { interaction.getTarget match { case shape: IViewShape => setAction(shape.getShape) case _ => } } override def isConditionRespected = interaction.getTarget.isInstanceOf[IViewText] || interaction.getTarget.isInstanceOf[IViewPlot] } /** * This link allows to translate the selected shapes. */ private sealed class DnD2Translate(hand : Hand) extends InteractorImpl[TranslateShapes, DnD, Hand](hand, true, classOf[TranslateShapes], classOf[DnD]) { override def initAction() { action.setDrawing(instrument.canvas.getDrawing) action.setShape(instrument.canvas.getDrawing.getSelection.duplicateDeep(false)) } override def updateAction() { val startPt = instrument.getAdaptedGridPoint(interaction.getStartPt) val endPt = instrument.getAdaptedGridPoint(interaction.getEndPt) action.setTx(endPt.getX - startPt.getX) action.setTy(endPt.getY - startPt.getY) } override def isConditionRespected: Boolean = { val startObject = interaction.getStartObject val button = interaction.getButton return !instrument.canvas.getDrawing.getSelection.isEmpty && (startObject==instrument.canvas && button==MouseEvent.BUTTON3 || startObject.isInstanceOf[IViewShape] && (button==MouseEvent.BUTTON1 || button==MouseEvent.BUTTON3)) } override def interimFeedback() { super.interimFeedback() instrument.canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)) } } private sealed class Press2Select(ins : Hand) extends InteractorImpl[SelectShapes, PressWithKeys, Hand](ins, false, classOf[SelectShapes], classOf[PressWithKeys]) { override def initAction() { action.setDrawing(instrument.canvas.getDrawing) } override def updateAction() { val target = interaction.getTarget if(target.isInstanceOf[IViewShape]) { val keys = interaction.getKeys val selection = instrument.canvas.getDrawing.getSelection.getShapes val targetSh = MappingRegistry.REGISTRY.getSourceFromTarget(target, classOf[IShape]) if(keys.contains(KeyEvent.VK_SHIFT)) selection.filter{sh => sh!=targetSh}.foreach{sh => action.addShape(sh)} else if(keys.contains(KeyEvent.VK_CONTROL)) { selection.foreach{sh => action.addShape(sh)} action.addShape(targetSh) } else action.setShape(targetSh) } } override def isConditionRespected: Boolean = interaction.getTarget.isInstanceOf[IViewShape] && !instrument.canvas.getDrawing.getSelection.contains(MappingRegistry.REGISTRY.getSourceFromTarget(interaction.getTarget.asInstanceOf[IViewShape], classOf[IShape])) } /** * This link allows to select several shapes. */ private sealed class DnD2Select(hand : Hand) extends InteractorImpl[SelectShapes, DnDWithKeys, Hand](hand, true, classOf[SelectShapes], classOf[DnDWithKeys]) { /** The is rectangle is used as interim feedback to show the rectangle made by the user to select some shapes. */ val selectionBorder : Rectangle2D = new Rectangle2D.Double() var selectedShapes : Buffer[IShape] = _ var selectedViews : Buffer[IViewShape] = _ override def initAction() { action.setDrawing(instrument.canvas.getDrawing) selectedShapes = new ArrayList(instrument.canvas.getDrawing.getSelection.getShapes) selectedViews = instrument.canvas.getBorderInstrument.selection.clone } override def updateAction() { val start = instrument.getAdaptedOriginPoint(interaction.getPoint) val end = instrument.getAdaptedOriginPoint(interaction.getEndPt) val minX = math.min(start.getX, end.getX) val maxX = math.max(start.getX, end.getX) val minY = math.min(start.getY, end.getY) val maxY = math.max(start.getY, end.getY) val zoom = instrument.canvas.getZoom val keys = interaction.getKeys // Updating the rectangle used for the interim feedback and for the selection of shapes. selectionBorder.setFrame(minX, minY, Math.max(maxX-minX, 1), Math.max(maxY-minY, 1)) // Cleaning the selected shapes in the action. action.setShape(null) if(keys.contains(KeyEvent.VK_SHIFT)) selectedViews.filter{view => !view.intersects(selectionBorder)}.foreach{ view => action.addShape(MappingRegistry.REGISTRY.getSourceFromTarget(view, classOf[IShape]))} else { if(keys.contains(KeyEvent.VK_CONTROL)) selectedShapes.foreach{sh => action.addShape(sh)} if(!selectionBorder.isEmpty) instrument.canvas.getViews.foreach{view => if(view.intersects(selectionBorder)) // Taking the shape in function of the view. action.addShape(MappingRegistry.REGISTRY.getSourceFromTarget(view, classOf[IShape])) } } } override def isConditionRespected = interaction.getStartObject==instrument.canvas && interaction.getButton==MouseEvent.BUTTON1 override def interimFeedback() { instrument.canvas.setTempUserSelectionBorder(selectionBorder) instrument.canvas.refresh } } /** * Moves the viewport using the hand. */ class DnD2MoveViewport(canvas:ICanvas, ins:Instrument) extends InteractorImpl[MoveCamera, DnD, Instrument](ins, true, classOf[MoveCamera], classOf[DnD]) { override def initAction() { action.setScrollPane(canvas.getScrollpane) } override def updateAction() { val startPt = interaction.getStartPt val endPt = interaction.getEndPt val pane = canvas.getScrollpane action.setPx(pane.getHorizontalScrollBar.getValue+pane.getHorizontalScrollBar.getWidth/2+(startPt.getX - endPt.getX).toInt) action.setPy(pane.getVerticalScrollBar.getValue+pane.getVerticalScrollBar.getHeight/2+(startPt.getY - endPt.getY).toInt) } override def isConditionRespected = interaction.getButton==MouseEvent.BUTTON2 override def interimFeedback() { super.interimFeedback canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)) } }latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/Helper.java000066400000000000000000000145471321075051700332250ustar00rootroot00000000000000package net.sf.latexdraw.instruments; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.dialog.AboutDialogueBox; import net.sf.latexdraw.ui.dialog.ShortcutsFrame; import net.sf.latexdraw.util.LResources; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.instrument.library.MenuItem2OpenWebPageInteractor; import org.malai.swing.instrument.library.MenuItem2ShowComponentInteractor; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MMenuItem; import java.awt.*; import java.net.URI; import java.net.URISyntaxException; /** * This instrument manages help features.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/20/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class Helper extends WidgetInstrument { /** This menu item shows the shortcut panel. */ protected MMenuItem shortcutItem; /** This menu item shows the "About latexdraw" panel. */ protected MMenuItem aboutItem; /** This menu opens the web page used to report bugs. */ protected MMenuItem reportBugItem; /** This menu opens the web page used to donate to the latexdraw project. */ protected MMenuItem donateItem; /** This menu opens the latexdraw forum. */ protected MMenuItem forumItem; /** The dialogue box that gives information on latexdraw. */ protected AboutDialogueBox aboutFrame; /** The shortcut dialogue box. */ protected ShortcutsFrame shortcutFrame; protected MMenuItem manuelItem; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @since 3.0 */ public Helper(final SwingUIComposer composer) { super(composer); initialiseWidgets(); } @Override protected void initialiseWidgets() { shortcutFrame = null; aboutFrame = null; aboutItem = new MMenuItem(LResources.LABEL_ABOUT); aboutItem.setIcon(LResources.ABOUT_ICON); donateItem = new MMenuItem(LangTool.INSTANCE.getStringActions("Helper.1")); //$NON-NLS-1$ donateItem.setIcon(LResources.ABOUT_ICON); reportBugItem = new MMenuItem(LangTool.INSTANCE.getStringActions("Helper.2")); //$NON-NLS-1$ reportBugItem.setIcon(LResources.ERR_ICON); forumItem = new MMenuItem(LangTool.INSTANCE.getStringActions("Helper.3")); //$NON-NLS-1$ forumItem.setIcon(LResources.ABOUT_ICON); shortcutItem = new MMenuItem(LangTool.INSTANCE.getString19("LaTeXDrawFrame.3")); //$NON-NLS-1$ shortcutItem.setIcon(LResources.ABOUT_ICON); manuelItem = new MMenuItem(LangTool.INSTANCE.getStringActions("Helper.4")); //$NON-NLS-1$ manuelItem.setIcon(LResources.ABOUT_ICON); } @Override protected void initialiseInteractors() { try{ addInteractor(new MenuItem2AboutFrame(this, aboutFrame, aboutItem)); addInteractor(new MenuItem2ShortcutFrame(this, aboutFrame, shortcutItem)); addInteractor(new MenuItem2OpenWebPageInteractor(this, reportBugItem, new URI("https://github.com/arnobl/latexdraw/wiki/Manual#how-to-report-a-bug"))); //$NON-NLS-1$ addInteractor(new MenuItem2OpenWebPageInteractor(this, forumItem, new URI("https://sourceforge.net/p/latexdraw/discussion/"))); //$NON-NLS-1$ addInteractor(new MenuItem2OpenWebPageInteractor(this, donateItem, new URI("http://sourceforge.net/project/project_donations.php?group_id=156523"))); //$NON-NLS-1$ addInteractor(new MenuItem2OpenWebPageInteractor(this, manuelItem, new URI("https://github.com/arnobl/latexdraw/wiki/Manual"))); //$NON-NLS-1$ }catch(InstantiationException | IllegalAccessException | URISyntaxException e){ BadaboomCollector.INSTANCE.add(e); } } /** @return The menu item that shows the shortcut panel. */ public MMenuItem getShortcutItem() { return shortcutItem; } /** @return The menu item that shows the "About latexdraw" panel. */ public MMenuItem getAboutItem() { return aboutItem; } /** @return The menu that opens the web page used to report bugs. */ public MMenuItem getReportBugItem() { return reportBugItem; } /** @return The menu that opens the web page used to donate to the latexdraw project. */ public MMenuItem getDonateItem() { return donateItem; } /** @return the menu that opens the latexdraw forum. */ public MMenuItem getForumItem() { return forumItem; } /** @return Open the latexdraw manual. */ public MMenuItem getManuelItem() { return manuelItem; } /** @return The created latexdraw dialogue box. */ protected AboutDialogueBox initialiseAboutFrame() { if(aboutFrame==null) aboutFrame = new AboutDialogueBox(); return aboutFrame; } /** @return The created shortcut dialogue box. */ protected ShortcutsFrame initialiseShortcutsFrame() { if(shortcutFrame==null) shortcutFrame = new ShortcutsFrame(); return shortcutFrame; } } /** The link between a menu item and the action that shows the latexdraw dialogue box. */ class MenuItem2AboutFrame extends MenuItem2ShowComponentInteractor { protected MenuItem2AboutFrame(final Helper ins, final Component component, final MMenuItem menuItem) throws InstantiationException, IllegalAccessException { super(ins, component, menuItem); } @Override public void initAction() { if(component==null) component = instrument.initialiseAboutFrame(); super.initAction(); } } /** The link between a menu item and the action that shows the shortcut box. */ class MenuItem2ShortcutFrame extends MenuItem2ShowComponentInteractor { /** * Creates the link. * @param ins The instrument that contains the link. * @param component The component to show/hide. * @param menuItem The menu item used to show/hide to component. * @since 3.0 */ protected MenuItem2ShortcutFrame(final Helper ins, final Component component, final MMenuItem menuItem) throws InstantiationException, IllegalAccessException { super(ins, component, menuItem); } @Override public void initAction() { if(component==null) component = instrument.initialiseShortcutsFrame(); super.initAction(); } } KeyTypedWithTimer.java000066400000000000000000000035571321075051700353210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import org.malai.interaction.IntermediaryState; import org.malai.interaction.TerminalState; import org.malai.interaction.TimeoutTransition; import org.malai.swing.interaction.KeyReleaseTransition; import org.malai.swing.interaction.library.KeyInteraction; /** * A KeyTyped interaction occurs when a key of a keyboard is pressed and then released.
    *
    * This file is part of Malai.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * Malai is free software; you can redistribute it and/or modify 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. *
    * Malai is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/01/2011
    * @author Arnaud BLOUIN * @since 0.2 */ public class KeyTypedWithTimer extends KeyInteraction { /** * Creates the interaction. * @since 0.2 */ public KeyTypedWithTimer() { super(); initStateMachine(); } @SuppressWarnings("unused") @Override protected void initStateMachine() { final TerminalState timeout = new TerminalState("timer"); //$NON-NLS-1$ final IntermediaryState key = new IntermediaryState("released"); //$NON-NLS-1$ addState(timeout); addState(key); new KeyInteractionKeyPressedTransition(initState, key); new KeyReleaseTransition(key, key) { @Override public boolean isGuardRespected() { return KeyTypedWithTimer.this.getLastHIDUsed()==this.hid; } }; new KeyInteractionKeyPressedTransition(key, key) { @Override public boolean isGuardRespected() { return KeyTypedWithTimer.this.getLastHIDUsed()==this.hid; } }; new TimeoutTransition(key, timeout, 200); } } MagneticGridCustomiser.java000066400000000000000000000167521321075051700363420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.util.Objects; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyMagneticGrid; import net.sf.latexdraw.actions.ModifyMagneticGrid.GridProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.ui.LMagneticGrid; import net.sf.latexdraw.glib.ui.LMagneticGrid.GridStyle; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.CheckBoxModified; import org.malai.swing.interaction.library.ListSelectionModified; import org.malai.swing.interaction.library.SpinnerModified; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; import org.malai.undo.Undoable; /** * This instrument customises the magnetic grid.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/14/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class MagneticGridCustomiser extends WidgetInstrument { /** The grid to customise. */ protected LMagneticGrid grid; /** Contains the different possible kind of grids. */ protected MComboBox styleList; /** Sets if the grid is magnetic. */ protected MCheckBox magneticCB; /** Defines the spacing of the personal grid. */ protected MSpinner gridSpacing; /** * Initialises the instrument. * @param composer The composer that manages the widgets of the instrument. * @param grid The grid to customise. * @throws IllegalArgumentException If the given grid is null. * @since 3.0 */ public MagneticGridCustomiser(final SwingUIComposer composer, final LMagneticGrid grid) { super(composer); this.grid = Objects.requireNonNull(grid); initialiseWidgets(); } @Override protected void initialiseWidgets() { styleList = createStyleList(); gridSpacing = new MSpinner(new MSpinner.MSpinnerNumberModel(10, 2, 100000, 1), new JLabel(LResources.GRID_GAP_ICON)); gridSpacing.setEditor(new JSpinner.NumberEditor(gridSpacing, "0"));//$NON-NLS-1$ gridSpacing.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.15")); //$NON-NLS-1$ magneticCB = new MCheckBox(LangTool.INSTANCE.getString18("LaTeXDrawFrame.13")); //$NON-NLS-1$ magneticCB.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.14")); //$NON-NLS-1$ } /** * @return The list widget that contains the different style of the magnetic grid. * @since 3.0 */ public static MComboBox createStyleList() { final MComboBox list = new MComboBox<>(); list.addItem(GridStyle.STANDARD.getLabel()); list.addItem(GridStyle.CUSTOMISED.getLabel()); list.addItem(GridStyle.NONE.getLabel()); return list; } @Override public void onUndoableUndo(final Undoable undoable) { super.onUndoableUndo(undoable); update(); } @Override public void onUndoableRedo(final Undoable undoable) { super.onUndoableRedo(undoable); update(); } @Override public void interimFeedback() { super.interimFeedback(); update(); } protected void update() { final GridStyle style = grid.getStyle(); final boolean visible = style!=GridStyle.NONE; composer.setWidgetVisible(gridSpacing, visible && style==GridStyle.CUSTOMISED); composer.setWidgetVisible(magneticCB, visible); styleList.setSelectedItemSafely(style.getLabel()); if(visible) { if(style==GridStyle.CUSTOMISED) gridSpacing.setValueSafely(grid.getGridSpacing()); magneticCB.setSelected(grid.isMagnetic()); } } @Override protected void initialiseInteractors() { try{ addInteractor(new List2ChangeStyle(this)); addInteractor(new Spinner2GridSpacing(this)); addInteractor(new CheckBox2MagneticGrid(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } @Override public void setActivated(final boolean activated) { super.setActivated(activated); composer.setWidgetVisible(gridSpacing, activated); composer.setWidgetVisible(magneticCB, activated); composer.setWidgetVisible(styleList, activated); } /** * @return The list that contains the different possible kind of grids. * @since 3.0 */ public MComboBox getStyleList() { return styleList; } /** * @return The check box that sets if the grid is magnetic. * @since 3.0 */ public MCheckBox getMagneticCB() { return magneticCB; } /** * @return The spinner that defines the spacing of the personal grid. * @since 3.0 */ public MSpinner getGridSpacing() { return gridSpacing; } } /** * Links a check-box widget to an action that sets if the grid is magnetic. */ class CheckBox2MagneticGrid extends InteractorImpl { /** * Initialises the link. * @since 3.0 */ protected CheckBox2MagneticGrid(final MagneticGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyMagneticGrid.class, CheckBoxModified.class); } @Override public void initAction() { action.setProperty(GridProperties.MAGNETIC); action.setGrid(instrument.grid); action.setValue(interaction.getCheckBox().isSelected()); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.magneticCB; } } /** * Links a spinner widget to an action that modifies the spacing of the customised magnetic grid. */ class Spinner2GridSpacing extends InteractorImpl { /** * Initialises the link. * @since 3.0 */ protected Spinner2GridSpacing(final MagneticGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyMagneticGrid.class, SpinnerModified.class); } @Override public void initAction() { action.setProperty(GridProperties.GRID_SPACING); action.setGrid(instrument.grid); } @Override public void updateAction() { action.setValue(Integer.valueOf(interaction.getSpinner().getValue().toString())); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.gridSpacing; } } /** * Links a list widget to an action that modifies the style of the magnetic grid. */ class List2ChangeStyle extends InteractorImpl { /** * Initialises the link. * @since 3.0 */ protected List2ChangeStyle(final MagneticGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyMagneticGrid.class, ListSelectionModified.class); } @Override public void initAction() { action.setValue(GridStyle.getStyleFromLabel(interaction.getList().getSelectedObjects()[0].toString())); action.setGrid(instrument.grid); action.setProperty(GridProperties.STYLE); } @Override public boolean isConditionRespected() { return interaction.getList()==instrument.styleList; } } MetaShapeCustomiser.java000066400000000000000000000261751321075051700356540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import org.malai.interaction.Eventable; import org.malai.swing.ui.SwingUIComposer; /** * This meta-instrument manages the instruments that customises shape properties.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class MetaShapeCustomiser extends ShapePropertyCustomiser { /** This instrument customises the line properties of shapes and the pencil. */ protected ShapeBorderCustomiser borderCustomiser; /** This instrument customises the double line properties of shapes and the pencil. */ protected ShapeDoubleBorderCustomiser doubleBorderCustomiser; /** This instrument customises the shadow properties of shapes and the pencil. */ protected ShapeShadowCustomiser shadowCustomiser; /** This instrument customises the filling properties of shapes and the pencil. */ protected ShapeFillingCustomiser fillingCustomiser; /** This instrument customises the texts. */ protected TextCustomiser textCustomiser; /** This instrument customises the rotation angle. */ protected ShapeRotationCustomiser rotationCustomiser; /** This instrument customises the arrows. */ protected ShapeArrowCustomiser arrowCustomiser; /** This instrument customises the dot parameters. */ protected ShapeDotCustomiser dotCustomiser; /** This instrument customises the arc parameters. */ protected ShapeArcCustomiser arcCustomiser; /** This instrument customises the dimensions and the position. */ protected ShapeCoordDimCustomiser dimPosCustomiser; /** This instrument customises grids and axes. */ protected ShapeStandardGridCustomiser gridCustomiser; /** This instrument groups shapes. */ protected ShapeGrouper shapeGrouper; /** This instrument that customises axes. */ protected ShapeAxesCustomiser shapeAxesCustomiser; /** This instrument that customises grids. */ protected ShapeGridCustomiser shapeGridCustomiser; /** This instrument that customises freehands. */ protected ShapeFreeHandCustomiser shapeFreeHandCustomiser; /** This instrument that transforms shapes. */ protected ShapeTransformer shapeTransformer; /** This instrument that places shapes. */ protected ShapePositioner shapePositioner; protected ShapePlotCustomiser plotCustom; /** * Creates the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @param composer The composer that manages the widgets of the instrument. * @param border The instrument Border * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public MetaShapeCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil, final Border border) { super(composer, hand, pencil); borderCustomiser = new ShapeBorderCustomiser(composer, hand, pencil); doubleBorderCustomiser = new ShapeDoubleBorderCustomiser(composer, hand, pencil); shadowCustomiser = new ShapeShadowCustomiser(composer, hand, pencil); fillingCustomiser = new ShapeFillingCustomiser(composer, hand, pencil); textCustomiser = new TextCustomiser(composer, hand, pencil); rotationCustomiser = new ShapeRotationCustomiser(composer, hand, pencil); arrowCustomiser = new ShapeArrowCustomiser(composer, hand, pencil); dotCustomiser = new ShapeDotCustomiser(composer, hand, pencil); arcCustomiser = new ShapeArcCustomiser(composer, hand, pencil); dimPosCustomiser = new ShapeCoordDimCustomiser(composer, hand, pencil); gridCustomiser = new ShapeStandardGridCustomiser(composer, hand, pencil); shapeGrouper = new ShapeGrouper(composer, hand, pencil); shapeAxesCustomiser = new ShapeAxesCustomiser(composer, hand, pencil); shapeGridCustomiser = new ShapeGridCustomiser(composer, hand, pencil); shapeFreeHandCustomiser = new ShapeFreeHandCustomiser(composer, hand, pencil); shapeTransformer = new ShapeTransformer(composer, hand, pencil, border); shapePositioner = new ShapePositioner(composer, hand, pencil); plotCustom = new ShapePlotCustomiser(composer, hand, pencil); } @Override public void addEventable(final Eventable eventable) { borderCustomiser.addEventable(eventable); doubleBorderCustomiser.addEventable(eventable); shadowCustomiser.addEventable(eventable); fillingCustomiser.addEventable(eventable); textCustomiser.addEventable(eventable); rotationCustomiser.addEventable(eventable); arrowCustomiser.addEventable(eventable); dotCustomiser.addEventable(eventable); arcCustomiser.addEventable(eventable); dimPosCustomiser.addEventable(eventable); gridCustomiser.addEventable(eventable); shapeGrouper.addEventable(eventable); shapeAxesCustomiser.addEventable(eventable); shapeGridCustomiser.addEventable(eventable); shapeFreeHandCustomiser.addEventable(eventable); shapeTransformer.addEventable(eventable); shapePositioner.addEventable(eventable); plotCustom.addEventable(eventable); } @Override public void setActivated(final boolean activated) { super.setActivated(activated); final IGroup selection = pencil.canvas().getDrawing().getSelection(); borderCustomiser.setActivated(activated); doubleBorderCustomiser.setActivated(activated); shadowCustomiser.setActivated(activated); fillingCustomiser.setActivated(activated); textCustomiser.setActivated(activated); rotationCustomiser.setActivated(activated && hand.isActivated()); arrowCustomiser.setActivated(activated); dotCustomiser.setActivated(activated); arcCustomiser.setActivated(activated); gridCustomiser.setActivated(activated); shapeAxesCustomiser.setActivated(activated); shapeGridCustomiser.setActivated(activated); plotCustom.setActivated(activated); shapeFreeHandCustomiser.setActivated(activated); dimPosCustomiser.setActivated(activated && hand.isActivated() && !selection.isEmpty()); shapeGrouper.setActivated(activated && hand.isActivated() && (selection.size()>1 || selection.getShapeAt(0) instanceof IGroup)); shapeTransformer.setActivated(activated && hand.isActivated() && !selection.isEmpty()); shapePositioner.setActivated(activated && hand.isActivated() && !selection.isEmpty()); if(activated) update(); } @Override protected void update(final IGroup shape) { borderCustomiser.update(shape); doubleBorderCustomiser.update(shape); shadowCustomiser.update(shape); fillingCustomiser.update(shape); textCustomiser.update(shape); rotationCustomiser.update(shape); arrowCustomiser.update(shape); dotCustomiser.update(shape); arcCustomiser.update(shape); dimPosCustomiser.update(shape); gridCustomiser.update(shape); shapeGrouper.update(shape); shapeAxesCustomiser.update(shape); shapeGridCustomiser.update(shape); shapeFreeHandCustomiser.update(shape); shapeTransformer.update(shape); shapePositioner.update(shape); plotCustom.update(shape); } @Override public void clearEvents() { borderCustomiser.clearEvents(); doubleBorderCustomiser.clearEvents(); shadowCustomiser.clearEvents(); fillingCustomiser.clearEvents(); textCustomiser.clearEvents(); rotationCustomiser.clearEvents(); arrowCustomiser.clearEvents(); dotCustomiser.clearEvents(); arcCustomiser.clearEvents(); dimPosCustomiser.clearEvents(); gridCustomiser.clearEvents(); shapeGrouper.clearEvents(); shapeAxesCustomiser.clearEvents(); shapeGridCustomiser.clearEvents(); shapeFreeHandCustomiser.clearEvents(); shapeTransformer.clearEvents(); shapePositioner.clearEvents(); plotCustom.clearEvents(); } /** @return The instrument that places shapes. */ public ShapePositioner getShapePositioner() { return shapePositioner; } /** @return The instrument that transforms shapes. */ public ShapeTransformer getShapeTransformer() { return shapeTransformer; } /** * @return The instrument that customises freehands. * @since 3.0 */ public ShapeFreeHandCustomiser getFreeHandCustomiser() { return shapeFreeHandCustomiser; } /** * @return The plot customiser. */ public ShapePlotCustomiser getPlotCustomiser() { return plotCustom; } /** * @return The instrument that customises axes. * @since 3.0 */ public ShapeAxesCustomiser getAxesCustomiser() { return shapeAxesCustomiser; } /** * @return The instrument that customises grids. * @since 3.0 */ public ShapeGridCustomiser getGridCustomiser() { return shapeGridCustomiser; } /** * @return The instrument that customises grids and axes. * @since 3.0 */ public ShapeStandardGridCustomiser getStandardGridCustomiser() { return gridCustomiser; } /** * @return The instrument that customises the line properties of shapes. * @since 3.0 */ public ShapeBorderCustomiser getBorderCustomiser() { return borderCustomiser; } /** * @return The instrument that customises the double line properties of shapes. * @since 3.0 */ public ShapeDoubleBorderCustomiser getDoubleBorderCustomiser() { return doubleBorderCustomiser; } /** * @return The instrument that customises the shadow properties of shapes. * @since 3.0 */ public ShapeShadowCustomiser getShadowCustomiser() { return shadowCustomiser; } /** * @return The instrument that customises the filling properties of shapes. * @since 3.0 */ public ShapeFillingCustomiser getFillingCustomiser() { return fillingCustomiser; } /** * @return The instrument that customises the texts. * @since 3.0 */ public TextCustomiser getTextCustomiser() { return textCustomiser; } /** * @return The instrument that customises the rotation angle. * @since 3.0 */ public ShapeRotationCustomiser getRotationCustomiser() { return rotationCustomiser; } /** * @return The instrument that customises the arrows. * @since 3.0 */ public ShapeArrowCustomiser getArrowCustomiser() { return arrowCustomiser; } /** * @return The instrument that customises the dots. * @since 3.0 */ public ShapeDotCustomiser getDotCustomiser() { return dotCustomiser; } /** * @return This instrument customises the arc parameters. * @since 3.0 */ public ShapeArcCustomiser getArcCustomiser() { return arcCustomiser; } /** * @return This instrument customises the dimensions and the position. * @since 3.0 */ public ShapeCoordDimCustomiser getDimPosCustomiser() { return dimPosCustomiser; } /** * @return the shapeGrouper. * @since 3.0 */ public ShapeGrouper getShapeGrouper() { return shapeGrouper; } @Override protected void initialiseInteractors() { // This instrument does not have any link. } @Override protected void initialiseWidgets() { // This instrument does not have any widget. } @Override protected void setWidgetsVisible(final boolean visible) { // This instrument does not have any widget. } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instruments/Pencil.scala000066400000000000000000000332331321075051700333530ustar00rootroot00000000000000package net.sf.latexdraw.instruments import java.awt.Cursor import java.awt.event.MouseEvent import javax.swing.{JFileChooser, JLabel, SwingUtilities} import net.sf.latexdraw.actions.shape.{AddShape, InitTextSetter, InsertPicture} import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.filters.PictureFilter import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos import net.sf.latexdraw.glib.models.interfaces.shape._ import net.sf.latexdraw.glib.ui.{ICanvas, LCanvas} import net.sf.latexdraw.glib.views.Java2D.interfaces.{IViewShape, View2DTK} import net.sf.latexdraw.util.LNumber import org.malai.instrument.InteractorImpl import org.malai.interaction.Interaction import org.malai.swing.interaction.library.{AbortableDnD, MultiClick, Press} import org.malai.swing.widget.MLayeredPane /** * This instrument allows to draw shapes.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/13/10
    * @author Arnaud BLOUIN * @version 3.0 */ class Pencil(canvas : ICanvas, val textSetter:TextSetter, val layers:MLayeredPane, val statusbar:JLabel) extends CanvasInstrument(canvas) { /** The current editing choice (rectangle, ellipse, etc.) of the instrument. */ var _currentChoice = EditionChoice.RECT /** The file chooser used to select pictures. */ protected lazy val _pictureFileChooser = { val fc = new JFileChooser() fc.setMultiSelectionEnabled(false) fc.setAcceptAllFileFilterUsed(true) fc.setFileFilter(new PictureFilter) fc } protected lazy val _groupParams = { val group = ShapeFactory.createGroup() group.addShape(ShapeFactory.createRectangle()) group.addShape(ShapeFactory.createDot(ShapeFactory.createPoint)) group.addShape(ShapeFactory.createGrid(ShapeFactory.createPoint)) group.addShape(ShapeFactory.createAxes(ShapeFactory.createPoint)) group.addShape(ShapeFactory.createText()) group.addShape(ShapeFactory.createCircleArc()) group.addShape(ShapeFactory.createPolyline()) group.addShape(ShapeFactory.createBezierCurve()) group.addShape(ShapeFactory.createFreeHand()) group.addShape(ShapeFactory.createPlot(ShapeFactory.createPoint, 1, 10, "x", false)) group } override def setActivated(activated:Boolean) { if(this.activated!=activated) { super.setActivated(activated) statusbar.setText(_currentChoice.getExplanations) } } override def interimFeedback() { canvas.setTempView(null) canvas.refresh canvas.setCursor(Cursor.getDefaultCursor) } override protected def initialiseInteractors() { try{ addInteractor(new DnD2MoveViewport(canvas, this)) addInteractor(new Press2AddShape(this)) addInteractor(new Press2AddText(this)) addInteractor(new Press2InsertPicture(this)) addInteractor(new DnD2AddShape(this)) addInteractor(new MultiClic2AddShape(this)) addInteractor(new Press2InitTextSetter(this)) }catch{ case e : Exception => BadaboomCollector.INSTANCE.add(e) } } /** * @return The shape that contains the parameters of the pencil. These parameters * will be used for the creation of new shapes. * @since 3.0 */ def groupParams() = _groupParams /** * @return An instance of a shape configured (thickness, colours, etc.) with the parameters of the pencil. * @since 3.0 */ def createShapeInstance() = setShapeParameters(_currentChoice.createShapeInstance) /** * Configures the given shape with the parameters (e.g. thickness, colours, etc.) of the pencil. * @param shape The shape to configure. * @return The modified shape given as argument. * @since 3.0 */ def setShapeParameters(shape:IShape) = { shape match { case mod: IModifiablePointsShape if !shape.isInstanceOf[IFreehand] => mod.addPoint(ShapeFactory.createPoint) mod.addPoint(ShapeFactory.createPoint) case _ => } shape.copy(groupParams) shape.setModified(true) shape } /** @return The file chooser used to select pictures. */ def pictureFileChooser() = _pictureFileChooser /** @return The current editing choice. */ def currentChoice() = _currentChoice /** * Sets the current editing choice. * @param currentChoice The new editing choice to set. * @since 3.0 */ def setCurrentChoice(currentChoice:EditionChoice) { _currentChoice = currentChoice } } /** * This class defines a generic link for the pencil. * @author Arnaud Blouin * @since 3.0 * @version 3.0 */ private abstract sealed class PencilInteractor[I <: Interaction](pencil:Pencil, exec:Boolean, clazzInteraction:Class[I]) extends InteractorImpl[AddShape, I, Pencil](pencil, false, classOf[AddShape], clazzInteraction) { protected var tmpShape : IViewShape = _ override def initAction() { val sh = instrument.createShapeInstance tmpShape = View2DTK.getFactory.createView(sh) action.setShape(sh) action.setDrawing(instrument.canvas.getDrawing) instrument.canvas.setTempView(tmpShape) } override def interimFeedback() { if(tmpShape!=null) { tmpShape.update instrument.canvas.refresh } } } /** * This link allows to create shapes using a multi-clic interaction. */ private sealed class MultiClic2AddShape(pencil:Pencil) extends PencilInteractor[MultiClick](pencil, false, classOf[MultiClick]) { // To avoid the overlapping with the DnD2AddShape, the starting interaction must be // aborted when the condition is not respected, i.e. when the selected shape type is // not devoted to the multi-clic interaction. override def isInteractionMustBeAborted = !isConditionRespected override def updateAction() { val pts = interaction.getPoints val currPoint = instrument.getAdaptedPoint(interaction.getCurrentPosition) val shape = action.shape.get.asInstanceOf[IModifiablePointsShape] if(shape.getNbPoints==pts.size && !interaction.isLastPointFinalPoint) shape.addPoint(ShapeFactory.createPoint(currPoint.getX, currPoint.getY), pts.size-1) else shape.setPoint(currPoint.getX, currPoint.getY, -1) // Curves need to be balanced. shape match { case shape1: IControlPointShape => shape1.balance case _ => } shape.setModified(true) action.drawing.get.setModified(true) } override def initAction() { super.initAction val shape = action.shape.get shape match { case modShape: IModifiablePointsShape => val pt = instrument.getAdaptedPoint(interaction.getPoints.get(0)) modShape.setPoint(pt, 0) modShape.setPoint(pt.getX + 1, pt.getY + 1, 1) case _ => } } override def isConditionRespected = instrument.currentChoice==EditionChoice.POLYGON || instrument.currentChoice==EditionChoice.LINES || instrument.currentChoice==EditionChoice.BEZIER_CURVE || instrument.currentChoice==EditionChoice.BEZIER_CURVE_CLOSED override def interactionStarts(inter:Interaction) { super.interactionStarts(inter) if(instrument.currentChoice==EditionChoice.POLYGON) interaction.setMinPoints(3) else interaction.setMinPoints(2) } } /** * This link allows to create shapes using a drag-and-drop interaction. */ private sealed class DnD2AddShape(pencil:Pencil) extends PencilInteractor[AbortableDnD](pencil, false, classOf[AbortableDnD]) { override def initAction() { super.initAction action.shape match { case Some(shape) => val pt = instrument.getAdaptedPoint(interaction.getStartPt) // For squares and circles, the centre of the shape is the reference point during the creation. shape match { case sq:ISquaredShape => sq.setPosition(pt.getX-1, pt.getY-1) sq.setWidth(2.0) case fh:IFreehand => fh.addPoint(ShapeFactory.createPoint(pt.getX, pt.getY)) case _ => shape.translate(pt.getX, pt.getY) } case _ => } } override def isConditionRespected = { val ec = instrument.currentChoice interaction.getButton==MouseEvent.BUTTON1 && (ec==EditionChoice.RECT || ec==EditionChoice.ELLIPSE || ec==EditionChoice.SQUARE || ec==EditionChoice.CIRCLE || ec==EditionChoice.RHOMBUS || ec==EditionChoice.TRIANGLE || ec==EditionChoice.CIRCLE_ARC || ec==EditionChoice.FREE_HAND) } override def updateAction() { val shape = action.shape.get // Getting the points depending on the current zoom. val startPt = instrument.getAdaptedPoint(interaction.getStartPt) val endPt = instrument.getAdaptedPoint(interaction.getEndPt) shape match { case sq:ISquaredShape => updateShapeFromCentre(sq, startPt, endPt.getX) shape.setModified(true) action.drawing.get.setModified(true) case fh:IFreehand => val lastPoint = fh.getPtAt(-1) if(!LNumber.equalsDouble(lastPoint.getX, endPt.getX, 0.0001) && !LNumber.equalsDouble(lastPoint.getY, endPt.getY, 0.0001)) fh.addPoint(endPt) case rec:IRectangularShape => updateShapeFromDiag(rec, startPt, endPt) shape.setModified(true) action.drawing.get.setModified(true) case _ => } } /** * @param shape The shape to analyse. * @return The gap that must respect the pencil to not allow shape to disappear when they are too small. * @since 3.0 */ private def getGap(shape:IShape) : Double = { // These lines are necessary to avoid shape to disappear. It appends when the borders position is INTO. In this case, the // minimum radius must be computed using the thickness and the double size. if(shape.isBordersMovable && shape.getBordersPosition==BorderPos.INTO) shape.getThickness + (if(shape.isDbleBorderable && shape.hasDbleBord) shape.getDbleBordSep else 0.0) else 1.0 } private def updateShapeFromCentre(shape:ISquaredShape, startPt:IPoint, endX:Double) { val sx = startPt.getX val radius = Math.max(if(sxgap) if(v1gap) if(v1 shape1.setPosition(instrument.getAdaptedPoint(interaction.getPoint)) shape.setModified(true) case _ => } } override def isConditionRespected = (instrument.currentChoice==EditionChoice.GRID || instrument.currentChoice==EditionChoice.DOT || instrument.currentChoice==EditionChoice.AXES) && interaction.getButton==MouseEvent.BUTTON1 } /** * When a user starts to type a text using the text setter and then he clicks somewhere else * in the canvas, the text typed must be added (if possible to the canvas) before starting typing * a new text. */ private sealed class Press2AddText(pencil:Pencil) extends PencilInteractor[Press](pencil, false, classOf[Press]) { override def initAction() { action.setDrawing(instrument.canvas.getDrawing) action.setShape(ShapeFactory.createText(ShapeFactory.createPoint(instrument.textSetter.relativePoint), instrument.textSetter.getTextField.getText)) } // The action is created only when the user uses the text setter and the text field of the text setter is not empty. override def isConditionRespected = instrument.currentChoice==EditionChoice.TEXT && instrument.textSetter.isActivated && instrument.textSetter.getTextField.getText.length>0 } /** * This link maps a press interaction to activate the instrument * that allows to add and modify some texts. */ private sealed class Press2InitTextSetter(pencil:Pencil) extends InteractorImpl[InitTextSetter, Press, Pencil](pencil, false, classOf[InitTextSetter], classOf[Press]) { override def initAction() { action.setText("") action.setTextShape(null) action.setInstrument(instrument.textSetter) action.setTextSetter(instrument.textSetter) action.setAbsolutePoint(ShapeFactory.createPoint( SwingUtilities.convertPoint(instrument.canvas.asInstanceOf[LCanvas],interaction.getPoint, instrument.layers))) action.setRelativePoint(instrument.getAdaptedPoint(interaction.getPoint)) } override def isConditionRespected = (instrument.currentChoice==EditionChoice.TEXT|| instrument.currentChoice==EditionChoice.PLOT) && interaction.getButton==MouseEvent.BUTTON1 } PreferencesActivator.java000066400000000000000000000107601321075051700360360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Component; import java.awt.event.KeyEvent; import java.util.Objects; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.dialog.PreferencesFrame; import net.sf.latexdraw.util.LResources; import org.malai.action.library.ActivateInstrument; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.instrument.library.MenuItem2ShowComponentInteractor; import org.malai.swing.interaction.library.MenuItemPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MMenuItem; /** * This instrument activates the preferences setter and shows the preferences frame.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/18/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class PreferencesActivator extends WidgetInstrument { /** The frame containing the widgets of the preferences setter. */ protected PreferencesFrame preferenceFrame; /** The menu item used to activate the setter. */ protected MMenuItem showPreferencesMenu; /** The instrument that modifies the preferences. */ protected PreferencesSetter prefSetter; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param prefSetter The instrument that modifies the preferences. * @throws IllegalArgumentException If the given instrument is null. * @since 3.0 */ public PreferencesActivator(final SwingUIComposer composer, final PreferencesSetter prefSetter) { super(composer); this.prefSetter = Objects.requireNonNull(prefSetter); initialiseWidgets(); } @Override protected void initialiseWidgets() { showPreferencesMenu = new MMenuItem(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.56"), KeyEvent.VK_P); //$NON-NLS-1$ showPreferencesMenu.setIcon(LResources.PREFERENCES_ICON); } @Override protected void initialiseInteractors() { try{ addInteractor(new MenuItem2ActivateSetterInteractor(this)); addInteractor(new MenuItem2ShowPreferencesInteractor(this, null, showPreferencesMenu)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * Initialises and returns the preferences frame. * @return The preferences frame. * @since 3.0 */ protected PreferencesFrame initialisePreferencesFrame() { if(preferenceFrame==null) { preferenceFrame = new PreferencesFrame(prefSetter); prefSetter.addEventable(preferenceFrame); } return preferenceFrame; } /** * @return the menu item used to activates the setter. * @since 3.0 */ public MMenuItem getShowPreferencesMenu() { return showPreferencesMenu; } } /** * This links maps a menu item to an action that activates the preferences setter. */ class MenuItem2ActivateSetterInteractor extends InteractorImpl { /** * Creates the link. */ protected MenuItem2ActivateSetterInteractor(final PreferencesActivator ins) throws InstantiationException, IllegalAccessException { super(ins, false, ActivateInstrument.class, MenuItemPressed.class); } @Override public void initAction() { action.setInstrument(instrument.prefSetter); } @Override public boolean isConditionRespected() { return interaction.getMenuItem()==instrument.showPreferencesMenu; } } /** * This link maps a menu item to an action that shows the preferences frame. */ class MenuItem2ShowPreferencesInteractor extends MenuItem2ShowComponentInteractor { /** * Creates the link. */ protected MenuItem2ShowPreferencesInteractor(final PreferencesActivator ins, final Component component, final MMenuItem menuItem) throws InstantiationException, IllegalAccessException { super(ins, component, menuItem); } @Override public void initAction() { if(component==null) component = instrument.initialisePreferencesFrame(); super.initAction(); } } PreferencesSetter.java000066400000000000000000000670351321075051700353570ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.WritePreferences; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.ui.LCanvas; import net.sf.latexdraw.glib.ui.LMagneticGrid.GridStyle; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LFrame; import net.sf.latexdraw.ui.ScaleRuler; import net.sf.latexdraw.ui.ScaleRuler.Unit; import net.sf.latexdraw.util.*; import org.malai.swing.instrument.SwingInstrument; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.WindowClosed; import org.malai.swing.widget.*; import org.w3c.dom.*; import javax.swing.*; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.awt.*; import java.io.File; import java.io.FileOutputStream; import java.util.*; import java.util.List; /** * This instrument modifies the preferences.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/18/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class PreferencesSetter extends SwingInstrument { /** The file chooser of paths selection. */ protected JFileChooser fileChooser; /** This check-box allows to set if antialiasing must be used. */ protected MCheckBox antialiasingCheckBox; protected MCheckBox openGL; /** This check-box allows to set if rendering quality must be used. */ protected MCheckBox renderingCheckBox; /** This check-box allows to set if colour rendering quality must be used. */ protected MCheckBox colorRenderCheckBox; /** This check-box allows to set if the user wants to display the grid. */ protected MCheckBox displayGridCB; /** The widget that defines if the grid is magnetic. */ protected MCheckBox magneticGridCB; /** This check-box allows to set if the user wants to display the X-scale. */ protected MCheckBox displayXScaleCB; /** This check-box allows to set if the user wants to display the Y-scale. */ protected MCheckBox displayYScaleCB; /** Allows the set if the program must check new version on start up. */ protected MCheckBox checkNewVersion; /** This check-box allows to set if alpha-interpolation must be used. */ protected MCheckBox alpaInterCheckBox; /** This textField allows to set the default directories for open/save actions. */ protected MTextField pathOpenField; /** This textField allows to set the default directories for exporting actions. */ protected MTextField pathExportField; /** The text field used to defines the latex packages to use. */ protected MTextArea latexIncludes; /** Allows to set the unit of length by default. */ protected MComboBox unitChoice; /** The list that contains the supported theme. */ protected MComboBox themeList; /** The list that contains the supported languages. */ protected MComboBox langList; /** The widget used to display the standard grid. */ protected MRadioButton classicGridRB; /** The widget used to display a customised grid. */ protected MRadioButton persoGridRB; /** The field used to modifies the gap of the customised grid. */ protected MSpinner persoGridGapField; /** The widget used to defines the number of recent file to keep in memory. */ protected MSpinner nbRecentFilesField; /** The recent files. */ protected List recentFilesName; /** Defines if the main frame is maximised or not. */ protected boolean isFrameMaximized; /** Defines the size of the main frame. */ protected Dimension frameSize; /** Defines the position of the main frame. */ protected IPoint framePosition; /** The main frame. */ protected LFrame frame; /** * Creates the instrument. * @param frame The frame that will be set while setting parameters. * @since 3.0 */ public PreferencesSetter(final LFrame frame) { super(); this.frame = Objects.requireNonNull(frame); framePosition = ShapeFactory.createPoint(); frameSize = new Dimension(); frameSize.height = 3*Toolkit.getDefaultToolkit().getScreenSize().height/2; frameSize.width = 3*Toolkit.getDefaultToolkit().getScreenSize().width/2; recentFilesName = new ArrayList<>(); isFrameMaximized = false; initialiseWidgets(); } /** * Initialises the widgets of the instrument. * @since 3.0 */ protected void initialiseWidgets() { final int height = 40; latexIncludes = new MTextArea(true, false); latexIncludes.setToolTipText(""+ //$NON-NLS-1$ LangTool.INSTANCE.getStringActions("PreferencesSetter.1")+ //$NON-NLS-1$ "
    \\usepackage[frenchb]{babel}
    \\usepackage[utf8]{inputenc}"); //$NON-NLS-1$ checkNewVersion = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.newVers"));//$NON-NLS-1$ if(VersionChecker.WITH_UPDATE) checkNewVersion.setSelected(true); langList = new MComboBox<>(); for(final LangTool.Lang lang : LangTool.Lang.values()) langList.addItem(lang.getName()); langList.setMaximumSize(new Dimension(250, height)); langList.setSelectedItemSafely(LangTool.getCurrentLanguage().getName()); nbRecentFilesField = new MSpinner(new MSpinner.MSpinnerNumberModel(5, 0, 20, 1), new JLabel(LangTool.INSTANCE.getString19("PreferencesFrame.0")));//$NON-NLS-1$ nbRecentFilesField.setEditor(new JSpinner.NumberEditor(nbRecentFilesField, "0"));//$NON-NLS-1$ nbRecentFilesField.setMaximumSize(new Dimension(60, height)); final UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels(); final String[] nameThemes = new String[info.length]; final String lnf = Theme.lookAndFeel(); String nameLnf = null; for(int i=0; i(nameThemes, new JLabel(LangTool.INSTANCE.getString19("PreferencesFrame.1"))); //$NON-NLS-1$ themeList.setMaximumSize(new Dimension(160, height)); if(nameLnf!=null) themeList.setSelectedItem(nameLnf); classicGridRB = new MRadioButton(LangTool.INSTANCE.getString18("PreferencesFrame.4")); //$NON-NLS-1$ classicGridRB.setSelected(false); persoGridRB = new MRadioButton(LangTool.INSTANCE.getString18("PreferencesFrame.5")); //$NON-NLS-1$ persoGridRB.setSelected(true); final ButtonGroup group = new ButtonGroup(); group.add(classicGridRB); group.add(persoGridRB); displayGridCB = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.grid"));//$NON-NLS-1$ displayGridCB.setSelected(true); magneticGridCB = new MCheckBox(LangTool.INSTANCE.getString18("PreferencesFrame.6")); //$NON-NLS-1$ magneticGridCB.setSelected(true); persoGridGapField = new MSpinner(new MSpinner.MSpinnerNumberModel(20, 2, 10000, 1), new JLabel(LangTool.INSTANCE.getString18("PreferencesFrame.7")));//$NON-NLS-1$ persoGridGapField.setEditor(new JSpinner.NumberEditor(persoGridGapField, "0"));//$NON-NLS-1$ persoGridGapField.setMaximumSize(new Dimension(60, height)); displayXScaleCB = new MCheckBox(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.38"));//$NON-NLS-1$ displayXScaleCB.setSelected(true); displayYScaleCB = new MCheckBox(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.39"));//$NON-NLS-1$ displayYScaleCB.setSelected(true); unitChoice = new MComboBox<>(); unitChoice.addItem(Unit.CM.getLabel()); unitChoice.addItem(Unit.INCH.getLabel()); unitChoice.setMaximumSize(new Dimension(160, height)); unitChoice.setSelectedItem(Unit.CM.getLabel()); pathExportField = new MTextField(); pathOpenField = new MTextField(); openGL = new MCheckBox("OpenGL acceleration"); antialiasingCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.antiAl"));//$NON-NLS-1$ renderingCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.rendQ"));//$NON-NLS-1$ colorRenderCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.colRendQ"));//$NON-NLS-1$ alpaInterCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.AlphaQ"));//$NON-NLS-1$ openGL.setSelected(true); antialiasingCheckBox.setSelected(true); renderingCheckBox.setSelected(true); colorRenderCheckBox.setSelected(true); alpaInterCheckBox.setSelected(true); } /** * Adds a recent file. * @param absolutePath The absolute path of the file to add. */ public void addRecentFile(final String absolutePath) { final int i = recentFilesName.indexOf(absolutePath); final int max = (int)Double.parseDouble(nbRecentFilesField.getValue().toString()); if(i!=-1) recentFilesName.remove(i); while(recentFilesName.size()>=max) recentFilesName.remove(max-1); recentFilesName.add(0, absolutePath); } @Override protected void initialiseInteractors() { try{ addInteractor(new CloseFrame2SavePreferences(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The file chooser used to selected folders. * @since 3.0 */ public JFileChooser getFileChooser() { if(fileChooser==null) { fileChooser = new JFileChooser(); fileChooser.setApproveButtonText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.171")); //$NON-NLS-1$ fileChooser.setDialogTitle(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.selectFolder")); //$NON-NLS-1$ fileChooser.setMultiSelectionEnabled(false); } return fileChooser; } public MCheckBox getOpenGLCheckBox() { return openGL; } /** * @return The check-box that allows to set if antialiasing must be used. */ public MCheckBox getAntialiasingCheckBox() { return antialiasingCheckBox; } /** * @return The check-box that allows to set if rendering quality must be used. */ public MCheckBox getRenderingCheckBox() { return renderingCheckBox; } /** * @return The check-box that allows to set if colour rendering quality must be used. */ public MCheckBox getColorRenderCheckBox() { return colorRenderCheckBox; } /** * @return The check-box that allows to set if the user wants to display the grid. */ public MCheckBox getDisplayGridCB() { return displayGridCB; } /** * @return The widget that defines if the grid is magnetic. */ public MCheckBox getMagneticGridCB() { return magneticGridCB; } /** * @return This check-box allows to set if the user wants to display the X-scale. */ public MCheckBox getDisplayXScaleCB() { return displayXScaleCB; } /** * @return This check-box allows to set if the user wants to display the Y-scale. */ public MCheckBox getDisplayYScaleCB() { return displayYScaleCB; } /** * @return The widget used to set if the program must check new version on start up. */ public MCheckBox getCheckNewVersion() { return checkNewVersion; } /** * @return This check-box allows to set if alpha-interpolation must be used. */ public MCheckBox getAlpaInterCheckBox() { return alpaInterCheckBox; } /** * @return This textField allows to set the default directories for open/save actions. */ public MTextField getPathOpenField() { return pathOpenField; } /** * @return This textField allows to set the default directories for exporting actions. */ public MTextField getPathExportField() { return pathExportField; } /** * @return The text field used to defines the latex packages to use. */ public MTextArea getLatexIncludes() { return latexIncludes; } /** * @return Allows to set the unit of length by default. */ public MComboBox getUnitChoice() { return unitChoice; } /** * @return The list that contains the supported theme. */ public MComboBox getThemeList() { return themeList; } /** * @return The list that contains the supported languages. */ public MComboBox getLangList() { return langList; } /** * @return The widget used to display the standard grid. */ public MRadioButton getClassicGridRB() { return classicGridRB; } /** * @return The widget used to display a customised grid. */ public MRadioButton getPersoGridRB() { return persoGridRB; } /** * @return The field used to modifies the gap of the customised grid. */ public MSpinner getPersoGridGapField() { return persoGridGapField; } /** * @return The widget used to defines the number of recent file to keep in memory. */ public MSpinner getNbRecentFilesField() { return nbRecentFilesField; } private void processXMLDataPreference(File xml) { Map prefMap = Preference.readXMLPreferencesFromFile(xml); Node n2; Node node; node = prefMap.get(LNamespace.XML_LATEX_INCLUDES); if(node!=null) latexIncludes.setText(node.getTextContent()); node = prefMap.get(LNamespace.XML_OPENGL); if(node!=null) openGL.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_ALPHA_INTER); if(node!=null) alpaInterCheckBox.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_ANTI_ALIAS); if(node!=null) antialiasingCheckBox.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_CHECK_VERSION); if(node!=null) checkNewVersion.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_CLASSIC_GRID); if(node!=null) { classicGridRB.setSelected(Boolean.parseBoolean(node.getTextContent())); persoGridRB.setSelected(!Boolean.parseBoolean(node.getTextContent())); } node = prefMap.get(LNamespace.XML_COLOR_RENDERING); if(node!=null) colorRenderCheckBox.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_DISPLAY_GRID); if(node!=null) displayGridCB.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_DISPLAY_X); if(node!=null) displayXScaleCB.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_DISPLAY_Y); if(node!=null) displayYScaleCB.setSelected(Boolean.parseBoolean(node.getTextContent())); node = prefMap.get(LNamespace.XML_GRID_GAP); if(node!=null) persoGridGapField.setValueSafely(Integer.valueOf(node.getTextContent())); node = prefMap.get(LNamespace.XML_LAF); if(node!=null) { final String nodeText = node.getTextContent(); final int count = themeList.getItemCount(); int j=0; boolean again = true; while(jdim.getWidth()?0:framePosition.getX())), (int)(rec.getY()+(framePosition.getY()>dim.getHeight()?0:framePosition.getY()))); if(frameSize.width>0 && frameSize.height>0) frame.setSize((int)Math.min(frameSize.width, dim.getWidth()), (int)Math.min(frameSize.height, dim.getHeight())); if(isFrameMaximized || frameSize.width==0 || frameSize.height==0) frame.setExtendedState(Frame.MAXIMIZED_BOTH); // TODO drawBorders, PathtexEditor } /** * Writes the preferences of latexdraw in an XML document. * @since 3.0 */ public void writeXMLPreferences() { try{ try(final FileOutputStream fos = new FileOutputStream(LPath.PATH_PREFERENCES_XML_FILE)) { final Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); final Rectangle rec = frame.getGraphicsConfiguration().getBounds(); final Element root; Element elt; Element elt2; document.setXmlVersion("1.0");//$NON-NLS-1$ document.setXmlStandalone(true); root = document.createElement(LNamespace.XML_ROOT_PREFERENCES); document.appendChild(root); final Attr attr = document.createAttribute(LNamespace.XML_VERSION); attr.setTextContent(VersionChecker.VERSION); root.setAttributeNode(attr); elt = document.createElement(LNamespace.XML_OPENGL); elt.setTextContent(String.valueOf(openGL.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_RENDERING); elt.setTextContent(String.valueOf(renderingCheckBox.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_COLOR_RENDERING); elt.setTextContent(String.valueOf(colorRenderCheckBox.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_ALPHA_INTER); elt.setTextContent(String.valueOf(alpaInterCheckBox.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_ANTI_ALIAS); elt.setTextContent(String.valueOf(antialiasingCheckBox.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_PATH_EXPORT); elt.setTextContent(pathExportField.getText()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_PATH_OPEN); elt.setTextContent(pathOpenField.getText()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_DISPLAY_GRID); elt.setTextContent(String.valueOf(displayGridCB.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_DISPLAY_X); elt.setTextContent(String.valueOf(displayXScaleCB.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_DISPLAY_Y); elt.setTextContent(String.valueOf(displayYScaleCB.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_UNIT); elt.setTextContent(unitChoice.getSelectedItem().toString()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_CHECK_VERSION); elt.setTextContent(String.valueOf(checkNewVersion.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_LANG); elt.setTextContent(langList.getSelectedItem().toString()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_MAGNETIC_GRID); elt.setTextContent(String.valueOf(magneticGridCB.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_CLASSIC_GRID); elt.setTextContent(String.valueOf(classicGridRB.isSelected())); root.appendChild(elt); elt = document.createElement(LNamespace.XML_GRID_GAP); elt.setTextContent(persoGridGapField.getValue().toString()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_LATEX_INCLUDES); elt.setTextContent(latexIncludes.getText()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_RECENT_FILES); elt.setAttribute(LNamespace.XML_NB_RECENT_FILES, nbRecentFilesField.getValue().toString()); root.appendChild(elt); for(final String recentFile : recentFilesName) { elt2 = document.createElement(LNamespace.XML_RECENT_FILE); elt2.setTextContent(recentFile); elt.appendChild(elt2); } elt = document.createElement(LNamespace.XML_LAF); elt.setTextContent(themeList.getSelectedItem().toString()); root.appendChild(elt); elt = document.createElement(LNamespace.XML_MAXIMISED); elt.setTextContent(String.valueOf(frame.getExtendedState()==Frame.MAXIMIZED_BOTH)); root.appendChild(elt); elt = document.createElement(LNamespace.XML_SIZE); root.appendChild(elt); elt2 = document.createElement(LNamespace.XML_WIDTH); elt2.setTextContent(String.valueOf(frame.getWidth())); elt.appendChild(elt2); elt2 = document.createElement(LNamespace.XML_HEIGHT); elt2.setTextContent(String.valueOf(frame.getHeight())); elt.appendChild(elt2); elt = document.createElement(LNamespace.XML_POSITION); root.appendChild(elt); elt2 = document.createElement(LNamespace.XML_POSITION_X); elt2.setTextContent(String.valueOf((int)(frame.getLocation().x-rec.getX()))); elt.appendChild(elt2); elt2 = document.createElement(LNamespace.XML_POSITION_Y); elt2.setTextContent(String.valueOf((int)(frame.getLocation().y-rec.getY()))); elt.appendChild(elt2); final Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$ transformer.transform(new DOMSource(document), new StreamResult(fos)); } }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } } /** * Reads the preferences of latexdraw defined in XML. * @throws IllegalArgumentException If a problem occurs. * @since 3.0 */ public void readXMLPreferences() { final File xml = new File(LPath.PATH_PREFERENCES_XML_FILE); if(xml.canRead()) processXMLDataPreference(xml); applyValues(); } } /** * This link maps a pressure on the close button of the preferences frame to an action saving the preferences. */ class CloseFrame2SavePreferences extends InteractorImpl { /** * Creates the link. */ protected CloseFrame2SavePreferences(final PreferencesSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, WritePreferences.class, WindowClosed.class); } @Override public void initAction() { action.setSetter(getInstrument()); } @Override public boolean isConditionRespected() { return true; } } ScaleRulersCustomiser.java000066400000000000000000000200751321075051700362220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.SetUnit; import net.sf.latexdraw.actions.ShowHideScaleRuler; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.ScaleRuler; import net.sf.latexdraw.ui.ScaleRuler.Unit; import net.sf.latexdraw.ui.XScaleRuler; import net.sf.latexdraw.ui.YScaleRuler; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LPath; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.SwingInstrument; import org.malai.swing.interaction.library.MenuItemPressed; import org.malai.swing.widget.MCheckBoxMenuItem; import org.malai.undo.Undoable; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.swing.*; import java.util.Objects; /** * This instrument activates X and Y scale rulers.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/12/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class ScaleRulersCustomiser extends SwingInstrument { /** The label of the centimetre menu */ public static final String LABEL_CM = LangTool.INSTANCE.getStringOthers("XScale.cm"); //$NON-NLS-1$ /** The label of the inch menu */ public static final String LABEL_INCH = LangTool.INSTANCE.getStringOthers("XScale.inch"); //$NON-NLS-1$ /** The x ruler of the system. */ protected XScaleRuler xRuler; /** The Y ruler of the system. */ protected YScaleRuler yRuler; /** The menu item that (des-)activate the x-scale ruler. */ protected MCheckBoxMenuItem xRulerItem; /** The menu item that (des-)activate the y-scale ruler. */ protected MCheckBoxMenuItem yRulerItem; /** The menu for the centimetre unit. */ protected MCheckBoxMenuItem unitCmItem; /** The menu for the inch unit. */ protected MCheckBoxMenuItem unitInchItem; /** * Creates the instrument. * @param xRuler The x ruler of the system. * @param yRuler The Y ruler of the system. * @throws IllegalArgumentException If one of the given rulers is null. * @since 3.0 */ public ScaleRulersCustomiser(final XScaleRuler xRuler, final YScaleRuler yRuler) { super(); this.xRuler = Objects.requireNonNull(xRuler); this.yRuler = Objects.requireNonNull(yRuler); xRulerItem = new MCheckBoxMenuItem(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.38"), LResources.EMPTY_ICON); //$NON-NLS-1$ yRulerItem = new MCheckBoxMenuItem(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.39"), LResources.EMPTY_ICON); //$NON-NLS-1$ unitCmItem = new MCheckBoxMenuItem(LABEL_CM); unitInchItem = new MCheckBoxMenuItem(LABEL_INCH); // Mapping the instrument to the widgets that produce interactions that concerns its links. addEventable(this.xRuler); addEventable(this.yRuler); } @Override public void setActivated(final boolean activated) { super.setActivated(activated); unitCmItem.setEnabled(activated); unitInchItem.setEnabled(activated); xRulerItem.setEnabled(activated); yRulerItem.setEnabled(activated); } @Override public void interimFeedback() { update(); } @Override public void onUndoableUndo(final Undoable undoable) { super.onUndoableUndo(undoable); update(); } @Override public void onUndoableRedo(final Undoable undoable) { super.onUndoableRedo(undoable); update(); } protected void update() { unitCmItem.setSelected(ScaleRuler.getUnit()==Unit.CM); unitInchItem.setSelected(!unitCmItem.isSelected()); } @Override protected void initialiseInteractors() { try{ addInteractor(new MenuItem2ShowHideCodeScaleRuler(this)); addInteractor(new MenuItem2SetUnit(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } @Override public void load(final boolean generalPreferences, final String nsURI, final Element root) { super.load(generalPreferences, nsURI, root); final String name = root.getNodeName(); if(name.endsWith(LNamespace.XML_DISPLAY_X)) { xRuler.setVisible(Boolean.parseBoolean(root.getTextContent())); xRulerItem.setSelected(xRuler.isVisible()); } else if(name.endsWith(LNamespace.XML_DISPLAY_Y)) { yRuler.setVisible(Boolean.parseBoolean(root.getTextContent())); yRulerItem.setSelected(yRuler.isVisible()); } else if(name.endsWith(LNamespace.XML_UNIT)) { final String unit = root.getTextContent(); final boolean isCm = Unit.CM.toString().equals(unit) || unitCmItem.getText().equals(unit); unitCmItem.setSelected(isCm); unitInchItem.setSelected(!isCm); ScaleRuler.setUnit(isCm ? Unit.CM : Unit.INCH); } } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { super.save(generalPreferences, nsURI, document, root); if(document==null || root==null) return ; Element elt; final String ns = generalPreferences ? "" : LPath.INSTANCE.getNormaliseNamespaceURI(nsURI); //$NON-NLS-1$ elt = document.createElement(ns + LNamespace.XML_DISPLAY_X); elt.setTextContent(String.valueOf(xRuler.isVisible())); root.appendChild(elt); elt = document.createElement(ns + LNamespace.XML_DISPLAY_Y); elt.setTextContent(String.valueOf(yRuler.isVisible())); root.appendChild(elt); elt = document.createElement(ns + LNamespace.XML_UNIT); elt.setTextContent(String.valueOf(unitCmItem.isSelected() ? Unit.CM : Unit.INCH)); root.appendChild(elt); } /** * @return The menu item that (des-)activate the x-scale ruler. * @since 3.0 */ public MCheckBoxMenuItem getxRulerItem() { return xRulerItem; } /** * @return The menu item that (des-)activate the y-scale ruler. * @since 3.0 */ public MCheckBoxMenuItem getyRulerItem() { return yRulerItem; } /** * @return The menu for the centimetre unit. * @since 3.0 */ public MCheckBoxMenuItem getUnitCmItem() { return unitCmItem; } /** * @return The menu for the inch unit. * @since 3.0 */ public MCheckBoxMenuItem getUnitInchItem() { return unitInchItem; } } /** * This link maps a menu item to an action that sets the unit of the rulers. */ class MenuItem2SetUnit extends InteractorImpl { /** * Initialises the link. * @param ins The rulers activator. */ protected MenuItem2SetUnit(final ScaleRulersCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, SetUnit.class, MenuItemPressed.class); } @Override public void initAction() { action.setUnit(interaction.getMenuItem()==instrument.unitCmItem ? Unit.CM : Unit.INCH); } @Override public boolean isConditionRespected() { final JMenuItem item = interaction.getMenuItem(); return item==instrument.unitCmItem || item==instrument.unitInchItem; } } /** * This link maps a menu item to an action that shows/hides scale rulers. */ class MenuItem2ShowHideCodeScaleRuler extends InteractorImpl { /** * Initialises the link. * @param ins The rulers activator. */ protected MenuItem2ShowHideCodeScaleRuler(final ScaleRulersCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ShowHideScaleRuler.class, MenuItemPressed.class); } @Override public void initAction() { final JMenuItem item = interaction.getMenuItem(); action.setRuler(item==instrument.xRulerItem ? instrument.xRuler : instrument.yRuler); action.setVisible(item.isSelected()); } @Override public boolean isConditionRespected() { final JMenuItem item = interaction.getMenuItem(); return item==instrument.xRulerItem || item==instrument.yRulerItem; } } ShapeArcCustomiser.java000066400000000000000000000234511321075051700354650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MToggleButton; import javax.swing.*; /** * This instrument modifies arc parameters.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/21/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeArcCustomiser extends ShapePropertyCustomiser { /** The toggle button that selects the arc style. */ protected MToggleButton arcB; /** The toggle button that selects the wedge style. */ protected MToggleButton wedgeB; /** The toggle button that selects the chord style. */ protected MToggleButton chordB; /** The spinner that sets the start angle. */ protected MSpinner startAngleS; /** The spinner that sets the end angle. */ protected MSpinner endAngleS; /** * Creates the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @param composer The composer that manages the widgets of the instrument. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ShapeArcCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { arcB = new MToggleButton(LResources.ARC_ICON); arcB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.128")); //$NON-NLS-1$ wedgeB = new MToggleButton(LResources.WEDGE_ICON); wedgeB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.130")); //$NON-NLS-1$ chordB = new MToggleButton(LResources.CHORD_ICON); chordB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.131")); //$NON-NLS-1$ startAngleS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., -360., 360., 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersArcFrame.0"))); //$NON-NLS-1$ startAngleS.setEditor(new MSpinner.NumberEditor(startAngleS, "0.0"));//$NON-NLS-1$ endAngleS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., -360., 360., 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersArcFrame.1"))); //$NON-NLS-1$ endAngleS.setEditor(new MSpinner.NumberEditor(endAngleS, "0.0"));//$NON-NLS-1$ } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(arcB, visible); composer.setWidgetVisible(wedgeB, visible); composer.setWidgetVisible(chordB, visible); composer.setWidgetVisible(startAngleS, visible); composer.setWidgetVisible(endAngleS, visible); } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IArcProp.class)) { final ArcStyle type = shape.getArcStyle(); arcB.setSelected(type==ArcStyle.ARC); wedgeB.setSelected(type==ArcStyle.WEDGE); chordB.setSelected(type==ArcStyle.CHORD); startAngleS.setValueSafely(Math.toDegrees(shape.getAngleStart())); endAngleS.setValueSafely(Math.toDegrees(shape.getAngleEnd())); setActivated(true); } else setActivated(false); } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2SelectionEndAngle(this)); addInteractor(new Spinner2SelectionStartAngle(this)); addInteractor(new Spinner2PencilStartAngle(this)); addInteractor(new Spinner2PencilEndAngle(this)); addInteractor(new Button2SelectionArcStyle(this)); addInteractor(new Button2PencilArcStyle(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** @return The toggle button that selects the arc style. */ public MToggleButton getArcB() { return arcB; } /** @return The toggle button that selects the wedge style. */ public MToggleButton getWedgeB() { return wedgeB; } /** @return The toggle button that selects the chord style. */ public MToggleButton getChordB() { return chordB; } /** @return The spinner that sets the start angle. */ public MSpinner getStartAngleS() { return startAngleS; } /** @return The spinner that sets the end angle. */ public MSpinner getEndAngleS() { return endAngleS; } } abstract class Button2ArcStyle extends ButtonPressedForCustomiser { protected Button2ArcStyle(final ShapeArcCustomiser ins, final Class action) throws InstantiationException, IllegalAccessException { super(ins, action); } @Override public void initAction() { final Object button = interaction.getButton(); final ArcStyle style; if(button==instrument.arcB) style = ArcStyle.ARC; else if(button==instrument.chordB) style=ArcStyle.CHORD; else style=ArcStyle.WEDGE; action.setProperty(ShapeProperties.ARC_STYLE); action.setValue(style); } @Override public boolean isConditionRespected() { final Object button = interaction.getButton(); return button==instrument.arcB || button==instrument.chordB || button==instrument.wedgeB; } } class Button2PencilArcStyle extends Button2ArcStyle { protected Button2PencilArcStyle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return super.isConditionRespected() && instrument.pencil.isActivated(); } } class Button2SelectionArcStyle extends Button2ArcStyle { protected Button2SelectionArcStyle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return super.isConditionRespected() && instrument.hand.isActivated(); } } class Spinner2PencilStartAngle extends SpinnerForCustomiser { protected Spinner2PencilStartAngle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.ARC_START_ANGLE); action.setPencil(instrument.pencil); } @Override public void updateAction() { action.setValue(Math.toRadians(Double.valueOf(instrument.startAngleS.getValue().toString()))); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.startAngleS && instrument.pencil.isActivated(); } } class Spinner2SelectionStartAngle extends SpinnerForCustomiser { protected Spinner2SelectionStartAngle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setProperty(ShapeProperties.ARC_START_ANGLE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public void updateAction() { action.setValue(Math.toRadians(Double.valueOf(instrument.startAngleS.getValue().toString()))); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.startAngleS && instrument.hand.isActivated(); } } class Spinner2PencilEndAngle extends SpinnerForCustomiser { protected Spinner2PencilEndAngle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.ARC_END_ANGLE); action.setPencil(instrument.pencil); } @Override public void updateAction() { action.setValue(Math.toRadians(Double.valueOf(instrument.endAngleS.getValue().toString()))); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.endAngleS && instrument.pencil.isActivated(); } } class Spinner2SelectionEndAngle extends SpinnerForCustomiser { protected Spinner2SelectionEndAngle(final ShapeArcCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setProperty(ShapeProperties.ARC_END_ANGLE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public void updateAction() { action.setValue(Math.toRadians(Double.valueOf(instrument.endAngleS.getValue().toString()))); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.endAngleS && instrument.hand.isActivated(); } } ShapeArrowCustomiser.java000066400000000000000000000534051321075051700360540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Dimension; import java.awt.ItemSelectable; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LabelComboBox; import net.sf.latexdraw.ui.LabelListCellRenderer; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; /** * This instrument customises the arrows of shapes or of the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/05/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeArrowCustomiser extends ShapePropertyCustomiser { /** Allows to change the style of the left-end of the shape. */ protected LabelComboBox arrowLeftCB; /** Allows to change the style of the right-end of the shape. */ protected LabelComboBox arrowRightCB; /** The field to set the dot size num parameter of arrows. */ protected MSpinner dotSizeNum; /** The field to set the dot size dim parameter of arrows. */ protected MSpinner dotSizeDim; /** The field to set the bracket num parameter of arrows. */ protected MSpinner bracketNum; /** The field to set the rounded bracket num parameter of arrows. */ protected MSpinner rbracketNum; /** The field to set the t bar size num parameter of arrows. */ protected MSpinner tbarsizeNum; /** The field to set the t bar size dim parameter of arrows. */ protected MSpinner tbarsizeDim; /** The field to set the arrows size dim parameter of arrows. */ protected MSpinner arrowSizeDim; /** The field to set the arrow size num parameter of arrows. */ protected MSpinner arrowSizeNum; /** The field to set the arrow length parameter of arrows. */ protected MSpinner arrowLength; /** The field to set the arrow inset parameter of arrows. */ protected MSpinner arrowInset; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeArrowCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { arrowLeftCB = createLeftArrowStyleList(); arrowLeftCB.setPreferredSize(new Dimension(80,30)); arrowLeftCB.setMaximumSize(new Dimension(80,30)); arrowRightCB = createRightArrowStyleList(); arrowRightCB.setPreferredSize(new Dimension(80,30)); arrowRightCB.setMaximumSize(new Dimension(80,30)); dotSizeDim = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0., 1000., 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.24"))); //$NON-NLS-1$ dotSizeDim.setEditor(new JSpinner.NumberEditor(dotSizeDim, "0.00"));//$NON-NLS-1$ arrowSizeDim = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0., 1000., 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.24"))); //$NON-NLS-1$ arrowSizeDim.setEditor(new JSpinner.NumberEditor(arrowSizeDim, "0.00"));//$NON-NLS-1$ tbarsizeDim = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0., 1000., 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.24"))); //$NON-NLS-1$ tbarsizeDim.setEditor(new JSpinner.NumberEditor(tbarsizeDim, "0.00"));//$NON-NLS-1$ dotSizeNum = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0.1, 100., 0.1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.20"))); //$NON-NLS-1$ dotSizeNum.setEditor(new JSpinner.NumberEditor(dotSizeNum, "0.00"));//$NON-NLS-1$ tbarsizeNum = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0.1, 100., 0.1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.21"))); //$NON-NLS-1$ tbarsizeNum.setEditor(new JSpinner.NumberEditor(tbarsizeNum, "0.00"));//$NON-NLS-1$ bracketNum = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0.1, 100., 0.01), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.22"))); //$NON-NLS-1$ bracketNum.setEditor(new JSpinner.NumberEditor(bracketNum, "0.00"));//$NON-NLS-1$ rbracketNum = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0.1, 100., 0.01), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.23"))); //$NON-NLS-1$ rbracketNum.setEditor(new JSpinner.NumberEditor(rbracketNum, "0.00"));//$NON-NLS-1$ arrowSizeNum = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0.1, 100., 0.01), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.28"))); //$NON-NLS-1$ arrowSizeNum.setEditor(new JSpinner.NumberEditor(arrowSizeNum, "0.00"));//$NON-NLS-1$ arrowLength = new MSpinner(new MSpinner.MSpinnerNumberModel(10., 0., 100., 0.01), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.26"))); //$NON-NLS-1$ arrowLength.setEditor(new JSpinner.NumberEditor(arrowLength, "0.00"));//$NON-NLS-1$ arrowInset = new MSpinner(new MSpinner.MSpinnerNumberModel(0., 0., 100., 0.01), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.27"))); //$NON-NLS-1$ arrowInset.setEditor(new JSpinner.NumberEditor(arrowInset, "0.00"));//$NON-NLS-1$ } /** * Creates a list of the different styles of arrowhead (right). * @return The created list. */ public static LabelComboBox createRightArrowStyleList() { final LabelComboBox lineArrowRChoice = new LabelComboBox(); lineArrowRChoice.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(ArrowStyle.NONE.name()); label.setIcon(LResources.ARROW_STYLE_NONE_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.BAR_IN.name()); label.setIcon(LResources.ARROW_STYLE_BAR_IN_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.BAR_END.name()); label.setIcon(LResources.ARROW_STYLE_BAR_END_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.CIRCLE_END.name()); label.setIcon(LResources.ARROW_STYLE_CIRCLE_END_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.CIRCLE_IN.name()); label.setIcon(LResources.ARROW_STYLE_CIRCLE_IN_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.DISK_END.name()); label.setIcon(LResources.ARROW_STYLE_DISK_END_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.DISK_IN.name()); label.setIcon(LResources.ARROW_STYLE_DISK_IN_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_ARROW_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_R_ARROW_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_ROUND_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_ARC_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_ROUND_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_ARC_RR_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_SQUARE_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_BRACK_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_SQUARE_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_BRACK_RR_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_DBLE_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_DBLE_ARROW_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_DBLE_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_R_DBLE_ARROW_R_ICON); lineArrowRChoice.addItem(label); label = new JLabel(ArrowStyle.ROUND_IN.name()); label.setIcon(LResources.ARROW_STYLE_ROUND_IN_R_ICON); 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; } /** * Creates a list of the different styles of arrowhead (left). * @return The created list. */ public static LabelComboBox createLeftArrowStyleList() { final LabelComboBox lineArrowLChoice = new LabelComboBox(); lineArrowLChoice.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(ArrowStyle.NONE.name()); label.setIcon(LResources.ARROW_STYLE_NONE_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.BAR_IN.name()); label.setIcon(LResources.ARROW_STYLE_BAR_IN_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.BAR_END.name()); label.setIcon(LResources.ARROW_STYLE_BAR_END_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.CIRCLE_END.name()); label.setIcon(LResources.ARROW_STYLE_CIRCLE_END_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.CIRCLE_IN.name()); label.setIcon(LResources.ARROW_STYLE_CIRCLE_IN_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.DISK_END.name()); label.setIcon(LResources.ARROW_STYLE_DISK_END_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.DISK_IN.name()); label.setIcon(LResources.ARROW_STYLE_DISK_IN_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_ARROW_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_R_ARROW_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_ROUND_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_ARC_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_ROUND_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_ARC_LR_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_SQUARE_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_BRACK_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_SQUARE_BRACKET.name()); label.setIcon(LResources.ARROW_STYLE_BRACK_LR_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.LEFT_DBLE_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_DBLE_ARROW_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.RIGHT_DBLE_ARROW.name()); label.setIcon(LResources.ARROW_STYLE_R_DBLE_ARROW_L_ICON); lineArrowLChoice.addItem(label); label = new JLabel(ArrowStyle.ROUND_IN.name()); label.setIcon(LResources.ARROW_STYLE_ROUND_IN_L_ICON); 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; } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(arrowLeftCB, visible); composer.setWidgetVisible(arrowRightCB, visible); composer.setWidgetVisible(arrowInset, visible); composer.setWidgetVisible(arrowLength, visible); composer.setWidgetVisible(arrowSizeDim, visible); composer.setWidgetVisible(arrowSizeNum, visible); composer.setWidgetVisible(dotSizeNum, visible); composer.setWidgetVisible(dotSizeDim, visible); composer.setWidgetVisible(tbarsizeDim, visible); composer.setWidgetVisible(tbarsizeNum, visible); composer.setWidgetVisible(bracketNum, visible); composer.setWidgetVisible(rbracketNum, visible); } @Override protected void initialiseInteractors() { try{ addInteractor(new List2PencilArrowStyle(this)); addInteractor(new List2ShapeArrowStyle(this)); addInteractor(new Spinner2SelectionArrowParam(this)); addInteractor(new Spinner2PencilArrowParam(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IArrowableShape.class)) { final IArrow arr1 = shape.getArrowAt(0); final IArrow arr2 = shape.getArrowAt(-1); final ArrowStyle arrStyle1 = arr1.getArrowStyle(); final ArrowStyle arrStyle2 = arr2.getArrowStyle(); //TODO this code suppose that if arrowable, there are 2 arrows. arrowLeftCB.setSelectedItemSafely(arrStyle1.name()); arrowRightCB.setSelectedItemSafely(arrStyle2.name()); final boolean isArrow = arrStyle1.isArrow() || arrStyle2.isArrow(); final boolean isDot = arrStyle1.isCircleDisk() || arrStyle2.isCircleDisk(); final boolean isBar = arrStyle1.isBar() || arrStyle2.isBar(); final boolean isSBracket = arrStyle1.isSquareBracket() || arrStyle2.isSquareBracket(); final boolean isRBracket = arrStyle1.isRoundBracket() || arrStyle2.isRoundBracket(); // Updating the visibility of the widgets. composer.setWidgetVisible(arrowInset, isArrow); composer.setWidgetVisible(arrowLength, isArrow); composer.setWidgetVisible(arrowSizeDim, isArrow); composer.setWidgetVisible(arrowSizeNum, isArrow); composer.setWidgetVisible(dotSizeNum, isDot); composer.setWidgetVisible(dotSizeDim, isDot); composer.setWidgetVisible(tbarsizeDim, isBar || isSBracket || isRBracket); composer.setWidgetVisible(tbarsizeNum, isBar || isSBracket || isRBracket); composer.setWidgetVisible(bracketNum, isSBracket); composer.setWidgetVisible(rbracketNum, isRBracket); // Updating the value of the widgets. if(isArrow) { arrowInset.setValueSafely(arr1.getArrowInset()); arrowLength.setValueSafely(arr1.getArrowLength()); arrowSizeDim.setValueSafely(arr1.getArrowSizeDim()); arrowSizeNum.setValueSafely(arr1.getArrowSizeNum()); } if(isDot) { dotSizeNum.setValueSafely(arr1.getDotSizeNum()); dotSizeDim.setValueSafely(arr1.getDotSizeDim()); } if(isBar || isSBracket || isRBracket) { tbarsizeDim.setValueSafely(arr1.getTBarSizeDim()); tbarsizeNum.setValueSafely(arr1.getTBarSizeNum()); } if(isSBracket) bracketNum.setValueSafely(arr1.getBracketNum()); if(isRBracket) rbracketNum.setValueSafely(arr1.getRBracketNum()); } else setActivated(false); } /** * @return The left arrow style combo box. * @since 3.0 */ public MComboBox getArrowLeftCB() { return arrowLeftCB; } /** * @return The right arrow style combo box. * @since 3.0 */ public MComboBox getArrowRightCB() { return arrowRightCB; } /** * @return the dotSizeNum. * @since 3.0 */ public MSpinner getDotSizeNum() { return dotSizeNum; } /** * @return the dotSizeDim. * @since 3.0 */ public MSpinner getDotSizeDim() { return dotSizeDim; } /** * @return the bracketNum. * @since 3.0 */ public MSpinner getBracketNum() { return bracketNum; } /** * @return the rbracketNum. * @since 3.0 */ public MSpinner getRbracketNum() { return rbracketNum; } /** * @return the tbarsizeNum. * @since 3.0 */ public MSpinner getTbarsizeNum() { return tbarsizeNum; } /** * @return the tbarsizeDim. * @since 3.0 */ public MSpinner getTbarsizeDim() { return tbarsizeDim; } /** * @return the arrowSizeDim. * @since 3.0 */ public MSpinner getArrowSizeDim() { return arrowSizeDim; } /** * @return the arrowSizeNum. * @since 3.0 */ public MSpinner getArrowSizeNum() { return arrowSizeNum; } /** * @return the arrowLength. * @since 3.0 */ public MSpinner getArrowLength() { return arrowLength; } /** * @return the arrowInset. * @since 3.0 */ public MSpinner getArrowInset() { return arrowInset; } } abstract class Spinner2ArrowParam
    extends SpinnerForCustomiser { protected Spinner2ArrowParam(final ShapeArrowCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public boolean isConditionRespected() { final Object obj = interaction.getSpinner(); return obj==instrument.arrowInset || obj==instrument.arrowLength || obj==instrument.arrowSizeDim || obj==instrument.arrowSizeNum || obj==instrument.bracketNum || obj==instrument.dotSizeDim || obj==instrument.dotSizeNum || obj==instrument.rbracketNum || obj==instrument.tbarsizeDim || obj==instrument.tbarsizeNum; } @Override public void initAction() { final Object obj = interaction.getSpinner(); final ShapeProperties prop; if(obj==instrument.arrowInset) prop = ShapeProperties.ARROW_INSET; else if(obj==instrument.arrowLength) prop = ShapeProperties.ARROW_LENGTH; else if(obj==instrument.arrowSizeDim) prop = ShapeProperties.ARROW_SIZE_DIM; else if(obj==instrument.arrowSizeNum) prop = ShapeProperties.ARROW_SIZE_NUM; else if(obj==instrument.bracketNum) prop = ShapeProperties.ARROW_BRACKET_NUM; else if(obj==instrument.dotSizeDim) prop = ShapeProperties.ARROW_DOT_SIZE_DIM; else if(obj==instrument.dotSizeNum) prop = ShapeProperties.ARROW_DOT_SIZE_NUM; else if(obj==instrument.rbracketNum) prop = ShapeProperties.ARROW_R_BRACKET_NUM; else if(obj==instrument.tbarsizeDim) prop = ShapeProperties.ARROW_T_BAR_SIZE_DIM; else prop = ShapeProperties.ARROW_T_BAR_SIZE_NUM; action.setProperty(prop); } } /** This link maps spinners to a ModifyShapeProperty action. */ class Spinner2PencilArrowParam extends Spinner2ArrowParam { protected Spinner2PencilArrowParam(final ShapeArrowCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } } /** This link maps spinners to a ModifyShapeProperty action. */ class Spinner2SelectionArrowParam extends Spinner2ArrowParam { protected Spinner2SelectionArrowParam(final ShapeArrowCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } } /** * This link maps a list to a ModifyPencil action. */ class List2PencilArrowStyle extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2PencilArrowStyle(final ShapeArrowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { if(getInteraction().getList()==instrument.arrowLeftCB) action.setProperty(ShapeProperties.ARROW1_STYLE); else action.setProperty(ShapeProperties.ARROW2_STYLE); action.setPencil(instrument.pencil); action.setValue(ArrowStyle.getArrowStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return (is==instrument.arrowLeftCB || is==instrument.arrowRightCB) && instrument.pencil.isActivated(); } } /** * This link maps a list to a ModifyShape action. */ class List2ShapeArrowStyle extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2ShapeArrowStyle(final ShapeArrowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { if(getInteraction().getList()==instrument.arrowLeftCB) action.setProperty(ShapeProperties.ARROW1_STYLE); else action.setProperty(ShapeProperties.ARROW2_STYLE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setValue(ArrowStyle.getArrowStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return (is==instrument.arrowLeftCB || is==instrument.arrowRightCB) && instrument.hand.isActivated(); } } ShapeAxesCustomiser.java000066400000000000000000000362571321075051700356700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import javax.swing.JLabel; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; /** * This instrument modifies axes properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-05
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeAxesCustomiser extends ShapePropertyCustomiser { /** The widget that permits to select the style of the axes. */ protected MComboBox shapeAxes; /** The widget that permits to select the style of the ticks. */ protected MComboBox shapeTicks; // /** The widget that permits to set the size of the ticks. */ // protected MSpinner ticksSizeS; /** The widget that permits to show/hide the ticks of the axes. */ protected MComboBox showTicks; /** The widget that permits to set the increment of X-labels. */ protected MSpinner incrLabelX; /** The widget that permits to set the increment of Y-labels. */ protected MSpinner incrLabelY; /** The widget that permits to set the visibility of the labels. */ protected MComboBox showLabels; /** The widget that permits to set the visibility of the origin point. */ protected MCheckBox showOrigin; /** The distance between the X-labels. */ protected MSpinner distLabelsX; /** The distance between the Y-labels. */ protected MSpinner distLabelsY; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeAxesCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IAxesProp.class)) { shapeAxes.setSelectedItemSafely(shape.getAxesStyle()); shapeTicks.setSelectedItemSafely(shape.getTicksStyle()); // ticksSizeS.setValueSafely(axes.getTicksSize()); showTicks.setSelectedItemSafely(shape.getTicksDisplayed()); incrLabelX.setValueSafely(shape.getIncrementX()); incrLabelY.setValueSafely(shape.getIncrementY()); showLabels.setSelectedItemSafely(shape.getLabelsDisplayed()); showOrigin.setSelected(shape.isShowOrigin()); distLabelsX.setValueSafely(shape.getDistLabelsX()); distLabelsY.setValueSafely(shape.getDistLabelsY()); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(shapeAxes, activated); composer.setWidgetVisible(shapeTicks, activated); // composer.setWidgetVisible(ticksSizeS, activated); composer.setWidgetVisible(showTicks, activated); composer.setWidgetVisible(incrLabelX, activated); composer.setWidgetVisible(incrLabelY, activated); composer.setWidgetVisible(showLabels, activated); composer.setWidgetVisible(showOrigin, activated); composer.setWidgetVisible(distLabelsX, activated); composer.setWidgetVisible(distLabelsY, activated); } @Override protected void initialiseWidgets() { shapeAxes = new MComboBox<>(AxesStyle.values(), null); shapeTicks = new MComboBox<>(TicksStyle.values(), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.0"))); //$NON-NLS-1$ showTicks = new MComboBox<>(PlottingStyle.values(), new JLabel(LangTool.INSTANCE.getStringActions("AxesCust.1"))); //$NON-NLS-1$ showLabels = new MComboBox<>(PlottingStyle.values(), new JLabel(LangTool.INSTANCE.getStringActions("AxesCust.1"))); //$NON-NLS-1$ // ticksSizeS = new MSpinner(new MSpinner.MSpinnerNumberModel(1., 1., 1000., 0.5), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.13"))); incrLabelX = new MSpinner(new MSpinner.MSpinnerNumberModel(0.0001, 0.0001, 1000., 1.), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.8"))); //$NON-NLS-1$ incrLabelY = new MSpinner(new MSpinner.MSpinnerNumberModel(0.0001, 0.0001, 1000., 1.), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.9"))); //$NON-NLS-1$ distLabelsX = new MSpinner(new MSpinner.MSpinnerNumberModel(0.01, 0.01, 1000., 0.05), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.6"))); //$NON-NLS-1$ distLabelsY = new MSpinner(new MSpinner.MSpinnerNumberModel(0.01, 0.01, 1000., 0.05), new JLabel(LangTool.INSTANCE.getString18("ParametersAxeFrame.7"))); //$NON-NLS-1$ showOrigin = new MCheckBox(LangTool.INSTANCE.getString18("ParametersAxeFrame.1"), true); //$NON-NLS-1$ } @Override protected void initialiseInteractors() { try { addInteractor(new Combobox2CustomSelectedAxes(this)); addInteractor(new Combobox2CustomPencilAxes(this)); addInteractor(new Spinner2CustomPencilAxes(this)); addInteractor(new Spinner2CustomSelectedAxes(this)); addInteractor(new CheckBox2CustomPencilAxes(this)); addInteractor(new CheckBox2CustomSelectedAxes(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The widget that permits to select the style of the axes. * @since 3.0 */ public MComboBox getShapeAxes() { return shapeAxes; } /** * @return The widget that permits to select the style of the ticks. * @since 3.0 */ public MComboBox getShapeTicks() { return shapeTicks; } // /** // * @return The widget that permits to set the size of the ticks. // * @since 3.0 // */ // public MSpinner getTicksSizeS() { // return ticksSizeS; // } /** * @return The widget that permits to show/hide the ticks of the axes. * @since 3.0 */ public MComboBox getShowTicks() { return showTicks; } /** * @return The widget that permits to show/hide the labels of the axes. * @since 3.0 */ public MComboBox getShowLabels() { return showLabels; } /** * @return The widget that permits to set the increment of X-labels. * @since 3.0 */ public MSpinner getIncrLabelX() { return incrLabelX; } /** * @return The widget that permits to set the increment of Y-labels. * @since 3.0 */ public MSpinner getIncrLabelY() { return incrLabelY; } /** * @return The widget that permits to set the visibility of the origin point. * @since 3.0 */ public MCheckBox getShowOrigin() { return showOrigin; } /** * @return The distance between the X-labels. * @since 3.0 */ public MSpinner getDistLabelsX() { return distLabelsX; } /** * @return The distance between the Y-labels. * @since 3.0 */ public MSpinner getDistLabelsY() { return distLabelsY; } /** Maps a checkbox to an action that modifies several axes' parameters. */ private abstract static class CheckBox2CustomAxes
    extends CheckBoxForCustomiser { protected CheckBox2CustomAxes(final ShapeAxesCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public boolean isConditionRespected() { return instrument.showOrigin==interaction.getCheckBox(); } @Override public void initAction() { action.setProperty(ShapeProperties.AXES_SHOW_ORIGIN); } @Override public void updateAction() { action.setValue(interaction.getCheckBox().isSelected()); } } /** Maps a spinner to an action that modifies the ticks size of the selected shapes. */ private static class CheckBox2CustomSelectedAxes extends CheckBox2CustomAxes { protected CheckBox2CustomSelectedAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } /** Maps a spinner to an action that modifies the ticks size of the pencil. */ private static class CheckBox2CustomPencilAxes extends CheckBox2CustomAxes { protected CheckBox2CustomPencilAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** Maps a spinner to an action that modifies several axes' parameters. */ private abstract static class Spinner2CustomAxes extends SpinnerForCustomiser { protected Spinner2CustomAxes(final ShapeAxesCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public boolean isConditionRespected() { final Object spinner = interaction.getSpinner(); return // instrument.ticksSizeS==spinner || instrument.incrLabelX==spinner || instrument.incrLabelY==spinner || instrument.distLabelsX==spinner || instrument.distLabelsY==spinner; } @Override public void initAction() { final Object spinner = interaction.getSpinner(); // if(spinner==instrument.ticksSizeS) // action.setProperty(ShapeProperties.AXES_TICKS_SIZE); // else if(spinner==instrument.distLabelsX || spinner==instrument.distLabelsY) action.setProperty(ShapeProperties.AXES_LABELS_DIST); else action.setProperty(ShapeProperties.AXES_LABELS_INCR); } @Override public void updateAction() { final Object spinner = interaction.getSpinner(); // if(spinner==instrument.ticksSizeS) // action.setValue(Double.valueOf(interaction.getSpinner().getValue().toString())); // else if(spinner==instrument.distLabelsX || spinner==instrument.distLabelsY) action.setValue(ShapeFactory.createPoint(Double.valueOf(instrument.distLabelsX.getValue().toString()), Double.valueOf(instrument.distLabelsY.getValue().toString()))); else action.setValue(ShapeFactory.createPoint(Double.valueOf(instrument.incrLabelX.getValue().toString()), Double.valueOf(instrument.incrLabelY.getValue().toString()))); } } /** Maps a spinner to an action that modifies the ticks size of the selected shapes. */ private static class Spinner2CustomSelectedAxes extends Spinner2CustomAxes { protected Spinner2CustomSelectedAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } /** Maps a spinner to an action that modifies the ticks size of the pencil. */ private static class Spinner2CustomPencilAxes extends Spinner2CustomAxes { protected Spinner2CustomPencilAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** Maps a combobox to an action that modifies the axe's style. */ private abstract static class Combobox2CustomAxes extends ListForCustomiser { protected Combobox2CustomAxes(final ShapeAxesCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public boolean isConditionRespected() { final Object list = interaction.getList(); return instrument.shapeAxes==list || instrument.shapeTicks==list || instrument.showTicks==list || instrument.showLabels==list; } @Override public void initAction() { final Object list = interaction.getList(); if(instrument.shapeAxes==list) action.setProperty(ShapeProperties.AXES_STYLE); else if(instrument.showTicks==list) action.setProperty(ShapeProperties.AXES_TICKS_SHOW); else if(instrument.showLabels==list) action.setProperty(ShapeProperties.AXES_LABELS_SHOW); else action.setProperty(ShapeProperties.AXES_TICKS_STYLE); action.setValue(interaction.getList().getSelectedObjects()[0]); } } /** Maps a combobox to an action that modifies the axe's style of the pencil. */ private static class Combobox2CustomPencilAxes extends Combobox2CustomAxes { protected Combobox2CustomPencilAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** Maps a combobox to an action that modifies the axe's style of the selection. */ private static class Combobox2CustomSelectedAxes extends Combobox2CustomAxes { protected Combobox2CustomSelectedAxes(final ShapeAxesCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } } ShapeBorderCustomiser.java000066400000000000000000000414241321075051700361750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Color; import java.awt.Dimension; import java.awt.ItemSelectable; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LabelComboBox; import net.sf.latexdraw.ui.LabelListCellRenderer; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; /** * This instrument modifies border properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 10/31/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeBorderCustomiser extends ShapePropertyCustomiser { /** The field which allows to change shapes thickness. */ protected MSpinner thicknessField; /** Allows to set the colour of the borders of shapes. */ protected MColorButton lineColButton; /** Allows to change the style of the borders */ protected LabelComboBox lineCB; /** Allows to select the position of the borders of the shape. */ protected LabelComboBox bordersPosCB; /** Allows to change the angle of the round corner. */ protected MSpinner frameArcField; /** Defines if the points of the shape must be painted. */ protected MCheckBox showPoints; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeBorderCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } /** * Creates a list of the different positions of the borders. * @return The created list. */ public static LabelComboBox createBordersPositionChoice() { final LabelComboBox dbPositionChoice = new LabelComboBox(); dbPositionChoice.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(BorderPos.INTO.toString()); label.setIcon(LResources.INNER_ICON); dbPositionChoice.addItem(label); label = new JLabel(BorderPos.OUT.toString()); label.setIcon(LResources.OUTER_ICON); dbPositionChoice.addItem(label); label = new JLabel(BorderPos.MID.toString()); label.setIcon(LResources.MIDDLE_ICON); dbPositionChoice.addItem(label); return dbPositionChoice; } /** * Creates a list of the different styles of line. * @return The created list. */ public static LabelComboBox createStyleLineChoice() { final LabelComboBox lineChoice = new LabelComboBox(); lineChoice.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(LineStyle.SOLID.toString()); label.setIcon(LResources.LINE_STYLE_NONE_ICON); lineChoice.addItem(label); label = new JLabel(LineStyle.DASHED.toString()); label.setIcon(LResources.LINE_STYLE_DASHED_ICON); lineChoice.addItem(label); label = new JLabel(LineStyle.DOTTED.toString()); label.setIcon(LResources.LINE_STYLE_DOTTED_ICON); lineChoice.addItem(label); return lineChoice; } @Override protected void initialiseWidgets() { thicknessField = new MSpinner(new MSpinner.MSpinnerNumberModel(2., 0.1, 1000., 0.1), new JLabel(LResources.THICKNESS_ICON)); thicknessField.setEditor(new JSpinner.NumberEditor(thicknessField, "0.0"));//$NON-NLS-1$ thicknessField.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.65")); //$NON-NLS-1$ lineColButton = new MColorButton(LangTool.INSTANCE.getStringActions("ShapeBord.1"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ lineColButton.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.66")); //$NON-NLS-1$ lineCB = createStyleLineChoice(); lineCB.setPreferredSize(new Dimension(70,30)); lineCB.setMaximumSize(new Dimension(70,30)); bordersPosCB = createBordersPositionChoice(); bordersPosCB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.77")); //$NON-NLS-1$ bordersPosCB.setPreferredSize(new Dimension(45, 30)); bordersPosCB.setMaximumSize(new Dimension(45, 30)); frameArcField = new MSpinner(new MSpinner.MSpinnerNumberModel(0., 0., 1., 0.05), new JLabel(LResources.ROUNDNESS_ICON)); frameArcField.setEditor(new JSpinner.NumberEditor(frameArcField, "0.00"));//$NON-NLS-1$ showPoints = new MCheckBox(LangTool.INSTANCE.getStringActions("ShapeBord.2")); //$NON-NLS-1$ showPoints.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeBord.3")); //$NON-NLS-1$ } @Override protected void update(final IGroup shape) { if(shape==null) setActivated(false); else { final boolean isTh = shape.isThicknessable(); final boolean isStylable = shape.isLineStylable(); final boolean isMvble = shape.isBordersMovable(); final boolean isColor = shape.isColourable(); final boolean supportRound = shape.isTypeOf(ILineArcProp.class); final boolean showPts = shape.isShowPtsable(); composer.setWidgetVisible(thicknessField, isTh); composer.setWidgetVisible(lineCB, isStylable); composer.setWidgetVisible(bordersPosCB, isMvble); composer.setWidgetVisible(frameArcField, supportRound); composer.setWidgetVisible(lineColButton, isColor); composer.setWidgetVisible(showPoints, showPts); if(isColor) lineColButton.setColor(shape.getLineColour()); if(isTh) thicknessField.setValueSafely(shape.getThickness()); if(isStylable) lineCB.setSelectedItemSafely(shape.getLineStyle().toString()); if(isMvble) bordersPosCB.setSelectedItemSafely(shape.getBordersPosition().toString()); if(supportRound) frameArcField.setValueSafely(shape.getLineArc()); if(showPts) showPoints.setSelected(shape.isShowPts()); } } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(bordersPosCB, activated); composer.setWidgetVisible(thicknessField, activated); composer.setWidgetVisible(lineColButton, activated); composer.setWidgetVisible(lineCB, activated); composer.setWidgetVisible(frameArcField, activated); composer.setWidgetVisible(showPoints, activated); } /** * @return The widget that defines if the points of the shape must be painted. */ public MCheckBox getShowPoints() { return showPoints; } /** * @return The line style combo box. * @since 3.0 */ public MComboBox getLineCB() { return lineCB; } /** * @return The border position combo box. * @since 3.0 */ public MComboBox getBordersPosCB() { return bordersPosCB; } /** * @return The line colour button. * @since 3.0 */ public MColorButton getLineColButton() { return lineColButton; } /** * @return The field that allows to modify the thickness of the pencil. * @since 3.0 */ public MSpinner getThicknessField() { return thicknessField; } /** * @return The field that defines the roundness of the corners. * @since 3.0 */ public MSpinner getFrameArcField() { return frameArcField; } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2PencilBorder(this)); addInteractor(new List2PencilBorder(this)); addInteractor(new List2SelectionBorder(this)); addInteractor(new Spinner2SelectionBorder(this)); addInteractor(new ColourButton2PencilBorder(this)); addInteractor(new ColourButton2SelectionBorder(this)); addInteractor(new Checkbox2ShowPointsSelection(this)); addInteractor(new Checkbox2ShowPointsPencil(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } } /** Maps a checkbox to an action that show/hide the selected shapes' points. */ class Checkbox2ShowPointsSelection extends CheckBoxForCustomiser { protected Checkbox2ShowPointsSelection(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && instrument.showPoints==interaction.getCheckBox(); } @Override public void initAction() { action.setProperty(ShapeProperties.SHOW_POINTS); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setValue(interaction.getCheckBox().isSelected()); } } /** Maps a checkbox to an action that show/hide the shapes' points created by the pencil. */ class Checkbox2ShowPointsPencil extends CheckBoxForCustomiser { protected Checkbox2ShowPointsPencil(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.SHOW_POINTS); action.setPencil(instrument.pencil); action.setValue(interaction.getCheckBox().isSelected()); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && instrument.showPoints==interaction.getCheckBox(); } } /** * This link maps a list to an action that modifies shapes properties. */ class List2SelectionBorder extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2SelectionBorder(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return (is==instrument.bordersPosCB || is==instrument.lineCB) && instrument.hand.isActivated(); } @Override public void initAction() { final ItemSelectable is = interaction.getList(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); if(is==instrument.bordersPosCB) { action.setProperty(ShapeProperties.BORDER_POS); action.setValue(BorderPos.getStyle(getLabelText())); }else { action.setProperty(ShapeProperties.LINE_STYLE); action.setValue(LineStyle.getStyle(getLabelText())); } } } /** * This link maps a list to a ModifyPencil action. */ class List2PencilBorder extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2PencilBorder(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { final ItemSelectable is = interaction.getList(); action.setPencil(instrument.pencil); if(is==instrument.bordersPosCB) { action.setProperty(ShapeProperties.BORDER_POS); action.setValue(BorderPos.getStyle(getLabelText())); } else { action.setProperty(ShapeProperties.LINE_STYLE); action.setValue(LineStyle.getStyle(getLabelText())); } } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return (is==instrument.bordersPosCB || is==instrument.lineCB) && instrument.pencil.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2SelectionBorder extends SpinnerForCustomiser { /** * Creates the link. * @param borderCustom The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2SelectionBorder(final ShapeBorderCustomiser borderCustom) throws InstantiationException, IllegalAccessException { super(borderCustom, ModifyShapeProperty.class); } @Override public void initAction() { if(interaction.getSpinner()==instrument.thicknessField) action.setProperty(ShapeProperties.LINE_THICKNESS); else action.setProperty(ShapeProperties.ROUND_CORNER_VALUE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { final JSpinner spinner = interaction.getSpinner(); return (spinner==instrument.thicknessField || spinner==instrument.frameArcField) && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2PencilBorder extends SpinnerForCustomiser { /** * Creates the link. * @param borderCustom The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2PencilBorder(final ShapeBorderCustomiser borderCustom) throws InstantiationException, IllegalAccessException { super(borderCustom, ModifyPencilParameter.class); } @Override public void initAction() { if(interaction.getSpinner()==instrument.thicknessField) action.setProperty(ShapeProperties.LINE_THICKNESS); else action.setProperty(ShapeProperties.ROUND_CORNER_VALUE); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { final JSpinner spinner = interaction.getSpinner(); return (spinner==instrument.thicknessField || spinner==instrument.frameArcField) && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the pencil. */ class ColourButton2PencilBorder extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2PencilBorder(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_LINE); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.lineColButton && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the selected shapes. */ class ColourButton2SelectionBorder extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2SelectionBorder(final ShapeBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_LINE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.lineColButton && instrument.hand.isActivated(); } } ShapeCoordDimCustomiser.java000066400000000000000000000113751321075051700364620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.shape.TranslateShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.lang.LangTool; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.SpinnerModified; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MSpinner; /** * This instrument modifies arc dimensions and coordinates of shapes or pencil parameters.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/17/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeCoordDimCustomiser extends ShapePropertyCustomiser { /** Sets the X-coordinate of the top-left position. */ protected MSpinner tlxS; /** Sets the Y-coordinate of the top-left position. */ protected MSpinner tlyS; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeCoordDimCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup shape) { if(isActivated() && shape!=null) { final IPoint tl = shape.getTopLeftPoint(); tlxS.setValueSafely(tl.getX()); tlyS.setValueSafely(tl.getY()); } } @Override protected void initialiseWidgets() { tlxS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel("x")); //$NON-NLS-1$ tlxS.setEditor(new JSpinner.NumberEditor(tlxS, "0.00"));//$NON-NLS-1$ tlxS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeCoord.1")); //$NON-NLS-1$ tlyS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel("y")); //$NON-NLS-1$ tlyS.setEditor(new JSpinner.NumberEditor(tlyS, "0.00"));//$NON-NLS-1$ tlyS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeCoord.2")); //$NON-NLS-1$ } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(tlxS, activated); composer.setWidgetVisible(tlyS, activated); } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2TranslateShape(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The spinner that sets the X-coordinate of the top-left position. * @since 3.0 */ public MSpinner getTlxS() { return tlxS; } /** * @return The spinner that sets the Y-coordinate of the top-left position. * @since 3.0 */ public MSpinner getTlyS() { return tlyS; } /** * Maps spinners to translation of shapes. The X and Y spinners are used to change the position of the top-left point of the * selected shapes, i.e. to translate it. */ private static class Spinner2TranslateShape extends InteractorImpl { protected Spinner2TranslateShape(final ShapeCoordDimCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, TranslateShapes.class, SpinnerModified.class); } @Override public void initAction() { action.setDrawing(instrument.pencil.canvas().getDrawing()); action.setShape(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public void updateAction() { super.updateAction(); final IPoint tl = action.drawing().get().getSelection().getTopLeftPoint(); final double value = Double.parseDouble(interaction.getSpinner().getValue().toString()); if(interaction.getSpinner()==instrument.tlxS) action.setTx(value-tl.getX()); else action.setTy(value-tl.getY()); } @Override public boolean isConditionRespected() { final JSpinner obj = interaction.getSpinner(); return obj==instrument.tlxS || obj==instrument.tlyS; } } } ShapeDeleter.java000066400000000000000000000132121321075051700342600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.event.KeyEvent; import java.util.List; import net.sf.latexdraw.actions.shape.DeleteShapes; import net.sf.latexdraw.actions.shape.SelectShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.action.ActionsRegistry; import org.malai.instrument.InteractorImpl; import org.malai.interaction.Interaction; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.interaction.library.KeyPressure; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; /** * This instrument deletes the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 01/05/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeDeleter extends WidgetInstrument { /** The button used to remove the selected shapes. */ protected MButton deleteB; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @since 3.0 */ public ShapeDeleter(final SwingUIComposer composer) { super(composer); initialiseWidgets(); } @Override protected void initialiseWidgets() { deleteB = new MButton(LResources.DEL_ICON); deleteB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.139")); //$NON-NLS-1$ } @Override public void setActivated(final boolean activated, final boolean hideWidgets) { super.setActivated(activated, hideWidgets); updateWidgets(hideWidgets); } @Override public void setActivated(final boolean activated) { super.setActivated(activated); updateWidgets(false); } /** * Updates the widgets of this instrument. * @param hideWidgets True: the widgets are hidden on deactivation. * @since 3.0 */ protected void updateWidgets(final boolean hideWidgets) { deleteB.setVisible(activated || !hideWidgets); deleteB.setEnabled(activated); } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonPressed2DeleteShapes(this)); addInteractor(new KeyPressed2DeleteShapes(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The button used to remove the selected shapes. * @since 3.0 */ public MButton getDeleteB() { return deleteB; } } /** * This abstract link maps an interaction to an action that delete shapes. */ abstract class DeleteShapesInteractor extends InteractorImpl { /** * Creates the link. * @param ins The instrument that contains the link. * @param clazzInteraction The class of the interaction to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected DeleteShapesInteractor(final ShapeDeleter ins, final Class clazzInteraction) throws InstantiationException, IllegalAccessException { super(ins, false, DeleteShapes.class, clazzInteraction); } @Override public void initAction() { final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); final List shapes = selection.shapes(); for(final IShape sh : shapes) action.addShape(sh); action.setDrawing(selection.drawing().get()); } @Override public boolean isConditionRespected() { final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); return selection!=null && !selection.shapes().isEmpty(); } } /** * This link maps an key pressure interaction to an action that delete shapes. */ class KeyPressed2DeleteShapes extends DeleteShapesInteractor { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected KeyPressed2DeleteShapes(final ShapeDeleter ins) throws InstantiationException, IllegalAccessException { super(ins, KeyPressure.class); } @Override public boolean isConditionRespected() { return (interaction.getKey()==KeyEvent.VK_DELETE || interaction.getKey()==KeyEvent.VK_BACK_SPACE) && super.isConditionRespected(); } } /** * This link maps an button pressure interaction to an action that delete shapes. */ class ButtonPressed2DeleteShapes extends DeleteShapesInteractor { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ButtonPressed2DeleteShapes(final ShapeDeleter ins) throws InstantiationException, IllegalAccessException { super(ins, ButtonPressed.class); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.deleteB && super.isConditionRespected(); } } ShapeDotCustomiser.java000066400000000000000000000266501321075051700355120ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Color; import java.awt.Dimension; import java.awt.ItemSelectable; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LabelComboBox; import net.sf.latexdraw.ui.LabelListCellRenderer; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; /** * This instrument modifies dot parameters.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 08/10/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeDotCustomiser extends ShapePropertyCustomiser { /** Allows to define the size of a dot. */ protected MSpinner dotSizeField; /** Allows the selection of a dot shape. */ protected LabelComboBox dotCB; /** Changes the colour of the filling of the dot. */ protected MColorButton fillingB; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public ShapeDotCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { dotSizeField = new MSpinner(new MSpinner.MSpinnerNumberModel(6., 0.1, 1000., 1.), new JLabel(LResources.DOT_STYLE_NONE_ICON)); dotSizeField.setEditor(new JSpinner.NumberEditor(dotSizeField, "0.0"));//$NON-NLS-1$ dotSizeField.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeDot.1")); //$NON-NLS-1$ dotCB = createDotStyleChoice(); dotSizeField.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeDot.2")); //$NON-NLS-1$ fillingB = new MColorButton(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.48"), new MButtonIcon(Color.WHITE));//$NON-NLS-1$ fillingB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.68")); //$NON-NLS-1$ } /** * Creates a list of the different styles of the dot. * @return The created list. */ public static LabelComboBox createDotStyleChoice() { final LabelComboBox dotChoice = new LabelComboBox(); dotChoice.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(DotStyle.DOT.toString()); label.setIcon(LResources.DOT_STYLE_NONE_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.ASTERISK.toString()); label.setIcon(LResources.DOT_STYLE_ASTERISK_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.BAR.toString()); label.setIcon(LResources.DOT_STYLE_BAR_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.DIAMOND.toString()); label.setIcon(LResources.DOT_STYLE_DIAMOND_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.FDIAMOND.toString()); label.setIcon(LResources.DOT_STYLE_DIAMOND_F_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.O.toString()); label.setIcon(LResources.DOT_STYLE_O_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.OPLUS.toString()); label.setIcon(LResources.DOT_STYLE_O_PLUS_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.OTIMES.toString()); label.setIcon(LResources.DOT_STYLE_O_CROSS_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.PLUS.toString()); label.setIcon(LResources.DOT_STYLE_PLUS_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.X.toString()); label.setIcon(LResources.DOT_STYLE_CROSS_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.TRIANGLE.toString()); label.setIcon(LResources.DOT_STYLE_TRIANGLE_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.FTRIANGLE.toString()); label.setIcon(LResources.DOT_STYLE_TRIANGLE_F_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.PENTAGON.toString()); label.setIcon(LResources.DOT_STYLE_PENTAGON_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.FPENTAGON.toString()); label.setIcon(LResources.DOT_STYLE_PENTAGON_F_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.SQUARE.toString()); label.setIcon(LResources.DOT_STYLE_SQUARE_ICON); dotChoice.addItem(label); label = new JLabel(DotStyle.FSQUARE.toString()); label.setName(DotStyle.FSQUARE.toString()); label.setIcon(LResources.DOT_STYLE_SQUARE_F_ICON); dotChoice.addItem(label); dotChoice.setPreferredSize(new Dimension(55,30)); dotChoice.setMaximumSize(new Dimension(55,30)); return dotChoice; } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IDotProp.class)) { dotSizeField.setValueSafely(shape.getDiametre()); dotCB.setSelectedItemSafely(shape.getDotStyle().toString()); fillingB.setEnabled(shape.isFillable()); if(shape.isFillable()) fillingB.setColor(shape.getDotFillingCol()); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(dotCB, visible); composer.setWidgetVisible(dotSizeField, visible); composer.setWidgetVisible(fillingB, visible); } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2PencilDotSize(this)); addInteractor(new Spinner2SelectionDotSize(this)); addInteractor(new List2PencilDotStyle(this)); addInteractor(new List2SelectionDotStyle(this)); addInteractor(new FillingButton2SelectionFilling(this)); addInteractor(new FillingButton2PencilFilling(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The dot size field. * @since 3.0 */ public MSpinner getDotSizeField() { return dotSizeField; } /** * @return The dot style combo box. * @since 3.0 */ public MComboBox getDotCB() { return dotCB; } /** * @return the button that changes the colour of the filling of dots. * @since 3.0 */ public MColorButton getFillingB() { return fillingB; } /** * This link maps a colour button to the pencil. */ private static class FillingButton2PencilFilling extends ColourButtonForCustomiser { protected FillingButton2PencilFilling(final ShapeDotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); action.setProperty(ShapeProperties.DOT_FILLING_COL); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.fillingB && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the pencil. */ private static class FillingButton2SelectionFilling extends ColourButtonForCustomiser { protected FillingButton2SelectionFilling(final ShapeDotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.DOT_FILLING_COL); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.fillingB && instrument.hand.isActivated(); } } /** * This link maps a list to a ModifyPencil action. */ private static class List2PencilDotStyle extends ListForCustomiser { protected List2PencilDotStyle(final ShapeDotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { action.setPencil(instrument.pencil); action.setProperty(ShapeProperties.DOT_STYLE); action.setValue(DotStyle.getStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return is==instrument.dotCB && instrument.pencil.isActivated(); } } /** * This link maps a list to a ModifyShape action. */ private static class List2SelectionDotStyle extends ListForCustomiser { protected List2SelectionDotStyle(final ShapeDotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.DOT_STYLE); action.setValue(DotStyle.getStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return is==instrument.dotCB && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ private static class Spinner2SelectionDotSize extends SpinnerForCustomiser { protected Spinner2SelectionDotSize(final ShapeDotCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setProperty(ShapeProperties.DOT_SIZE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.dotSizeField && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ private static class Spinner2PencilDotSize extends SpinnerForCustomiser { protected Spinner2PencilDotSize(final ShapeDotCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.DOT_SIZE); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.dotSizeField && instrument.pencil.isActivated(); } } } ShapeDoubleBorderCustomiser.java000066400000000000000000000242601321075051700373270ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MSpinner; import javax.swing.*; import java.awt.*; /** * This instrument modifies double border properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/02/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeDoubleBorderCustomiser extends ShapePropertyCustomiser { /** Sets if the shape has double borders or not. */ protected MCheckBox dbleBoundCB; /** Allows to change the colour of the space between the double boundaries. */ protected MColorButton dbleBoundColB; /** This field modifies the double separation of the double line. */ protected MSpinner dbleSepField; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ShapeDoubleBorderCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { dbleBoundCB = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.0")); //$NON-NLS-1$ dbleBoundCB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.78")); //$NON-NLS-1$ dbleBoundColB = new MColorButton(LangTool.INSTANCE.getStringActions("ShapeBord.1"), new MButtonIcon(Color.WHITE)); //$NON-NLS-1$ dbleBoundColB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.79")); //$NON-NLS-1$ dbleSepField = new MSpinner(new MSpinner.MSpinnerNumberModel(5., 1., 1000., 1.), new JLabel(LResources.GRID_GAP_ICON)); dbleSepField.setEditor(new JSpinner.NumberEditor(dbleSepField, "0")); //$NON-NLS-1$ } /** * @return The field that modifies the separation between the double line. * @since 3.0 */ public MSpinner getDbleSepField() { return dbleSepField; } /** * @return The double border check box. * @since 3.0 */ public MColorButton getDbleBoundColB() { return dbleBoundColB; } /** * @return The double border check box. * @since 3.0 */ public MCheckBox getDbleBoundCB() { return dbleBoundCB; } @Override protected void update(final IGroup shape) { if(shape!=null && shape.isDbleBorderable()) { final boolean dble = shape.hasDbleBord(); dbleBoundCB.setSelected(dble); dbleBoundColB.setEnabled(dble); dbleSepField.setEnabled(dble); if(dble) { dbleBoundColB.setColor(shape.getDbleBordCol()); dbleSepField.setValueSafely(shape.getDbleBordSep()); } } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(dbleBoundCB, visible); composer.setWidgetVisible(dbleBoundColB, visible); composer.setWidgetVisible(dbleSepField, visible); } @Override protected void initialiseInteractors() { try{ addInteractor(new CheckBox2PencilDoubleBorder(this)); addInteractor(new CheckBox2SelectionDoubleBorder(this)); addInteractor(new ColourButton2PencilDoubleBorder(this)); addInteractor(new ColourButton2SelectionDoubleBorder(this)); addInteractor(new Spinner2PencilDoubleBorder(this)); addInteractor(new Spinner2SelectionDoubleBorder(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } } /** * This link uses a checkbox to modify the pencil. */ class CheckBox2PencilDoubleBorder extends CheckBoxForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected CheckBox2PencilDoubleBorder(final ShapeDoubleBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.DBLE_BORDERS); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.dbleBoundCB && instrument.pencil.isActivated(); } } /** * This link uses a checkbox to modify shapes. */ class CheckBox2SelectionDoubleBorder extends CheckBoxForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected CheckBox2SelectionDoubleBorder(final ShapeDoubleBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.DBLE_BORDERS); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.dbleBoundCB && instrument.hand.isActivated(); } } /** * This link maps a colour button to the pencil. */ class ColourButton2PencilDoubleBorder extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2PencilDoubleBorder(final ShapeDoubleBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_DBLE_BORD); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.dbleBoundColB && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the selected shapes. */ class ColourButton2SelectionDoubleBorder extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2SelectionDoubleBorder(final ShapeDoubleBorderCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_DBLE_BORD); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.dbleBoundColB && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2SelectionDoubleBorder extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2SelectionDoubleBorder(final ShapeDoubleBorderCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setProperty(ShapeProperties.DBLE_BORDERS_SIZE); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.dbleSepField && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2PencilDoubleBorder extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2PencilDoubleBorder(final ShapeDoubleBorderCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.DBLE_BORDERS_SIZE); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.dbleSepField && instrument.pencil.isActivated(); } } ShapeFillingCustomiser.java000066400000000000000000000470161321075051700363470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LabelComboBox; import net.sf.latexdraw.ui.LabelListCellRenderer; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; import javax.swing.*; import java.awt.*; /** * This instrument modifies filling properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/11/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeFillingCustomiser extends ShapePropertyCustomiser { /** Sets the colour of the interior of a shape. */ protected MColorButton fillColButton; /** Sets the colour of the hatchings. */ protected MColorButton hatchColButton; /** Changes the first colour of a gradient. */ protected MColorButton gradStartColButton; /** Changes the second colour of a gradient. */ protected MColorButton gradEndColButton; /** Changes the style of filling. */ protected LabelComboBox fillStyleCB; /** Changes the mid point of the gradient. */ protected MSpinner gradMidPtField; /** Changes the angle of the gradient. */ protected MSpinner gradAngleField; /** Changes the separation of the hatchings. */ protected MSpinner hatchSepField; /** Changes the angle of the hatchings. */ protected MSpinner hatchAngleField; /** Changes the width of the hatchings. */ protected MSpinner hatchWidthField; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ShapeFillingCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } /** * Creates a list that contains all kinds of hatchings. * @return A created list. */ public static LabelComboBox createFillingChoice() { final LabelComboBox list = new LabelComboBox(); list.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(FillingStyle.NONE.toString()); label.setIcon(LResources.HATCH_NONE_ICON); list.addItem(label); label = new JLabel(FillingStyle.PLAIN.toString()); label.setIcon(LResources.HATCH_SOLID_ICON); list.addItem(label); label = new JLabel(FillingStyle.CLINES.toString()); label.setIcon(LResources.HATCH_CROSS_ICON); list.addItem(label); label = new JLabel(FillingStyle.CLINES_PLAIN.toString()); label.setIcon(LResources.HATCH_F_CROSS_ICON); list.addItem(label); label = new JLabel(FillingStyle.HLINES.toString()); label.setIcon(LResources.HATCH_HORIZ_ICON); list.addItem(label); label = new JLabel(FillingStyle.HLINES_PLAIN.toString()); label.setIcon(LResources.HATCH_F_HORIZ_ICON); list.addItem(label); label = new JLabel(FillingStyle.VLINES.toString()); label.setIcon(LResources.HACTH_VERT_ICON); list.addItem(label); label = new JLabel(FillingStyle.VLINES_PLAIN.toString()); label.setIcon(LResources.HATCH_F_VERT_ICON); list.addItem(label); label = new JLabel(FillingStyle.GRAD.toString()); label.setIcon(LResources.GRADIENT_ICON); list.addItem(label); return list; } @Override protected void initialiseWidgets() { // Creation of the filling widgets. fillColButton = new MColorButton(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.48"), new MButtonIcon(Color.WHITE));//$NON-NLS-1$ fillColButton.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.68")); //$NON-NLS-1$ fillStyleCB = createFillingChoice(); fillStyleCB.setPreferredSize(new Dimension(65,30)); fillStyleCB.setMaximumSize(new Dimension(65,30)); // Creation of the gradient widgets. gradStartColButton = new MColorButton(LangTool.INSTANCE.getString17("LaTeXDrawFrame.1"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ gradStartColButton.setToolTipText(LangTool.INSTANCE.getString17("LaTeXDrawFrame.7")); //$NON-NLS-1$ gradEndColButton = new MColorButton(LangTool.INSTANCE.getString17("LaTeXDrawFrame.2"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ gradEndColButton.setToolTipText(LangTool.INSTANCE.getString17("LaTeXDrawFrame.8")); //$NON-NLS-1$ gradMidPtField = new MSpinner(new MSpinner.MSpinnerNumberModel(0.5, 0., 1., 0.01), new JLabel(LangTool.INSTANCE.getString17("AbstractParametersFrame.4"))); //$NON-NLS-1$ gradMidPtField.setEditor(new JSpinner.NumberEditor(gradMidPtField, "0.000"));//$NON-NLS-1$ gradAngleField = new MSpinner(new MSpinner.MSpinnerNumberModel(0., -360., 360., 0.5), new JLabel(LangTool.INSTANCE.getString17("AbstractParametersFrame.3"))); //$NON-NLS-1$ gradAngleField.setEditor(new JSpinner.NumberEditor(gradAngleField, "0.0"));//$NON-NLS-1$ // Creation of the hatchings widgets. hatchWidthField = new MSpinner(new MSpinner.MSpinnerNumberModel(5., 0.1, 100., 0.1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.11"))); //$NON-NLS-1$ hatchWidthField.setEditor(new JSpinner.NumberEditor(hatchWidthField, "0.0"));//$NON-NLS-1$ hatchSepField = new MSpinner(new MSpinner.MSpinnerNumberModel(2., 0.01, 1000., 1.), new JLabel(LangTool.INSTANCE.getString18("AbstractParametersFrame.0"))); //$NON-NLS-1$ hatchSepField.setEditor(new JSpinner.NumberEditor(hatchSepField, "0.00"));//$NON-NLS-1$ hatchAngleField = new MSpinner(new MSpinner.MSpinnerNumberModel(0., -1000., 1000., 1.), new JLabel(LangTool.INSTANCE.getStringActions("ShapeFill.1"))); //$NON-NLS-1$ hatchAngleField.setEditor(new JSpinner.NumberEditor(hatchAngleField, "0.00"));//$NON-NLS-1$ hatchColButton = new MColorButton(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.49"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ hatchColButton.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.69")); //$NON-NLS-1$ } @Override protected void update(final IGroup shape) { if(shape.isInteriorStylable()) { final FillingStyle style = shape.getFillingStyle(); final boolean isFillable = style.isFilled(); final boolean hatchings = style.isHatchings(); final boolean gradient = style.isGradient(); // Updating the visibility of the widgets. composer.setWidgetVisible(fillColButton, isFillable); composer.setWidgetVisible(hatchColButton, hatchings); composer.setWidgetVisible(hatchAngleField, hatchings); composer.setWidgetVisible(hatchSepField, hatchings); composer.setWidgetVisible(hatchWidthField, hatchings); composer.setWidgetVisible(gradStartColButton, gradient); composer.setWidgetVisible(gradEndColButton, gradient); composer.setWidgetVisible(gradAngleField, gradient); composer.setWidgetVisible(gradMidPtField, gradient); fillStyleCB.setSelectedItemSafely(style.toString()); if(isFillable) fillColButton.setColor(shape.getFillingCol()); if(hatchings) { hatchColButton.setColor(shape.getHatchingsCol()); hatchAngleField.setValueSafely(Math.toDegrees(shape.getHatchingsAngle())); hatchSepField.setValueSafely(shape.getHatchingsSep()); hatchWidthField.setValueSafely(shape.getHatchingsWidth()); } else if(gradient){ gradStartColButton.setColor(shape.getGradColStart()); gradEndColButton.setColor(shape.getGradColEnd()); gradAngleField.setValueSafely(Math.toDegrees(shape.getGradAngle())); gradMidPtField.setValueSafely(shape.getGradMidPt()); } } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(fillColButton, visible); composer.setWidgetVisible(hatchColButton, visible); composer.setWidgetVisible(gradStartColButton, visible); composer.setWidgetVisible(gradEndColButton, visible); composer.setWidgetVisible(fillStyleCB, visible); composer.setWidgetVisible(gradMidPtField, visible); composer.setWidgetVisible(gradAngleField, visible); composer.setWidgetVisible(hatchSepField, visible); composer.setWidgetVisible(hatchAngleField, visible); composer.setWidgetVisible(hatchWidthField, visible); } @Override protected void initialiseInteractors() { try{ addInteractor(new List2PencilFilling(this)); addInteractor(new List2SelectionFilling(this)); addInteractor(new ColourButton2PencilFilling(this)); addInteractor(new ColourButton2SelectionFilling(this)); addInteractor(new Spinner2PencilFilling(this)); addInteractor(new Spinner2SelectionFilling(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The widget that modifies the colour of the interior of a shape. * @since 3.0 */ public MColorButton getFillColButton() { return fillColButton; } /** * @return The widget that modifies the colour of the hatchings. * @since 3.0 */ public MColorButton getHatchColButton() { return hatchColButton; } /** * @return The widget that modifies the colour of the starting gradient. * @since 3.0 */ public MColorButton getGradStartColButton() { return gradStartColButton; } /** * @return The widget that modifies the colour of the ending gradient. * @since 3.0 */ public MColorButton getGradEndColButton() { return gradEndColButton; } /** * @return The widget that sets if the shape is filled. * @since 3.0 */ public MComboBox getFillStyleCB() { return fillStyleCB; } /** * @return The widget that modifies the middle point of the gradient. * @since 3.0 */ public MSpinner getGradMidPtField() { return gradMidPtField; } /** * @return The widget that modifies the angle of the gradient. * @since 3.0 */ public MSpinner getGradAngleField() { return gradAngleField; } /** * @return The widget that modifies the separation between hatchings. * @since 3.0 */ public MSpinner getHatchSepField() { return hatchSepField; } /** * @return The widget that modifies the angle of the hatchings. * @since 3.0 */ public MSpinner getHatchAngleField() { return hatchAngleField; } /** * @return The widget that modifies the width of the hatchings. * @since 3.0 */ public MSpinner getHatchWidthField() { return hatchWidthField; } } /** * This link maps a list to a ModifyPencil action. */ class List2PencilFilling extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2PencilFilling(final ShapeFillingCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { action.setPencil(instrument.pencil); action.setProperty(ShapeProperties.FILLING_STYLE); action.setValue(FillingStyle.getStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return is==instrument.fillStyleCB && instrument.pencil.isActivated(); } } /** * This link maps a list to a ModifyShape action. */ class List2SelectionFilling extends ListForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected List2SelectionFilling(final ShapeFillingCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.FILLING_STYLE); action.setValue(FillingStyle.getStyle(getLabelText())); } @Override public boolean isConditionRespected() { final ItemSelectable is = interaction.getList(); return is==instrument.fillStyleCB && instrument.hand.isActivated(); } } /** * This link maps a colour button to the pencil. */ class ColourButton2PencilFilling extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2PencilFilling(final ShapeFillingCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); final AbstractButton but = interaction.getButton(); action.setPencil(instrument.pencil); if(but==instrument.fillColButton) action.setProperty(ShapeProperties.COLOUR_FILLING); else if(but==instrument.gradEndColButton) action.setProperty(ShapeProperties.COLOUR_GRADIENT_END); else if(but==instrument.gradStartColButton) action.setProperty(ShapeProperties.COLOUR_GRADIENT_START); else if(but==instrument.hatchColButton) action.setProperty(ShapeProperties.COLOUR_HATCHINGS); else action = null; } @Override public boolean isConditionRespected() { final AbstractButton but = interaction.getButton(); return (but==instrument.fillColButton || but==instrument.gradEndColButton || but==instrument.gradStartColButton || but==instrument.hatchColButton) && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the pencil. */ class ColourButton2SelectionFilling extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2SelectionFilling(final ShapeFillingCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); final AbstractButton but = interaction.getButton(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); if(but==instrument.fillColButton) action.setProperty(ShapeProperties.COLOUR_FILLING); else if(but==instrument.gradEndColButton) action.setProperty(ShapeProperties.COLOUR_GRADIENT_END); else if(but==instrument.gradStartColButton) action.setProperty(ShapeProperties.COLOUR_GRADIENT_START); else if(but==instrument.hatchColButton) action.setProperty(ShapeProperties.COLOUR_HATCHINGS); else action = null; } @Override public boolean isConditionRespected() { final AbstractButton but = interaction.getButton(); return (but==instrument.fillColButton || but==instrument.gradEndColButton || but==instrument.gradStartColButton || but==instrument.hatchColButton) && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2SelectionFilling extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2SelectionFilling(final ShapeFillingCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); setProperty(interaction.getSpinner(), instrument, action); } @Override public void updateAction() { setValue(interaction.getSpinner(), instrument, action); } @Override public boolean isConditionRespected() { final JSpinner spinner = getInteraction().getSpinner(); return instrument.hand.isActivated() && (spinner==instrument.gradAngleField || spinner==instrument.gradMidPtField || spinner==instrument.hatchAngleField || spinner==instrument.hatchSepField || spinner==instrument.hatchWidthField); } protected static void setProperty(final JSpinner spinner, final ShapeFillingCustomiser sfc, final ShapePropertyAction act) { if(spinner==sfc.gradAngleField) act.setProperty(ShapeProperties.GRAD_ANGLE); else if(spinner==sfc.gradMidPtField) act.setProperty(ShapeProperties.GRAD_MID_POINT); else if(spinner==sfc.hatchAngleField) act.setProperty(ShapeProperties.HATCHINGS_ANGLE); else if(spinner==sfc.hatchSepField) act.setProperty(ShapeProperties.HATCHINGS_SEP); else if(spinner==sfc.hatchWidthField) act.setProperty(ShapeProperties.HATCHINGS_WIDTH); else act.setProperty(null); } protected static void setValue(final JSpinner spinner, final ShapeFillingCustomiser sfc, final ShapePropertyAction act) { if(spinner==sfc.hatchAngleField || spinner==sfc.gradAngleField) act.setValue(Math.toRadians(Double.valueOf(spinner.getValue().toString()))); else act.setValue(Double.valueOf(spinner.getValue().toString())); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2PencilFilling extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2PencilFilling(final ShapeFillingCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setPencil(instrument.pencil); Spinner2SelectionFilling.setProperty(interaction.getSpinner(), instrument, action); } @Override public void updateAction() { Spinner2SelectionFilling.setValue(interaction.getSpinner(), instrument, action); } @Override public boolean isConditionRespected() { final JSpinner spinner = interaction.getSpinner(); return instrument.pencil.isActivated() && (spinner==instrument.gradAngleField || spinner==instrument.gradMidPtField || spinner==instrument.hatchAngleField || spinner==instrument.hatchSepField || spinner==instrument.hatchWidthField); } } ShapeFreeHandCustomiser.java000066400000000000000000000251231321075051700364320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Dimension; import javax.swing.JLabel; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.LabelComboBox; import net.sf.latexdraw.ui.LabelListCellRenderer; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MSpinner.MSpinnerNumberModel; /** * This instrument modifies free hand properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-15
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeFreeHandCustomiser extends ShapePropertyCustomiser { /** The type of the freehand. */ protected LabelComboBox freeHandType; /** The gap to consider between the points. */ protected MSpinner gapPoints; /** Defines if the shape is open. */ protected MCheckBox open; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeFreeHandCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IFreeHandProp.class)) { freeHandType.setSelectedItemSafely(shape.getType().toString()); gapPoints.setValueSafely(shape.getInterval()); open.setSelected(shape.isOpen()); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(freeHandType, activated); composer.setWidgetVisible(gapPoints, activated); composer.setWidgetVisible(open, activated); } @Override protected void initialiseWidgets() { freeHandType = new LabelComboBox(); freeHandType.setLabel(new JLabel(LangTool.INSTANCE.getString19("ParametersAkinPointsFrame.2"))); //$NON-NLS-1$ freeHandType.setRenderer(new LabelListCellRenderer()); JLabel label = new JLabel(IFreeHandProp.FreeHandType.CURVES.toString()); label.setIcon(LResources.CURVES_FREEHAND_ICON); freeHandType.addItem(label); label = new JLabel(IFreeHandProp.FreeHandType.LINES.toString()); label.setIcon(LResources.LINES_FREEHAND_ICON); freeHandType.addItem(label); freeHandType.setPreferredSize(new Dimension(90, 30)); freeHandType.setMaximumSize(new Dimension(90, 30)); gapPoints = new MSpinner(new MSpinnerNumberModel(5, 1, 1000, 1), new JLabel(LangTool.INSTANCE.getString19("ParametersAkinPointsFrame.0"))); //$NON-NLS-1$ open = new MCheckBox(LangTool.INSTANCE.getString19("ParametersAkinPointsFrame.1")); //$NON-NLS-1$ } /** * @return The type of the freehand. * @since 3.0 */ public final MComboBox getFreeHandType() { return freeHandType; } /** * @return The gap to consider between the points. * @since 3.0 */ public final MSpinner getGapPoints() { return gapPoints; } /** * @return The check box that defines if the shape is open. * @since 3.0 */ public final MCheckBox getOpen() { return open; } @Override protected void initialiseInteractors() { try { addInteractor(new Combobox2CustomPencilFH(this)); addInteractor(new Combobox2CustomSelectedFH(this)); addInteractor(new Spinner2PencilFreeHand(this)); addInteractor(new Spinner2SelectionFreeHand(this)); addInteractor(new Checkbox2PencilFreeHand(this)); addInteractor(new Checkbox2SelectionFreeHand(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** Maps a checkbox to an action. */ private abstract static class CheckboxForShapeFreeHandCust
    extends CheckBoxForCustomiser { protected CheckboxForShapeFreeHandCust(final ShapeFreeHandCustomiser instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, clazzAction); } @Override public void initAction() { action.setProperty(ShapeProperties.FREEHAND_OPEN); action.setValue(interaction.getCheckBox().isSelected()); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.open; } } /** Maps a checkbox to an action that modifies the pencil. */ private static class Checkbox2PencilFreeHand extends CheckboxForShapeFreeHandCust { protected Checkbox2PencilFreeHand(final ShapeFreeHandCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** This link maps a colour button to the selected shapes. */ private static class Checkbox2SelectionFreeHand extends CheckboxForShapeFreeHandCust { protected Checkbox2SelectionFreeHand(final ShapeFreeHandCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } /** Maps a spinner to an action. */ private abstract static class SpinnerForShapeFreeHandCust extends SpinnerForCustomiser { protected SpinnerForShapeFreeHandCust(final ShapeFreeHandCustomiser instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, clazzAction); } @Override public void initAction() { action.setProperty(ShapeProperties.FREEHAND_INTERVAL); } @Override public boolean isConditionRespected() { return interaction.getSpinner()==instrument.gapPoints; } @Override public void updateAction() { action.setValue(Integer.valueOf(interaction.getSpinner().getValue().toString())); } } /** Maps a spinner to an action that modifies the pencil. */ private static class Spinner2PencilFreeHand extends SpinnerForShapeFreeHandCust { protected Spinner2PencilFreeHand(final ShapeFreeHandCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** * This link maps a colour button to the selected shapes. */ private static class Spinner2SelectionFreeHand extends SpinnerForShapeFreeHandCust { protected Spinner2SelectionFreeHand(final ShapeFreeHandCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } /** Maps a combobox to an action that modifies freehand's parameters. */ private abstract static class Combobox2CustomFH extends ListForCustomiser { protected Combobox2CustomFH(final ShapeFreeHandCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public boolean isConditionRespected() { return instrument.freeHandType==interaction.getList(); } @Override public void initAction() { action.setProperty(ShapeProperties.FREEHAND_STYLE); if(getLabelText().equals(IFreeHandProp.FreeHandType.CURVES.toString())) action.setValue(IFreeHandProp.FreeHandType.CURVES); else action.setValue(IFreeHandProp.FreeHandType.LINES); } } /** Maps a combobox to an action that modifies freehand's parameters of the pencil. */ private static class Combobox2CustomPencilFH extends Combobox2CustomFH { protected Combobox2CustomPencilFH(final ShapeFreeHandCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** Maps a combobox to an action that modifies the freehand's parameters of the selection. */ private static class Combobox2CustomSelectedFH extends Combobox2CustomFH { protected Combobox2CustomSelectedFH(final ShapeFreeHandCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } } ShapeGridCustomiser.java000066400000000000000000000363261321075051700356520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Color; import javax.swing.JLabel; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.IGridProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MSpinner.MSpinnerNumberModel; import org.malai.swing.widget.MToggleButton; /** * This instrument modifies grids properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-15
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeGridCustomiser extends ShapePropertyCustomiser { /** Changes the colour of the labels. */ protected MColorButton colourLabels; /** Changes the colour of the sub-grid. */ protected MColorButton colourSubGrid; /** Changes the width of the main grid. */ protected MSpinner gridWidth; /** Changes the width of the sub-grid. */ protected MSpinner subGridWidth; /** Changes the number of dots composing the main grid. */ protected MSpinner gridDots; /** Changes the number of dots composing the sub-grid. */ protected MSpinner subGridDots; /** Changes the division of the sub-grid. */ protected MSpinner subGridDiv; /** The field that defines the Y-coordinates of the labels. */ protected MToggleButton labelsYInvertedCB; /** The field that defines the X-coordinates of the labels. */ protected MToggleButton labelsXInvertedCB; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot * be accessed from the hand. * @since 3.0 */ public ShapeGridCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup gp) { if(gp.isTypeOf(IGridProp.class)) { colourLabels.setColor(gp.getGridLabelsColour()); colourSubGrid.setColor(gp.getSubGridColour()); gridWidth.setValueSafely(gp.getGridWidth()); subGridWidth.setValueSafely(gp.getSubGridWidth()); gridDots.setValueSafely(gp.getGridDots()); subGridDots.setValueSafely(gp.getSubGridDots()); subGridDiv.setValueSafely(gp.getSubGridDiv()); labelsYInvertedCB.setSelected(!gp.isXLabelSouth()); labelsXInvertedCB.setSelected(!gp.isYLabelWest()); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(colourLabels, activated); composer.setWidgetVisible(colourSubGrid, activated); composer.setWidgetVisible(gridWidth, activated); composer.setWidgetVisible(subGridWidth, activated); composer.setWidgetVisible(gridDots, activated); composer.setWidgetVisible(subGridDots, activated); composer.setWidgetVisible(subGridDiv, activated); composer.setWidgetVisible(labelsYInvertedCB, visible); composer.setWidgetVisible(labelsXInvertedCB, visible); } @Override protected void initialiseWidgets() { colourLabels = new MColorButton(LangTool.INSTANCE.getStringActions("ShapeGrid.1"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ colourSubGrid = new MColorButton(LangTool.INSTANCE.getStringActions("ShapeGrid.2"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ gridWidth = new MSpinner(new MSpinnerNumberModel(1., 0.1, 1000., 0.5), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.6"))); //$NON-NLS-1$ subGridWidth = new MSpinner(new MSpinnerNumberModel(1., 0.1, 1000., 0.5), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.7"))); //$NON-NLS-1$ gridDots = new MSpinner(new MSpinnerNumberModel(0, 0, 10000, 1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.5"))); //$NON-NLS-1$ subGridDots = new MSpinner(new MSpinnerNumberModel(0, 0, 10000, 1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.4"))); //$NON-NLS-1$ subGridDiv = new MSpinner(new MSpinnerNumberModel(1, 1, 100, 1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.8"))); //$NON-NLS-1$ labelsYInvertedCB = new MToggleButton(LResources.GRID_Y_LABEL); labelsYInvertedCB.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeGrid.3")); //$NON-NLS-1$ labelsXInvertedCB = new MToggleButton(LResources.GRID_X_LABEL); labelsXInvertedCB.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeGrid.4")); //$NON-NLS-1$ } @Override protected void initialiseInteractors() { try{ addInteractor(new ColourButton2PencilGrid(this)); addInteractor(new ColourButton2SelectionGrid(this)); addInteractor(new Spinner2PencilGrid(this)); addInteractor(new Spinner2SelectionGrid(this)); addInteractor(new CheckBox2ModifySelectionGrid(this)); addInteractor(new CheckBox2ModifyPencilGrid(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The field that defines the Y-coordinates of the labels. * @since 3.0 */ public MToggleButton getLabelsYInvertedCB() { return labelsYInvertedCB; } /** * @return The field that defines the X-coordinates of the labels. * @since 3.0 */ public MToggleButton getLabelsXInvertedCB() { return labelsXInvertedCB; } /** * @return The button that permits to change the colour of the labels. * @since 3.0 */ public final MColorButton getColourLabels() { return colourLabels; } /** * @return The button that permits to change the colour of the sub-grid. * @since 3.0 */ public final MColorButton getColourSubGrid() { return colourSubGrid; } /** * @return The spinner that permits to change the width of the main grid. * @since 3.0 */ public final MSpinner getGridWidth() { return gridWidth; } /** * @return The spinner that permits to change the width of the sub-grid. * @since 3.0 */ public final MSpinner getSubGridWidth() { return subGridWidth; } /** * @return The spinner that permits to change the number of dots composing the main grid. * @since 3.0 */ public final MSpinner getGridDots() { return gridDots; } /** * @return The spinner that permits to change the number of dots composing the sub-grid. * @since 3.0 */ public final MSpinner getSubGridDots() { return subGridDots; } /** * @return The spinner that permits to change the division of the sub-grid. * @since 3.0 */ public final MSpinner getSubGridDiv() { return subGridDiv; } private abstract static class CheckBox4ShapeGridCust
    extends ButtonPressedForCustomiser { protected CheckBox4ShapeGridCust(final ShapeGridCustomiser ins, final Class actClazz) throws InstantiationException, IllegalAccessException { super(ins, actClazz); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.labelsYInvertedCB || interaction.getButton()==instrument.labelsXInvertedCB; } @Override public void initAction() { if(interaction.getButton()==instrument.labelsYInvertedCB) action.setProperty(ShapeProperties.GRID_LABEL_POSITION_Y); else action.setProperty(ShapeProperties.GRID_LABEL_POSITION_X); } @Override public void updateAction() { action.setValue(!interaction.getButton().isSelected()); } } /** The link that maps a checkbox to an action that modifies the selection. */ private static class CheckBox2ModifySelectionGrid extends CheckBox4ShapeGridCust { protected CheckBox2ModifySelectionGrid(final ShapeGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return super.isConditionRespected() && instrument.hand.isActivated(); } } /** The link that maps a checkbox to an action that modifies the pencil. */ private static class CheckBox2ModifyPencilGrid extends CheckBox4ShapeGridCust { protected CheckBox2ModifyPencilGrid(final ShapeGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return super.isConditionRespected() && instrument.pencil.isActivated(); } } private abstract static class SpinnerForShapeGridCust extends SpinnerForCustomiser { protected SpinnerForShapeGridCust(final ShapeGridCustomiser instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, clazzAction); } @Override public void initAction() { final Object spinner = interaction.getSpinner(); if(spinner==instrument.gridWidth) action.setProperty(ShapeProperties.GRID_WIDTH); else if(spinner==instrument.subGridWidth) action.setProperty(ShapeProperties.GRID_SUBGRID_WIDTH); else if(spinner==instrument.gridDots) action.setProperty(ShapeProperties.GRID_DOTS); else if(spinner==instrument.subGridDots) action.setProperty(ShapeProperties.GRID_SUBGRID_DOTS); else action.setProperty(ShapeProperties.GRID_SUBGRID_DIV); } @Override public boolean isConditionRespected() { final Object spinner = interaction.getSpinner(); return spinner==instrument.gridWidth || spinner==instrument.subGridWidth || spinner==instrument.gridDots || spinner==instrument.subGridDots || spinner==instrument.subGridDiv; } @Override public void updateAction() { if(interaction.getSpinner()==instrument.gridDots || interaction.getSpinner()==instrument.subGridDots || interaction.getSpinner()==instrument.subGridDiv) action.setValue(Integer.valueOf(interaction.getSpinner().getValue().toString())); else super.updateAction(); } } private static class Spinner2PencilGrid extends SpinnerForShapeGridCust { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2PencilGrid(final ShapeGridCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** * This link maps a colour button to the selected shapes. */ private static class Spinner2SelectionGrid extends SpinnerForShapeGridCust { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected Spinner2SelectionGrid(final ShapeGridCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } private abstract static class ColourButtonForShapeGridCust extends ColourButtonForCustomiser { protected ColourButtonForShapeGridCust(final ShapeGridCustomiser instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, clazzAction); } @Override public void initAction() { super.initAction(); if(interaction.getButton()==instrument.colourLabels) action.setProperty(ShapeProperties.GRID_LABELS_COLOUR); else action.setProperty(ShapeProperties.GRID_SUBGRID_COLOUR); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.colourLabels || interaction.getButton()==instrument.colourSubGrid; } } /** * This link maps a colour button to the pencil. */ private static class ColourButton2PencilGrid extends ColourButtonForShapeGridCust { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2PencilGrid(final ShapeGridCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } /** * This link maps a colour button to the selected shapes. */ private static class ColourButton2SelectionGrid extends ColourButtonForShapeGridCust { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButton2SelectionGrid(final ShapeGridCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } } ShapeGrouper.java000066400000000000000000000114511321075051700343220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.util.List; import net.sf.latexdraw.actions.shape.JoinShapes; import net.sf.latexdraw.actions.shape.SelectShapes; import net.sf.latexdraw.actions.shape.SeparateShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.action.ActionsRegistry; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; /** * This instrument groups and separates shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 02/13/2012
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeGrouper extends ShapePropertyCustomiser { /** The widget to group shapes. */ protected MButton groupB; /** The widget to separate shapes. */ protected MButton sepB; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public ShapeGrouper(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { groupB = new MButton(LResources.JOIN_ICON); groupB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.75")); //$NON-NLS-1$ sepB = new MButton(LResources.SEPARATE_ICON); sepB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.76")); //$NON-NLS-1$ } @Override protected void update(final IGroup shape) { if(isActivated() && !shape.isEmpty()) { final boolean separate = shape.size()==1 && shape.getShapeAt(0) instanceof IGroup; groupB.setVisible(shape.size()>1); sepB.setVisible(separate); } } @Override protected void setWidgetsVisible(final boolean visible) { groupB.setVisible(visible); sepB.setVisible(visible); } @Override protected void initialiseInteractors() { try{ addInteractor(new Button2GroupShapes(this)); addInteractor(new Button2SeparateShapes(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The widget to group shapes. * @since 3.0 */ public MButton getGroupB() { return groupB; } /** * @return The widget to separate shapes. * @since 3.0 */ public MButton getSepB() { return sepB; } /** This link maps a button to an action that separates the selected group. */ private static class Button2SeparateShapes extends InteractorImpl { protected Button2SeparateShapes(final ShapeGrouper ins) throws InstantiationException, IllegalAccessException { super(ins, false, SeparateShapes.class, ButtonPressed.class); } @Override public void initAction() { final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); final List shapes = selection.shapes(); if(shapes.size()==1 && shapes.get(0) instanceof IGroup) action.setShape(shapes.get(0)); action.setDrawing(instrument.pencil.canvas().getDrawing()); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.getSepB(); } } /** This link maps a button to an action that groups the selected shapes. */ private static class Button2GroupShapes extends InteractorImpl { protected Button2GroupShapes(final ShapeGrouper ins) throws InstantiationException, IllegalAccessException { super(ins, false, JoinShapes.class, ButtonPressed.class); } @Override public void initAction() { final SelectShapes selection = ActionsRegistry.INSTANCE.getAction(SelectShapes.class); final List shapes = selection.shapes(); for(final IShape sh : shapes) action.addShape(sh); action.setDrawing(instrument.pencil.canvas().getDrawing()); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.getGroupB(); } } } ShapePlotCustomiser.java000066400000000000000000000261131321075051700356740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.parsers.ps.PSFunctionParser; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MSpinner; import javax.swing.*; import java.awt.*; /** * This instrument modifies plot parameters.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2014-10-05
    * @author Arnaud BLOUIN * @since 3.1 */ public class ShapePlotCustomiser extends ShapePropertyCustomiser { MSpinner nbPtsSpinner; MSpinner minXSpinner; MSpinner maxXSpinner; MSpinner xScaleSpinner; MSpinner yScaleSpinner; MCheckBox polarCB; MComboBox plotStyleCB; /** * Creates the instrument. * @param hand The Hand instrument. * @param composer The composer that manages the widgets of the instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null or if the drawing cannot be accessed from the hand. */ public ShapePlotCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(IPlotProp.class)) { nbPtsSpinner.setValueSafely(shape.getNbPlottedPoints()); minXSpinner.setValueSafely(shape.getPlotMinX()); maxXSpinner.setValueSafely(shape.getPlotMaxX()); xScaleSpinner.setValueSafely(shape.getXScale()); yScaleSpinner.setValueSafely(shape.getYScale()); polarCB.setSelected(shape.isPolar()); plotStyleCB.setSelectedItemSafely(shape.getPlotStyle()); setActivated(true); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(nbPtsSpinner, visible); composer.setWidgetVisible(minXSpinner, visible); composer.setWidgetVisible(maxXSpinner, visible); composer.setWidgetVisible(xScaleSpinner, visible); composer.setWidgetVisible(yScaleSpinner, visible); composer.setWidgetVisible(polarCB, visible); composer.setWidgetVisible(plotStyleCB, visible); } @Override protected void initialiseWidgets() { nbPtsSpinner = new MSpinner(new MSpinner.MSpinnerNumberModel(50, 1, 10000, 10), new JLabel("Plotted points:")); nbPtsSpinner.setEditor(new JSpinner.NumberEditor(nbPtsSpinner, "0"));//$NON-NLS-1$ minXSpinner = new MSpinner(new MSpinner.MSpinnerNumberModel(0.0, -100000.0, 100000.0, 1.0), new JLabel("X-min:")); minXSpinner.setEditor(new JSpinner.NumberEditor(minXSpinner, "0.0"));//$NON-NLS-1$ maxXSpinner = new MSpinner(new MSpinner.MSpinnerNumberModel(10.0, -100000.0, 100000.0, 1.0), new JLabel("X-max:")); maxXSpinner.setEditor(new JSpinner.NumberEditor(maxXSpinner, "0.0"));//$NON-NLS-1$ xScaleSpinner = new MSpinner(new MSpinner.MSpinnerNumberModel(1.0, 0.0001, 10000.0, 0.1), new JLabel("X scale:")); xScaleSpinner.setEditor(new JSpinner.NumberEditor(xScaleSpinner, "0.0"));//$NON-NLS-1$ yScaleSpinner = new MSpinner(new MSpinner.MSpinnerNumberModel(1.0, 0.0001, 10000.0, 0.1), new JLabel("Y scale:")); yScaleSpinner.setEditor(new JSpinner.NumberEditor(yScaleSpinner, "0.0"));//$NON-NLS-1$ polarCB = new MCheckBox("Polar"); polarCB.setToolTipText("Polar or cartesian coordinates."); plotStyleCB = new MComboBox<>(IPlotProp.PlotStyle.values(), null); plotStyleCB.setPreferredSize(new Dimension(110, 30)); plotStyleCB.setMaximumSize(new Dimension(110, 30)); } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2PencilPlot(this)); addInteractor(new Spinner2SelectionPlot(this)); addInteractor(new CheckBox2PencilPlot(this)); addInteractor(new CheckBox2SelectionPlot(this)); addInteractor(new Combobox2CustomPencilPlot(this)); addInteractor(new Combobox2CustomSelectionPlot(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** @return The widget that permits to change the number of plotted points. */ public MSpinner getNbPtsSpinner() { return nbPtsSpinner; } /** @return The widget that permits to change the X-min of the plot. */ public MSpinner getMinXSpinner() { return minXSpinner; } /** @return The widget that permits to change the X-max of the plot. */ public MSpinner getMaxXSpinner() { return maxXSpinner; } /** @return The widget that permits to change the x scale of the plot. */ public MSpinner getXScaleSpinner() { return xScaleSpinner; } /** @return The widget that permits to change the y scale of the plot. */ public MSpinner getYScaleSpinner() { return yScaleSpinner; } /** @return The widget that permits to change kind of coordinates. */ public MCheckBox getPolarCB() { return polarCB; } /** @return The widget to set the style of the plot. */ public MComboBox getPlotStyleCB() { return plotStyleCB; } private abstract static class SpinnerForPlotCust
    extends SpinnerForCustomiser { protected SpinnerForPlotCust(final ShapePlotCustomiser instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, clazzAction); } @Override public void initAction() { final Object spinner = interaction.getSpinner(); if(spinner==instrument.nbPtsSpinner) action.setProperty(ShapeProperties.PLOT_NB_PTS); else if(spinner==instrument.minXSpinner) action.setProperty(ShapeProperties.PLOT_MIN_X); else if(spinner==instrument.maxXSpinner) action.setProperty(ShapeProperties.PLOT_MAX_X); else if(spinner==instrument.xScaleSpinner) action.setProperty(ShapeProperties.X_SCALE); else if(spinner==instrument.yScaleSpinner) action.setProperty(ShapeProperties.Y_SCALE); } @Override public boolean isConditionRespected() { final Object spinner = interaction.getSpinner(); return spinner==instrument.nbPtsSpinner || spinner==instrument.maxXSpinner || spinner==instrument.minXSpinner || spinner==instrument.xScaleSpinner || spinner==instrument.yScaleSpinner; } @Override public void updateAction() { if(interaction.getSpinner()==instrument.nbPtsSpinner) action.setValue(Integer.valueOf(interaction.getSpinner().getValue().toString())); else super.updateAction(); } } private static class Spinner2PencilPlot extends SpinnerForPlotCust { protected Spinner2PencilPlot(final ShapePlotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected();} } private static class Spinner2SelectionPlot extends SpinnerForPlotCust { protected Spinner2SelectionPlot(final ShapePlotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected() && PSFunctionParser.isValidPostFixEquation(instrument.pencil.canvas().getDrawing().getSelection().getPlotEquation(), Double.valueOf(instrument.getMinXSpinner().getValue().toString()), Double.valueOf(instrument.getMaxXSpinner().getValue().toString()), Double.valueOf(instrument.getNbPtsSpinner().getValue().toString())); } } private static class CheckBox2PencilPlot extends CheckBoxForCustomiser { CheckBox2PencilPlot(final ShapePlotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.PLOT_POLAR); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.polarCB && instrument.pencil.isActivated(); } } private static class CheckBox2SelectionPlot extends CheckBoxForCustomiser { CheckBox2SelectionPlot(final ShapePlotCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.PLOT_POLAR); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.polarCB && instrument.hand.isActivated(); } } private static class Combobox2CustomPencilPlot extends ListForCustomiser { Combobox2CustomPencilPlot(final ShapePlotCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { action.setProperty(ShapeProperties.PLOT_STYLE); action.setValue(interaction.getList().getSelectedObjects()[0]); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && instrument.plotStyleCB==interaction.getList(); } } private static class Combobox2CustomSelectionPlot extends ListForCustomiser { Combobox2CustomSelectionPlot(final ShapePlotCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { action.setProperty(ShapeProperties.PLOT_STYLE); action.setValue(interaction.getList().getSelectedObjects()[0]); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && instrument.plotStyleCB==interaction.getList(); } } } ShapePositioner.java000066400000000000000000000072431321075051700350360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.shape.MoveBackForegroundShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; /** * Puts shapes in background / foreground.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-04-21
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapePositioner extends ShapePropertyCustomiser { /** The foreground button. */ protected MButton foregroundB; /** The background button. */ protected MButton backgroundB; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public ShapePositioner(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { foregroundB = new MButton(LResources.FOREGROUND_ICON); foregroundB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.70")); //$NON-NLS-1$ backgroundB = new MButton(LResources.BACKGROUND_ICON); backgroundB.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.71")); //$NON-NLS-1$ } @Override protected void initialiseInteractors() { try { addInteractor(new Button2MoveBackForeground(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** @return The foreground button. */ public MButton getForegroundButton() { return foregroundB; } /** @return The background button. */ public MButton getBackgroundButton() { return backgroundB; } @Override protected void update(final IGroup shape) { // Nothing to do. } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(foregroundB, visible); composer.setWidgetVisible(backgroundB, visible); } } /** This link maps a button interaction to an action that puts shapes in foreground / background. */ class Button2MoveBackForeground extends InteractorImpl { protected Button2MoveBackForeground(final ShapePositioner ins) throws InstantiationException, IllegalAccessException { super(ins, false, MoveBackForegroundShapes.class, ButtonPressed.class); } @Override public void initAction() { action.setIsForeground(interaction.getButton()==instrument.foregroundB); action.setDrawing(instrument.pencil.canvas().getDrawing()); action.setShape(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.backgroundB || interaction.getButton()==instrument.foregroundB; } } ShapePropertyCustomiser.java000066400000000000000000000174141321075051700366060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.ItemSelectable; import java.util.Objects; import javax.swing.JColorChooser; import javax.swing.JLabel; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import org.malai.action.Action; import org.malai.instrument.InteractorImpl; import org.malai.swing.instrument.WidgetInstrument; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.interaction.library.CheckBoxModified; import org.malai.swing.interaction.library.ListSelectionModified; import org.malai.swing.interaction.library.SpinnerModified; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MColorButton; import org.malai.undo.Undoable; /** * This abstract instrument defines the base definition of instruments that customise * shape properties.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/10
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class ShapePropertyCustomiser extends WidgetInstrument { /** The Hand instrument. */ protected Hand hand; /** The Pencil instrument. */ protected Pencil pencil; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ protected ShapePropertyCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer); this.hand = Objects.requireNonNull(hand); this.pencil = Objects.requireNonNull(pencil); } @Override public void onActionDone(final Action action) { update(); } @Override public void onUndoableUndo(final Undoable undoable) { update(); } @Override public void onUndoableRedo(final Undoable undoable) { update(); } /** * Updates the instrument and its widgets * @since 3.0 */ public void update() { if(pencil.isActivated()) update(ShapeFactory.createGroup(pencil.createShapeInstance())); else update(hand.canvas().getDrawing().getSelection()); } /** * Updates the widgets using the given shape. * @param shape The shape used to update the widgets. If null, nothing is performed. * @since 3.0 */ protected abstract void update(final IGroup shape); /** * Sets the widgets of the instrument visible or not. * @param visible True: they are visible. * @since 3.0 */ protected abstract void setWidgetsVisible(final boolean visible); @Override public void setActivated(final boolean activated) { super.setActivated(activated); setWidgetsVisible(activated); } /** * @return The Hand instrument. * @since 3.0 */ public Hand getHand() { return hand; } /** * @return The Pencil instrument. * @since 3.0 */ public Pencil getPencil() { return pencil; } } /** * This link maps a list widget to an object. */ abstract class ListForCustomiser
    extends InteractorImpl { /** * Creates the link. * @param instrument The instrument that contains the link. * @param clazzAction The class of the action to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ListForCustomiser(final N instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, false, clazzAction, ListSelectionModified.class); } /** * @return The selected text. Can be null. * @since 3.0 */ protected String getLabelText() { final ItemSelectable is = interaction.getList(); final Object[] selection = is.getSelectedObjects(); return selection.length!=1 && ! (selection[0] instanceof JLabel) ? null : ((JLabel)selection[0]).getText(); } } /** * This link maps a colour button to an object. */ abstract class ColourButtonForCustomiser extends InteractorImpl { /** * Creates the link. * @param instrument The instrument that contains the link. * @param clazzAction The class of the action to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ColourButtonForCustomiser(final N instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, false, clazzAction, ButtonPressed.class); } @Override public void initAction() { final MColorButton button = (MColorButton)interaction.getButton(); action.setValue(JColorChooser.showDialog(button, "", button.getColor())); //$NON-NLS-1$ } } /** * This link maps a checkbox to an object. */ abstract class CheckBoxForCustomiser extends InteractorImpl { /** * Creates the link. * @param instrument The instrument that contains the link. * @param clazzAction The class of the action to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected CheckBoxForCustomiser(final N instrument, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(instrument, false, clazzAction, CheckBoxModified.class); } @Override public void initAction() { action.setValue(interaction.getCheckBox().isSelected()); } } /** * This link maps a button to an object. */ abstract class ButtonPressedForCustomiser extends InteractorImpl { /** * Creates the link. * @param ins The instrument that contains the link. * @param clazzAction The class of the action to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected ButtonPressedForCustomiser(final N ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, false, clazzAction, ButtonPressed.class); } } /** * This link maps a spinner to an object. */ abstract class SpinnerForCustomiser extends InteractorImpl { /** * Creates the link. * @param ins The instrument that contains the link. * @param clazzAction The class of the action to create. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ protected SpinnerForCustomiser(final N ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, false, clazzAction, SpinnerModified.class); } @Override public void updateAction() { action.setValue(Double.valueOf(interaction.getSpinner().getValue().toString())); } } ShapeRotationCustomiser.java000066400000000000000000000157551321075051700365670ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import javax.swing.AbstractButton; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.shape.RotateShapes; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.ButtonPressed; import org.malai.swing.interaction.library.SpinnerModified; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButton; import org.malai.swing.widget.MSpinner; import scala.Option; /** * This instrument modifies the rotation angle of selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/31/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeRotationCustomiser extends ShapePropertyCustomiser { /** The rotation button to perform 90 degree rotation. */ protected MButton rotate90Button; /** The rotation button to perform 180 degree rotation. */ protected MButton rotate180Button; /** The rotation button to perform 270 degree rotation. */ protected MButton rotate270Button; /** The field that modifies the rotation angle. */ protected MSpinner rotationField; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ShapeRotationCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { rotate90Button = new MButton(LResources.ROTATE_90_ICON); rotate90Button.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.3")); //$NON-NLS-1$ rotate180Button = new MButton(LResources.ROTATE_180_ICON); rotate180Button.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.4")); //$NON-NLS-1$ rotate270Button = new MButton(LResources.ROTATE_270_ICON); rotate270Button.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.5")); //$NON-NLS-1$ rotationField = new MSpinner(new MSpinner.MSpinnerNumberModel(0., -360., 360., 0.1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.7"))); //$NON-NLS-1$ rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0")); //$NON-NLS-1$ } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(rotate180Button, visible); composer.setWidgetVisible(rotate270Button, visible); composer.setWidgetVisible(rotate90Button, visible); composer.setWidgetVisible(rotationField, visible); } @Override protected void update(final IGroup shape) { if(isActivated() && shape!=null) rotationField.setValueSafely(Math.toDegrees(shape.getRotationAngle())); } @Override protected void initialiseInteractors() { try{ addInteractor(new ButtonPress2RotateShape(this)); addInteractor(new Spinner2RotateShape(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The rotation button to perform 90 degree rotation. * @since 3.0 */ public MButton getRotate90Button() { return rotate90Button; } /** * @return The rotation button to perform 180 degree rotation. * @since 3.0 */ public MButton getRotate180Button() { return rotate180Button; } /** * @return The rotation button to perform 270 degree rotation. * @since 3.0 */ public MButton getRotate270Button() { return rotate270Button; } /** * @return The field that modifies the rotation angle. * @since 3.0 */ public MSpinner getRotationField() { return rotationField; } } /** * This link maps a spinner to an action that rotates the selected shapes. */ class Spinner2RotateShape extends InteractorImpl { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ Spinner2RotateShape(final ShapeRotationCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, RotateShapes.class, SpinnerModified.class); } @Override public boolean isConditionRespected() { return instrument.getRotationField()==interaction.getSpinner(); } @Override public void updateAction() { final Option obj = action.shape(); if(obj.isDefined()) action.setRotationAngle(Math.toRadians(Double.valueOf(interaction.getSpinner().getValue().toString()))-obj.get().getRotationAngle()); } @Override public void initAction() { final IShape sh = instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false); action.setShape(sh); action.setGravityCentre(sh.getGravityCentre()); } } /** * This link maps a button to an action that rotates the selected shapes. */ class ButtonPress2RotateShape extends InteractorImpl { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ ButtonPress2RotateShape(final ShapeRotationCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, RotateShapes.class, ButtonPressed.class); } @Override public boolean isConditionRespected() { final AbstractButton button = interaction.getButton(); return button==instrument.rotate90Button || button==instrument.rotate180Button || button==instrument.rotate270Button; } @Override public void initAction() { final double angle; final AbstractButton button = interaction.getButton(); if(button==instrument.rotate90Button) angle = Math.PI/2.; else if(button==instrument.rotate180Button) angle = Math.PI; else angle = -Math.PI/2.; action.setGravityCentre(instrument.pencil.canvas().getDrawing().getSelection().getGravityCentre()); action.setRotationAngle(angle); action.setShape(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } } ShapeShadowCustomiser.java000066400000000000000000000266411321075051700362110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.Color; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MButtonIcon; import org.malai.swing.widget.MCheckBox; import org.malai.swing.widget.MColorButton; import org.malai.swing.widget.MSpinner; /** * This instrument modifies shadow properties of shapes or the pencil.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/07/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeShadowCustomiser extends ShapePropertyCustomiser { /** Sets if the a shape has a shadow or not. */ protected MCheckBox shadowCB; /** Sets the colour of the shadow of a figure. */ protected MColorButton shadowColB; /** Changes the size of the shadow. */ protected MSpinner shadowSizeField; /** Changes the angle of the shadow. */ protected MSpinner shadowAngleField; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ShapeShadowCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { shadowCB = new MCheckBox(LangTool.INSTANCE.getString17("LaTeXDrawFrame.0")); //$NON-NLS-1$ shadowCB.setToolTipText(LangTool.INSTANCE.getString17("LaTeXDrawFrame.4")); //$NON-NLS-1$ shadowColB = new MColorButton(LangTool.INSTANCE.getStringActions("ShapeBord.1"), new MButtonIcon(Color.BLACK)); //$NON-NLS-1$ shadowColB.setToolTipText(LangTool.INSTANCE.getString17("LaTeXDrawFrame.5")); //$NON-NLS-1$ shadowSizeField = new MSpinner(new MSpinner.MSpinnerNumberModel(1., 0.01, 1000. ,1.), new JLabel(LangTool.INSTANCE.getStringActions("ShapeShad.1"))); //$NON-NLS-1$ shadowSizeField.setEditor(new JSpinner.NumberEditor(shadowSizeField, "0.00"));//$NON-NLS-1$ shadowAngleField = new MSpinner(new MSpinner.MSpinnerNumberModel(45., -360., 360., 0.5), new JLabel(LangTool.INSTANCE.getStringActions("ShapeFill.1"))); //$NON-NLS-1$ shadowAngleField.setEditor(new JSpinner.NumberEditor(shadowAngleField, "0.0"));//$NON-NLS-1$ } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(shadowCB, visible); composer.setWidgetVisible(shadowColB, visible); composer.setWidgetVisible(shadowSizeField, visible); composer.setWidgetVisible(shadowAngleField, visible); } @Override protected void update(final IGroup shape) { if(shape!=null && shape.isShadowable()) { final boolean hasShadow = shape.hasShadow(); shadowCB.setSelected(hasShadow); shadowColB.setEnabled(hasShadow); shadowAngleField.setEnabled(hasShadow); shadowSizeField.setEnabled(hasShadow); if(hasShadow) { shadowColB.setColor(shape.getShadowCol()); shadowAngleField.setValueSafely(Math.toDegrees(shape.getShadowAngle())); shadowSizeField.setValueSafely(shape.getShadowSize()); } } else setActivated(false); } @Override protected void initialiseInteractors() { try{ addInteractor(new CheckBox2PencilShadow(this)); addInteractor(new CheckBox2SelectionShadow(this)); addInteractor(new Spinner2SelectionShadow(this)); addInteractor(new Spinner2PencilShadow(this)); addInteractor(new ColourButton2SelectionShadow(this)); addInteractor(new ColourButton2PencilShadow(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The widget used to define if the shape has a shadow. * @since 3.0 */ public MCheckBox getShadowCB() { return shadowCB; } /** * @return The widget used to change the shadow colour. * @since 3.0 */ public MColorButton getShadowColB() { return shadowColB; } /** * @return The widget that modifies the size of the shadow. * @since 3.0 */ public MSpinner getShadowSizeField() { return shadowSizeField; } /** * @return The widget that modifies the angle of the shadow. * @since 3.0 */ public MSpinner getShadowAngleField() { return shadowAngleField; } } /** * This link uses a checkbox to modify the pencil. */ class CheckBox2PencilShadow extends CheckBoxForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ CheckBox2PencilShadow(final ShapeShadowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.SHADOW); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.shadowCB && instrument.pencil.isActivated(); } } /** * This link uses a checkbox to modify shapes. */ class CheckBox2SelectionShadow extends CheckBoxForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ CheckBox2SelectionShadow(final ShapeShadowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.SHADOW); } @Override public boolean isConditionRespected() { return interaction.getCheckBox()==instrument.shadowCB && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2SelectionShadow extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ Spinner2SelectionShadow(final ShapeShadowCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { final JSpinner spinner = interaction.getSpinner(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); if(spinner==instrument.shadowSizeField) action.setProperty(ShapeProperties.SHADOW_SIZE); else action.setProperty(ShapeProperties.SHADOW_ANGLE); } @Override public void updateAction() { if(interaction.getSpinner()==instrument.shadowAngleField) action.setValue(Math.toRadians(Double.valueOf(interaction.getSpinner().getValue().toString()))); else super.updateAction(); } @Override public boolean isConditionRespected() { final JSpinner spinner = getInteraction().getSpinner(); return (spinner==instrument.shadowAngleField || spinner==instrument.shadowSizeField) && instrument.hand.isActivated(); } } /** * This link maps a spinner to a ModifyPencil action. */ class Spinner2PencilShadow extends SpinnerForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ Spinner2PencilShadow(final ShapeShadowCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { final JSpinner spinner = getInteraction().getSpinner(); action.setPencil(instrument.pencil); if(spinner==instrument.shadowAngleField) action.setProperty(ShapeProperties.SHADOW_ANGLE); else action.setProperty(ShapeProperties.SHADOW_SIZE); } @Override public void updateAction() { if(interaction.getSpinner()==instrument.shadowAngleField) action.setValue(Math.toRadians(Double.valueOf(interaction.getSpinner().getValue().toString()))); else super.updateAction(); } @Override public boolean isConditionRespected() { final JSpinner spinner = interaction.getSpinner(); return (spinner==instrument.shadowSizeField || spinner==instrument.shadowAngleField) && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the pencil. */ class ColourButton2PencilShadow extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ ColourButton2PencilShadow(final ShapeShadowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_SHADOW); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.shadowColB && instrument.pencil.isActivated(); } } /** * This link maps a colour button to the selected shapes. */ class ColourButton2SelectionShadow extends ColourButtonForCustomiser { /** * Creates the link. * @param instrument The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ ColourButton2SelectionShadow(final ShapeShadowCustomiser instrument) throws InstantiationException, IllegalAccessException { super(instrument, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setProperty(ShapeProperties.COLOUR_SHADOW); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return interaction.getButton()==instrument.shadowColB && instrument.hand.isActivated(); } } ShapeStandardGridCustomiser.java000066400000000000000000000263061321075051700373300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import javax.swing.JLabel; import javax.swing.JSpinner; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.actions.shape.ShapePropertyAction; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IStdGridProp; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.lang.LangTool; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MSpinner; /** * This instrument modifies the parameters of grids and axes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/23/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeStandardGridCustomiser extends ShapePropertyCustomiser { /** The field that sets the X-coordinate of the starting point of the grid. */ protected MSpinner xStartS; /** The field that sets the Y-coordinate of the starting point of the grid. */ protected MSpinner yStartS; /** The field that sets the X-coordinate of the ending point of the grid. */ protected MSpinner xEndS; /** The field that sets the Y-coordinate of the ending point of the grid. */ protected MSpinner yEndS; /** The field that sets the size of the labels of the grid. */ protected MSpinner labelsSizeS; /** The field that sets the X-coordinate of the origin point of the grid. */ protected MSpinner xOriginS; /** The field that sets the Y-coordinate of the origin point of the grid. */ protected MSpinner yOriginS; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public ShapeStandardGridCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void update(final IGroup gp) { if(gp.isTypeOf(IStdGridProp.class)) { ((MSpinner.MSpinnerNumberModel)xStartS.getModel()).setMaximumSafely(gp.getGridEndX()); ((MSpinner.MSpinnerNumberModel)yStartS.getModel()).setMaximumSafely(gp.getGridEndY()); xStartS.setValueSafely(gp.getGridStartX()); yStartS.setValueSafely(gp.getGridStartY()); ((MSpinner.MSpinnerNumberModel)xEndS.getModel()).setMinumunSafely(gp.getGridStartX()); ((MSpinner.MSpinnerNumberModel)yEndS.getModel()).setMinumunSafely(gp.getGridStartY()); xEndS.setValueSafely(gp.getGridEndX()); yEndS.setValueSafely(gp.getGridEndY()); xOriginS.setValueSafely(gp.getOriginX()); yOriginS.setValueSafely(gp.getOriginY()); labelsSizeS.setValueSafely(gp.getLabelsSize()); } else setActivated(false); } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(xStartS, visible); composer.setWidgetVisible(yStartS, visible); composer.setWidgetVisible(xEndS, visible); composer.setWidgetVisible(yEndS, visible); composer.setWidgetVisible(labelsSizeS, visible); composer.setWidgetVisible(xOriginS, visible); composer.setWidgetVisible(yOriginS, visible); } @Override protected void initialiseWidgets() { xStartS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.12")));//$NON-NLS-1$ xStartS.setEditor(new JSpinner.NumberEditor(xStartS, "0"));//$NON-NLS-1$ xStartS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.1")); //$NON-NLS-1$ yStartS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.14")));//$NON-NLS-1$ yStartS.setEditor(new JSpinner.NumberEditor(yStartS, "0"));//$NON-NLS-1$ yStartS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.2")); //$NON-NLS-1$ xEndS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.11")));//$NON-NLS-1$ xEndS.setEditor(new JSpinner.NumberEditor(xEndS, "0"));//$NON-NLS-1$ xEndS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.3")); //$NON-NLS-1$ yEndS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.13")));//$NON-NLS-1$ yEndS.setEditor(new JSpinner.NumberEditor(yEndS, "0"));//$NON-NLS-1$ yEndS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.4")); //$NON-NLS-1$ labelsSizeS = new MSpinner(new MSpinner.MSpinnerNumberModel(10, 0, 100, 1), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.9")));//$NON-NLS-1$ labelsSizeS.setEditor(new JSpinner.NumberEditor(labelsSizeS, "0"));//$NON-NLS-1$ labelsSizeS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.5")); //$NON-NLS-1$ xOriginS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.1")));//$NON-NLS-1$ xOriginS.setEditor(new JSpinner.NumberEditor(xOriginS, "0"));//$NON-NLS-1$ xOriginS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.6")); //$NON-NLS-1$ yOriginS = new MSpinner(new MSpinner.MSpinnerNumberModel(0., (double)Integer.MIN_VALUE, (double)Integer.MAX_VALUE, 1.), new JLabel(LangTool.INSTANCE.getStringDialogFrame("ParametersGridFrame.0")));//$NON-NLS-1$ yOriginS.setEditor(new JSpinner.NumberEditor(yOriginS, "0"));//$NON-NLS-1$ yOriginS.setToolTipText(LangTool.INSTANCE.getStringActions("ShapeStdGrid.7")); //$NON-NLS-1$ } @Override protected void initialiseInteractors() { try{ addInteractor(new Spinner2ModifySelectionGridCoords(this)); addInteractor(new Spinner2ModifyPencilGridCoords(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } /** * @return The field that sets the X-coordinate of the starting point of the grid. * @since 3.0 */ public MSpinner getxStartS() { return xStartS; } /** * @return The field that sets the Y-coordinate of the starting point of the grid. * @since 3.0 */ public MSpinner getyStartS() { return yStartS; } /** * @return The field that sets the X-coordinate of the ending point of the grid. * @since 3.0 */ public MSpinner getxEndS() { return xEndS; } /** * @return The field that sets the Y-coordinate of the ending point of the grid. * @since 3.0 */ public MSpinner getyEndS() { return yEndS; } /** * @return The field that sets the X-coordinate of the origin point of the grid. * @since 3.0 */ public MSpinner getxOriginS() { return xOriginS; } /** * @return The field that sets the Y-coordinate of the origin point of the grid. * @since 3.0 */ public MSpinner getyOriginS() { return yOriginS; } /** * @return The field that sets the size of the labels of the grid. * @since 3.0 */ public MSpinner getLabelsSizeS() { return labelsSizeS; } /** The link that maps a spinner to an action that modifies the selected shapes. */ private static class Spinner2ModifySelectionGridCoords extends Spinner2ModifyGridCoords { protected Spinner2ModifySelectionGridCoords(final ShapeStandardGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { super.initAction(); action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false)); } @Override public boolean isConditionRespected() { return instrument.hand.isActivated() && super.isConditionRespected(); } } /** The link that maps a spinner to an action that modifies the pencil. */ private static class Spinner2ModifyPencilGridCoords extends Spinner2ModifyGridCoords { protected Spinner2ModifyPencilGridCoords(final ShapeStandardGridCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { super.initAction(); action.setPencil(instrument.pencil); } @Override public boolean isConditionRespected() { return instrument.pencil.isActivated() && super.isConditionRespected(); } } private abstract static class Spinner2ModifyGridCoords
    extends SpinnerForCustomiser { protected Spinner2ModifyGridCoords(final ShapeStandardGridCustomiser ins, final Class clazzAction) throws InstantiationException, IllegalAccessException { super(ins, clazzAction); } @Override public void initAction() { if(isOriginSpinner()) action.setProperty(ShapeProperties.GRID_ORIGIN); else if(isLabelSizeSpinner()) action.setProperty(ShapeProperties.GRID_SIZE_LABEL); else if(isStartGridSpinner()) action.setProperty(ShapeProperties.GRID_START); else action.setProperty(ShapeProperties.GRID_END); } @Override public void updateAction() { if(isOriginSpinner()) action.setValue(ShapeFactory.createPoint( Double.parseDouble(instrument.xOriginS.getValue().toString()), Double.parseDouble(instrument.yOriginS.getValue().toString()))); else if(isLabelSizeSpinner()) action.setValue(Integer.parseInt(instrument.labelsSizeS.getValue().toString())); else if(isStartGridSpinner()) action.setValue(ShapeFactory.createPoint( Double.parseDouble(instrument.xStartS.getValue().toString()), Double.parseDouble(instrument.yStartS.getValue().toString()))); else action.setValue(ShapeFactory.createPoint( Double.parseDouble(instrument.xEndS.getValue().toString()), Double.parseDouble(instrument.yEndS.getValue().toString()))); } private boolean isStartGridSpinner() { return interaction.getSpinner()==instrument.xStartS || interaction.getSpinner()==instrument.yStartS; } private boolean isEndGridSpinner() { return interaction.getSpinner()==instrument.xEndS || interaction.getSpinner()==instrument.yEndS; } private boolean isLabelSizeSpinner() { return interaction.getSpinner()==instrument.labelsSizeS; } private boolean isOriginSpinner() { return interaction.getSpinner()==instrument.xOriginS || interaction.getSpinner()==instrument.yOriginS; } @Override public boolean isConditionRespected() { return isStartGridSpinner() || isEndGridSpinner() || isLabelSizeSpinner() || isOriginSpinner(); } } } ShapeTransformer.scala000066400000000000000000000254641321075051700353540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments import org.malai.swing.interaction.library.ButtonPressed import org.malai.swing.ui.SwingUIComposer import org.malai.swing.widget.MButton import net.sf.latexdraw.actions.shape.AlignShapes import net.sf.latexdraw.actions.shape.AlignmentType import net.sf.latexdraw.actions.shape.DistributeShapes import net.sf.latexdraw.actions.shape.DistributionType import net.sf.latexdraw.actions.shape.MirrorShapes import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.util.LResources import org.malai.instrument.{Interactor, InteractorImpl} /** * This instrument transforms (mirror, etc.) the selected shapes.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2013-03-07
    * @author Arnaud BLOUIN * @since 3.0 */ class ShapeTransformer(composer:SwingUIComposer[_], hand:Hand, pencil:Pencil, val border:Border) extends ShapePropertyCustomiser(composer, hand, pencil) { /** The widget to mirror horizontally. */ lazy val _mirrorH = new MButton(LResources.MIRROR_H_ICON) /** The widget to mirror vertically. */ lazy val _mirrorV = new MButton(LResources.MIRROR_V_ICON) /** The widget to bottom align the shapes. */ lazy val _alignBot = new MButton(LResources.ALIGN_BOTTOM_ICON) /** The widget to left align the shapes. */ lazy val _alignLeft = new MButton(LResources.ALIGN_LEFT_ICON) /** The widget to right align the shapes. */ lazy val _alignRight = new MButton(LResources.ALIGN_RIGHT_ICON) /** The widget to top align the shapes. */ lazy val _alignTop = new MButton(LResources.ALIGN_TOP_ICON) /** The widget to middle horizontal align the shapes. */ lazy val _alignMidHoriz = new MButton(LResources.ALIGN_MID_HORIZ_ICON) /** The widget to middle vertical align the shapes. */ lazy val _alignMidVert = new MButton(LResources.ALIGN_MID_VERT_ICON) /** The widget to bottom-vertically distribute the shapes. */ lazy val _distribVertBot = new MButton(LResources.DIST_VERT_BOTTOM_ICON) /** The widget to equal-vertically distribute the shapes. */ lazy val _distribVertEq = new MButton(LResources.DIST_VERT_EQUAL_ICON) /** The widget to middle-vertically distribute the shapes. */ lazy val _distribVertMid = new MButton(LResources.DIST_VERT_MID_ICON) /** The widget to top-vertically distribute the shapes. */ lazy val _distribVertTop = new MButton(LResources.DIST_VERT_TOP_ICON) /** The widget to equal-horizontally distribute the shapes. */ lazy val _distribHorizEq = new MButton(LResources.DIST_HORIZ_EQUAL_ICON) /** The widget to left-horizontally distribute the shapes. */ lazy val _distribHorizLeft = new MButton(LResources.DIST_HORIZ_LEFT_ICON) /** The widget to middle-horizontally distribute the shapes. */ lazy val _distribHorizMid = new MButton(LResources.DIST_HORIZ_MID_ICON) /** The widget to right-horizontally distribute the shapes. */ lazy val _distribHorizRight = new MButton(LResources.DIST_HORIZ_RIGHT_ICON) protected override def initialiseWidgets() { _mirrorH.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.7")) _mirrorV.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.8")) _alignBot.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.5")) _alignTop.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.4")) _alignLeft.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.2")) _alignRight.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.3")) _alignMidHoriz.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.6")) _alignMidVert.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.7")) _distribVertBot.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.9")) _distribVertEq.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.10")) _distribVertMid.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.11")) _distribVertTop.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.12")) _distribHorizLeft.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.13")) _distribHorizEq.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.14")) _distribHorizMid.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.15")) _distribHorizRight.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.16")) } protected override def setWidgetsVisible(visible:Boolean) { composer.setWidgetVisible(_mirrorH, visible) composer.setWidgetVisible(_mirrorV, visible) composer.setWidgetVisible(_alignBot, visible) composer.setWidgetVisible(_alignTop, visible) composer.setWidgetVisible(_alignLeft, visible) composer.setWidgetVisible(_alignRight, visible) composer.setWidgetVisible(_alignMidHoriz, visible) composer.setWidgetVisible(_alignMidVert, visible) composer.setWidgetVisible(_distribVertBot, visible) composer.setWidgetVisible(_distribVertEq, visible) composer.setWidgetVisible(_distribVertMid, visible) composer.setWidgetVisible(_distribVertTop, visible) composer.setWidgetVisible(_distribHorizLeft, visible) composer.setWidgetVisible(_distribHorizEq, visible) composer.setWidgetVisible(_distribHorizMid, visible) composer.setWidgetVisible(_distribHorizRight, visible) } protected override def update(shape:IGroup) { // Nothing to do } protected override def initialiseInteractors() { try{ addInteractor(new Button2Mirror(this)) addInteractor(new Button2Align(this)) addInteractor(new Button2Distribute(this)) }catch{case ex: Throwable => BadaboomCollector.INSTANCE.add(ex)} } /** The widget to mirror horizontally. */ def mirrorH = _mirrorH /** The widget to mirror vertically. */ def mirrorV = _mirrorV /** The widget to left align the shapes. */ def alignLeft = _alignLeft /** The widget to right align the shapes. */ def alignRight = _alignRight /** The widget to middle horizontal align the shapes. */ def alignMidHoriz = _alignMidHoriz /** The widget to middle vertical align the shapes. */ def alignMidVert = _alignMidVert /** The widget to top align the shapes. */ def alignTop = _alignTop /** The widget to bottom align the shapes. */ def alignBot = _alignBot /** The widget to equal-vertically distribute the shapes. */ def distribVertEq = _distribVertEq /** The widget to bottom-vertically distribute the shapes. */ def distribVertBot = _distribVertBot /** The widget to middle-vertically distribute the shapes. */ def distribVertMid = _distribVertMid /** The widget to top-vertically distribute the shapes. */ def distribVertTop = _distribVertTop /** The widget to left-horizontally distribute the shapes. */ def distribHorizLeft = _distribHorizLeft /** The widget to equal-horizontally distribute the shapes. */ def distribHorizEq = _distribHorizEq /** The widget to middle-horizontally distribute the shapes. */ def distribHorizMid = _distribHorizMid /** The widget to right-horizontally distribute the shapes. */ def distribHorizRight = _distribHorizRight } /** * Maps a button interaction with an action that aligns the selected shapes. */ private sealed class Button2Align(ins:ShapeTransformer) extends InteractorImpl[AlignShapes, ButtonPressed, ShapeTransformer](ins, false, classOf[AlignShapes], classOf[ButtonPressed]) { override def initAction() { val but = interaction.getButton action.setShape(instrument.pencil.canvas.getDrawing.getSelection.duplicateDeep(false)) if(but==instrument._alignBot) action.setAlignment(AlignmentType.bottom) else if(but==instrument._alignLeft) action.setAlignment(AlignmentType.left) else if(but==instrument._alignMidHoriz) action.setAlignment(AlignmentType.midHoriz) else if(but==instrument._alignMidVert) action.setAlignment(AlignmentType.midVert) else if(but==instrument._alignRight) action.setAlignment(AlignmentType.right) else if(but==instrument._alignTop) action.setAlignment(AlignmentType.top) action.setBorder(instrument.border.border) } override def isConditionRespected = { val but = interaction.getButton but==instrument._alignBot || but==instrument._alignLeft || but==instrument._alignMidHoriz || but==instrument._alignMidVert || but==instrument._alignRight || but==instrument._alignTop } } /** * Maps a button interaction with an action that distributes the selected shapes. */ private sealed class Button2Distribute(ins:ShapeTransformer) extends InteractorImpl[DistributeShapes, ButtonPressed, ShapeTransformer](ins, false, classOf[DistributeShapes], classOf[ButtonPressed]) { override def initAction() { val but = interaction.getButton action.setShape(instrument.pencil.canvas.getDrawing.getSelection.duplicateDeep(false)) if(but==instrument._distribHorizEq) action.setDistribution(DistributionType.horizEq) else if(but==instrument._distribHorizLeft) action.setDistribution(DistributionType.horizLeft) else if(but==instrument._distribHorizMid) action.setDistribution(DistributionType.horizMid) else if(but==instrument._distribHorizRight) action.setDistribution(DistributionType.horizRight) else if(but==instrument._distribVertBot) action.setDistribution(DistributionType.vertBot) else if(but==instrument._distribVertEq) action.setDistribution(DistributionType.vertEq) else if(but==instrument._distribVertMid) action.setDistribution(DistributionType.vertMid) else if(but==instrument._distribVertTop) action.setDistribution(DistributionType.vertTop) action.setBorder(instrument.border.border) } override def isConditionRespected = { val but = interaction.getButton but==instrument._distribHorizEq || but==instrument._distribHorizLeft || but==instrument._distribHorizMid || but==instrument._distribHorizRight || but==instrument._distribVertBot || but==instrument._distribVertEq || but==instrument._distribVertMid || but==instrument._distribVertTop } } /** * Maps a button interaction with an action that mirrors the selected shapes. */ private sealed class Button2Mirror(ins:ShapeTransformer) extends InteractorImpl[MirrorShapes, ButtonPressed, ShapeTransformer](ins, false, classOf[MirrorShapes], classOf[ButtonPressed]) { override def initAction() { action.setShape(instrument.pencil.canvas.getDrawing.getSelection.duplicateDeep(false)) action.setHorizontally(interaction.getButton==instrument._mirrorH) } override def isConditionRespected = interaction.getButton==instrument._mirrorH || interaction.getButton==instrument._mirrorV } TabSelector.java000066400000000000000000000070561321075051700341330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.util.Objects; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.ui.LFrame; import org.malai.swing.instrument.SwingInstrument; import org.malai.instrument.InteractorImpl; import org.malai.swing.action.library.ActivateInactivateInstruments; import org.malai.swing.interaction.library.TabSelected; /** * This instrument (de-)activates instruments while changing of tab (drawing tab, PST tab, etc.).
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/09/2011
    * @author Arnaud BLOUIN * @since 3.0 */ public class TabSelector extends SwingInstrument { /** The main frame of the system. */ protected LFrame frame; /** * Creates the instrument. * @param frame The main frame of the system. * @throws IllegalArgumentException If the given argument is null. * @since 3.0 */ public TabSelector(final LFrame frame) { super(); this.frame = Objects.requireNonNull(frame); } @Override protected void initialiseInteractors() { try{ addInteractor(new TabSelected2ActivateInstruments(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } private static class TabSelected2ActivateInstruments extends InteractorImpl { protected TabSelected2ActivateInstruments(final TabSelector ins) throws InstantiationException, IllegalAccessException { super(ins, false, ActivateInactivateInstruments.class, TabSelected.class); } @Override public void initAction() { switch(interaction.getTabbedPane().getSelectedIndex()) { case 0: // Drawing tab. action.addInstrumentToActivate(instrument.frame.getEditingSelector()); action.addInstrumentToActivate(instrument.frame.getGridCustomiser()); action.addInstrumentToActivate(instrument.frame.getPaster()); action.addInstrumentToActivate(instrument.frame.getScaleRulersCustomiser()); action.addInstrumentToActivate(instrument.frame.getUndoManager()); action.addInstrumentToActivate(instrument.frame.getZoomer()); if(getInstrument().frame.getDrawing().getSelection().isEmpty()) { action.addInstrumentToInactivate(instrument.frame.getDeleter()); }else { action.addInstrumentToActivate(instrument.frame.getDeleter()); } break; case 1: // PST tab. action.setHideWidgets(true); action.addInstrumentToInactivate(instrument.frame.getEditingSelector()); action.addInstrumentToInactivate(instrument.frame.getGridCustomiser()); action.addInstrumentToInactivate(instrument.frame.getPaster()); action.addInstrumentToInactivate(instrument.frame.getScaleRulersCustomiser()); action.addInstrumentToInactivate(instrument.frame.getUndoManager()); action.addInstrumentToInactivate(instrument.frame.getZoomer()); action.addInstrumentToInactivate(instrument.frame.getDeleter()); break; default: } } @Override public boolean isConditionRespected() { return interaction.getTabbedPane()==instrument.frame.getTabbedPanel(); } } } TemplateManager.scala000066400000000000000000000107651321075051700351350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments import java.io.File import net.sf.latexdraw.actions.{ExportTemplate, LoadTemplate, UpdateTemplates} import net.sf.latexdraw.badaboom.BadaboomCollector import net.sf.latexdraw.generators.svg.SVGDocumentGenerator import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing import net.sf.latexdraw.lang.LangTool import net.sf.latexdraw.ui.LFrame import net.sf.latexdraw.util.LResources import org.malai.instrument.InteractorImpl import org.malai.swing.instrument.WidgetInstrument import org.malai.swing.interaction.library.MenuItemPressed import org.malai.swing.ui.SwingUIComposer import org.malai.swing.widget.{MMenu, MMenuItem} /** * This instrument manages the templates.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @since 3.0 */ class TemplateManager(composer : SwingUIComposer[_], val ui : LFrame, val drawing:IDrawing) extends WidgetInstrument(composer) { /** The main menu that contains the template menu items. */ val _templateMenu : MMenu = new MMenu(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.103"), true) /** The menu item that permits to update the templates. */ val _updateTemplatesMenu : MMenuItem = new MMenuItem(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.41"), LResources.RELOAD_ICON) /** The menu item used to export the selection as templates. */ val _exportTemplateMenu : MMenuItem = new MMenuItem(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.42")) initialiseWidgets override def setActivated(activated : Boolean) { super.setActivated(activated) templateMenu.setEnabled(isActivated) } override protected def initialiseInteractors() { try { addInteractor(new MenuItem2UpdateTemplates(this)) addInteractor(new MenuItem2LoadTemplate(this)) addInteractor(new MenuItem2ExportTemplate(this)) } catch{case ex: Throwable => BadaboomCollector.INSTANCE.add(ex)} } override protected def initialiseWidgets() { _templateMenu.addSeparator _templateMenu.add(_updateTemplatesMenu) val action = new UpdateTemplates() action.templatesMenu = _templateMenu action.updateThumbnails = false action.doIt action.flush } /** * @return The main menu that contains the template menu items. */ def templateMenu = _templateMenu /** * @return The menu item that permits to update the templates. */ def updateTemplatesMenu() = _updateTemplatesMenu /** * @return The menu item used to export the selection as templates. */ def exportTemplateMenu = _exportTemplateMenu } private sealed class MenuItem2ExportTemplate(ins : TemplateManager) extends InteractorImpl[ExportTemplate, MenuItemPressed, TemplateManager](ins, false, classOf[ExportTemplate], classOf[MenuItemPressed]) { override def initAction() { action.setUi(instrument.ui) action.templatesMenu = instrument.templateMenu } override def isConditionRespected = interaction.getMenuItem==instrument.exportTemplateMenu } private sealed class MenuItem2LoadTemplate(ins : TemplateManager) extends InteractorImpl[LoadTemplate, MenuItemPressed, TemplateManager](ins, false, classOf[LoadTemplate], classOf[MenuItemPressed]) { override def initAction() { action.setFile(new File(interaction.getMenuItem.getName)) action.setOpenSaveManager(SVGDocumentGenerator.INSTANCE) action.setUi(instrument.ui) action.setDrawing(instrument.drawing) } override def isConditionRespected = interaction.getMenuItem!=instrument.updateTemplatesMenu && instrument.templateMenu.contains(interaction.getMenuItem) } /** Maps a menu item interaction to an action that updates the templates. */ private sealed class MenuItem2UpdateTemplates(ins : TemplateManager) extends InteractorImpl[UpdateTemplates, MenuItemPressed, TemplateManager](ins, false, classOf[UpdateTemplates], classOf[MenuItemPressed]) { override def initAction() { action.updateThumbnails = true action.templatesMenu = instrument.templateMenu } override def isConditionRespected = interaction.getMenuItem==instrument.updateTemplatesMenu } TextCustomiser.java000066400000000000000000000343301321075051700347210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import net.sf.latexdraw.actions.ModifyLatexProperties; import net.sf.latexdraw.actions.ModifyLatexProperties.LatexProperties; import net.sf.latexdraw.actions.ModifyPencilParameter; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.KeysTyped; import org.malai.mapping.MappingRegistry; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MTextArea; import org.malai.swing.widget.MToggleButton; import javax.swing.*; import java.awt.*; /** * This instrument modifies texts.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/27/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class TextCustomiser extends ShapePropertyCustomiser { /** The button that selects the bottom-left text position. */ protected MToggleButton blButton; /** The button that selects the bottom text position. */ protected MToggleButton bButton; /** The button that selects the bottom-right text position. */ protected MToggleButton brButton; /** The button that selects the top-left text position. */ protected MToggleButton tlButton; /** The button that selects the top text position. */ protected MToggleButton tButton; /** The button that selects the top-right text position. */ protected MToggleButton trButton; /** The button that selects the left text position. */ protected MToggleButton lButton; /** The button that selects the right text position. */ protected MToggleButton rButton; /** The button that selects the centre text position. */ protected MToggleButton centreButton; /** The label used to explain the goal of the package text field. */ protected JLabel packagesLabel; /** This text field permits to add latex packages that will be used during compilation. */ protected MTextArea packagesField; /** The error log field. */ protected MTextArea logField; /** * Creates the instrument. * @param composer The composer that manages the widgets of the instrument. * @param hand The Hand instrument. * @param pencil The Pencil instrument. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public TextCustomiser(final SwingUIComposer composer, final Hand hand, final Pencil pencil) { super(composer, hand, pencil); initialiseWidgets(); } @Override protected void initialiseWidgets() { packagesLabel = new JLabel(LangTool.INSTANCE.getStringActions("TextCust.1")); //$NON-NLS-1$ packagesField = new MTextArea(true, true); packagesLabel.setLabelFor(packagesField); final Font font = packagesField.getFont(); packagesField.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.2")); //$NON-NLS-1$ packagesField.setFont(new Font(font.getName(), font.getStyle(), Math.max(10, font.getSize()-4))); packagesField.setColumns(35); packagesField.setRows(10); logField = new MTextArea(true, false); logField.setEditable(false); logField.setFont(new Font(font.getName(), font.getStyle(), Math.max(10, font.getSize()-4))); logField.setColumns(50); logField.setRows(10); blButton = new MToggleButton(LResources.TEXTPOS_BL); blButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.3")); //$NON-NLS-1$ bButton = new MToggleButton(LResources.TEXTPOS_B); bButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.4")); //$NON-NLS-1$ brButton = new MToggleButton(LResources.TEXTPOS_BR); brButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.5")); //$NON-NLS-1$ tlButton = new MToggleButton(LResources.TEXTPOS_TL); tlButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.6")); //$NON-NLS-1$ tButton = new MToggleButton(LResources.TEXTPOS_T); tButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.7")); //$NON-NLS-1$ trButton = new MToggleButton(LResources.TEXTPOS_TR); trButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.8")); //$NON-NLS-1$ centreButton = new MToggleButton(LResources.TEXTPOS_CENTRE); centreButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.9")); //$NON-NLS-1$ lButton = new MToggleButton(LResources.TEXTPOS_L); lButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.10")); //$NON-NLS-1$ rButton = new MToggleButton(LResources.TEXTPOS_R); rButton.setToolTipText(LangTool.INSTANCE.getStringActions("TextCust.11")); //$NON-NLS-1$ } @Override protected void setWidgetsVisible(final boolean visible) { composer.setWidgetVisible(blButton, visible); composer.setWidgetVisible(bButton, visible); composer.setWidgetVisible(brButton, visible); composer.setWidgetVisible(tlButton, visible); composer.setWidgetVisible(tButton, visible); composer.setWidgetVisible(trButton, visible); composer.setWidgetVisible(lButton, visible); composer.setWidgetVisible(rButton, visible); composer.setWidgetVisible(centreButton, visible); composer.setWidgetVisible(packagesLabel, visible); composer.setWidgetVisible(packagesField.getScrollpane(), visible); composer.setWidgetVisible(logField.getScrollpane(), visible); } @Override protected void update(final IGroup shape) { if(shape.isTypeOf(ITextProp.class)) { final TextPosition tp = shape.getTextPosition(); bButton.setSelected(tp==TextPosition.BOT); brButton.setSelected(tp==TextPosition.BOT_RIGHT); blButton.setSelected(tp==TextPosition.BOT_LEFT); tButton.setSelected(tp==TextPosition.TOP); trButton.setSelected(tp==TextPosition.TOP_RIGHT); tlButton.setSelected(tp==TextPosition.TOP_LEFT); centreButton.setSelected(tp==TextPosition.CENTER); lButton.setSelected(tp==TextPosition.LEFT); rButton.setSelected(tp==TextPosition.RIGHT); if(!packagesField.hasFocus()) // Otherwise it means that this field is currently being edited and must not be updated. packagesField.setText(LaTeXGenerator.getPackages()); // Updating the log field. SwingUtilities.invokeLater(() -> { IText txt = null; for(int i=0, size=shape.size(); i { protected KeysTyped2ChangePackages(final TextCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyLatexProperties.class, KeysTyped.class); } @Override public void initAction() { action.setProperty(LatexProperties.PACKAGES); } @Override public void updateAction() { action.setValue(instrument.getPackagesField().getText()); } @Override public boolean isConditionRespected() { return interaction.getObject()==instrument.packagesField; } } /** * Links a button interaction to an action that modifies the pencil. */ class ButtonPressed2ChangePencil extends ButtonPressedForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ ButtonPressed2ChangePencil(final TextCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyPencilParameter.class); } @Override public void initAction() { final AbstractButton ab = interaction.getButton(); action.setProperty(ShapeProperties.TEXT_POSITION); action.setPencil(instrument.pencil); if(instrument.blButton==ab) action.setValue(ITextProp.TextPosition.BOT_LEFT); else if(instrument.brButton==ab) action.setValue(ITextProp.TextPosition.BOT_RIGHT); else if(instrument.tButton==ab) action.setValue(ITextProp.TextPosition.TOP); else if(instrument.bButton==ab) action.setValue(ITextProp.TextPosition.BOT); else if(instrument.tlButton==ab) action.setValue(ITextProp.TextPosition.TOP_LEFT); else if(instrument.centreButton==ab) action.setValue(ITextProp.TextPosition.CENTER); else if(instrument.lButton==ab) action.setValue(ITextProp.TextPosition.LEFT); else if(instrument.rButton==ab) action.setValue(ITextProp.TextPosition.RIGHT); else action.setValue(ITextProp.TextPosition.TOP_RIGHT); } @Override public boolean isConditionRespected() { final AbstractButton ab = interaction.getButton(); return instrument.pencil.isActivated() && (instrument.tButton==ab || instrument.tlButton==ab || instrument.centreButton==ab || instrument.trButton==ab || instrument.bButton==ab || instrument.blButton==ab || instrument.brButton==ab || instrument.lButton==ab || instrument.rButton==ab); } } /** * Links a button interaction to an action that modifies the selected shapes. */ class ButtonPressed2ChangeTextPosition extends ButtonPressedForCustomiser { /** * Creates the link. * @param ins The instrument that contains the link. * @throws InstantiationException If an error of instantiation (interaction, action) occurs. * @throws IllegalAccessException If no free-parameter constructor are provided. */ ButtonPressed2ChangeTextPosition(final TextCustomiser ins) throws InstantiationException, IllegalAccessException { super(ins, ModifyShapeProperty.class); } @Override public void initAction() { final AbstractButton ab = interaction.getButton(); action.setGroup(instrument.hand.canvas().getDrawing().getSelection().duplicateDeep(false)); action.setProperty(ShapeProperties.TEXT_POSITION); if(instrument.bButton==ab) action.setValue(ITextProp.TextPosition.BOT); else if(instrument.blButton==ab) action.setValue(ITextProp.TextPosition.BOT_LEFT); else if(instrument.brButton==ab) action.setValue(ITextProp.TextPosition.BOT_RIGHT); else if(instrument.tButton==ab) action.setValue(ITextProp.TextPosition.TOP); else if(instrument.tlButton==ab) action.setValue(ITextProp.TextPosition.TOP_LEFT); else if(instrument.centreButton==ab) action.setValue(ITextProp.TextPosition.CENTER); else if(instrument.lButton==ab) action.setValue(ITextProp.TextPosition.LEFT); else if(instrument.rButton==ab) action.setValue(ITextProp.TextPosition.RIGHT); else action.setValue(ITextProp.TextPosition.TOP_RIGHT); } @Override public boolean isConditionRespected() { final AbstractButton ab = interaction.getButton(); return instrument.hand.isActivated() && ( instrument.bButton==ab || instrument.blButton==ab || instrument.centreButton==ab || instrument.brButton==ab || instrument.tButton==ab || instrument.tlButton==ab || instrument.trButton==ab || instrument.lButton==ab || instrument.rButton==ab); } } TextSetter.java000066400000000000000000000243161321075051700340350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/instrumentspackage net.sf.latexdraw.instruments; import java.awt.event.KeyEvent; import javax.swing.JLayeredPane; import net.sf.latexdraw.actions.shape.AddShape; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.parsers.ps.PSFunctionParser; import net.sf.latexdraw.ui.TextAreaAutoSize; import org.malai.action.Action; import org.malai.swing.instrument.SwingInstrument; import org.malai.instrument.InteractorImpl; import org.malai.swing.interaction.library.KeyTyped; import org.malai.swing.action.library.ActivateInactivateInstruments; import org.malai.swing.widget.MLayeredPane; /** * This instrument allows to add and modify texts to the drawing.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 20/12/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class TextSetter extends SwingInstrument { /** The text field. */ protected TextAreaAutoSize textField; /** The pencil used to create shapes. */ protected Pencil pencil; /** * The point where texts are added. It may not corresponds with the location * of the text field since the text field position is absolute (does not consider * the zoom level). */ protected IPoint relativePoint; /** The text to modify throw this instrument. If it is not set, a new text will be created. */ protected IText text; protected IPlot plot; protected TextCustomiser custom; protected ShapePlotCustomiser plotCustom; /** * Creates the instrument. * @param overlayedPanel The pane where the text field must be added. * @throws NullPointerException If the given MLayeredPane is null. * @since 3.0 */ public TextSetter(final MLayeredPane overlayedPanel) { super(); textField = new TextAreaAutoSize(); overlayedPanel.add(textField, JLayeredPane.PALETTE_LAYER); overlayedPanel.add(textField.getMessageField(), JLayeredPane.PALETTE_LAYER); textField.setVisible(false); addEventable(textField); } @Override public void onActionDone(final Action action) { super.onActionDone(action); if(custom!=null) custom.update(); pencil.canvas().requestFocus(); } /** * Sets the text customiser. * @param custom The instrument. */ public void setTestCustomiser(final TextCustomiser custom) { if(custom!=null) this.custom = custom; } public void setPlotCustomiser(final ShapePlotCustomiser ins) { if(ins!=null) plotCustom = ins; } /** * Sets the text to modify throw this instrument. * @param sh The plot to modify. * @since 3.1 */ public void setPlot(final IPlot sh) { plot = sh; if(sh!=null) { textField.setText(sh.getPlotEquation()); setPlotMessage(); } } /** * Sets the text to modify throw this instrument. * @param sh The text to modify. * @since 3.0 */ public void setText(final IText sh) { text = sh; if(sh!=null) { textField.setText(sh.getText()); setTextMessage(); } } /** * @param pencil The pencil to set to the text setter. * @since 3.0 */ public void setPencil(final Pencil pencil) { this.pencil = pencil; } @Override protected void initialiseInteractors() { try{ addInteractor(new Enter2SetText(this)); addInteractor(new Enter2SetEquation(this)); addInteractor(new Enter2AddText(this)); addInteractor(new Enter2CheckPlot(this)); addInteractor(new KeyPress2Desactivate(this)); }catch(InstantiationException | IllegalAccessException e){ BadaboomCollector.INSTANCE.add(e); } } private void setTextMessage() { textField.getMessageField().setText("Write LaTeX text."); } private void setPlotMessage() { final String eqEx = " 2 x add sin"; //$NON-NLS-1$ textField.getMessageField().setText("Write the equation, e.g.:"+eqEx); } @Override public void setActivated(final boolean activated) { super.setActivated(activated); if(activated && pencil.isActivated()) { switch(pencil._currentChoice()) { case TEXT: setTextMessage(); break; case PLOT: setPlotMessage(); break; default: break; } } textField.setValid(true); textField.setVisible(activated); if(activated) textField.requestFocusInWindow(); } /** * @return The text field used to set texts. * @since 3.0 */ public TextAreaAutoSize getTextField() { return textField; } /** * @param relativePoint The point where texts are added. It may not corresponds with the location * of the text field since the text field position is absolute (does not consider * the zoom level). * @since 3.0 */ public void setRelativePoint(final IPoint relativePoint) { this.relativePoint = relativePoint; } } /** * This links maps a key press interaction to an action that desactivates the instrument. */ class KeyPress2Desactivate extends InteractorImpl { /** * Creates the link. */ protected KeyPress2Desactivate(final TextSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, ActivateInactivateInstruments.class, KeyTyped.class); } @Override public void initAction() { action.addInstrumentToInactivate(instrument); } @Override public boolean isConditionRespected() { final int key = interaction.getKey(); // It is useless to check if another key is pressed because if it is the case, the interaction // is in state keyPressed. return key==KeyEvent.VK_ENTER && instrument.textField.isValidText() && !instrument.textField.getText().isEmpty() || key==KeyEvent.VK_ESCAPE; } } class Enter2SetText extends InteractorImpl { protected Enter2SetText(final TextSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyShapeProperty.class, KeyTyped.class); } @Override public void initAction() { action.setGroup(ShapeFactory.createGroup(instrument.text)); action.setProperty(ShapeProperties.TEXT); action.setValue(instrument.textField.getText()); } @Override public boolean isConditionRespected() { return instrument.text!=null && !instrument.textField.getText().isEmpty() && interaction.getKey()==KeyEvent.VK_ENTER; } } class Enter2SetEquation extends InteractorImpl { protected Enter2SetEquation(final TextSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, ModifyShapeProperty.class, KeyTyped.class); } @Override public void initAction() { action.setGroup(ShapeFactory.createGroup(instrument.plot)); action.setProperty(ShapeProperties.PLOT_EQ); action.setValue(instrument.textField.getText()); } @Override public boolean isConditionRespected() { return instrument.plot!=null && !instrument.textField.getText().isEmpty() && interaction.getKey()==KeyEvent.VK_ENTER; } } /** * This links maps a key press interaction to an action that adds a text to the drawing. */ class Enter2AddText extends InteractorImpl { /** * Creates the link. */ protected Enter2AddText(final TextSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, AddShape.class, KeyTyped.class); } @Override public void initAction() { final IPoint textPosition = instrument.relativePoint==null ? ShapeFactory.createPoint(instrument.textField.getX(), instrument.textField.getY()+instrument.textField.getHeight()) : instrument.relativePoint; final IShape sh = instrument.pencil==null ? null : instrument.pencil.createShapeInstance(); if(sh instanceof IText) { final IText text = (IText)sh; text.setPosition(textPosition.getX(), textPosition.getY()); text.setText(instrument.textField.getText()); action.setShape(text); action.setDrawing(instrument.pencil.canvas().getDrawing()); } } @Override public boolean isConditionRespected() { return instrument.pencil.currentChoice()==EditionChoice.TEXT && instrument.text==null && !instrument.textField.getText().isEmpty() && interaction.getKey()==KeyEvent.VK_ENTER; } } class Enter2CheckPlot extends InteractorImpl { protected Enter2CheckPlot(final TextSetter ins) throws InstantiationException, IllegalAccessException { super(ins, false, AddShape.class, KeyTyped.class); } @Override public void initAction() { instrument.textField.setValid(true); final IPoint textPosition = instrument.relativePoint==null ? ShapeFactory.createPoint(instrument.textField.getX(), instrument.textField.getY()+instrument.textField.getHeight()) : instrument.relativePoint; final IShape sh = instrument.pencil==null ? null : instrument.pencil.createShapeInstance(); if(sh instanceof IPlot) { final IPlot plot = (IPlot)sh; plot.setPosition(textPosition.getX(), textPosition.getY()); plot.setPlotEquation(instrument.textField.getText()); action.setShape(plot); action.setDrawing(instrument.pencil.canvas().getDrawing()); } } @Override public boolean isConditionRespected() { boolean ok = instrument.pencil.currentChoice()==EditionChoice.PLOT && instrument.plot==null && !instrument.textField.getText().isEmpty() && interaction.getKey()==KeyEvent.VK_ENTER; if(ok) if(!PSFunctionParser.isValidPostFixEquation(instrument.textField.getText(), Double.valueOf(instrument.plotCustom.getMinXSpinner().getValue().toString()), Double.valueOf(instrument.plotCustom.getMaxXSpinner().getValue().toString()), Double.valueOf(instrument.plotCustom.getNbPtsSpinner().getValue().toString()))) { instrument.textField.setValid(false); ok = false; } return ok; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/lang/000077500000000000000000000000001321075051700274565ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/lang/LangTool.java000077500000000000000000000313731321075051700320520ustar00rootroot00000000000000package net.sf.latexdraw.lang; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LPath; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** * This class defines the localisation.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/01/06
    * @author Arnaud BLOUIN * @version 3.0 */ public final class LangTool { public enum Lang { CA { @Override public String getName() { return "Català";//$NON-NLS-1$ } @Override public String getToken() { return "lang.ca";//$NON-NLS-1$ } }, RU { @Override public String getName() { return "Russkiy yazyk";//$NON-NLS-1$ } @Override public String getToken() { return "lang.ru";//$NON-NLS-1$ } }, CS { @Override public String getName() { return "ÄŒeÅ¡tina";//$NON-NLS-1$ } @Override public String getToken() { return "lang.cs";//$NON-NLS-1$ } },SI { @Override public String getName() { return "\u0dc3\u0dd2\u0d82\u0dc4\u0dbd";//$NON-NLS-1$ } @Override public String getToken() { return "lang.si";//$NON-NLS-1$ } }, SR { @Override public String getName() { return "\u0441\u0440\u043f\u0441\u043a\u0438";//$NON-NLS-1$ } @Override public String getToken() { return "lang.sr";//$NON-NLS-1$ } }, HU { @Override public String getName() { return "Magyar";//$NON-NLS-1$ } @Override public String getToken() { return "lang.hu";//$NON-NLS-1$ } }, VI { @Override public String getName() { return "Ti\u1ebfng Vi\u1ec7t";//$NON-NLS-1$ } @Override public String getToken() { return "lang.vi";//$NON-NLS-1$ } }, PT_BR { @Override public String getName() { return "Portugu\u00eas Brasileiro";//$NON-NLS-1$ } @Override public String getToken() { return "lang.pt-BR";//$NON-NLS-1$ } }, JA { @Override public String getName() { return "\u65e5\u672c\u8a9e";//$NON-NLS-1$ } @Override public String getToken() { return "lang.ja";//$NON-NLS-1$ } }, TR { @Override public String getName() { return "T\u00fcrk\u00e7e";//$NON-NLS-1$ } @Override public String getToken() { return "lang.tr";//$NON-NLS-1$ } }, EN_BR { @Override public String getName() { return "English";//$NON-NLS-1$ } @Override public String getToken() { return "lang.en";//$NON-NLS-1$ } }, EN_US { @Override public String getName() { return "English-US";//$NON-NLS-1$ } @Override public String getToken() { return "lang.en-US";//$NON-NLS-1$ } }, FR { @Override public String getName() { return "Fran\u00e7ais";//$NON-NLS-1$ } @Override public String getToken() { return "lang.fr";//$NON-NLS-1$ } }, ES { @Override public String getName() { return "Espa\u00f1ol";//$NON-NLS-1$ } @Override public String getToken() { return "lang.es";//$NON-NLS-1$ } }, DE { @Override public String getName() { return "Deutsch";//$NON-NLS-1$ } @Override public String getToken() { return "lang.de";//$NON-NLS-1$ } }, IT { @Override public String getName() { return "Italiano";//$NON-NLS-1$ } @Override public String getToken() { return "lang.it";//$NON-NLS-1$ } }, PL { @Override public String getName() { return "J\u0119zyk polski";//$NON-NLS-1$ } @Override public String getToken() { return "lang.pl";//$NON-NLS-1$ } }, UK { @Override public String getName() { return "українÑька мова";//$NON-NLS-1$ } @Override public String getToken() { return "lang.uk";//$NON-NLS-1$ } }, zh_CN { @Override public String getName() { return "\u4e2d\u6587";//$NON-NLS-1$ } @Override public String getToken() { return "lang.zh_CN";//$NON-NLS-1$ } }; /** * @return The name of the language. * @since 3.0 */ public abstract String getName(); /** * @return The token corresponding to the language. * @since 3.0 */ public abstract String getToken(); /** * @return The language used by default. */ public static Lang getDefaultLanguage() { return EN_BR; } /** * @param name The name of the language. * @return The Lang object corresponding to the given language name, or the default language is null or not found. * @since 3.0 */ public static Lang getLanguage(final String name) { final Lang lang = INSTANCE.getMapLangs().get(name); return lang==null ? EN_BR : lang; } /** * @return The language token (e.g. LANG_FR) corresponding to the system language. * @since 3.0 */ public static Lang getSystemLanguage() { final Lang language = INSTANCE.getMapLangs().get(System.getProperty("user.language"));//$NON-NLS-1$ return language==null ? Lang.getDefaultLanguage() : language; } } /** The string corresponding to a missing key. */ public static final String MISSING_KEY = "!missingKey!";//$NON-NLS-1$ private static final ResourceBundle RES_BUNDLE_LFRAME; private static final ResourceBundle RES_BUNDLE_DIALOG_FRAME; private static final ResourceBundle RES_BUNDLE_OTHERS; private static final ResourceBundle RES_BUNDLE_16; private static final ResourceBundle RES_BUNDLE_17; private static final ResourceBundle RES_BUNDLE_18; private static final ResourceBundle RES_BUNDLE_19; private static final ResourceBundle RES_BUNDLE_ACTIONS; /** The singleton to use when wanting to use language utilities. */ public static final LangTool INSTANCE = new LangTool(); private static final Lang LANG_CURRENT = INSTANCE.readLang(); /** This map provides an easy access to the language items. */ private final Map mapLangs = new HashMap<>(); static { final String token = LangTool.getCurrentLanguage().getToken(); RES_BUNDLE_LFRAME = ResourceBundle.getBundle(token+".LaTeXDrawFrame"); //$NON-NLS-1$ RES_BUNDLE_DIALOG_FRAME = ResourceBundle.getBundle(token+".dialogFrames"); //$NON-NLS-1$ RES_BUNDLE_OTHERS = ResourceBundle.getBundle(token+".others"); //$NON-NLS-1$ RES_BUNDLE_16 = ResourceBundle.getBundle(token+".1_6"); //$NON-NLS-1$ RES_BUNDLE_17 = ResourceBundle.getBundle(token+".1_7"); //$NON-NLS-1$ RES_BUNDLE_18 = ResourceBundle.getBundle(token+".1_8"); //$NON-NLS-1$ RES_BUNDLE_19 = ResourceBundle.getBundle(token+".1_9"); //$NON-NLS-1$ RES_BUNDLE_ACTIONS = ResourceBundle.getBundle(token+".actions"); //$NON-NLS-1$ } private LangTool() { super(); initMap(); } private void initMap() { // Recording the languages mapLangs.put("fr", Lang.FR); //$NON-NLS-1$ mapLangs.put("en", Lang.EN_BR); //$NON-NLS-1$ mapLangs.put("es", Lang.ES); //$NON-NLS-1$ mapLangs.put("de", Lang.DE); //$NON-NLS-1$ mapLangs.put("it", Lang.IT); //$NON-NLS-1$ mapLangs.put("pl", Lang.PL); //$NON-NLS-1$ mapLangs.put("tr", Lang.TR); //$NON-NLS-1$ mapLangs.put("ja", Lang.JA); //$NON-NLS-1$ mapLangs.put("vi", Lang.VI); //$NON-NLS-1$ mapLangs.put("hu", Lang.HU); //$NON-NLS-1$ mapLangs.put("pt-BR", Lang.PT_BR); //$NON-NLS-1$ mapLangs.put("sr", Lang.SR); //$NON-NLS-1$ mapLangs.put("ru", Lang.RU); //$NON-NLS-1$ mapLangs.put("cs", Lang.CS); //$NON-NLS-1$ mapLangs.put("ca", Lang.CA); //$NON-NLS-1$ mapLangs.put("uk", Lang.UK); //$NON-NLS-1$ mapLangs.put("si", Lang.SI); //$NON-NLS-1$ mapLangs.put("zh-CN", Lang.zh_CN); //$NON-NLS-1$ mapLangs.put(Lang.FR.getName(), Lang.FR); mapLangs.put(Lang.EN_BR.getName(), Lang.EN_BR); mapLangs.put(Lang.DE.getName(), Lang.DE); mapLangs.put(Lang.ES.getName(), Lang.ES); mapLangs.put(Lang.IT.getName(), Lang.IT); mapLangs.put(Lang.PL.getName(), Lang.PL); mapLangs.put(Lang.EN_US.getName(), Lang.EN_US); mapLangs.put(Lang.TR.getName(), Lang.TR); mapLangs.put(Lang.JA.getName(), Lang.JA); mapLangs.put(Lang.VI.getName(), Lang.VI); mapLangs.put(Lang.HU.getName(), Lang.HU); mapLangs.put(Lang.PT_BR.getName(), Lang.PT_BR); mapLangs.put(Lang.SR.getName(), Lang.SR); mapLangs.put(Lang.RU.getName(), Lang.RU); mapLangs.put(Lang.CS.getName(), Lang.CS); mapLangs.put(Lang.CA.getName(), Lang.CA); mapLangs.put(Lang.UK.getName(), Lang.UK); mapLangs.put(Lang.SI.getName(), Lang.SI); mapLangs.put(Lang.zh_CN.getName(), Lang.zh_CN); } /** * @return the map containing mapping between name and languages. * @since 3.0 */ public Map getMapLangs() { return mapLangs; } /** * Allows to get a string of the others components * @param key The key of the string * @return The string */ public String getStringOthers(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_OTHERS); } /** * Allows to get a string of the LaTeXDrawFrame * @param key The key of the string * @return The string */ public String getStringLaTeXDrawFrame(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_LFRAME); } /** * Allows to get a string of the new 1.6 strings. * @param key The key of the string. * @return The string. */ public String getString16(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_16); } /** * 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 String getString17(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_17); } /** * 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 String getString18(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_18); } /** * 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 String getString19(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_19); } /** * Allows to get a string of the dialog frames. * @param key The key of the string. * @return The string. */ public String getStringDialogFrame(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_DIALOG_FRAME); } /** * Allows to get a string related to actions. * @param key The key of the string. * @return The string. */ public String getStringActions(final String key) { return getStringFromResourceBundle(key, RES_BUNDLE_ACTIONS); } /** * @param key The key of the string. * @param bundle The bundle to search into. * @return The found String or MISSING_KEY or !key! * @since 3.0 */ private String getStringFromResourceBundle(final String key, final ResourceBundle bundle) { String str; if(key==null || bundle==null) str = MISSING_KEY; else try { str = bundle.getString(key); } catch(final MissingResourceException e) { str = '!' + key + '!'; } return str; } /** * Allows to get the language of the program. * @return The read language, or the default language. */ public Lang readLang() { try { final Path xml = Paths.get(LPath.PATH_PREFERENCES_XML_FILE); if(Files.exists(xml)) { final Node node = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(Files.newInputStream(xml)).getFirstChild(); final NodeList nl; if(node!=null && node.getNodeName().equals(LNamespace.XML_ROOT_PREFERENCES)) { nl = node.getChildNodes(); final int size = nl.getLength(); for(int i=0 ; iQvas> { *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/16/10
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public class Drawing2CanvasMapping extends Object2ObjectMapping { /** * {@link Object2ObjectMapping#Object2ObjectMapping(Object, Object)} */ public Drawing2CanvasMapping(final IDrawing source, final ICanvas target) { super(source, target); } @Override public void onObjectModified(final Object object) { targetObject.update(); } } Package2TextViewMapping.java000066400000000000000000000034371321075051700354140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText; import org.malai.mapping.IUnary; import org.malai.mapping.Object2ObjectMapping; /** * This mapping maps the LaTeX packages, used for LaTeX compilation, with the text views. This kind of mapping * is necessary to update the text views when the packages are modified.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/17/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class Package2TextViewMapping extends Object2ObjectMapping, IViewText> { /** * Creates the mapping. * @param packages The LaTeX packages to listen. * @param textView The text view to update. * @throws IllegalArgumentException If one of the given arguments is null or if they are the same object. * @since 3.0 */ public Package2TextViewMapping(final IUnary packages, final IViewText textView) { super(packages, textView); } @Override public void onObjectModified(final Object object) { updateTarget(); } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { updateTarget(); } /** * Updates the text view. */ private void updateTarget() { targetObject.updateImage(); targetObject.updateBorder(); } } Selection2BorderMapping.java000066400000000000000000000050151321075051700354360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.instruments.Border; import org.malai.mapping.MappingRegistry; /** * This mapping maps the selected shapes of the drawing to the Border instrument that manages * the corresponding selected views.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/27/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class Selection2BorderMapping extends SelectionMapping { /** The border to update in function of the selection. */ protected Border border; /** * Creates the mapping. * @param selection The list of selected shapes. * @param border The Border instrument. * @throws IllegalArgumentException If one of the given parameter is null. * @since 3.0 */ public Selection2BorderMapping(final List selection, final Border border) { super(selection); this.border = Objects.requireNonNull(border); } @Override public Border getTarget() { return border; } @Override public void onObjectAdded(final Object list, final Object object, final int index) { final IViewShape view = MappingRegistry.REGISTRY.getTargetFromSource(object, IViewShape.class); if(view!=null) { updateActivation(list); border.add(view); } } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { final IViewShape view = MappingRegistry.REGISTRY.getTargetFromSource(object, IViewShape.class); if(view!=null) { border.remove(view); updateActivation(list); } } @Override public void onListCleaned(final Object list) { border.clear(); } @Override public void clear() { super.clear(); border = null; } /** * Updates the activation of the border. * @since 3.0 */ protected void updateActivation(final Object list) { if(list instanceof List) border.setActivated(!((List)list).isEmpty()); } } Selection2DeleterMapping.java000066400000000000000000000040231321075051700356030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.instruments.ShapeDeleter; /** * This mapping maps the selected shapes of the drawing to the instrument that can delete them.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/07/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class Selection2DeleterMapping extends SelectionMapping { /** The instrument that removes shapes. */ protected ShapeDeleter deleter; /** * Creates the mapping. * @param selection The list of selected shapes. * @param deleter The instrument that removes shapes. * @throws IllegalArgumentException If one of the given parameter is null. * @since 3.0 */ public Selection2DeleterMapping(final List selection, final ShapeDeleter deleter) { super(selection); this.deleter = Objects.requireNonNull(deleter); } @Override public ShapeDeleter getTarget() { return deleter; } @Override public void onObjectAdded(final Object list, final Object object, final int index) { deleter.setActivated(true); } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { if(list instanceof List) deleter.setActivated(!((List)list).isEmpty()); } @Override public void onListCleaned(final Object list) { if(deleter.isActivated()) deleter.setActivated(false); } @Override public void clear() { super.clear(); deleter = null; } } Selection2MetaCustumiserMapping.java000066400000000000000000000044651321075051700372030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.instruments.MetaShapeCustomiser; /** * This mapping maps the selected shapes of the drawing to the instrument that * manages the instruments customising the shapes and the pencil.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class Selection2MetaCustumiserMapping extends SelectionMapping { /** The instrument that manages the instruments customising the shapes and the pencil. */ protected MetaShapeCustomiser shapeCustomiser; /** * Creates the mapping. * @param selection The list of selected shapes. * @param shapeCustomiser The instrument that manages the instruments customising the shapes and the pencil. * @throws NullPointerException If on of the given parameter is null. * @since 3.0 */ public Selection2MetaCustumiserMapping(final List selection, final MetaShapeCustomiser shapeCustomiser) { super(selection); this.shapeCustomiser = Objects.requireNonNull(shapeCustomiser); } @Override public MetaShapeCustomiser getTarget() { return shapeCustomiser; } @Override public void onObjectAdded(final Object list, final Object object, final int index) { shapeCustomiser.setActivated(true); } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { if(shapeCustomiser.getHand().isActivated()) shapeCustomiser.setActivated(!selection.isEmpty()); } @Override public void onListCleaned(final Object list) { if(shapeCustomiser.getHand().isActivated()) shapeCustomiser.setActivated(false); } @Override public void clear() { super.clear(); shapeCustomiser = null; } } Selection2TemplateManager.scala000066400000000000000000000030031321075051700361100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.instruments.TemplateManager /** * This mapping maps the selected shapes of the drawing to the instrument that can export the selection as templates.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-19
    * @author Arnaud BLOUIN * @version 3.0 */ class Selection2TemplateManager(selection : java.util.List[IShape], val template : TemplateManager) extends SelectionMapping(selection) { override def getTarget: TemplateManager = template override def onObjectAdded(list : Object, obj : Object, index : Int) { template.exportTemplateMenu.setEnabled(true) } override def onObjectRemoved(list : Object, obj : Object, index : Int) { list match { case value: java.util.List[_] => template.exportTemplateMenu.setEnabled(!value.isEmpty) case _ => } } override def onListCleaned(list : Object) { template.exportTemplateMenu.setEnabled(false) } } SelectionMapping.java000066400000000000000000000043071321075051700342210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.malai.mapping.IMapping; import org.malai.mapping.IUnary; /** * This abstract mapping maps the selected shapes of the drawing to something.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/10
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class SelectionMapping implements IMapping { /** The selected shapes. */ protected List selection; /** * Creates the mapping. * @param selection The list of selected shapes. * @throws IllegalArgumentException If the given parameter is null. * @since 3.0 */ protected SelectionMapping(final List selection) { super(); this.selection = Objects.requireNonNull(selection); } @Override public List getSource() { return selection; } @Override public void clear() { selection = null; } @Override public void onObjectAdded(final Object list, final Object object, final int index) { // Nothing to do. } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { // Nothing to do. } @Override public void onObjectMoved(final Object list, final Object object, final int srcIndex, final int targetIndex) { // Nothing to do. } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { // Nothing to do. } @Override public void onObjectModified(final Object object) { // Nothing to do. } @Override public void onListCleaned(final Object list) { // Nothing to do. } @Override public void init() { onListCleaned(selection); } } Shape2BorderMapping.java000066400000000000000000000023111321075051700345450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.instruments.Border; import org.malai.mapping.Object2ObjectMapping; /** * This mapping is used to link a selected shape to the border instrument. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * @author Arnaud Blouin * @since 3.0 */ public class Shape2BorderMapping extends Object2ObjectMapping { /** * {@link Object2ObjectMapping#Object2ObjectMapping(Object, Object)} */ public Shape2BorderMapping(final IShape source, final Border target) { super(source, target); } @Override public void onObjectModified(final Object object) { targetObject.update(); } } Shape2ViewMapping.java000066400000000000000000000024061321075051700342470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import org.malai.mapping.Object2ObjectMapping; /** * Defines a mapping that link an IShape to a IShapeView.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/16/10
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public class Shape2ViewMapping extends Object2ObjectMapping { /** * {@link Object2ObjectMapping#Object2ObjectMapping(Object, Object)} */ public Shape2ViewMapping(final IShape source, final IViewShape target) { super(source, target); } @Override public void onObjectModified(final Object object) { targetObject.update(); } } ShapeList2ExporterMapping.java000066400000000000000000000052511321075051700360020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import java.util.Objects; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.instruments.Exporter; import org.malai.mapping.IMapping; import org.malai.mapping.IUnary; /** * Creates a mapping between a list of shapes and the instrument exporter.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 05/24/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class ShapeList2ExporterMapping implements IMapping { /** The list of shapes to listen. */ protected List shapes; /** The instrument exporter to update. */ protected Exporter exporter; /** * Creates a mapping between a list of shapes and the instrument exporter. * @param shapes The list of shapes. * @param exporter The instrument exporter to update. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public ShapeList2ExporterMapping(final List shapes, final Exporter exporter) { super(); this.shapes = Objects.requireNonNull(shapes); this.exporter = Objects.requireNonNull(exporter); } /** * Updates the activation of the instrument exporter. * @since 3.0 */ protected void updateExporter() { exporter.setActivated(!shapes.isEmpty()); } @Override public void onObjectAdded(final Object list, final Object object, final int index) { updateExporter(); } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { updateExporter(); } @Override public void onListCleaned(final Object list) { exporter.setActivated(false); } @Override public void onObjectMoved(final Object list, final Object object, final int srcIndex, final int targetIndex) { // } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { // } @Override public void onObjectModified(final Object object) { // } @Override public void init() { updateExporter(); } @Override public void clear() { updateExporter(); } @Override public List getSource() { return shapes; } @Override public Exporter getTarget() { return exporter; } } ShapeList2ViewListMapping.java000066400000000000000000000064171321075051700357450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import net.sf.latexdraw.glib.views.latex.LaTeXGenerator; import net.sf.latexdraw.instruments.Border; import org.malai.mapping.MappingRegistry; import org.malai.mapping.SynchroSymmetricList2ListMapping; /** * Defines a mapping that link a list of IShape to a list of IShapeView.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/15/10
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public class ShapeList2ViewListMapping extends SynchroSymmetricList2ListMapping { /** The border that must be updated. */ protected Border border; /** * Creates the mapping. * @param source The shape list. * @param target The view list. * @param border The instrument Border */ public ShapeList2ViewListMapping(final List source, final List target, final Border border) { super(source, target); this.border = border; } @Override protected IViewShape createTargetObject(final Object sourceObject) { return sourceObject instanceof IShape ? View2DTK.getFactory().createView((IShape)sourceObject) : null; } @Override public void onObjectAdded(final Object list, final Object object, final int index) { super.onObjectAdded(list, object, index); if(object instanceof IShape) { final IViewShape view = index==-1 ? target.get(target.size()-1) : target.get(index); MappingRegistry.REGISTRY.addMapping(new Shape2ViewMapping((IShape)object, view)); // If the shape is a text, a special mapping must be added. if(view instanceof IViewText) MappingRegistry.REGISTRY.addMapping(new Package2TextViewMapping(LaTeXGenerator.getPackagesUnary(), (IViewText)view)); } } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { final IViewShape view = index==-1 ? target.get(target.size()-1) : target.get(index); view.flush(); super.onObjectRemoved(list, object, index); border.remove(view); MappingRegistry.REGISTRY.removeMappingsUsingSource(object, Shape2ViewMapping.class); // If the shape is a text, the special mapping previously added must be removed. if(object instanceof IText) MappingRegistry.REGISTRY.removeMappingsUsingTarget(view, Package2TextViewMapping.class); } @Override public void onListCleaned(final Object list) { super.onListCleaned(list); for(final IShape shape : source) MappingRegistry.REGISTRY.removeMappingsUsingSource(shape, Shape2ViewMapping.class); } } Unit2ScaleRuler.java000066400000000000000000000032161321075051700337410ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import net.sf.latexdraw.ui.ScaleRuler; import net.sf.latexdraw.ui.ScaleRuler.Unit; import org.malai.mapping.IUnary; import org.malai.mapping.Object2ObjectMapping; /** * Creates a mapping between the unit value and a scale ruler.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/13/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class Unit2ScaleRuler extends Object2ObjectMapping, ScaleRuler> { //TODO this class must be merged with Zoom2ScaleRuler to form a Unit,Zoom->ScaleRuler mapping. /** * Creates the mapping. * @param source The unit value. * @param target The scale ruler to update. * @throws IllegalArgumentException If one of the given arguments is null or if they are the same object. * @since 3.0 */ public Unit2ScaleRuler(final IUnary source, final ScaleRuler target) { super(source, target); } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { onObjectModified(object); } @Override public void onObjectModified(final Object object) { if(targetObject.isVisible()) targetObject.repaint(); } } ViewList2TooltipableList.java000066400000000000000000000047621321075051700356500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import java.util.List; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.ToolTipable; import org.malai.mapping.IUnary; import org.malai.mapping.List2ListMapping; /** * Defines a mapping that link the views of a canvas to a set of tooltipable views. * This last list is used to avoid a full exploration of the set of views (that can be huge). * So a synchronisation between these two lists must be performed. *
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 19/01/12
    * @author Arnaud BLOUIN * @since 3.0 * @version 3.0 */ public class ViewList2TooltipableList extends List2ListMapping { /** * Creates the mapping. * @param source The list of views. * @param target The subset of tooltipable views. * @throws IllegalArgumentException If one of the given argument is null. * @since 3.0 */ public ViewList2TooltipableList(final List source, final List target) { super(source, target); } @Override public void onObjectAdded(final Object list, final Object object, final int index) { // TODO Auto-generated method stub if(object instanceof ToolTipable) synchronized(target){ target.add((ToolTipable)object); } } @Override public void onObjectRemoved(final Object list, final Object object, final int index) { if(object instanceof ToolTipable) synchronized(target){ target.remove(object); } } @Override public void onListCleaned(final Object list) { synchronized(target){ target.clear(); } } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { // Nothing to do. } @Override public void onObjectMoved(final Object list, final Object object, final int srcIndex, final int targetIndex) { // Nothing to do. } @Override public void onObjectModified(final Object object) { // Nothing to do. } @Override public void init() { // Nothing to do. } } Zoom2ScaleRuler.java000066400000000000000000000030051321075051700337420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/mappingpackage net.sf.latexdraw.mapping; import net.sf.latexdraw.ui.ScaleRuler; import org.malai.mapping.IUnary; import org.malai.mapping.Object2ObjectMapping; /** * Creates a mapping between the zoom value and a scale ruler.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 11/12/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class Zoom2ScaleRuler extends Object2ObjectMapping, ScaleRuler> { /** * Creates the mapping. * @param source The zoom value. * @param target The scale ruler to update. * @throws IllegalArgumentException If one of the given arguments is null or if they are the same object. * @since 3.0 */ public Zoom2ScaleRuler(final IUnary source, final ScaleRuler target) { super(source, target); } @Override public void onObjectReplaced(final IUnary object, final Object replacedObject) { onObjectModified(object); } @Override public void onObjectModified(final Object object) { if(targetObject.isVisible()) targetObject.repaint(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/000077500000000000000000000000001321075051700302145ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/CodeParser.java000066400000000000000000000120651321075051700331120ustar00rootroot00000000000000package net.sf.latexdraw.parsers; import java.util.Objects; /** * Defines an abstract parser that parses code.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/21/08
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class CodeParser implements 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 */ protected static 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. */ protected Code(final String c) { super(); code = Objects.requireNonNull(c); position = 0; linePosition = 1; } } /** The core level of the parser that contains the code to parse,...
    * It can be shared with others code parsers. */ private Code codeCore; /** * Creates and initialises the code parser. * @param code The code to parse. * @throws IllegalArgumentException If the given code is null. */ protected CodeParser(final String code) { super(); 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; } /** * @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(final 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(final 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() { final int c = getChar(); final boolean eol; 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(final int position) { if(position>=0) codeCore.position = position; } /** * @param linePosition the line position to set. Must be greater than 0. * @since 2.0.2 */ public void setLinePosition(final int linePosition) { if(linePosition>=1) codeCore.linePosition = linePosition; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/Parser.java000066400000000000000000000016261321075051700323200ustar00rootroot00000000000000package net.sf.latexdraw.parsers; import java.text.ParseException; /** * This class defines the general structure of a parser.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/09/07
    * @author Arnaud BLOUIN * @version 3.0 */ public interface Parser { /** * Launches the parsing. * @throws ParseException If an error occurs. * @since 2.0.2 */ void parse() throws ParseException; } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/css/000077500000000000000000000000001321075051700310045ustar00rootroot00000000000000AbstractCSSParser.java000066400000000000000000000035161321075051700350660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/csspackage net.sf.latexdraw.parsers.css; import net.sf.latexdraw.parsers.CodeParser; /** * Defines an abstract CSS parser that contains functions to help the CSS parsing. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/05/08
    * @author Arnaud BLOUIN * @version 3.0 * @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 */ protected AbstractCSSParser(final String code) { super(code); } @Override public boolean isComment() { return getChar()=='/' && getCharAt(getPosition()+1)=='*'; } @Override public String skipComment() { if(!isComment()) return null; final StringBuilder comment = new StringBuilder(); 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() { final int c = getChar(); return c=='\t' || c==' ' || c=='\r' || c=='\n' || c=='\f'; } @Override public void skipWSP() { while(isWSP() && !isEOC()) nextChar(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/ps/000077500000000000000000000000001321075051700306365ustar00rootroot00000000000000InvalidFormatPSFunctionException.java000077500000000000000000000021551321075051700400170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; /** * Defines an exception for the ps parser.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class InvalidFormatPSFunctionException extends NumberFormatException { private static final long serialVersionUID = 1L; /** * Creates the exception. */ public InvalidFormatPSFunctionException() { super(); } /** * Creates the exception. * @param s The detail message. */ public InvalidFormatPSFunctionException(final String s) { super (s); } } PSAbsCommand.java000077500000000000000000000020351321075051700336740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines a model of postscript command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSAbsCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.abs(stack.pop())); } } PSAddCommand.java000077500000000000000000000020751321075051700336630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the add command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSAddCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); stack.push(b+a); } } PSArithemticCommand.java000077500000000000000000000023001321075051700352530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines an abstract arithmetic command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public interface PSArithemticCommand { /** * Creates n abstract postscript arithmetical command. * @param stack The current stack of commands. * @param x The x variable of the command. * @throws InvalidFormatPSFunctionException If the command format is not valid. * @throws ArithmeticException When a division by 0 occurs for instance. * @since 3.0 */ void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException; } PSCeilingCommand.java000077500000000000000000000020301321075051700345340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the ceiling command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSCeilingCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.ceil(stack.pop())); } } PSClearCommand.java000077500000000000000000000017541321075051700342240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the clear command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSClearCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null) throw new InvalidFormatPSFunctionException(); stack.clear(); } } PSCosCommand.java000066400000000000000000000020371321075051700337120ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the cos command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSCosCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.cos(Math.toRadians(stack.pop()))); } } PSCountCommand.java000077500000000000000000000017771321075051700342730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the count command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSCountCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null) throw new InvalidFormatPSFunctionException(); stack.push((double)stack.size()); } } PSDivCommand.java000077500000000000000000000022531321075051700337130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; import net.sf.latexdraw.util.LNumber; /** * Defines the div command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSDivCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); if(LNumber.equalsDouble(a, 0.0)) throw new ArithmeticException(); stack.push(b/a); } } PSDupCommand.java000077500000000000000000000020051321075051700337140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the dup command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSDupCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<1) throw new InvalidFormatPSFunctionException(); stack.push(stack.peek()); } } PSExchCommand.java000077500000000000000000000021221321075051700340530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the exch command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSExchCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final Double a = stack.pop(); final Double b = stack.pop(); stack.push(a); stack.push(b); } } PSExpCommand.java000066400000000000000000000021101321075051700337120ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the exp command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSExpCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); stack.push(Math.pow(b, a)); } } PSFloorCommand.java000077500000000000000000000020251321075051700342470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the floor command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSFloorCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.floor(stack.pop())); } } PSFunctionParser.java000077500000000000000000000145731321075051700346440ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.List; /** * Defines a postscript function parser.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSFunctionParser { /** * Checks whether the given equation is a valid post-fixed PS equation. * @param eq The equation to check. * @param min The X-min of the plotting. * @param max The X-max of the plotting. * @param nbPts The number of points to plot. * @return True if the given equation is a valid post-fixed PS equation. * @since 3.3 */ public static boolean isValidPostFixEquation(final String eq, final double min, final double max, final double nbPts) { try { final PSFunctionParser fct = new PSFunctionParser(eq); final double gap = (max-min)/(nbPts-1); for(double x = min; x commands; public static final String CMD_MUL = "mul"; //$NON-NLS-1$ public static final String CMD_ADD = "add";//$NON-NLS-1$ public static final String CMD_SUB = "sub";//$NON-NLS-1$ public static final String CMD_SIN = "sin";//$NON-NLS-1$ public static final String CMD_COS = "cos";//$NON-NLS-1$ public static final String CMD_DIV = "div";//$NON-NLS-1$ public static final String CMD_IDIV = "idiv";//$NON-NLS-1$ public static final String CMD_MOD = "mod";//$NON-NLS-1$ public static final String CMD_NEG = "neg";//$NON-NLS-1$ public static final String CMD_EXCH = "exch";//$NON-NLS-1$ public static final String CMD_CLEAR= "clear";//$NON-NLS-1$ public static final String CMD_DUP = "dup";//$NON-NLS-1$ public static final String CMD_POP = "pop";//$NON-NLS-1$ public static final String CMD_ROLL = "roll";//$NON-NLS-1$ public static final String CMD_SQRT = "sqrt";//$NON-NLS-1$ public static final String CMD_EXP = "exp";//$NON-NLS-1$ public static final String CMD_ABS = "abs";//$NON-NLS-1$ public static final String CMD_FLOOR= "floor";//$NON-NLS-1$ public static final String CMD_CEILING = "ceiling";//$NON-NLS-1$ public static final String CMD_COUNT= "count";//$NON-NLS-1$ public static final String CMD_X = "x";//$NON-NLS-1$ public static final String CMD_LOG = "log";//$NON-NLS-1$ /** * Creates and parser from postscript functions. * @param fct The function to parse. * @throws InvalidFormatPSFunctionException If the function format is not valid. * @since 3.0 */ public PSFunctionParser(final String fct) throws InvalidFormatPSFunctionException { super(); if (fct == null || fct.isEmpty()) throw new IllegalArgumentException(); commands = new ArrayList<>(); function = fct; parseFunction(); } /** * @param x The X-coordinate used to compute the Y using the function. * @return The y value corresponding to the given X value. Or Double.NaN is an arithmetic error occurs. * @throws InvalidFormatPSFunctionException If the function is not correct. * @throws ArithmeticException If an error occurs during the computation of the points (e.g. division by 0). */ public double getY(final double x) throws InvalidFormatPSFunctionException { final Deque stack = new ArrayDeque<>(); for(final PSArithemticCommand cmd : commands) cmd.execute(stack, x); if(stack.isEmpty()) throw new InvalidFormatPSFunctionException(); return stack.pop(); } /** * Parses the function. * @throws InvalidFormatPSFunctionException If the function is not correct. * @throws NumberFormatException If the function is not correct. */ protected void parseFunction() throws InvalidFormatPSFunctionException, NumberFormatException { int i = 0; final int lgth = function.length(); final StringBuilder cmd = new StringBuilder(); while(i0) commands.add(identifyCommand(cmd.toString())); } } /** * @param cmd The arithmetic command to analyse. * @return The arithmetic instance corresponding to the given command. * @throws InvalidFormatPSFunctionException If the function is not correct. * @throws NumberFormatException If the function is not correct. * @since 3.0 */ protected PSArithemticCommand identifyCommand(final String cmd) throws InvalidFormatPSFunctionException, NumberFormatException { if(cmd==null || cmd.isEmpty()) throw new InvalidFormatPSFunctionException(); switch(cmd) { case CMD_ADD: return new PSAddCommand(); case CMD_ABS: return new PSAbsCommand(); case CMD_CEILING: return new PSCeilingCommand(); case CMD_CLEAR: return new PSClearCommand(); case CMD_COS: return new PSCosCommand(); case CMD_COUNT: return new PSCountCommand(); case CMD_DIV: return new PSDivCommand(); case CMD_DUP: return new PSDupCommand(); case CMD_EXCH: return new PSExchCommand(); case CMD_EXP: return new PSExpCommand(); case CMD_FLOOR: return new PSFloorCommand(); case CMD_IDIV: return new PSIDivCommand(); case CMD_LOG: return new PSLogCommand(); case CMD_MOD: return new PSModCommand(); case CMD_MUL: return new PSMulCommand(); case CMD_NEG: return new PSNegCommand(); case CMD_POP: return new PSPopCommand(); case CMD_ROLL: return null; case CMD_SIN: return new PSSinCommand(); case CMD_SQRT: return null; case CMD_SUB: return new PSSubCommand(); case CMD_X: return new PSPlotXVariable(); } try {return new PSValue(Double.parseDouble(cmd));} catch(final NumberFormatException ex) {throw new InvalidFormatPSFunctionException("Cannot parse: " + cmd);} //$NON-NLS-1$ } } PSIDivCommand.java000077500000000000000000000022721321075051700340250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; import net.sf.latexdraw.util.LNumber; /** * Defines the idiv command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSIDivCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); if(LNumber.equalsDouble(a, 0.0)) throw new ArithmeticException(); stack.push(Math.floor(b/a)); } } PSLogCommand.java000066400000000000000000000020031321075051700337000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the log command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2014-10-09
    * @author Arnaud BLOUIN */ public class PSLogCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.log10(stack.pop())); } } PSModCommand.java000077500000000000000000000022541321075051700337110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; import net.sf.latexdraw.util.LNumber; /** * Defines the mod command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSModCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); if(LNumber.equalsDouble(a, 0.0)) throw new ArithmeticException(); stack.push(b%a); } } PSMulCommand.java000077500000000000000000000020751321075051700337300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the mul command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSMulCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); stack.push(b*a); } } PSNegCommand.java000077500000000000000000000020061321075051700336760ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the neg command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSNegCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(-stack.pop()); } } PSPlotXVariable.java000077500000000000000000000017601321075051700344100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Manages postscript variables.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSPlotXVariable implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null) throw new InvalidFormatPSFunctionException(); stack.push(x); } } PSPopCommand.java000077500000000000000000000017701321075051700337320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the pop command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSPopCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<1) throw new InvalidFormatPSFunctionException(); stack.pop(); } } PSSinCommand.java000066400000000000000000000020371321075051700337170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the sin command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSSinCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.isEmpty()) throw new InvalidFormatPSFunctionException(); stack.push(Math.sin(Math.toRadians(stack.pop()))); } } PSSubCommand.java000077500000000000000000000020761321075051700337250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pspackage net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines the sub command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0> */ public class PSSubCommand implements PSArithemticCommand { @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null || stack.size()<2) throw new InvalidFormatPSFunctionException(); final double a = stack.pop(); final double b = stack.pop(); stack.push(b-a); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/ps/PSValue.java000077500000000000000000000022561321075051700330300ustar00rootroot00000000000000package net.sf.latexdraw.parsers.ps; import java.util.Deque; /** * Defines a postscript value model.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class PSValue implements PSArithemticCommand { /** The value. */ protected double value; /** * Creates of postscript value. * @param v The value. * @since 3.0 */ public PSValue(final double v) { super(); value = v; } @Override public void execute(final Deque stack, final double x) throws InvalidFormatPSFunctionException { if(stack==null) throw new InvalidFormatPSFunctionException(); stack.push(value); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/000077500000000000000000000000001321075051700310225ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/lexer/000077500000000000000000000000001321075051700321415ustar00rootroot00000000000000PSTLexer.scala000066400000000000000000000016631321075051700345430ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/lexerpackage net.sf.latexdraw.parsers.pst.lexer /** * Defines a PSTricks lexer.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-23
    * @author Arnaud BLOUIN * @version 3.0 */ class PSTLexer(content : String) extends PSTLexical { var tokens = new Scanner(content) def nextToken : PSTToken = { val tok = tokens.first tokens = tokens.rest tok.asInstanceOf[PSTToken] } def atEnd = tokens.atEnd } PSTLexical.scala000066400000000000000000000200111321075051700350310ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/lexerpackage net.sf.latexdraw.parsers.pst.lexer import java.text.ParseException import scala.collection.mutable.HashSet import scala.util.parsing.combinator.lexical.Lexical import scala.util.parsing.input.CharArrayReader.EofCh /** * Defines a PSTricks lexical.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-23
    * @author Arnaud BLOUIN * @version 3.0 */ class PSTLexical extends Lexical with PSTTokens { /** This token is produced by a scanner Scanner when scanning failed. */ override def errorToken(msg : String): PSTToken = new KError(msg) def eof = elem("eof", ch => ch == EofCh) override def whitespace : Parser[Any] = rep(whitespaceChar | comment) /** The reserved token of the PST language. */ val reserved : HashSet[String] = HashSet("\\psellipse", "\\psframe", "\\psframe*", "\\psellipse*", "\\pscircle", "\\pscircle*", "\\qdisk", "\\psline", "\\psline*", "\\qline", "\\pspolygon*", "\\pspolygon", "\\pswedge*", "\\pswedge", "\\psarc*", "\\psarc", "\\psarcn*", "\\psarcn", "\\psbezier*", "\\psbezier", "\\parabola*", "\\parabola", "\\pscurve", "\\pscurve*", "\\psecurve*", "\\psecurve", "\\psccurve*", "\\psccurve", "\\psdiamond*", "\\psdiamond", "\\pstriangle*", "\\pstriangle", "\\psellipticarc*", "\\psellipticarc", "\\psellipticarcn*", "\\psellipticarcn", "\\psdot*", "\\psdot", "\\psdots*", "\\psdots", "\\psgrid", "\\begin", "\\end", "pspicture", "\\fileplot", "\\fileplot*", "\\dataplot*", "\\dataplot", "\\savedata", "\\readdata", "\\listplot", "\\listplot*", "\\psplot", "\\psplot*", "\\parametricplot*", "\\parametricplot", "\\psset", "\\newpsobject", "\\newpsstyle", "\\pscustom", "\\pscustom*", "\\newpath", "\\moveto", "\\lineto", "\\curveto", "\\closepath", "\\rcurveto", "\\gsave", "\\grestore", "\\stroke", "\\fill", "\\translate", "\\scale", "\\rotate", "\\swapaxes", "\\msave", "\\mrestore", "\\openshadow", "\\closedshadow", "\\movepath", "\\rlineto", "pspicture*", "\\rput*", "\\rput", "\\usefont", "\\psframebox", "\\psframebox*", "\\psdblframebox", "\\psdblframebox*", "\\psshadowbox", "\\psshadowbox*", "\\pscirclebox", "\\pscirclebox*", "\\psovalbox", "\\psovalbox*", "\\psdiabox", "\\psdiabox*", "\\pstribox", "\\pstribox*", "\\color", "\\textcolor", "\\definecolor", "\\scalebox", "center", "\\psscalebox", "\\tiny", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge", "\\`", "\\'", "\\^", "\\\"", "\\H", "\\~", "\\c", "\\k", "\\=", "\\b", "\\.", "\\d", "\\r", "\\u", "\\v", "\\t", "\\l", "\\textit", "\\textsf", "\\textsc", "\\textsl", "\\underline", "\\texttt", "\\emph", "\\textbf", "\\textit", "\\rmfamily", "\\sffamily", "\\ttfamily", "\\mdseries", "\\bfseries", "\\scshape", "\\slshape", "\\itshape", "\\upshape", "\\it", "\\sl", "\\sc", "\\bf", "\\psaxes", "\\includegraphics", "\\pspicture", "\\endpspicture") val textualDelimiters : HashSet[String] = HashSet(",", "(", ")", "[", "]", "=") val delimiters : HashSet[String] = HashSet("{", "}", "\\") ++ textualDelimiters def command : Parser[PSTToken] = positioned('\\' ~> (identifier | specialCommandName) ^^ { case name => Command("\\" + name.chars) }) /** Companion of the parser 'command' for parsing special command names. */ protected def specialCommandName : Parser[Identifier] = (elem('_')|elem('&')|elem('=')|elem('~')|elem('$')|elem('^')|elem('{')|elem('}')| elem('%')|elem('#')|elem('\\')|elem('\"')|elem('\'')|elem('*')|elem(',')|elem('.')| elem('/')|elem('@')|elem('`')) ^^ {case char => Identifier(char.toString) } def comment : Parser[PSTToken] = positioned('%' ~> rep(chrExcept(EofCh, '\n')) ^^ { case content => Comment(content.mkString) }) def mathMode : Parser[MathMode] = positioned('$' ~> mathModeMultiLine ^^ { case math => MathMode(math.chars) }) | positioned('\\' ~> '(' ~> mathModeParenthesisMultiLine ^^ { case math => MathMode(math.chars) }) | positioned('\\' ~> '[' ~> mathModeBracketsMultiLine ^^ { case math => MathMode(math.chars) }) protected def mathModeMultiLine : Parser[MathMode] = '$' ^^ { case _ => MathMode("") } | chrExcept(EofCh) ~ mathModeMultiLine ^^ { case c ~ rc => MathMode(c+rc.chars) } protected def mathModeParenthesisMultiLine : Parser[MathMode] = '\\' ~ ')' ^^ { case _ => MathMode("") } | chrExcept(EofCh) ~ mathModeParenthesisMultiLine ^^ { case c ~ rc => MathMode(c+rc.chars) } protected def mathModeBracketsMultiLine : Parser[MathMode] = '\\' ~ ']' ^^ { case _ => MathMode("") } | chrExcept(EofCh) ~ mathModeBracketsMultiLine ^^ { case c ~ rc => MathMode(c+rc.chars) } /** * Parses units. */ private def unit : Parser[String] = unitCM | unitMM | unitPT | unitIN /** Parses the cm unit. */ private def unitCM : Parser[String] = elem('c') ~ elem('m') ^^ { case _ ~ _ => "cm"} /** Parses the mm unit. */ private def unitMM : Parser[String] = elem('m') ~ elem('m') ^^ { case _ ~ _ => "mm"} /** Parses the pt unit. */ private def unitPT : Parser[String] = elem('p') ~ elem('t') ^^ { case _ ~ _ => "pt"} /** Parses the in unit. */ private def unitIN : Parser[String] = elem('i') ~ elem('n') ^^ { case _ ~ _ => "in"} /** * Parses identifiers */ def identifier : Parser[Identifier] = positioned(letter ~ rep(letter|digit) ~ opt('*') ^^ { case firstChar ~ chars ~ star => star match { case Some(_) => Identifier(firstChar+chars.mkString + '*') case None => Identifier(firstChar+chars.mkString) } }) /** * Parses float numbers. */ def floatNumber : Parser[NumericLit] = positioned(rep(elem('-')|elem('+')) ~ (parseDotDigit1 | parseDigitOptDotDigit) ~ opt(unit) ^^ { case signs ~ content ~ unit => unit match { case Some(value) => NumericLit(signs.mkString + content + value) case None => NumericLit(signs.mkString + content) } }) /** * Parses a character that could be part of LaTeX texts. */ def text : Parser[Text] = positioned(elem("char", _.isValidChar) ^^ { case char => Text(char.toString) }) private def parseDigitOptDotDigit : Parser[String] = rep1(digit) ~ opt(parseDotDigit) ^^ { case digits ~ decimals => decimals match { case Some(value) => digits.mkString + value case None => digits.mkString } } private def parseDotDigit : Parser[String] = elem('.') ~ rep(digit) ^^ { case _ ~ digits => "." + digits.mkString } private def parseDotDigit1 : Parser[String] = elem('.') ~ rep1(digit) ^^ { case _ ~ digits => "." + digits.mkString } /** * Parses all the possible tokens. */ def token: Parser[PSTToken] = ( positioned(identifier) | positioned(mathMode) | positioned(comment) | positioned(command) | positioned(floatNumber) | positioned(eof ^^ {case _ => KEOF() }) | positioned('$' ^^ {case _ => throw new ParseException("Unclosed math expression (a closing $ is missing).", -1) }) | positioned(delim) | positioned(text) | positioned(elem("illegal character", p => true) ^^^ KError("Illegal character")) ) private lazy val _delim : Parser[PSTToken] = { // construct parser for delimiters by |'ing together the parsers for the individual delimiters, // starting with the longest one -- otherwise a delimiter D will never be matched if there is // another delimiter that is a prefix of D def parseDelim(str : String) : Parser[PSTToken] = positioned(accept(str.toList) ^^ { x => Delimiter(str) }) val d = new Array[String](delimiters.size) delimiters.copyToArray(d, 0) scala.util.Sorting.quickSort(d) (d.toList map parseDelim).foldRight(failure("no matching delimiter") : Parser[PSTToken])((x, y) => y | x) } protected def delim: Parser[PSTToken] = _delim } PSTTokens.scala000066400000000000000000000051121321075051700347200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/lexerpackage net.sf.latexdraw.parsers.pst.lexer import scala.util.parsing.combinator.Parsers import scala.util.parsing.combinator.token.Tokens import scala.util.parsing.input.OffsetPosition import scala.util.parsing.input.Positional import scala.util.parsing.input.CharArrayReader /** * Defines the concept of PSTricks token.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-23
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTTokens extends Tokens with Parsers { trait PSTToken extends Token with Positional { def getOffset : java.lang.Integer = this.pos.asInstanceOf[OffsetPosition].offset def getLength : java.lang.Integer = this.toString.length } /** The class of comment tokens */ case class Whitespace() extends PSTToken { override def chars = " " override def toString = " " } /** The class of comment tokens */ case class Comment(chars : String) extends PSTToken { override def toString = "%"+chars } /** The class of Math mode tokens */ case class MathMode(chars : String) extends PSTToken { override def toString = "$"+chars+"$" } /** The class of delim tokens */ case class Delimiter(chars : String) extends PSTToken { override def toString = chars } /** The class of numeric literal tokens */ case class NumericLit(chars : String) extends PSTToken { override def toString = chars } /** The class of identifier tokens */ case class Command(chars : String) extends PSTToken { override def toString = chars } /** The class of text tokens */ case class Text(chars : String) extends PSTToken { override def toString = chars } /** The class of identifier tokens */ case class Identifier(chars : String) extends PSTToken { override def toString = chars } case class KEOF() extends PSTToken { override def toString = chars override def chars = CharArrayReader.EofCh.toString } case class KIncomplet(chars : String, msg : String) extends PSTToken { override def toString = chars } case class KError(chars : String) extends PSTToken { override def toString = chars override def getLength = 1 } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parser/000077500000000000000000000000001321075051700323165ustar00rootroot00000000000000IPSTCodeParser.scala000066400000000000000000000037001321075051700357730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import scala.util.parsing.combinator.syntactical.TokenParsers import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * Defines an interface for a parser parsing basic PST expressions.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2013-02-26
    * @author Arnaud BLOUIN * @version 3.0 */ trait IPSTCodeParser extends TokenParsers { /** The entry point to parse PST texts. */ def parsePSTCode(ctx : PSTContext) : Parser[IGroup] /** This parser rule parses texts (raw text, unknown commands, math area, etc.) and transforms them into shapes. */ def parseText(ctx : PSTContext) : Parser[List[IShape]] def parsePscustom(ctx : PSTContext) : Parser[IGroup] def parseNewpsobject(ctx : PSTContext) : Parser[List[IShape]] def parseNewpsstyle(ctx : PSTContext) : Parser[List[IShape]] def parseIncludeGraphics(ctx : PSTContext) : Parser[IShape] def parsePSTBlock(ctx : PSTContext, isPsCustomBlock : Boolean) : Parser[IGroup] /** Parses the command definecolor. */ def parseDefineColor(ctx:PSTContext) : Parser[Unit] /** Parses rput commands. */ def parseRput(ctx : PSTContext) : Parser[IGroup] /** Parses begin{center} \end{center} blocks. */ def parseCenterBlock(ctx : PSTContext) : Parser[IGroup] /** Parses begin{pspicture} \end{pspicture} blocks. */ def parsePspictureBlock(ctx : PSTContext) : Parser[IGroup] }PSBezierParser.scala000066400000000000000000000042221321075051700361040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing bézier curves.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-03
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSBezierParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser { /** * Parses psbezier commands. */ def parsePsbezier(ctx : PSTContext) : Parser[List[IShape]] = ("\\psbezier*" | "\\psbezier") ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ rep(repN(3, parseCoord(ctx))) ~ opt(parseCoord(ctx)) ^^ { case cmdName ~ _ ~ arrowRaw ~ ptsRaw ~ ptRaw => val listPts = ptRaw match { case Some(value) => ptsRaw.flatten ::: List(value) case None => ctx.origin.dup :: ptsRaw.flatten } val bezier = ShapeFactory.createBezierCurve() var j = 1 val size = listPts.length // Setting the points. for(i <- 0 until size by 3) bezier.addPoint(transformPointTo2DScene(listPts(i), ctx)) for(i <- 2 until size by 3){ bezier.getFirstCtrlPtAt(j).setPoint(transformPointTo2DScene(listPts(i), ctx)) j +=1 } if(size>1) bezier.getFirstCtrlPtAt(0).setPoint(transformPointTo2DScene(listPts(1), ctx)) setShapeParameters(bezier, ctx) setArrows(bezier, arrowRaw, false, ctx) bezier.updateSecondControlPoints if(bezier.getNbPoints()>2 && bezier.getPtAt(0).equals(bezier.getPtAt(-1))) { bezier.removePoint(-1) } else bezier.setIsClosed(false) if(cmdName.endsWith("*")) setShapeForStar(bezier) checkTextParsed(ctx) ::: List(bezier) } } PSCircleParser.scala000066400000000000000000000051121321075051700360640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.ICircle import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing circles.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-02
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSCircleParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser { /** * Parses pscircle commands. */ def parsePscircle(ctx : PSTContext) : Parser[List[IShape]] = ("\\pscircle*" | "\\pscircle") ~ opt(parseParam(ctx)) ~ opt(parseCoord(ctx)) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ pos ~ radius => parseValueDim(radius) match { case Some(value) => var pt : PointUnit = null pos match { case Some(point) => pt = point case _ => pt = ctx.origin.dup } val pt2d = transformPointTo2DScene(pt, ctx) checkTextParsed(ctx) ::: List(createCircle(cmdName.endsWith("*"), pt2d, value._1*IShape.PPC, ctx)) case None => PSTParser.errorLogs += "Bracket's content cannot be empty: " + cmdName; Nil } } /** * Parses qdisk commands. */ def parseQdisk(ctx : PSTContext) : Parser[List[IShape]] = "\\qdisk" ~ parseCoord(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ pos ~ radius => parseValueDim(radius) match { case Some(value) => checkTextParsed(ctx) ::: List(createCircle(true, transformPointTo2DScene(pos, ctx), value._1*IShape.PPC, ctx)) case None => PSTParser.errorLogs += "Bracket's content cannot be empty: " + cmdName; Nil } } /** * Creates and initialises a circle. */ private def createCircle(hasStar : Boolean, centre : IPoint, radius : Double, ctx : PSTContext) : ICircle = { val circ = ShapeFactory.createCircle() val width = scala.math.max(0.1, radius)*2.0 circ.setWidth(width) circ.setPosition(centre.getX-width/2.0, centre.getY+width/2.0) setShapeParameters(circ, ctx) if(hasStar) setShapeForStar(circ) circ } }PSCurveParabolaParser.scala000066400000000000000000000040561321075051700374170ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape /** * A parser grouping parsers parsing curves and parabolas.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-04
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSCurveParabolaParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser with PSTValueParser { /** * Parses pscurve commands. */ def parsePscurve(ctx : PSTContext) : Parser[List[IShape]] = ("\\pscurve*" | "\\pscurve") ~> parsePscurves(ctx) /** * Parses pscurve commands. */ def parsePsecurve(ctx : PSTContext) : Parser[List[IShape]] = ("\\psecurve*" | "\\psecurve") ~> parsePscurves(ctx) /** * Parses pscurve commands. */ def parsePsccurve(ctx : PSTContext) : Parser[List[IShape]] = ("\\psccurve*" | "\\psccurve") ~> parsePscurves(ctx) private def parsePscurves(ctx : PSTContext) : Parser[List[IShape]] = opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ repN(3, parseCoord(ctx)) ~ rep(parseCoord(ctx)) ^^ { case _ ~ arrowRaw ~ firstPtsRaw ~ lastPtsRaw => PSTParser.errorLogs += "Commands pscurve, psecurve, and psccurve not supported yet." Nil } /** * Parses parabola commands. */ def parseParabola(ctx : PSTContext) : Parser[List[IShape]] = ("\\parabola*" | "\\parabola") ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ parseCoord(ctx) ~ parseCoord(ctx) ^^ { case cmdName ~ _ ~ arrowRaw ~ pt1Raw ~ pt2Raw => PSTParser.errorLogs += "Command parabola not supported yet." Nil } } PSCustomParser.scala000066400000000000000000000216351321075051700361450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp /** * A parser grouping parsers parsing commands related to the pscustom command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-07-09
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSCustomParser extends PSTAbstractParser with PSTCoordinateParser with PSTParamParser with PSTBracketBlockParser { protected val notIntoPscustomBlockErrorMsg = "must be located into a pscustom block" /** * This parser contains all the parser related to pscustom commands. */ def parsePSCustomCommands(ctx : PSTContext) : Parser[List[IShape]] = parseNewpath(ctx) | parseMoveTo(ctx) | parseLineTo(ctx) | parseCurveTo(ctx) | parseClosepath(ctx) | parseRcurveTo(ctx) | parseGsave(ctx) | parseGrestore(ctx) | parseStroke(ctx) | parseFill(ctx) | parseTranslate(ctx) | parseScale(ctx) | parseRotate(ctx) | parseSwapaxes(ctx) | parseMsave(ctx) | parseMrestore(ctx) | parseOpenshadow(ctx) | parseClosedshadow(ctx) | parseMovepath(ctx) | parseRlineto(ctx) /** * Parses rlineto commands. */ def parseRlineto(ctx : PSTContext) : Parser[List[IShape]] = "\\rlineto" ~ parseCoord(ctx) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command rlineto is not supported yet." else PSTParser.errorLogs += "The command rlineto " + notIntoPscustomBlockErrorMsg Nil } /** * Parses movepath commands. */ def parseMovepath(ctx : PSTContext) : Parser[List[IShape]] = "\\movepath" ~ parseCoord(ctx) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command movepath is not supported yet." else PSTParser.errorLogs += "The command movepath " + notIntoPscustomBlockErrorMsg Nil } /** * Parses closedshadow commands. */ def parseClosedshadow(ctx : PSTContext) : Parser[List[IShape]] = "\\closedshadow" ~ opt(parseParam(ctx)) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command closedshadow is not supported yet." else PSTParser.errorLogs += "The command closedshadow " + notIntoPscustomBlockErrorMsg Nil } /** * Parses openshadow commands. */ def parseOpenshadow(ctx : PSTContext) : Parser[List[IShape]] = "\\openshadow" ~ opt(parseParam(ctx)) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command openshadow is not supported yet." else PSTParser.errorLogs += "The command openshadow " + notIntoPscustomBlockErrorMsg Nil } /** * Parses mrestore commands. */ def parseMrestore(ctx : PSTContext) : Parser[List[IShape]] = "\\mrestore" ^^ { case _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command mrestore is not supported yet." else PSTParser.errorLogs += "The command mrestore " + notIntoPscustomBlockErrorMsg Nil } /** * Parses msave commands. */ def parseMsave(ctx : PSTContext) : Parser[List[IShape]] = "\\msave" ^^ { case _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command msave is not supported yet." else PSTParser.errorLogs += "The command msave " + notIntoPscustomBlockErrorMsg Nil } /** * Parses swapaxes commands. */ def parseSwapaxes(ctx : PSTContext) : Parser[List[IShape]] = "\\swapaxes" ^^ { case _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command swapaxes is not supported yet." else PSTParser.errorLogs += "The command swapaxes " + notIntoPscustomBlockErrorMsg Nil } /** * Parses rotate commands. */ def parseRotate(ctx : PSTContext) : Parser[List[IShape]] = "\\rotate" ~ parseBracket(ctx) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command rotate is not supported yet." else PSTParser.errorLogs += "The command rotate " + notIntoPscustomBlockErrorMsg Nil } /** * Parses scale commands. */ def parseScale(ctx : PSTContext) : Parser[List[IShape]] = "\\scale" ~ parseBracket(ctx) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command scale is not supported yet." else PSTParser.errorLogs += "The command scale " + notIntoPscustomBlockErrorMsg Nil } /** * Parses translate commands. */ def parseTranslate(ctx : PSTContext) : Parser[List[IShape]] = "\\translate" ~ parseCoord(ctx) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command translate is not supported yet." else PSTParser.errorLogs += "The command translate " + notIntoPscustomBlockErrorMsg Nil } /** * Parses fill commands. */ def parseFill(ctx : PSTContext) : Parser[List[IShape]] = "\\fill" ~ opt(parseParam(ctx)) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command fill is not supported yet." else PSTParser.errorLogs += "The command fill " + notIntoPscustomBlockErrorMsg Nil } /** * Parses stroke commands. */ def parseStroke(ctx : PSTContext) : Parser[List[IShape]] = "\\stroke" ~ opt(parseParam(ctx)) ^^ { case _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command stroke is not supported yet." else PSTParser.errorLogs += "The command stroke " + notIntoPscustomBlockErrorMsg Nil } /** * Parses grestore commands. */ def parseGrestore(ctx : PSTContext) : Parser[List[IShape]] = "\\grestore" ^^ { case _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command grestore is not supported yet." else PSTParser.errorLogs += "The command grestore " + notIntoPscustomBlockErrorMsg Nil } /** * Parses gsave commands. */ def parseGsave(ctx : PSTContext) : Parser[List[IShape]] = "\\gsave" ^^ { case _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command gsave is not supported yet." else PSTParser.errorLogs += "The command gsave " + notIntoPscustomBlockErrorMsg Nil } /** * Parses rcurveto commands. */ def parseRcurveTo(ctx : PSTContext) : Parser[List[IShape]] = "\\rcurveto" ~ parseCoord(ctx) ~ parseCoord(ctx) ~ parseCoord(ctx) ^^ { case _ ~ _ ~ _ ~ _ => if(ctx.isPsCustom) PSTParser.errorLogs += "The command rcurveto is not supported yet." else PSTParser.errorLogs += "The command rcurveto " + notIntoPscustomBlockErrorMsg Nil } /** * Parses closepath commands. */ def parseClosepath(ctx : PSTContext) : Parser[List[IShape]] = "\\closepath" ^^ { case _ => if(ctx.isPsCustom) { val fh = ShapeFactory.createFreeHand() fh.setOpen(false) checkTextParsed(ctx) ::: List(fh) } else { PSTParser.errorLogs += "The command closepath " + notIntoPscustomBlockErrorMsg Nil } } /** * Parses curveto commands. */ def parseCurveTo(ctx : PSTContext) : Parser[List[IShape]] = "\\curveto" ~ parseCoord(ctx) ~ parseCoord(ctx) ~ parseCoord(ctx) ^^ { case _ ~ _ ~ _ ~ pt3 => if(ctx.isPsCustom) checkTextParsed(ctx) ::: List(createFreeHand(false, ctx, pt3)) else { PSTParser.errorLogs += "The command curveto " + notIntoPscustomBlockErrorMsg Nil } } /** * Parses lineto commands. */ def parseLineTo(ctx : PSTContext) : Parser[List[IShape]] = "\\lineto" ~ parseCoord(ctx) ^^ { case _ ~ pt => if(ctx.isPsCustom) checkTextParsed(ctx) ::: List(createFreeHand(true, ctx, pt)) else { PSTParser.errorLogs += "The command lineto " + notIntoPscustomBlockErrorMsg Nil } } private def createFreeHand(isLine : Boolean, ctx : PSTContext, pt : PointUnit) : IFreehand = { val freeHand = ShapeFactory.createFreeHand() freeHand.addPoint(ShapeFactory.createPoint(ctx.psCustomLatestPt)) freeHand.addPoint(transformPointTo2DScene(pt, ctx)) if(isLine) freeHand.setType(IFreeHandProp.FreeHandType.LINES) else freeHand.setType(IFreeHandProp.FreeHandType.CURVES) setShapeGeneralParameters(freeHand, ctx) ctx.psCustomLatestPt.setPoint(transformPointTo2DScene(pt, ctx)) freeHand } /** * Parses moveto commands. */ def parseMoveTo(ctx : PSTContext) : Parser[List[IShape]] = "\\moveto" ~ parseCoord(ctx) ^^ { case _ ~ pt => if(ctx.isPsCustom) ctx.psCustomLatestPt.setPoint(transformPointTo2DScene(pt, ctx)) else PSTParser.errorLogs += "The command moveto " + notIntoPscustomBlockErrorMsg checkTextParsed(ctx) } /** * Parses newpath commands. */ def parseNewpath(ctx : PSTContext) : Parser[List[IShape]] = "\\newpath" ^^ { case _ => if(!ctx.isPsCustom) PSTParser.errorLogs += "The command newpath " + notIntoPscustomBlockErrorMsg checkTextParsed(ctx) } } PSDotParser.scala000066400000000000000000000047671321075051700354300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import scala.annotation.migration import net.sf.latexdraw.glib.models.interfaces.shape.IDot import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing dots.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-02
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSDotParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTValueParser { /** * Parses psdot commands. */ def parsePsdot(ctx : PSTContext) : Parser[List[IShape]] = ("\\psdot*" | "\\psdot") ~ opt(parseParam(ctx)) ~ opt(parseCoord(ctx)) ^^ { case cmdName ~ _ ~ posRaw => val pos = posRaw match { case Some(value) => transformPointTo2DScene(value, ctx) case None => transformPointTo2DScene(ctx.origin, ctx) } checkTextParsed(ctx) ::: List(createDot(pos, cmdName.endsWith("*"), ctx)) } /** * Parses psdots commands. */ def parsePsdots(ctx : PSTContext) : Parser[List[IShape]] = ("\\psdots*" | "\\psdots") ~ opt(parseParam(ctx)) ~ rep1(parseCoord(ctx)) ^^ { case cmdName ~ _ ~ ptList => val hasStar = cmdName.endsWith("*") checkTextParsed(ctx) ::: ptList.map{pt => createDot(transformPointTo2DScene(pt, ctx), hasStar, ctx)} } private def createDot(pos : IPoint, hasStar : Boolean, ctx : PSTContext) : IDot = { val dot = ShapeFactory.createDot(pos) val dotSizeDim = if(ctx.arrowDotSize._1+ctx.arrowDotSize._2<0) scala.math.abs(ctx.arrowDotSize._1) else ctx.arrowDotSize._1 val dotSizeNum = if(ctx.arrowDotSize._1+ctx.arrowDotSize._2<0) scala.math.abs(ctx.arrowDotSize._2) else ctx.arrowDotSize._2 dot.setDiametre((dotSizeDim+dotSizeNum*ctx.lineWidth)*IShape.PPC*ctx.dotScale._1) setShapeParameters(dot, ctx) dot.setRotationAngle(dot.getRotationAngle+scala.math.toRadians(ctx.dotAngle)) dot.setDotStyle(ctx.dotStyle) if(hasStar) setShapeForStar(dot) dot } } PSFrameEllipseDiamondTriangleParser.scala000066400000000000000000000144241321075051700422230ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle import net.sf.latexdraw.util.LNumber import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing ellipses and rectangles.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-02
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSFrameEllipseDiamondTriangleParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser { /** * Parses psframe commands. */ def parsePsframe(ctx : PSTContext) : Parser[List[IShape]] = ("\\psframe*" ~> parsePsFrameEllipseDiamondTriangle("\\psframe*", ctx)) | ("\\psframe" ~> parsePsFrameEllipseDiamondTriangle("\\psframe", ctx)) /** * Parses psellipse commands. */ def parsePsellipse(ctx : PSTContext) : Parser[List[IShape]] = ("\\psellipse*" ~> parsePsFrameEllipseDiamondTriangle("\\psellipse*", ctx)) | ("\\psellipse" ~> parsePsFrameEllipseDiamondTriangle("\\psellipse", ctx)) /** * Parses psdiamond commands. */ def parsePsdiamond(ctx : PSTContext) : Parser[List[IShape]] = ("\\psdiamond*" ~> parsePsFrameEllipseDiamondTriangle("\\psdiamond*", ctx)) | ("\\psdiamond" ~> parsePsFrameEllipseDiamondTriangle("\\psdiamond", ctx)) /** * Parses pstriangle commands. */ def parsePstriangle(ctx : PSTContext) : Parser[List[IShape]] = ("\\pstriangle*" ~> parsePsFrameEllipseDiamondTriangle("\\pstriangle*", ctx)) | ("\\pstriangle" ~> parsePsFrameEllipseDiamondTriangle("\\pstriangle", ctx)) private def parsePsFrameEllipseDiamondTriangle(cmd : String, ctx : PSTContext) : Parser[List[IShape]] = opt(parseParam(ctx)) ~ parseCoord(ctx) ~ opt(parseCoord(ctx)) ^^ { case _ ~ pt1 ~ dim => checkTextParsed(ctx) ::: createRectangleEllipseDiamondTriangle(cmd, cmd.endsWith("*"), pt1, dim, ctx) } /** * Creates a rectangle or an ellipse depending on the given parameters. */ private def createRectangleEllipseDiamondTriangle(cmd : String, hasStar : Boolean, pt1 : PointUnit, pt2 : Option[PointUnit], ctx : PSTContext) : List[IShape] = { var p1 : PointUnit = null var p2 : PointUnit = null pt2 match { case Some(pt) => p1 = pt1 p2 = pt case _ => p1 = ctx.origin.dup p2 = pt1 } // Transforming the PST point into a Java point. val p12D = transformPointTo2DScene(p1, ctx) val p22D = transformPointTo2DScene(p2, ctx) val name = cmd.substring(1) name match { case "psframe*" | "psframe" => List(createRectangle(hasStar, p12D, p22D, ctx)) case "psellipse*" | "psellipse" => List(createEllipse(hasStar, p12D, p22D, ctx)) case "psdiamond*" | "psdiamond" => List(createDiamond(hasStar, p12D, p22D, ctx)) case "pstriangle*" | "pstriangle" => List(createTriangle(hasStar, p12D, p22D, ctx)) case _ => PSTParser.errorLogs += "Unknown command: " + name ; Nil } } /** * Creates and initialises a triangle. */ private def createTriangle(hasStar : Boolean, p1 : IPoint, p2 : IPoint, ctx : PSTContext) : ITriangle = { val rh = ShapeFactory.createTriangle() setRectangularShape(rh, p1.getX-p2.getX/2.0, p1.getY, scala.math.abs(p2.getX), scala.math.abs(p2.getY), hasStar, ctx) if(!LNumber.equalsDouble(ctx.gangle, 0.0)) { val gc = rh.getGravityCentre val newGc = gc.rotatePoint(p1, scala.math.toRadians(-ctx.gangle)) rh.setRotationAngle(rh.getRotationAngle+scala.math.toRadians(ctx.gangle)) rh.translate(newGc.getX-gc.getX, newGc.getY-gc.getY) } // If the height is negative, the position and the rotation of the triangle changes. if(p2.getY>0) { rh.setRotationAngle(rh.getRotationAngle+scala.math.Pi) rh.translate(0, rh.getHeight) } rh } /** * Creates and initialises a rhombus. */ private def createDiamond(hasStar : Boolean, p1 : IPoint, p2 : IPoint, ctx : PSTContext) : IRhombus = { val rh = ShapeFactory.createRhombus() setRectangularShape(rh, p1.getX-p2.getX, p1.getY-p2.getY, scala.math.abs(p2.getX*2), scala.math.abs(p2.getY*2), hasStar, ctx) if(!LNumber.equalsDouble(ctx.gangle, 0.0)) rh.setRotationAngle(rh.getRotationAngle-scala.math.toRadians(ctx.gangle)) rh } /** * Creates and initialises an ellipse. */ private def createEllipse(hasStar : Boolean, p1 : IPoint, p2 : IPoint, ctx : PSTContext) : IEllipse = { val ell = ShapeFactory.createEllipse() setRectangularShape(ell, p1.getX-p2.getX, p1.getY-p2.getY, scala.math.abs(p2.getX*2), scala.math.abs(p2.getY*2), hasStar, ctx) ell } /** * Creates and initialises a rectangle. */ private def createRectangle(hasStar : Boolean, p1 : IPoint, p2 : IPoint, ctx : PSTContext) : IRectangle = { // The x-coordinates of p1 must be lower than p2 one. if(p1.getX>p2.getX) { val tmp = p1.getX p1.setX(p2.getX) p2.setX(tmp) } // The y-coordinates of p1 must be lower than p2 one. if(p1.getY *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-10-22
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSFrameboxParser extends PSTAbstractParser with PSTBracketBlockParser { def parsePsFrameboxCmds(ctx:PSTContext) : Parser[Unit] = ("\\psframebox" | "\\psframebox*" | "\\psdblframebox" | "\\psdblframebox*" | "\\psshadowbox" | "\\psshadowbox*" | "\\pscirclebox" | "\\pscirclebox*" | "\\psovalbox" | "\\psovalbox*" | "\\psdiabox" | "\\psdiabox*" | "\\pstribox" | "\\pstribox*") ~ opt(parseSquaredBracket(ctx)) ~ parseBracket(ctx) ^^ { case nameCmd ~ param ~ block => val colStr = "color" val paramStr = param match { case Some(p) => // Searching into the parameters a user colour. // These colours must be included into the parsed text. p.split(",").filter(s=>s.contains(colStr)).map(s=>s.split("=")).filter(s=>s.length==2).map(s=>s(1)).foreach{ col => DviPsColors.INSTANCE.getUsercolourCode(col) match { case "" => // The colour must not be already included. case str if !ctx.textParsed.contains(str) => ctx.textParsed += str case _ => } } "[" + param.get + "]" case _ => "" } ctx.textParsed += nameCmd + paramStr + "{" + block + "}" ctx.parsedTxtNoTxt = false } } PSGridAxes.scala000066400000000000000000000140731321075051700352220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import scala.collection.mutable.ListBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IGrid import net.sf.latexdraw.glib.views.pst.PSTricksConstants import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid import net.sf.latexdraw.util.LNumber import net.sf.latexdraw.glib.models.interfaces.shape.IAxes import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing grids and axes.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-06
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSGridAxes extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser { def parsePsaxes(ctx : PSTContext) : Parser[List[IShape]] = "\\psaxes" ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ^^ { case _ ~ _ ~ arr ~ p1 ~ p2 ~ p3 => (p1, p2, p3) match { case (Some(pt1), Some(pt2), Some(pt3)) => checkTextParsed(ctx) ::: List(createAxes(pt2, pt3, arr, ctx)) case (Some(pt1), Some(pt2), None) => checkTextParsed(ctx) ::: List(createAxes(pt1, pt2, arr, ctx)) case (Some(pt1), None, None) => checkTextParsed(ctx) ::: List(createAxes(new PointUnit(0,0, "", ""), pt1, arr, ctx)) case _ => val gridEnd = new PointUnit(getApproxCoord(ctx.pictureNEPt.getX), getApproxCoord(ctx.pictureNEPt.getY), "", "") val gridStart = new PointUnit(getApproxCoord(ctx.pictureSWPt.getX), getApproxCoord(ctx.pictureSWPt.getY), "", "") checkTextParsed(ctx) ::: List(createAxes(gridStart, gridEnd, arr, ctx)) } } /** * Parses psgrid commands. */ def parsePsgrid(ctx : PSTContext) : Parser[List[IShape]] = "\\psgrid" ~ opt(parseParam(ctx)) ~ opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ^^ { case _ ~ _ ~ p1 ~ p2 ~ p3 => (p1, p2, p3) match { case (Some(pt1), Some(pt2), Some(pt3)) => checkTextParsed(ctx) ::: List(createGrid(pt1, pt2, pt3, ctx)) case (Some(pt1), Some(pt2), None) => checkTextParsed(ctx) ::: List(createGrid(pt1.dup(), pt1, pt2, ctx)) case (Some(pt1), None, None) => checkTextParsed(ctx) ::: List(createGrid(new PointUnit(0,0, "", ""), new PointUnit(0,0, "", ""), pt1, ctx)) case _ => val gridEnd = new PointUnit(getApproxCoord(ctx.pictureNEPt.getX), getApproxCoord(ctx.pictureNEPt.getY), "", "") val gridStart = new PointUnit(getApproxCoord(ctx.pictureSWPt.getX), getApproxCoord(ctx.pictureSWPt.getY), "", "") val grid = createGrid(new PointUnit(0,0,"",""), gridStart, gridEnd, ctx) grid.setPosition(0,0) grid.setLabelsSize(0) checkTextParsed(ctx) ::: List(grid) } } private def createAxes(min : PointUnit, max : PointUnit, arrows : Option[String], ctx : PSTContext) : IAxes = { val axes = ShapeFactory.createAxes(ShapeFactory.createPoint) setArrows(axes, arrows, false, ctx) setStdGridParams(new PointUnit(ctx.ox, ctx.oy, null, null), min, max, axes, ctx) setShapeGeneralParameters(axes, ctx) axes.setAxesStyle(ctx.axesStyle) axes.setTicksDisplayed(ctx.ticks) axes.setLabelsDisplayed(ctx.labels) axes.setTicksStyle(ctx.ticksStyle) axes.setIncrementX(ctx.dxIncrement) axes.setIncrementY(ctx.dyIncrement) axes.setDistLabelsX(ctx.dxLabelDist) axes.setDistLabelsY(ctx.dyLabelDist) axes.setShowOrigin(ctx.showOrigin) axes.setGridEndX(max.x) axes.setGridEndY(max.y) axes.setGridStartX(min.x) axes.setGridStartY(min.y) axes.setPosition(ShapeFactory.createPoint(0.0, 0.0)) axes } private def createGrid(origin : PointUnit, min : PointUnit, max : PointUnit, ctx : PSTContext) : IGrid = { val grid = ShapeFactory.createGrid(ShapeFactory.createPoint) var gridEndX = max.x var gridEndY = max.y var gridStartX = min.x var gridStartY = min.y var isGridXLabelInverted = false var isGridYLabelInverted = false if(gridStartX>=gridEndX) { val tmp = gridEndX gridEndX = gridStartX gridStartX = tmp isGridXLabelInverted = true } if(gridStartY>=gridEndY) { val tmp = gridEndY gridEndY = gridStartY gridStartY = tmp isGridYLabelInverted = true } setStdGridParams(origin, min, max, grid, ctx) setShapeGeneralParameters(grid, ctx) grid.setPosition(ShapeFactory.createPoint(ctx.pictureSWPt.getX*IShape.PPC, (ctx.pictureSWPt.getY+ctx.pictureNEPt.getY)/2.0*IShape.PPC*(-1.0))) grid.setUnit(ctx.unit) grid.setGridDots(ctx.gridDots.toInt) grid.setGridLabelsColour(ctx.gridlabelcolor) grid.setLabelsSize((ctx.gridLabel*IShape.PPC).toInt) grid.setGridWidth(scala.math.abs(ctx.gridWidth*IShape.PPC)) grid.setSubGridColour(ctx.subGridCol) grid.setSubGridDiv(ctx.subGridDiv.toInt) grid.setSubGridDots(ctx.subGridDots.toInt) grid.setSubGridWidth(scala.math.abs(ctx.subGridWidth*IShape.PPC)) grid.setLineColour(ctx.gridColor) grid.setXLabelSouth(!isGridYLabelInverted) grid.setYLabelWest(!isGridXLabelInverted) grid.setGridEndX(gridEndX) grid.setGridEndY(gridEndY) grid.setGridStartX(gridStartX) grid.setGridStartY(gridStartY) grid } /** Sets the parameters of std grids (axes and grids). */ private def setStdGridParams(origin : PointUnit, min : PointUnit, max : PointUnit, grid : IStandardGrid, ctx : PSTContext) { grid.setLineColour(ctx.gridColor) grid.setOriginX(origin.x) grid.setOriginY(origin.y) } private def getApproxCoord(value : Double) : Double = { if(value>=0) if(value-value.toInt>=0.5) value.toInt+1 else value.toInt else if(value.toInt-value>=0.5) value.toInt-1 else value.toInt+1 } } PSLineParser.scala000066400000000000000000000054661321075051700355660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline import scala.collection.mutable.ListBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IArrowable import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle /** * A parser grouping parsers parsing lines.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-02
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSLineParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser with PSTValueParser { /** * Parses psline commands. */ def parsePsline(ctx : PSTContext) : Parser[List[IShape]] = ("\\psline*" | "\\psline") ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ rep1(parseCoord(ctx)) ^^ { case cmdName ~ _ ~ arr ~ ptList => val ptList2 = ptList.length match { case 1 => ctx.origin.dup :: ptList case _ => ptList } val ptList3 = new ListBuffer[IPoint] ptList2.foreach{pt => ptList3 += transformPointTo2DScene(pt, ctx)} checkTextParsed(ctx) ::: List(createLine(cmdName.endsWith("*"), ptList3, arr, ctx, false)) } /** * Parses qline commands. */ def parserQline(ctx : PSTContext) : Parser[List[IShape]] = "\\qline" ~ parseCoord(ctx) ~ parseCoord(ctx) ^^ { case _ ~ pt1 ~ pt2 => val ptList = ListBuffer(transformPointTo2DScene(pt1, ctx), transformPointTo2DScene(pt2, ctx)) checkTextParsed(ctx) ::: List(createLine(false, ptList, None, ctx, true)) } /** * Creates and initialises a line. */ private def createLine(hasStar : Boolean, pts : ListBuffer[IPoint], arrows : Option[String], ctx : PSTContext, qObject:Boolean) : IPolyline = { val line = ShapeFactory.createPolyline() pts.foreach{pt => line.addPoint(pt)} setShapeParameters(line, ctx) setArrows(line, arrows, false, ctx) if(qObject) { line.setHasShadow(false) line.setHasDbleBord(false) line.setFillingStyle(IShape.FillingStyle.NONE) line.setArrowStyle(IArrow.ArrowStyle.NONE, 0) line.setArrowStyle(IArrow.ArrowStyle.NONE, -1) } if(hasStar) setShapeForStar(line) line } } PSPolygonParser.scala000066400000000000000000000037011321075051700363140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import scala.collection.mutable.ListBuffer import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon import net.sf.latexdraw.glib.models.ShapeFactory /** * A parser grouping parsers parsing polygons.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-03
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSPolygonParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTValueParser { /** * Parses pspolygon commands. */ def parsePspolygon(ctx : PSTContext) : Parser[List[IShape]] = ("\\pspolygon*" | "\\pspolygon") ~ opt(parseParam(ctx)) ~ parseCoord(ctx) ~ rep1(parseCoord(ctx)) ^^ { case cmdName ~ _ ~ pt1 ~ pts => val ptList = pts.length match { case 1 => ctx.origin.dup :: pt1 :: pts case _ => pt1 :: pts } val ptList2 = new ListBuffer[IPoint] ptList.foreach{pt => ptList2 += transformPointTo2DScene(pt, ctx)} checkTextParsed(ctx) ::: List(createPolygon(cmdName.endsWith("*"), ptList2, ctx)) } /** * Creates and initialises a line. */ private def createPolygon(hasStar : Boolean, pts : ListBuffer[IPoint], ctx : PSTContext) : IPolygon = { val pol = ShapeFactory.createPolygon() pts.foreach{pt => pol.addPoint(pt)} setShapeParameters(pol, ctx) if(hasStar) setShapeForStar(pol) pol } }PSTAbstractParser.scala000066400000000000000000000171441321075051700365620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import scala.collection.mutable.HashMap import scala.util.parsing.combinator.syntactical.TokenParsers import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.interfaces.shape.IText import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp import scala.language.implicitConversions import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape import java.awt.Color /** * Defines an abstract PST parser.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-23
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTAbstractParser extends TokenParsers { type Tokens = net.sf.latexdraw.parsers.pst.lexer.PSTTokens val lexical = new net.sf.latexdraw.parsers.pst.lexer.PSTLexical import lexical._ protected val keywordCache : HashMap[String, Parser[String]] = HashMap.empty protected val delimCache : HashMap[String, Parser[String]] = HashMap.empty /** A parser which matches an identifier. */ def ident : Parser[String] = elem("identifier", _.isInstanceOf[Identifier]) ^^ (_.toString) /** A parser which matches a math expression. */ def math : Parser[String] = elem("mathMode", _.isInstanceOf[MathMode]) ^^ (_.toString) /** A parser which matches an PST command name defined in the lexer. */ def commandKnown : Parser[String] = elem("command", cmd => cmd.isInstanceOf[Command] && lexical.reserved.contains(cmd.chars)) ^^ (_.toString) /** A parser which matches an PST command name undefined in the lexer. */ def commandUnknown : Parser[String] = elem("command", cmd => cmd.isInstanceOf[Command] && !lexical.reserved.contains(cmd.chars)) ^^ (_.toString) /** A parser which matches a float or integer value. */ def numeric : Parser[String] = elem("numeric", _.isInstanceOf[NumericLit]) ^^ (_.toString) /** A parser which matches a text. */ def text : Parser[String] = elem("text", elt => elt.isInstanceOf[Text] || lexical.textualDelimiters.contains(elt.chars)) ^^ (_.toString) /** A parser that parses all characters excepted the given ones. */ def chrExcept(cs : Char*) = elem("", ch => !cs.exists{c => ch.chars.equals(c.toString)}) // Error handling def orFailure[A](a : Parser[A], msg : String) : Parser[A] = a | failure(msg) /** * Workaround for consuming tokens. */ def consume[T](p: => Parser[T])(): Parser[T] = Parser{ in => val r = p(in) r } /** * For debugging purpose. */ def log[T](p: => Parser[T], ctx:PSTContext)(name: String): Parser[T] = Parser{ in => println("trying "+ name +" at "+ in + " with " + ctx + " having " + ctx.textParsed) val r = p(in) println(name +" --> "+ r + " with " + ctx + " having " + ctx.textParsed) r } /** * This operation checks if some texts have been parsed. In such a case a text shape * is created and returned into a list. Otherwise, Nil is returned. */ protected def checkTextParsed(ctx:PSTContext) : List[IShape] = { ctx.textParsed match { case "" => Nil case _ => if(ctx.parsedTxtNoTxt) Nil else { val text = ShapeFactory.createText() if(ctx.textParsed.endsWith(" ")) text.setText(ctx.textParsed.substring(0, ctx.textParsed.length()-1)) else text.setText(ctx.textParsed) ctx.textParsed = "" setShapeParameters(text, ctx) text.setTextPosition(ITextProp.TextPosition.getTextPosition(ctx.textPosition)) text.setLineColour(ctx.textColor) List(text) } } } /** * Sets the parameters of the given shape using the given context. */ protected def setShapeParameters(sh : IShape, ctx : PSTContext) { if(sh!=null && ctx!=null) { setShapeGeneralParameters(sh, ctx) sh match { case sh1: IArrowableShape => setShapeArrows(sh1, ctx) case _ => } } } protected def transformPointTo2DScene(pt : PointUnit, ctx:PSTContext) = { val newX = if(pt.xUnit.length==0) pt.x*IShape.PPC*ctx.xUnit*ctx.unit else pt.x*IShape.PPC val newY = if(pt.yUnit.length==0) -pt.y*IShape.PPC*ctx.yUnit*ctx.unit else -pt.y*IShape.PPC ShapeFactory.createPoint(newX, newY) } /** * Configures the given shape to fit stared command (e.g. psellipse*). */ protected def setShapeForStar(sh : IShape) { sh.setFillingStyle(IShape.FillingStyle.PLAIN) sh.setFillingCol(sh.getLineColour) sh.setBordersPosition(IShape.BorderPos.INTO) sh.setLineStyle(IShape.LineStyle.SOLID) sh.setHasShadow(false) sh.setHasDbleBord(false) } /** * Sets the arrows' parameters. */ protected def setShapeArrows(sh : IArrowableShape, ctx : PSTContext) { sh.setArrowStyle(ctx.arrowStyle._1, 0) sh.setArrowStyle(ctx.arrowStyle._2, 1) sh.setArrowSizeDim(ctx.arrowSize._1*IShape.PPC) sh.setArrowSizeNum(ctx.arrowSize._2) sh.setArrowLength(ctx.arrowLgth) sh.setArrowInset(ctx.arrowInset) sh.setTBarSizeDim(ctx.arrowTBar._1*IShape.PPC) sh.setTBarSizeNum(ctx.arrowTBar._2) sh.setBracketNum(ctx.arrowBrLgth) sh.setRBracketNum(ctx.arrowrBrLgth) } /** * Sets the common shape's parameters. */ protected def setShapeGeneralParameters(sh : IShape, ctx : PSTContext) { sh.setRotationAngle(ctx.rputAngle) if(ctx.strokeopacity<1.0) sh.setLineColour(new Color(ctx.lineColor.getRed, ctx.lineColor.getGreen, ctx.lineColor.getBlue, (ctx.strokeopacity*255.0).toInt)) else sh.setLineColour(ctx.lineColor) if(sh.isThicknessable) sh.setThickness(ctx.lineWidth*IShape.PPC) if(sh.isBordersMovable) sh.setBordersPosition(ctx.borderPos) if(sh.isLineStylable) sh.setLineStyle(ctx.lineStyle) if(sh.isDbleBorderable) { sh.setHasDbleBord(ctx.dbleLine) sh.setDbleBordCol(ctx.dbleColor) sh.setDbleBordSep(ctx.dbleSep*IShape.PPC) } if(sh.isShadowable) { sh.setHasShadow(ctx.shadow) sh.setShadowAngle(scala.math.toRadians(ctx.shadowAngle)) sh.setShadowCol(ctx.shadowCol) sh.setShadowSize(ctx.shadowSize*IShape.PPC) } if(sh.isInteriorStylable) { if(ctx.opacity<1.0) sh.setFillingCol(new Color(ctx.fillColor.getRed, ctx.fillColor.getGreen, ctx.fillColor.getBlue, (ctx.opacity*255.0).toInt)) else sh.setFillingCol(ctx.fillColor) sh.setFillingStyle(ctx.fillStyle) sh.setGradAngle(scala.math.toRadians(ctx.gradAngle)) sh.setGradColEnd(ctx.gradEnd) sh.setGradColStart(ctx.gradBegin) sh.setGradMidPt(ctx.gradMidPoint) sh.setHatchingsAngle(scala.math.toRadians(ctx.hatchAngle)) sh.setHatchingsCol(ctx.hatchCol) sh.setHatchingsSep(ctx.hatchSep*IShape.PPC) sh.setHatchingsWidth(ctx.hatchWidth*IShape.PPC) } } // An implicit keyword function that gives a warning when a given word is not in the delimiters list implicit def keyword(chars : String) : Parser[String] = { if(lexical.reserved.contains(chars)) if(chars.startsWith("\\")) keywordCache.getOrElseUpdate(chars, accept(Command(chars)) ^^ (_.chars)) else keywordCache.getOrElseUpdate(chars, accept(Identifier(chars)) ^^ (_.chars)) else if(lexical.delimiters.contains(chars)) delimCache.getOrElseUpdate(chars, accept(Delimiter(chars)) ^^ (_.chars)) else failure("You are trying to parse \"" + chars + "\", but it is neither contained in the delimiters list of your lexical object") } } PSTBracketBlockParser.scala000066400000000000000000000025071321075051700373420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import scala.util.parsing.input.CharArrayReader /** * A parser that parses bracket block of PST commands.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-02
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTBracketBlockParser extends PSTAbstractParser { /** * Parses brackets and their contents as text. */ def parseBracket(ctx : PSTContext, sep:String = "") : Parser[String] = "{" ~ rep1(chrExcept('}', CharArrayReader.EofCh)) ~ "}" ^^ { case _ ~ content ~ _ => content.mkString(sep) } /** * Parses squared brackets and their contents as text. */ def parseSquaredBracket(ctx : PSTContext, sep:String = "") : Parser[String] = "[" ~ rep1(chrExcept(']', CharArrayReader.EofCh)) ~ "]" ^^ { case _ ~ content ~ _ => content.mkString(sep) } } PSTCodeParser.scala000066400000000000000000000260061321075051700356660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.awt.Color import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.seqAsJavaList import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.views.latex.DviPsColors /** * Defines a parser parsing PST expressions.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-24
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTCodeParser extends PSTAbstractParser with PSFrameEllipseDiamondTriangleParser with PSCircleParser with PSLineParser with PSPolygonParser with PSWedgeArcParser with PSBezierParser with PSCurveParabolaParser with PSDotParser with PSGridAxes with PSTPlotParser with PSCustomParser with TextCommandsParser with PSFrameboxParser with IPSTCodeParser { override def parsePSTCode(ctx : PSTContext) : Parser[IGroup] = rep(consume(parsePSTBlock(ctx, ctx.isPsCustom)) | consume(parsePspictureBlock(ctx)) | consume(parseCenterBlock(ctx)) | consume(parsePsset(ctx)) | consume(parsePsellipse(new PSTContext(ctx))) | consume(parsePsframe(new PSTContext(ctx))) | consume(parsePsdiamond(new PSTContext(ctx))) | consume(parsePstriangle(new PSTContext(ctx))) | consume(parsePsline(new PSTContext(ctx))) | consume(parserQline(new PSTContext(ctx))) | consume(parsePscircle(new PSTContext(ctx))) | consume(parseQdisk(new PSTContext(ctx))) | consume(parsePspolygon(new PSTContext(ctx))) | consume(parsePsbezier(new PSTContext(ctx))) | consume(parsePsdot(new PSTContext(ctx))) | consume(parsePsdots(new PSTContext(ctx))) | consume(parsePsaxes(new PSTContext(ctx))) | consume(parsePsgrid(new PSTContext(ctx))) | consume(parseRput(ctx)) | consume(parseScalebox(ctx)) | consume(parsePsscalebox(ctx)) | consume(parsePswedge(new PSTContext(ctx))) | consume(parsePsarc(new PSTContext(ctx))) | consume(parsePsarcn(new PSTContext(ctx))) | consume(parsePsellipticarc(new PSTContext(ctx))) | consume(parsePsellipticarcn(new PSTContext(ctx))) | consume(parseParabola(new PSTContext(ctx))) | consume(parsePscurve(new PSTContext(ctx))) | consume(parsePsecurve(new PSTContext(ctx))) | consume(parsePsccurve(new PSTContext(ctx))) | consume(parsePSTPlotCommands(new PSTContext(ctx))) | consume(parseNewpsobject(ctx)) | consume(parseNewpsstyle(ctx)) | consume(parsePscustom(new PSTContext(ctx))) | consume(parseDefineColor(ctx)) | consume(parseIncludeGraphics(ctx) | parsePSCustomCommands(ctx)) | consume(parsePsFrameboxCmds(ctx)) | consume(parsetextCommands(ctx)) | consume(parseText(ctx))) ^^ { case list => val group = ShapeFactory.createGroup() list.foreach{ case gp : List[_] => gp.foreach{sh => group.addShape(sh.asInstanceOf[IShape])} case gp : IGroup => gp.getShapes.foreach{sh => group.addShape(sh)} case sh : IShape => group.addShape(sh) case _ => } group } /** * Parses the command psscalebox. */ def parsePsscalebox(ctx:PSTContext) : Parser[IGroup] = "\\psscalebox" ~ parseBracket(ctx) ~ parsePSTBlock(ctx, ctx.isPsCustom) ^^ { case _ ~ factor ~ shapes => shapes } /** * Parses the command scalebox. */ def parseScalebox(ctx:PSTContext) : Parser[IGroup] = "\\scalebox" ~ parseBracket(ctx) ~ parsePSTBlock(ctx, ctx.isPsCustom) ^^ { case _ ~ factor ~ shapes => shapes } override def parseText(ctx : PSTContext) : Parser[List[IShape]] = (math | text | ident | numeric | commandUnknown) ^^ { case obj => if(obj.replace("\\\\", "").startsWith("\\")) PSTParser.errorLogs += "Unknown command: " + obj ctx.textParsed match { case "" => ctx.textParsed = obj.mkString case _ => ctx.textParsed += " " + obj.mkString } ctx.parsedTxtNoTxt = false Nil } override def parseIncludeGraphics(ctx : PSTContext) : Parser[IShape] = "\\includegraphics" ~ opt(parseParam(ctx)) ~ "{" ~ rep1(text|ident|numeric) ~ "}" ^^ { case _ ~ _ ~ _ ~ paths ~ _ => PSTParser.errorLogs += "The command includegraphics is not supported yet." null // val pic = DrawingTK.getFactory.createPicture(true, DrawingTK.getFactory.createPoint) // val pathEPS = paths.mkString // pic.setPathSource(pathEPS) // pic } override def parsePscustom(ctx : PSTContext) : Parser[IGroup] = ("\\pscustom*" | "\\pscustom") ~ opt(parseParam(ctx)) ~ parsePSTBlock(ctx, true) ^^ { case cmdName ~ _ ~ shapes => if(cmdName.endsWith("*")) shapes.getShapes.foreach{sh => setShapeForStar(sh)} var fh : IFreehand = null val gp = ShapeFactory.createGroup() // The different created freehand shapes must be merged into a single one. shapes.getShapes.foreach { case ifh: IFreehand => fh match { case null => gp.addShape(ifh); fh = ifh; fh.setInterval(1) // This shape is now the reference shape used for the merge. case _ => if (ifh.getNbPoints == 1) { // If the shape has a single point, it means it is a closepath command fh.setOpen(ifh.isOpen) } else { // Otherwise, the shape has two points. So, we take the last one and add it to the first shape. fh.addPoint(ifh.getPtAt(ifh.getNbPoints - 1)) fh.setType(ifh.getType) } } case sh => gp.addShape(sh) } gp } override def parseNewpsobject(ctx : PSTContext) : Parser[List[IShape]] = "\\newpsobject" ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case _ ~ name ~ obj ~ attributes => PSTParser.errorLogs += "The command newpsobject is not supported yet" ; Nil } override def parseNewpsstyle(ctx : PSTContext) : Parser[List[IShape]] = "\\newpsstyle" ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case _ ~ name ~ attributes => PSTParser.errorLogs += "The command newpsstyle is not supported yet" ; Nil } /** Parses a PST block surrounded with brackets. */ override def parsePSTBlock(ctx : PSTContext, isPsCustomBlock : Boolean) : Parser[IGroup] = { val newCtx = new PSTContext(ctx, isPsCustomBlock) "{" ~ parsePSTCode(newCtx) ~ "}" ^^ { case _ ~ shapes ~ _ => shapes.getShapes.addAll(0, checkTextParsed(newCtx)) shapes } } override def parseDefineColor(ctx:PSTContext) : Parser[Unit] = "\\definecolor" ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case _ ~ colName ~ colType ~ colSpec => var colour : Color = null try{ colType match { case "rgb" => colSpec.split(',') match { case Array(r,g,b) => colour = new Color(r.toFloat, g.toFloat, b.toFloat) case _ => PSTParser.errorLogs += "An rgb colour must have 3 numbers." } case "RGB" => colSpec.split(',') match { case Array(r,g,b) => colour = DviPsColors.INSTANCE.convertRGB2rgb(r.toDouble, g.toDouble, b.toDouble) case _ => PSTParser.errorLogs += "An RGB colour must have 3 numbers." } case "gray" => colour = DviPsColors.INSTANCE.convertgray2rgb(colSpec.toDouble) case "HTML" => colour = DviPsColors.INSTANCE.convertHTML2rgb(colSpec) case "cmyk" => colSpec.split(',') match { case Array(c,m,y,k) => colour = DviPsColors.INSTANCE.convertcmyk2rgb(c.toDouble, m.toDouble, y.toDouble, k.toDouble) case _ => PSTParser.errorLogs += "An cmyk colour must have 3 numbers." } case "cmy" => colSpec.split(',') match { case Array(c,m,y) => colour = new Color(1-c.toFloat, 1-m.toFloat, 1-y.toFloat) case _ => PSTParser.errorLogs += "An cmy colour must have 3 numbers." } case "hsb" => colSpec.split(',') match { case Array(h,s,b) => colour = new Color(Color.HSBtoRGB(h.toFloat, s.toFloat, b.toFloat)) case _ => PSTParser.errorLogs += "An hsb colour must have 3 numbers." } case _ => PSTParser.errorLogs += "Unknown color type: " + colType } }catch{case e: Throwable => PSTParser.errorLogs += "Error during colour conversion: " + colName + " " + colType + " " + colSpec + " " + e.getStackTrace.map(_.toString()).mkString("\n") } if(colour!=null) DviPsColors.INSTANCE.addUserColour(colour, colName) } override def parseRput(ctx : PSTContext) : Parser[IGroup] = { val ctx2 = new PSTContext(ctx)// Must create an other context not to modify the current one. ("\\rput*" | "\\rput") ~ opt(parseRputTextPosition(ctx2)) ~ opt(parseRputRotationAngle(ctx2)) ~ parseCoord(ctx2) ~ parsePSTBlock(ctx2, false) ^^ { case _ ~ _ ~ rot ~ coord ~ figs => figs.getShapes.foreach(_.translate(coord.x * IShape.PPC, -coord.y * IShape.PPC)) figs } } private def parseRputRotationAngle(ctx : PSTContext) : Parser[Unit] = parseBracket(ctx) ^^ { case rotation => parseValuePutRotation(rotation) match { case Some(Tuple2(rotationAngle, true)) => ctx.rputAngle += rotationAngle case Some(Tuple2(rotationAngle, false)) => ctx.rputAngle = rotationAngle case _ => } } private def parseRputTextPosition(ctx : PSTContext) : Parser[Unit] = parseSquaredBracket(ctx) ^^ { case refPos => ctx.textPosition = refPos } override def parseCenterBlock(ctx:PSTContext) : Parser[IGroup] = "\\begin" ~> "{" ~> "center" ~> "}" ~> parsePSTCode(ctx) <~ "\\end" <~ "{" <~ "center" <~ "}" override def parsePspictureBlock(ctx : PSTContext) : Parser[IGroup] = { val ctx2 = new PSTContext(ctx, false) (parseBeginPspicture(ctx2, false) ~> parsePSTCode(ctx2) <~ "\\end" <~ "{" <~ "pspicture" <~ "}") | (parseBeginPspicture(ctx2, true) ~> parsePSTCode(ctx2) <~ "\\end" <~ "{" <~ "pspicture*" <~ "}") | (parsePspicture(ctx2) ~> parsePSTCode(ctx2) <~ "\\endpspicture") } private def parsePspicture(ctx : PSTContext) : Parser[Any] = "\\pspicture" ~ opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ^^ { case _ ~ p1 ~ p2 => setPspicturePoints(p1, p2, ctx) } /** * Parses begin{pspicture} commands. */ private def parseBeginPspicture(ctx : PSTContext, star : Boolean) : Parser[Any] = "\\begin" ~> "{" ~> (if(star) "pspicture*" else "pspicture") ~> "}" ~> opt(parseCoord(ctx)) ~ opt(parseCoord(ctx)) ^^ { case p1 ~ p2 => setPspicturePoints(p1, p2, ctx) } private def setPspicturePoints(p1: Option[PointUnit], p2: Option[PointUnit], ctx : PSTContext) { (p1,p2) match { case (Some(val1), None) => ctx.pictureSWPt = ShapeFactory.createPoint ctx.pictureNEPt = ShapeFactory.createPoint(val1.x, val1.x) case (Some(val1),Some(val2)) => ctx.pictureSWPt = ShapeFactory.createPoint(val1.x, val1.y) ctx.pictureNEPt = ShapeFactory.createPoint(val2.x, val2.y) case _ => ctx.pictureSWPt = ShapeFactory.createPoint ctx.pictureNEPt = ShapeFactory.createPoint(10, 10) } } } PSTContext.scala000066400000000000000000000547661321075051700353010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.awt.geom.Point2D import java.awt.Color import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp import net.sf.latexdraw.glib.models.interfaces.shape.IDot import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp import net.sf.latexdraw.glib.models.interfaces.shape.IPoint import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.views.pst.PSTricksConstants import scala.collection.mutable.MutableList import net.sf.latexdraw.glib.models.ShapeFactory /** * The different kinds of font shapes. */ object fontShape extends Enumeration { case class FontShapeVal(pstToken:String, equivCmd:String) extends Val val italic = FontShapeVal("it", "\\it") val slanted = FontShapeVal("sl", "\\sl") val smallCaps = FontShapeVal("sc", "\\sc") val normal = FontShapeVal("n", "\\upshape") /** * returns the font shape value corresponding to the given latex token (or None). */ def toFontShape(token:String) : Option[FontShapeVal] = { token match { case italic.pstToken => Some(italic) case slanted.pstToken => Some(slanted) case smallCaps.pstToken => Some(smallCaps) case normal.pstToken => Some(normal) case _ => None } } } /** * The different kinds of font families. */ object fontFamily extends Enumeration { case class FontFamilyVal(pstToken:String, equivCmd:String) extends Val val rm = FontFamilyVal("cmr", "\\rmfamily") val sf = FontFamilyVal("cmss", "\\sffamily") val tt = FontFamilyVal("cmtt", "\\ttfamily") /** * returns the font family value corresponding to the given latex token (or None). */ def toFontFamily(token:String) : Option[FontFamilyVal] = { token match { case rm.pstToken => Some(rm) case sf.pstToken => Some(sf) case tt.pstToken => Some(tt) case _ => None } } } /** * The different kinds of font series. */ object fontSerie extends Enumeration { case class FontSerieVal(pstToken:String, equivCmd:String) extends Val val normal = FontSerieVal("m", "\\mdseries") val bf = FontSerieVal("b", "\\bf") /** * returns the font serie value corresponding to the given latex token (or None). */ def toFontSerie(token:String) : Option[FontSerieVal] = { token match { case normal.pstToken => Some(normal) case bf.pstToken => Some(bf) case _ => None } } } import fontShape._ import fontFamily._ import fontSerie._ /** * A PST context contains the value of the PST parameters used during the parsing * and the creation of PST objects.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-24
    * @author Arnaud BLOUIN * @version 3.0 */ class PSTContext(var axesStyle : IAxesProp.AxesStyle, var arrowStyle : (IArrow.ArrowStyle, IArrow.ArrowStyle), var arrowSize : (Double, Double), var arrowLgth : Double, var arrowInset : Double, var arrowTBar : (Double, Double), var arrowBrLgth : Double, var arrowrBrLgth : Double, var arrowDotSize : (Double, Double), var arrowScale : (Double, Double), var arcSep : Double, var arcSepA : Double, var arcSepB : Double, var boxSep : Boolean, var borderColor : Color, var borderPos : IShape.BorderPos, var border : Double, var curvature : (Double, Double, Double), var dxIncrement : Double, var dyIncrement : Double, var dxLabelDist : Double, var dyLabelDist : Double, var dotStyle : IDotProp.DotStyle, var dotScale : (Double, Double), var dotAngle : Double, var dotSep : Double, var dash : (Double, Double), var dbleLine : Boolean, var dbleSep : Double, var dbleColor : Color, var degrees : Double, var frameSep : Double, var frameArc : Double, var fillStyle : IShape.FillingStyle, var fillColor : Color, var gridWidth : Double, var gridLabel : Double, var gridDots : Double, var gradAngle : Double, var gridColor : Color, var gradMidPoint : Double, var gradBegin : Color, var gradEnd : Color, var gradLines : Int, var gangle : Double, var hatchWidth : Double, var hatchSep : Double, var hatchCol : Color, var hatchAngle : Double, var isCornerRel : Boolean, var isShadow : Boolean, var lineWidth : Double, var lineColor : Color, var labels : IAxesProp.PlottingStyle, var lineArc : Double, var lineStyle : IShape.LineStyle, var ox : Double, var oy : Double, var onRadians : Boolean, var origin : PointUnit, var specialCoor : Boolean, var showPoints : Boolean, var showOrigin : Boolean, var subGridWidth : Double, var swapAxes : Boolean, var shadowCol : Color, var subGridCol : Color, var shadowAngle : Double, var shadowSize : Double, var subGridDots : Double, var subGridDiv : Double, var ticks : IAxesProp.PlottingStyle, var ticksStyle : IAxesProp.TicksStyle, var ticksSize : Double, var unit : Double, var xUnit : Double, var yUnit : Double, var textColor : Color, var shadow : Boolean, var gridlabelcolor : Color, var isCentered : Boolean, var pictureSWPt : IPoint, var pictureNEPt : IPoint, var tokenPosition : String, var plotStyle : String, var plotPoints : Int, var addfillstyle : IShape.FillingStyle, var liftpen : Int, var isPsCustom : Boolean, var textPosition : String, var rputAngle : Double, var parsedTxtNoTxt:Boolean, var currFontShape:FontShapeVal, var currFontSerie:FontSerieVal, var currFontFamily:FontFamilyVal, val psCustomLatestPt : IPoint, var opacity:Double, var strokeopacity:Double, var polarPlot:Boolean) { /** Text text parsed in the current context. */ var textParsed : String = "" def this(psCustom : Boolean) { this(PSTricksConstants.DEFAULT_AXES_STYLE, Tuple2(IArrow.ArrowStyle.NONE, IArrow.ArrowStyle.NONE), Tuple2(PSTricksConstants.DEFAULT_ARROW_SIZE_DIM, PSTricksConstants.DEFAULT_ARROW_SIZE_NUM), PSTricksConstants.DEFAULT_ARROW_LENGTH, PSTricksConstants.DEFAULT_ARROW_INSET, Tuple2(PSTricksConstants.DEFAULT_ARROW_TBARSIZE_DIM, PSTricksConstants.DEFAULT_ARROW_TBARSIZE_NUM), PSTricksConstants.DEFAULT_ARROW_BRACKET_LGTH, PSTricksConstants.DEFAULT_ARROW_RBRACKET_LGTH, Tuple2(PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM, PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM), Tuple2(PSTricksConstants.DEFAULT_ARROW_SCALE1, PSTricksConstants.DEFAULT_ARROW_SCALE2), PSTricksConstants.DEFAULT_ARC_SEP, PSTricksConstants.DEFAULT_ARC_SEP_A, PSTricksConstants.DEFAULT_ARC_SEP_B, PSTricksConstants.DEFAULT_BOX_SEP, PSTricksConstants.DEFAULT_BORDER_COLOR, PSTricksConstants.DEFAULT_BORDERS_POS, PSTricksConstants.DEFAULT_BORDER, Tuple3(PSTricksConstants.DEFAULT_CURVATURE_NUM1, PSTricksConstants.DEFAULT_CRUVATURE_NUM2, PSTricksConstants.DEFAULT_CRUVATURE_NUM3), PSTricksConstants.DEFAULT_DX, PSTricksConstants.DEFAULT_DY, PSTricksConstants.DEFAULT_DIST_X_LABEL, PSTricksConstants.DEFAULT_DIST_Y_LABEL, PSTricksConstants.DEFAULT_DOT_STYLE, Tuple2(PSTricksConstants.DEFAULT_DOT_SCALE1, PSTricksConstants.DEFAULT_DOT_SCALE2), PSTricksConstants.DEFAULT_DOT_ANGLE, PSTricksConstants.DEFAULT_DOT_STEP, Tuple2(PSTricksConstants.DEFAULT_DASH_BLACK, PSTricksConstants.DEFAULT_DASH_WHITE), PSTricksConstants.DEFAULT_DOUBLE_LINE, PSTricksConstants.DEFAULT_DOUBLE_SEP, PSTricksConstants.DEFAULT_DOUBLE_COLOR, PSTricksConstants.DEFAULT_DEGREES, PSTricksConstants.DEFAULT_FRAME_SEP, PSTricksConstants.DEFAULT_FRAME_ARC, PSTricksConstants.DEFAULT_FILL_STYLE, PSTricksConstants.DEFAULT_FILL_COLOR, PSTricksConstants.DEFAULT_GRID_WIDTH, PSTricksConstants.DEFAULT_GRID_LABEL/PSTricksConstants.CM_VAL_PT, PSTricksConstants.DEFAULT_GRIDDOTS, PSTricksConstants.DEFAULT_GRADIENT_ANGLE, PSTricksConstants.DEFAULT_GRIDCOLOR, PSTricksConstants.DEFAULT_GRADIENT_MID_POINT, PSTricksConstants.DEFAULT_GRADIENT_START_COLOR, PSTricksConstants.DEFAULT_GRADIENT_END_COLOR, PSTricksConstants.DEFAULT_GRADIENT_LINES, PSTricksConstants.DEFAULT_GANGLE, PSTricksConstants.DEFAULT_HATCH_WIDTH, PSTricksConstants.DEFAULT_HATCH_SEP, PSTricksConstants.DEFAULT_HATCHING_COLOR, PSTricksConstants.DEFAULT_HATCH_ANGLE, PSTricksConstants.DEFAULT_CORNER_SIZE_RELATIVE, PSTricksConstants.DEFAULT_SHADOW, PSTricksConstants.DEFAULT_LINE_WIDTH, PSTricksConstants.DEFAULT_LINE_COLOR, PSTricksConstants.DEFAULT_LABELS_DISPLAYED, PSTricksConstants.DEFAULT_LINE_ARC, PSTricksConstants.DEFAULT_LINE_STYLE, PSTricksConstants.DEFAULT_OX, PSTricksConstants.DEFAULT_OY, PSTricksConstants.DEFAULT_ON_RADIANS, new PointUnit(PSTricksConstants.DEFAULT_ORIGIN.getX, PSTricksConstants.DEFAULT_ORIGIN.getY, "", ""), PSTricksConstants.DEFAULT_SPECIAL_COOR, PSTricksConstants.DEFAULT_SHOW_POINTS, PSTricksConstants.DEFAULT_SHOW_ORIGIN, PSTricksConstants.DEFAULT_SUB_GRID_WIDTH, PSTricksConstants.DEFAULT_SWAP_AXES, PSTricksConstants.DEFAULT_SHADOW_COLOR, PSTricksConstants.DEFAULT_SUB_GRID_COLOR, PSTricksConstants.DEFAULT_SHADOW_ANGLE, PSTricksConstants.DEFAULT_SHADOW_SIZE, PSTricksConstants.DEFAULT_SUBGRIDDOTS, PSTricksConstants.DEFAULT_SUBGRIDDIV, PSTricksConstants.DEFAULT_TICKS_DISPLAYED, PSTricksConstants.DEFAULT_TICKS_STYLE, PSTricksConstants.DEFAULT_TICKS_SIZE, PSTricksConstants.DEFAULT_UNIT, PSTricksConstants.DEFAULT_UNIT, PSTricksConstants.DEFAULT_UNIT, Color.BLACK, PSTricksConstants.DEFAULT_SHADOW, PSTricksConstants.DEFAULT_LABELGRIDCOLOR, false, ShapeFactory.createPoint, ShapeFactory.createPoint, "", "line", 50, PSTricksConstants.DEFAULT_FILL_STYLE, 0, psCustom, "", 0, true, fontShape.normal, fontSerie.normal, fontFamily.rm, ShapeFactory.createPoint, 1.0, 1.0, false) } /** * Creates the PST context by copying the given one. */ def this(model : PSTContext, psCustom : Boolean) { this(model.axesStyle, Tuple2(model.arrowStyle._1, model.arrowStyle._2), Tuple2(model.arrowSize._1, model.arrowSize._2), model.arrowLgth, model.arrowInset, Tuple2(model.arrowTBar._1, model.arrowTBar._2), model.arrowBrLgth, model.arrowrBrLgth, Tuple2(model.arrowDotSize._1, model.arrowDotSize._2), Tuple2(model.arrowScale._1, model.arrowScale._2), model.arcSep, model.arcSepA, model.arcSepB, model.boxSep, model.borderColor, model.borderPos, model.border, Tuple3(model.curvature._1, model.curvature._2, model.curvature._3), model.dxIncrement, model.dyIncrement, model.dxLabelDist, model.dyLabelDist, model.dotStyle, Tuple2(model.dotScale._1, model.dotScale._2), model.dotAngle, model.dotSep, Tuple2(model.dash._1, model.dash._2), model.dbleLine, model.dbleSep, model.dbleColor, model.degrees, model.frameSep, model.frameArc, model.fillStyle, model.fillColor, model.gridWidth, model.gridLabel, model.gridDots, model.gradAngle, model.gridColor, model.gradMidPoint, model.gradBegin, model.gradEnd, model.gradLines, model.gangle, model.hatchWidth, model.hatchSep, model.hatchCol, model.hatchAngle, model.isCornerRel, model.isShadow, model.lineWidth, model.lineColor, model.labels, model.lineArc, model.lineStyle, model.ox, model.oy, model.onRadians, model.origin.dup, model.specialCoor, model.showPoints, model.showOrigin, model.subGridWidth, model.swapAxes, model.shadowCol, model.subGridCol, model.shadowAngle, model.shadowSize, model.subGridDots, model.subGridDiv, model.ticks, model.ticksStyle, model.ticksSize, model.unit, model.xUnit, model.yUnit, model.textColor, model.shadow, model.gridlabelcolor, model.isCentered, ShapeFactory.createPoint(model.pictureSWPt), ShapeFactory.createPoint(model.pictureNEPt), model.tokenPosition, model.plotStyle, model.plotPoints, model.fillStyle, model.liftpen, psCustom, model.textPosition, model.rputAngle, model.parsedTxtNoTxt, model.currFontShape, model.currFontSerie, model.currFontFamily, ShapeFactory.createPoint(model.psCustomLatestPt), model.opacity, model.strokeopacity, model.polarPlot) if(model.currFontShape!=fontShape.normal) textParsed += model.currFontShape.equivCmd if(model.currFontSerie!=fontSerie.normal) textParsed += model.currFontSerie.equivCmd if(model.currFontFamily!=fontFamily.rm) textParsed += model.currFontFamily.equivCmd } def this(model:PSTContext) { this(model, model.isPsCustom) } /** * Returns the value corresponding to the given parameter. */ def getParam(name : String) : Any = { if(name!=null) name match { case "strokeopacity" => strokeopacity case "opacity" => opacity case "boxsep" => boxSep case "showpoints" => showPoints case "swapaxes" => swapAxes case "doubleline" => dbleLine case "shadow" => shadow case "showorigin" => showOrigin case "linecolor" => lineColor case "fillcolor" => fillColor case "gridcolor" => gridColor case "gridlabelcolor" => gridlabelcolor case "subgridcolor" => subGridCol case "bordercolor" => borderColor case "doublecolor" => dbleColor case "shadowcolor" => shadowCol case "hatchcolor" => hatchCol case "gradend" => gradEnd case "gradbegin" => gradBegin case "fillstyle" => fillStyle case "linestyle" => lineStyle case "dimen" => borderPos case "linewidth" => lineWidth case "shadowsize" => shadowSize case "doublesep" => dbleSep case "hatchsep" => hatchSep case "hatchwidth" => hatchWidth case "shadowangle" => shadowAngle case "gradangle" => gradAngle case "gradmidpoint" => gradMidPoint case "hatchangle" => hatchAngle case "gradlines" => gradLines case "framearc" => frameArc case "linearc" => lineArc case "cornersize" => isCornerRel case "arrows" => arrowStyle case "arcsep" => arcSep case "arcsepA" => arcSepA case "arcsepB" => arcSepB case "curvature" => curvature case "gangle" => gangle case "dotstyle" => dotStyle case "dotsize" => arrowDotSize case "dotscale" => dotScale case "dotangle" => dotAngle case "gridwidth" => gridWidth case "griddots" => gridDots case "gridlabels" => gridLabel case "subgriddiv" => subGridDiv case "subgridwidth" => subGridWidth case "subgriddots" => subGridDots case "unit" => unit case "xunit" => xUnit case "yunit" => yUnit case "plotstyle" => plotStyle case "plotpoints" => plotPoints case "origin" => origin case "dash" => dash case "dotsep" => dotSep case "border" => border case "addfillstyle" => addfillstyle case "arrowsize" => arrowSize case "arrowlength" => arrowLgth case "tbarsize" => arrowTBar case "bracketlength" => arrowBrLgth case "rbracketlength" => arrowrBrLgth case "arrowscale" => arrowScale case "liftpen" => liftpen case "polarplot" => polarPlot case _ => PSTParser.errorLogs += "Parameter unknown: " + name } } /** * Sets the value of the given parameter. */ def setParam(name : String, value : Any) { if(name!=null) name match { case "strokeopacity" if value.isInstanceOf[Double] => strokeopacity = value.asInstanceOf[Double] case "opacity" if value.isInstanceOf[Double] => opacity = value.asInstanceOf[Double] case "boxsep" if value.isInstanceOf[Boolean] => boxSep = value.asInstanceOf[Boolean] case "showpoints" if value.isInstanceOf[Boolean] => showPoints = value.asInstanceOf[Boolean] case "swapaxes" if value.isInstanceOf[Boolean] => swapAxes = value.asInstanceOf[Boolean] case "doubleline" if value.isInstanceOf[Boolean] => dbleLine = value.asInstanceOf[Boolean] case "shadow" if value.isInstanceOf[Boolean] => shadow = value.asInstanceOf[Boolean] case "showorigin" if value.isInstanceOf[Boolean] => showOrigin = value.asInstanceOf[Boolean] case "linecolor" if value.isInstanceOf[Color] => lineColor = value.asInstanceOf[Color] case "fillcolor" if value.isInstanceOf[Color] => fillColor = value.asInstanceOf[Color] case "gridcolor" if value.isInstanceOf[Color] => gridColor = value.asInstanceOf[Color] case "gridlabelcolor" if value.isInstanceOf[Color] => gridlabelcolor = value.asInstanceOf[Color] case "subgridcolor" if value.isInstanceOf[Color] => subGridCol = value.asInstanceOf[Color] case "bordercolor" if value.isInstanceOf[Color] => borderColor = value.asInstanceOf[Color] case "doublecolor" if value.isInstanceOf[Color] => dbleColor = value.asInstanceOf[Color] case "shadowcolor" if value.isInstanceOf[Color] => shadowCol = value.asInstanceOf[Color] case "hatchcolor" if value.isInstanceOf[Color] => hatchCol = value.asInstanceOf[Color] case "gradend" if value.isInstanceOf[Color] => gradEnd = value.asInstanceOf[Color] case "gradbegin" if value.isInstanceOf[Color] => gradBegin = value.asInstanceOf[Color] case "fillstyle" if value.isInstanceOf[IShape.FillingStyle] => fillStyle = value.asInstanceOf[IShape.FillingStyle] case "addfillstyle" if value.isInstanceOf[IShape.FillingStyle] => addfillstyle = value.asInstanceOf[IShape.FillingStyle] case "linestyle" if value.isInstanceOf[IShape.LineStyle] => lineStyle = value.asInstanceOf[IShape.LineStyle] case "dimen" if value.isInstanceOf[IShape.BorderPos] => borderPos = value.asInstanceOf[IShape.BorderPos] case "linewidth" if value.isInstanceOf[Double] => lineWidth = value.asInstanceOf[Double] case "shadowsize" if value.isInstanceOf[Double] => shadowSize = value.asInstanceOf[Double] case "doublesep" if value.isInstanceOf[Double] => dbleSep = value.asInstanceOf[Double] case "hatchsep" if value.isInstanceOf[Double] => hatchSep = value.asInstanceOf[Double] case "hatchwidth" if value.isInstanceOf[Double] => hatchWidth = value.asInstanceOf[Double] case "shadowangle" if value.isInstanceOf[Double] => shadowAngle = value.asInstanceOf[Double] case "gradangle" if value.isInstanceOf[Double] => gradAngle = value.asInstanceOf[Double] case "gradmidpoint" if value.isInstanceOf[Double] => gradMidPoint = value.asInstanceOf[Double] case "hatchangle" if value.isInstanceOf[Double] => hatchAngle = value.asInstanceOf[Double] case "gradlines" if value.isInstanceOf[Int] => gradLines = value.asInstanceOf[Int] case "framearc" if value.isInstanceOf[Double] => frameArc = value.asInstanceOf[Double] case "linearc" if value.isInstanceOf[Double] => lineArc = value.asInstanceOf[Double] case "arcsep" if value.isInstanceOf[Double] => arcSep = value.asInstanceOf[Double] case "arcsepA" if value.isInstanceOf[Double] => arcSepA = value.asInstanceOf[Double] case "arcsepB" if value.isInstanceOf[Double] => arcSepB = value.asInstanceOf[Double] case "gangle" if value.isInstanceOf[Double] => gangle = value.asInstanceOf[Double] case "gridwidth" if value.isInstanceOf[Double] => gridWidth = value.asInstanceOf[Double] case "dotsep" if value.isInstanceOf[Double] => dotSep = value.asInstanceOf[Double] case "border" if value.isInstanceOf[Double] => border = value.asInstanceOf[Double] case "dotangle" if value.isInstanceOf[Double] => dotAngle = value.asInstanceOf[Double] case "griddots" if value.isInstanceOf[Double] => gridDots = value.asInstanceOf[Double] case "gridlabels" if value.isInstanceOf[Double] => gridLabel = value.asInstanceOf[Double] case "subgriddiv" if value.isInstanceOf[Double] => subGridDiv = value.asInstanceOf[Double] case "subgridwidth" if value.isInstanceOf[Double] => subGridWidth = value.asInstanceOf[Double] case "subgriddots" if value.isInstanceOf[Double] => subGridDots = value.asInstanceOf[Double] case "tickstyle" if value.isInstanceOf[IAxesProp.TicksStyle] => ticksStyle = value.asInstanceOf[IAxesProp.TicksStyle] case "axesstyle" if value.isInstanceOf[IAxesProp.AxesStyle] => axesStyle = value.asInstanceOf[IAxesProp.AxesStyle] case "labels" if value.isInstanceOf[IAxesProp.PlottingStyle] => labels = value.asInstanceOf[IAxesProp.PlottingStyle] case "ticks" if value.isInstanceOf[IAxesProp.PlottingStyle] => ticks = value.asInstanceOf[IAxesProp.PlottingStyle] case "dx" if value.isInstanceOf[Double] => dxLabelDist = value.asInstanceOf[Double] case "dy" if value.isInstanceOf[Double] => dyLabelDist = value.asInstanceOf[Double] case "Dx" if value.isInstanceOf[Double] => dxIncrement = value.asInstanceOf[Double] case "Dy" if value.isInstanceOf[Double] => dyIncrement = value.asInstanceOf[Double] case "Ox" if value.isInstanceOf[Double] => ox = value.asInstanceOf[Double] case "Oy" if value.isInstanceOf[Double] => oy = value.asInstanceOf[Double] case "ticksize" if value.isInstanceOf[Double] => ticksSize = value.asInstanceOf[Double] case "bracketlength" if value.isInstanceOf[Double] => arrowBrLgth = value.asInstanceOf[Double] case "rbracketlength" if value.isInstanceOf[Double] => arrowrBrLgth = value.asInstanceOf[Double] case "unit" if value.isInstanceOf[Double] => unit = value.asInstanceOf[Double] case "xunit" if value.isInstanceOf[Double] => xUnit = value.asInstanceOf[Double] case "yunit" if value.isInstanceOf[Double] => yUnit = value.asInstanceOf[Double] case "arrowlength" if value.isInstanceOf[Double] => arrowLgth = value.asInstanceOf[Double] case "arrowinset" if value.isInstanceOf[Double] => arrowInset = value.asInstanceOf[Double] case "plotpoints" if value.isInstanceOf[Int] => plotPoints = value.asInstanceOf[Int] case "plotstyle" if value.isInstanceOf[String] => plotStyle = value.asInstanceOf[String] case "dotstyle" if value.isInstanceOf[IDotProp.DotStyle] => dotStyle = value.asInstanceOf[IDotProp.DotStyle] case "cornersize" if value.isInstanceOf[Boolean] => isCornerRel = value.asInstanceOf[Boolean] case "origin" if value.isInstanceOf[PointUnit] => origin = value.asInstanceOf[PointUnit] case "liftpen" if value.isInstanceOf[Int] => liftpen = value.asInstanceOf[Int] case "arrows" if value.isInstanceOf[(_, _)] => arrowStyle = value.asInstanceOf[(IArrow.ArrowStyle, IArrow.ArrowStyle)] case "dotscale" if value.isInstanceOf[(_, _)] => dotScale = value.asInstanceOf[(Double, Double)] case "arrowscale" if value.isInstanceOf[(_, _)] => arrowScale = value.asInstanceOf[(Double, Double)] case "dotsize" if value.isInstanceOf[(_, _)] => arrowDotSize = value.asInstanceOf[(Double, Double)] case "arrowsize" if value.isInstanceOf[(_, _)] => arrowSize = value.asInstanceOf[(Double, Double)] case "tbarsize" if value.isInstanceOf[(_, _)] => arrowTBar = value.asInstanceOf[(Double, Double)] case "dash" if value.isInstanceOf[(_, _)] => dash = value.asInstanceOf[(Double, Double)] case "curvature" if value.isInstanceOf[(_, _, _)] => curvature = value.asInstanceOf[(Double, Double, Double)] case "polarplot" if value.isInstanceOf[Boolean] => polarPlot = value.asInstanceOf[Boolean] case _ => PSTParser.errorLogs += "[PSTContext.setParam] Parameter unknown: " + name + " " + value } } } PSTCoordinateParser.scala000066400000000000000000000025161321075051700371030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.views.pst.PSTricksConstants /** * A parser that parses coordinates.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-28
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTCoordinateParser extends PSTAbstractParser with PSTNumberParser { /** * Parses a coordinate. */ def parseCoord(ctx : PSTContext) : Parser[PointUnit] = "(" ~ opt(parseNumber) ~ "," ~ opt(parseNumber) ~ ")" ^^ { case _ ~ p1 ~ _ ~ p2 ~ _ => val x = p1 match { case Some(value) => value case None => Tuple2(PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE,"") } val y = p2 match { case Some(value) => value case None => Tuple2(PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE,"") } new PointUnit(x._1, y._1, x._2, y._2) } } PSTNumberParser.scala000066400000000000000000000114211321075051700362370ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.views.pst.PSTricksConstants import net.sf.latexdraw.glib.models.interfaces.shape.IPoint /** * A parser that parses numbers.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-01
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTNumberParser extends PSTAbstractParser { // /** The regex expression of the parameter origin. */ // val originPattern = """\{([\d\s +-]*),([\d\s +-]*)\}""".r /** * Parses a number: a numeric value that may be followed by a unit. */ def parseNumber : Parser[(Double, String)] = numeric ^^ { case num => parseValueDim(num) match { case Some(value) => value case None => Tuple2(Double.NaN,"") } } /** * Parses the given string to extract a value that can be either 0, 1, or 2. * Otherwise, None is returned. */ def parseValue012(num : String) : Option[Int] = { createValidNumber(num) match { case Some(value) if value == 0 || value == 1 || value == 2 => Some(value.toInt) case _ => None } } /** * Parses double values contained in the interval [0..1] */ def parseValue01Interval(num : String) : Option[Double] = { createValidNumber(num) match { case Some(value) if value >= 0.0 && value <= 1.0 => Some(value) case _ => None } } /** * Parses int values. */ def parseValueInt(num : String) : Option[Int] = { createValidNumber(num) match { case Some(value) => scala.math.abs(value-scala.math.ceil(value))<0.00001 match { case true => Some(value.toInt) case false => None } case None => None } } /** Parses numerical values. */ def parseValueNum(num : String) = createValidNumber(num) // /** Parses the origin parameter. */ // def parseValueOrigin(str : String) : Option[IPoint] = { // str match { // case originPattern(coord1, coord2) => println(coord1 + " " + coord2) // case _ => println("fooooo:"+ str) // } // // None // } /** * Parses a number: a numeric value that may be followed by a unit. */ def parseValueDimDim(str : String) : Option[(Double, Double)] = { var val1 : Option[(Double, String)] = None var val2 : Option[(Double, String)] = None str.split(" ") match { case Array(v1, u1, v2, u2) => val1 = parseValueDim(v1+u1) ; val2 = parseValueDim(v2+u2) case Array(v1, v2) => val1 = parseValueDim(v1) ; val2 = parseValueDim(v2) case Array(v1, o1, o2) => if(parseValueDim(o2).isDefined) { val1 = parseValueDim(v1+o1) ; val2 = parseValueDim(o2) } else { val1 = parseValueDim(v1) ; val2 = parseValueDim(o1+o2) } case _ => } if(val1.isDefined && val2.isDefined) Some(Tuple2(val1.get._1, val2.get._1)) else None } def parseValueDimNoUnit(str:String) : Option[Double] = { parseValueDim(str) match { case Some(Tuple2(value,_)) => Some(value) case _ => None } } /** * Parses a number: a numeric value that may be followed by a unit. */ def parseValueDim(str : String) : Option[(Double, String)] = { if(str.length>2) { val value = str.substring(0, str.length-2) str.substring(str.length-2) match { case PSTricksConstants.TOKEN_CM => createValidNumber(value) match { case Some(v) => Some(Tuple2(v, PSTricksConstants.TOKEN_CM)) case _ => None } case PSTricksConstants.TOKEN_MM => createValidNumber(value) match { case Some(num) => Some(Tuple2(num/10.0, PSTricksConstants.TOKEN_MM)) case _ => None } case PSTricksConstants.TOKEN_PS_PT => createValidNumber(value) match { case Some(num) => Some(num/PSTricksConstants.CM_VAL_PT, PSTricksConstants.TOKEN_PS_PT) case _ => None } case PSTricksConstants.TOKEN_INCH => createValidNumber(value) match { case Some(num) => Some(num/PSTricksConstants.INCH_VAL_CM, PSTricksConstants.TOKEN_INCH) case _ => None } case _ => createValidNumber(str) match { case Some(v) => Some(v, "") case _ => None } } } else createValidNumber(str) match { case Some(v) => Some(v, "") case _ => None } } /** * Converts the given parsed coordinate into a valid Java value. */ private def createValidNumber(coord : String) : Option[Double] = { var coordValid = coord.replace("+", "") coordValid = coordValid.replace("--", "") try { Some(coordValid.toDouble) } catch{case _: Throwable => None} } } PSTParamParser.scala000066400000000000000000000201651321075051700360540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import scala.util.parsing.input.CharArrayReader /** * A parser that parses parameters of a command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-26
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTParamParser extends PSTAbstractParser with PSTValueParser { val paramsMap : Map[String, (String, PSTContext) => Option[Any]] = Map( ("polarplot", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("opacity", (str : String, ctx : PSTContext) => parseValue01Interval(str)), ("strokeopacity", (str : String, ctx : PSTContext) => parseValue01Interval(str)), ("linecolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("fillcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("gridcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("gridlabelcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("subgridcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("bordercolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("doublecolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("shadowcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("hatchcolor", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("gradend", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("gradbegin", (str : String, ctx : PSTContext) => parseValueColour(str, ctx)), ("showpoints", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("swapaxes", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("doubleline", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("shadow", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("showorigin", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("boxsep", (str : String, ctx : PSTContext) => parseValueBoolean(str)), ("cornersize", (str : String, ctx : PSTContext) => parseValueCornersize(str)), ("plotstyle", (str : String, ctx : PSTContext) => parseValuePlotstyle(str)), ("linestyle", (str : String, ctx : PSTContext) => parseValueLineStyle(str)), ("dimen", (str : String, ctx : PSTContext) => parseValueDimen(str)), ("fillstyle", (str : String, ctx : PSTContext) => parseValueFillingStyle(str)), ("addfillstyle", (str : String, ctx : PSTContext) => parseValueFillingStyle(str)), ("framearc", (str : String, ctx : PSTContext) => parseValue01Interval(str)), ("linearc", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("gradlines", (str : String, ctx : PSTContext) => parseValueInt(str)), ("plotpoints", (str : String, ctx : PSTContext) => parseValueInt(str)), ("gradmidpoint", (str : String, ctx : PSTContext) => parseValue01Interval(str)), ("hatchangle", (str : String, ctx : PSTContext) => parseValueNum(str)), ("gangle", (str : String, ctx : PSTContext) => parseValueNum(str)), ("gradangle", (str : String, ctx : PSTContext) => parseValueNum(str)), ("griddots", (str : String, ctx : PSTContext) => parseValueNum(str)), ("shadowangle", (str : String, ctx : PSTContext) => parseValueNum(str)), ("shadowsize", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("doublesep", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("hatchsep", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("hatchwidth", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("subgridwidth", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("arrows", (str : String, ctx : PSTContext) => parseValueArrows(str)), ("arcsepA", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("arcsepB", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("arcsep", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("gridlabels", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("linewidth", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("dotstyle", (str : String, ctx : PSTContext) => parseValueDotStyle(str)), ("curvature", (str : String, ctx : PSTContext) => parseValueCurvature(str)), ("dotsize", (str : String, ctx : PSTContext) => parseValueDimNum(str)), ("arrowsize", (str : String, ctx : PSTContext) => parseValueDimNum(str)), ("arrowscale", (str : String, ctx : PSTContext) => parseValueDimNum(str)),//TODO to support ("tbarsize", (str : String, ctx : PSTContext) => parseValueDimNum(str)), ("subgriddiv", (str : String, ctx : PSTContext) => parseValueNum(str)), ("dotscale", (str : String, ctx : PSTContext) => parseValueNumNum(str)), ("dotangle", (str : String, ctx : PSTContext) => parseValueNum(str)), ("arrowlength", (str : String, ctx : PSTContext) => parseValueNum(str)), ("arrowinset", (str : String, ctx : PSTContext) => parseValueNum(str)), ("subgriddots", (str : String, ctx : PSTContext) => parseValueNum(str)), ("bracketlength", (str : String, ctx : PSTContext) => parseValueNum(str)), ("rbracketlength", (str : String, ctx : PSTContext) => parseValueNum(str)), ("gridwidth", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("unit", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("dotsep", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("border", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("dash", (str : String, ctx : PSTContext) => parseValueDimDim(str)), ("xunit", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("liftpen", (str : String, ctx : PSTContext) => parseValue012(str)), ("yunit", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), // ("origin", (str : String, ctx : PSTContext) => parseValueOrigin(str))) ("labels", (str : String, ctx : PSTContext) => parseValueLabelVisibility(str)), ("ticks", (str : String, ctx : PSTContext) => parseValueLabelVisibility(str)), ("tickstyle", (str : String, ctx : PSTContext) => parseValueTickstyle(str)), ("dx", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("dy", (str : String, ctx : PSTContext) => parseValueDimNoUnit(str)), ("Dx", (str : String, ctx : PSTContext) => parseValueNum(str)), ("Dy", (str : String, ctx : PSTContext) => parseValueNum(str)), ("Ox", (str : String, ctx : PSTContext) => parseValueNum(str)), ("Oy", (str : String, ctx : PSTContext) => parseValueNum(str)), ("ticksize", (str : String, ctx : PSTContext) => parseValueDim(str)), ("axesstyle", (str : String, ctx : PSTContext) => parseValueAxestyle(str))) /** * Parses the psset command. */ def parsePsset(ctx : PSTContext) : Parser[Unit] = "\\psset" ~ "{" ~ repsep(parseParamSetting(ctx, '}'), ",") ~ "}" ^^ { case _ ~ _ ~ _ => } /** * Parses the list of parameters. */ def parseParam(ctx : PSTContext) : Parser[Unit] = "[" ~ repsep(parseParamSetting(ctx, ']'), ",") ~ "]" ^^ { case _ ~ _ ~ _ => } // framesep nodesep offset arm angle arcangle ncurv loopsize coilwidth coilheight coilarm coilaspect coilinc labelsep /** * Parses the setting of parameters. */ def parseParamSetting(ctx : PSTContext, closingChar : Char) : Parser[Unit] = ident ~ "=" ~ rep1(chrExcept(',', closingChar, CharArrayReader.EofCh)) ^^ { case name ~ _ ~ value => val valueStr = value.mkString(" ") paramsMap.get(name) match { case Some(fct) => fct(valueStr, ctx) match { case Some(res) => ctx.setParam(name, res) case None => PSTParser.errorLogs += "Value not valid: " + name + "=" + valueStr } case None => PSTParser.errorLogs += "Unknown parameter: " + name + "=" + valueStr } } } PSTParser.scala000066400000000000000000000035321321075051700350720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.text.ParseException import net.sf.latexdraw.glib.models.interfaces.shape.IGroup import scala.collection.mutable.ListBuffer /** * Defines a PST parser.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-23
    * @author Arnaud BLOUIN * @version 3.0 */ class PSTParser extends PSTAbstractParser with PSTCodeParser { @throws(classOf[ParseException]) def parsePSTCode(content : String) : Option[IGroup] = { val tokens = new lexical.Scanner("{\n" + content + "\n}\n") val result = phrase(parsePSTCode(new PSTContext(false)))(tokens) PSTParser._errorLogs.foreach{msg => println(msg)} result match { case Success(tree, _) => if(tree.size==1 && tree.getShapeAt(0).isInstanceOf[IGroup]) Some(tree.getShapeAt(0).asInstanceOf[IGroup]) else Some(tree) case e: NoSuccess => throw new ParseException(result.toString, -1) } } } /** * Companion object of the PST parser used to encapsulate shared elements. */ object PSTParser { protected val _errorLogs = ListBuffer[String]() /** * Adds the given message to the error loggers. */ def errorLogs_+=(msg : String) { if(_errorLogs!=null) _errorLogs += msg } /** The error logger. */ def errorLogs = _errorLogs /** * Cleans the parsing logs. */ def cleanErrors() { _errorLogs.clear } } PSTPlotParser.scala000066400000000000000000000102661321075051700357330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.shape.IPlot import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp /** * Parsers parsing commands of the pst-plot package.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-09
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTPlotParser extends PSTAbstractParser with PSTParamParser with PSTBracketBlockParser { /** * General parser parsing all the commands of the package PST plot. */ def parsePSTPlotCommands(ctx : PSTContext) : Parser[List[IShape]] = parseFileplot(ctx) | parseDataplot(ctx) | parseSavedata(ctx) | parseReaddata(ctx) | parseListplot(ctx) | parsePsplot(ctx) | parseParametricplot(ctx) /** * Parses readdata commands. */ private def parseReaddata(ctx : PSTContext) : Parser[List[IShape]] = "\\readdata" ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ command ~ file => PSTParser.errorLogs += "Command readdata not supported yet."; Nil } /** * Parses savedata commands. */ private def parseSavedata(ctx : PSTContext) : Parser[List[IShape]] = "\\savedata" ~ parseBracket(ctx) ~ parseSquaredBracket(ctx) ^^ { case cmdName ~ command ~ data => PSTParser.errorLogs += "Command savedata not supported yet."; Nil } /** * Parses psplot commands. */ private def parseParametricplot(ctx : PSTContext) : Parser[List[IShape]] = ("\\parametricplot*" | "\\parametricplot") ~ opt(parseParam(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ xmin ~ xmax ~ function => PSTParser.errorLogs += "Command parametricplot not supported yet."; Nil } /** * Parses psplot commands. */ private def parsePsplot(ctx : PSTContext) : Parser[List[IShape]] = ("\\psplot*" | "\\psplot") ~ opt(parseParam(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx, " ") ^^ { case cmdName ~ _ ~ tmin ~ tmax ~ function => val v1 = tmin.toDouble val v2 = tmax.toDouble val plot = ShapeFactory.createPlot(ShapeFactory.createPoint, if(v1 PSTParser.errorLogs += "Command listplot not supported yet."; Nil } /** * Parses dataplot commands. */ private def parseDataplot(ctx : PSTContext) : Parser[List[IShape]] = ("\\dataplot*" | "\\dataplot") ~ opt(parseParam(ctx)) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ commands => PSTParser.errorLogs += "Command dataplot not supported yet."; Nil } /** * Parses fileplot commands. */ private def parseFileplot(ctx : PSTContext) : Parser[List[IShape]] = ("\\fileplot*" | "\\fileplot") ~ opt(parseParam(ctx)) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ file => PSTParser.errorLogs += "Command fileplot not supported yet."; Nil } } PSTValueParser.scala000066400000000000000000000263051321075051700360720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.awt.Color import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.views.latex.DviPsColors import net.sf.latexdraw.glib.views.pst.PSTricksConstants /** * A parser that parses a value corresponding to an object. * An object can be a name or a command.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-26
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSTValueParser extends PSTNumberParser { /** The regex expression of an identifier. */ val identPattern = """(\w)+""".r /** The regex expression of PST command name. */ val cmdPattern = """(\\)ps\w+""".r /** The regex expression of PST arrows. */ val arrowPattern = """([\]\[\)\(\*\|<>ocC]{0,2})-([\]\[\)\(\*\|<>ocC]{0,2})""".r /** * Parses the rotation value of put commands (rput, etc.) and converts it in a radian value (or None). * The second value of the returned tuple (Boolean) defines if the rotation must consider the previous * rotations (the char * in the rput command). */ def parseValuePutRotation(value : String) : Option[(Double, Boolean)] = { value match { case "U" => Some(Tuple2(0, true)) case "L" => Some(Tuple2(-scala.math.Pi/2.0, true)) case "D" => Some(Tuple2(-scala.math.Pi, true)) case "R" => Some(Tuple2(-3.0*scala.math.Pi/2.0, true)) case "N" => Some(Tuple2(0, false)) case "W" => Some(Tuple2(-scala.math.Pi/2.0, false)) case "S" => Some(Tuple2(-scala.math.Pi, false)) case "E" => Some(Tuple2(-3.0*scala.math.Pi/2.0, false)) case `value` => parseValueNum(value) match { case Some(num) => Some(Tuple2(-scala.math.toRadians(num), true)) case _ => val withStar = value.startsWith("*") val numStr = if(withStar) value.substring(1) else value parseValuePutRotation(numStr) match { case Some(Tuple2(num, _)) => Some(Tuple2(num, !withStar)) case _ => None } } } } /** * Parses the value of the curvature parameter. */ def parseValueCurvature(value : String) : Option[(Double, Double, Double)] = { value.split(" ") match { case Array(val1, val2, val3) => try { Some(Tuple3(val1.toDouble, val2.toDouble, val3.toDouble)) } catch{case _: Throwable => None} case _ => None } } /** * Parses a num value that may be followed by another num value. */ def parseValueNumNum(value : String) : Option[(Double, Double)] = { value.split(" ") match { case Array(num1) => // When a single value is defined, it means that the second value equals the single one defined. parseValueNum(num1) match { case Some(value) => Some(Tuple2(value, value)) case _ => None } case Array(num1, num2) => val n1 = parseValueNum(num1) val n2 = parseValueNum(num2) if(n1.isDefined && n2.isDefined) Some(Tuple2(n1.get, n2.get)) else None case _ => None } } /** * Parses a dim value that may be followed by a num value. * Example: dotsize=2cm 4 */ def parseValueDimNum(value : String) : Option[(Double, Double)] = { value.split(" ") match { case Array(dim) => parseValueOptDimNum(dim, "") case Array(dim, num) => // When two elements compose the value, it can be either // 3 cm or 2.4 1 for instance. if(parseValueNum(num).isDefined) parseValueOptDimNum(dim, num) else parseValueOptDimNum(dim+num, "") case Array(dim, unit, num) => parseValueOptDimNum(dim+unit, num) case _ => None } } private def parseValueOptDimNum(dim : String, num : String) : Option[(Double, Double)] = { val dimOpt = parseValueDim(dim) val numOpt = parseValueNum(num) match { case Some(value) => value case _ => 0.0 } if(dimOpt.isDefined) Some(Tuple2(dimOpt.get._1, numOpt)) else None } /** * Parses arrows. */ def parseValueArrows(value : String) : Option[(IArrow.ArrowStyle, IArrow.ArrowStyle)] = value.replace(" ", "") match { // The arrow string must contains the separator - and at least one arrow. case arrowPattern(arr1, arr2) => Some(Tuple2(IArrow.ArrowStyle.getArrowStyle(arr1), IArrow.ArrowStyle.getArrowStyle(arr2))) case _ => None } def setArrows(sh : IArrowableShape, arrowsRaw : Option[String], invert : Boolean, ctx:PSTContext) { arrowsRaw match { case Some(value) => val arrows = parseValueArrows(value) if(arrows.isDefined) { ctx.arrowStyle = arrows.get if(invert) { sh.setArrowStyle(arrows.get._2, 0) sh.setArrowStyle(arrows.get._1, -1) }else { sh.setArrowStyle(arrows.get._1, 0) sh.setArrowStyle(arrows.get._2, -1) } } case None => } } /** * Parses the cornersize value and returns true if the corner is relative, false * is absolute and None is the value is not correct. */ def parseValueCornersize(value : String) : Option[Boolean] = value match { case PSTricksConstants.TOKEN_RELATIVE => Some(true) case PSTricksConstants.TOKEN_ABSOLUTE => Some(false) case _ => None } /** * Parses the line styles. */ def parseValueDotStyle(value : String) : Option[IDotProp.DotStyle] = value.replace(" ", "") match { case PSTricksConstants.ASTERISK_STYLE => Some(IDotProp.DotStyle.ASTERISK) case PSTricksConstants.BAR_STYLE => Some(IDotProp.DotStyle.BAR) case PSTricksConstants.DIAMOND_STYLE => Some(IDotProp.DotStyle.DIAMOND) case PSTricksConstants.DOT_STYLE => Some(IDotProp.DotStyle.DOT) case PSTricksConstants.FDIAMOND_STYLE => Some(IDotProp.DotStyle.FDIAMOND) case PSTricksConstants.FPENTAGON_STYLE => Some(IDotProp.DotStyle.FPENTAGON) case PSTricksConstants.FSQUARE_STYLE => Some(IDotProp.DotStyle.FSQUARE) case PSTricksConstants.FTRIANGLE_STYLE => Some(IDotProp.DotStyle.FTRIANGLE) case PSTricksConstants.O_STYLE => Some(IDotProp.DotStyle.O) case PSTricksConstants.OPLUS_STYLE => Some(IDotProp.DotStyle.OPLUS) case PSTricksConstants.OTIMES_STYLE => Some(IDotProp.DotStyle.OTIMES) case PSTricksConstants.PENTAGON_STYLE => Some(IDotProp.DotStyle.PENTAGON) case PSTricksConstants.PLUS_STYLE => Some(IDotProp.DotStyle.PLUS) case PSTricksConstants.SQUARE_STYLE => Some(IDotProp.DotStyle.SQUARE) case PSTricksConstants.TRIANGLE_STYLE => Some(IDotProp.DotStyle.TRIANGLE) case PSTricksConstants.X_STYLE => Some(IDotProp.DotStyle.X) case _ => PSTParser.errorLogs += "Unknown dot style: " + value.replace(" ", ""); None } /** * Parses the visibility styles. */ def parseValueLabelVisibility(value : String) : Option[IAxesProp.PlottingStyle] = value match { case PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL => Some(IAxesProp.PlottingStyle.ALL) case PSTricksConstants.TOKEN_LABELS_DISPLAYED_NONE => Some(IAxesProp.PlottingStyle.NONE) case PSTricksConstants.TOKEN_LABELS_DISPLAYED_X => Some(IAxesProp.PlottingStyle.X) case PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y => Some(IAxesProp.PlottingStyle.Y) case _ => PSTParser.errorLogs += "Unknown tick style: " + value; None } /** * Parses the tick styles. */ def parseValueTickstyle(value : String) : Option[IAxesProp.TicksStyle] = value match { case PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM => Some(IAxesProp.TicksStyle.BOTTOM) case PSTricksConstants.TOKEN_TICKS_STYLE_FULL => Some(IAxesProp.TicksStyle.FULL) case PSTricksConstants.TOKEN_TICKS_STYLE_TOP => Some(IAxesProp.TicksStyle.TOP) case _ => PSTParser.errorLogs += "Unknown tick style: " + value; None } /** * Parses the axes styles. */ def parseValueAxestyle(value : String) : Option[IAxesProp.AxesStyle] = value match { case PSTricksConstants.TOKEN_AXES_STYLE_AXES => Some(IAxesProp.AxesStyle.AXES) case PSTricksConstants.TOKEN_AXES_STYLE_FRAME => Some(IAxesProp.AxesStyle.FRAME) case PSTricksConstants.TOKEN_AXES_STYLE_NONE => Some(IAxesProp.AxesStyle.NONE) case _ => PSTParser.errorLogs += "Unknown axes style: " + value; None } /** * Parses the line styles. */ def parseValueDimen(value : String) : Option[IShape.BorderPos] = value match { case PSTricksConstants.BORDERS_INSIDE => Some(IShape.BorderPos.INTO) case PSTricksConstants.BORDERS_MIDDLE => Some(IShape.BorderPos.MID) case PSTricksConstants.BORDERS_OUTSIDE=> Some(IShape.BorderPos.OUT) case _ => PSTParser.errorLogs += "Unknown border position: " + value; None } /** * Parses the plotstyle values. */ def parseValuePlotstyle(value : String) : Option[String] = value match { case "dots" | "line" | "polygon" | "curve" | "ecurve" | "ccurve" => Some(value) case _ => PSTParser.errorLogs += "Unknown plotstyle: " + value; None } /** * Parses the line styles. */ def parseValueLineStyle(value : String) : Option[IShape.LineStyle] = value match { case PSTricksConstants.LINE_DASHED_STYLE => Some(IShape.LineStyle.DASHED) case PSTricksConstants.LINE_DOTTED_STYLE => Some(IShape.LineStyle.DOTTED) case PSTricksConstants.LINE_SOLID_STYLE => Some(IShape.LineStyle.SOLID) case PSTricksConstants.LINE_NONE_STYLE => PSTParser.errorLogs += "line style '"+PSTricksConstants.LINE_NONE_STYLE+"' not supported yet" None case _ => PSTParser.errorLogs += "Unknown line style: " + value; None } /** * Parses the filling styles. */ def parseValueFillingStyle(value : String) : Option[IShape.FillingStyle] = value match { case "solid" => Some(IShape.FillingStyle.PLAIN) case "none" => Some(IShape.FillingStyle.NONE) case "vlines" => Some(IShape.FillingStyle.VLINES) case "vlines*" => Some(IShape.FillingStyle.VLINES_PLAIN) case "hlines" => Some(IShape.FillingStyle.HLINES) case "hlines*" => Some(IShape.FillingStyle.HLINES_PLAIN) case "clines" => Some(IShape.FillingStyle.CLINES) case "clines*" => Some(IShape.FillingStyle.CLINES_PLAIN) case "gradient" => Some(IShape.FillingStyle.GRAD) case _ => PSTParser.errorLogs += "Unknown filling style: " + value; None } /** This parser parses a object value that can be either a name nor a command. */ def parseValueColour(value : String, ctx : PSTContext) : Option[Color] = try { value match { case cmdPattern(_) => ctx.getParam(value.replace("\\ps", "")) match { case col : Color => Some(col) case _ => None } case identPattern(_) => DviPsColors.INSTANCE.getColour(value) match { case col : Color => Some(col) case _ => PSTParser.errorLogs += "The following colour is unknown: " + value; None } case _ => None } }catch{case ex: Throwable => None } /** * Parses a boolean value. */ def parseValueBoolean(value : String) : Option[Boolean] = value match { case "true" => Some(true) case "false" => Some(false) case _ => None } } PSWedgeArcParser.scala000066400000000000000000000152531321075051700363530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import net.sf.latexdraw.glib.models.interfaces.shape.IArc import net.sf.latexdraw.glib.models.interfaces.shape.IArrow import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.models.ShapeFactory import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp /** * A parser grouping parsers parsing arcs.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-05-03
    * @author Arnaud BLOUIN * @version 3.0 */ trait PSWedgeArcParser extends PSTAbstractParser with PSTParamParser with PSTCoordinateParser with PSTBracketBlockParser with PSTValueParser { /** * Parses pswedge commands. */ def parsePswedge(ctx : PSTContext) : Parser[List[IShape]] = ("\\pswedge*" | "\\pswedge") ~ opt(parseParam(ctx)) ~ opt(parseCoord(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ posRaw ~ radiusStr ~ angle1Str ~ angle2Str => createArc(IArcProp.ArcStyle.WEDGE, cmdName.endsWith("*"), posRaw, radiusStr, angle1Str, angle2Str, None, ctx, false) match { case Some(shape) => List(shape) case None => Nil } } /** * Parses psellipticarc commands. */ def parsePsellipticarc(ctx : PSTContext) : Parser[List[IShape]] = ("\\psellipticarc*" | "\\psellipticarc") ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ parseCoord(ctx) ~ opt(parseCoord(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ arrowRaw ~ pos0Raw ~ pos1Raw ~ angle1Str ~ angle2Str => PSTParser.errorLogs += "Command psellipticarc not supported yet." Nil } /** * Parses psellipticarcn commands. */ def parsePsellipticarcn(ctx : PSTContext) : Parser[List[IShape]] = ("\\psellipticarcn*" | "\\psellipticarcn") ~ opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ parseCoord(ctx) ~ opt(parseCoord(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case cmdName ~ _ ~ arrowRaw ~ pos0Raw ~ pos1Raw ~ angle1Str ~ angle2Str => PSTParser.errorLogs += "Command psellipticarcn not supported yet." Nil } /** * Parses psarn commands. */ def parsePsarcn(ctx : PSTContext) : Parser[List[IShape]] = ("\\psarcn*" ~> parsePsarcPsarcn(ctx, true, "\\psarcn*")) | ("\\psarcn" ~> parsePsarcPsarcn(ctx, true, "\\psarcn")) /** * Parses psarc commands. */ def parsePsarc(ctx : PSTContext) : Parser[List[IShape]] = ("\\psarc*" ~> parsePsarcPsarcn(ctx, false, "\\psarc*")) | ("\\psarc" ~> parsePsarcPsarcn(ctx, false, "\\psarc")) private def parsePsarcPsarcn(ctx : PSTContext, inverted : Boolean, cmdName : String) : Parser[List[IShape]] = opt(parseParam(ctx)) ~ opt(parseBracket(ctx)) ~ opt(parseCoord(ctx)) ~ parseBracket(ctx) ~ parseBracket(ctx) ~ opt(parseBracket(ctx)) ^^ { case _ ~ firstBracketRaw ~ posRaw ~ radiusRaw ~ angle1Raw ~ angle2Raw => // One of the two bracket blocks must be defined. firstBracketRaw.isDefined || angle2Raw.isDefined match { case true => parsePsarc_(cmdName, posRaw, firstBracketRaw, radiusRaw, angle1Raw, angle2Raw, ctx, inverted) case false => PSTParser.errorLogs += "One set of brackets is missing for the psarc command."; Nil } } /** * Function associated to parsePsarc. */ private def parsePsarc_(cmdName : String, posRaw : Option[PointUnit], firstBracketRaw : Option[String], radiusRaw : String, angle1Raw : String, angle2Raw : Option[String], ctx : PSTContext, inverted : Boolean) : List[IShape] = { var arc : Option[IArc] = None posRaw match { // If the position is defined, that means that the last bracket block is defined as well. case Some(value) => arc = createArc(IArcProp.ArcStyle.ARC, cmdName.endsWith("*"), posRaw, radiusRaw, angle1Raw, angle2Raw.get, firstBracketRaw, ctx, inverted) case None => // Otherwise, the last bracket block must be check to define if there is an arrow block. angle2Raw match { case Some(value) => arc = createArc(IArcProp.ArcStyle.ARC, cmdName.endsWith("*"), posRaw, radiusRaw, angle1Raw, value, firstBracketRaw, ctx, inverted) case None => arc = createArc(IArcProp.ArcStyle.ARC, cmdName.endsWith("*"), posRaw, firstBracketRaw.get, radiusRaw, angle1Raw, firstBracketRaw, ctx, inverted) } } // Creation of the list depending on the previous result. arc match { case Some(shape) => List(shape) case None => Nil } } /** * Creates an arc using the given parameters. */ private def createArc(arcType : IArcProp.ArcStyle, hasStar : Boolean, posRaw : Option[PointUnit], radiusStr : String, angle1Str : String, angle2Str : String, arrows : Option[String], ctx : PSTContext, inverted : Boolean) : Option[IArc] = { val radius = parseValueDim(radiusStr) match { case Some(value) => value._1 case None => PSTParser.errorLogs += "pswedge's radius cannot be parsed: " + radiusStr ; Double.NaN } var angle1 = parseValueNum(angle1Str) match { case Some(value) => value case None => PSTParser.errorLogs += "pswedge's angle1 cannot be parsed: " + angle1Str ; Double.NaN } var angle2 = parseValueNum(angle2Str) match { case Some(value) => value case None => PSTParser.errorLogs += "pswedge's angle2 cannot be parsed: " + angle2Str ; Double.NaN } val pos = posRaw match { case Some(value) => value case None => ctx.origin.dup } // Inversion of the arrows and the angles (for psarcn) if(inverted) { val tmpAngle = angle1 angle1 = angle2 angle2 = tmpAngle ctx.arrowStyle = invertArrows(ctx.arrowStyle) } if(radius.isNaN || angle1.isNaN || angle2.isNaN) None else { val arc = ShapeFactory.createCircleArc() val centre = transformPointTo2DScene(pos, ctx) val width = scala.math.abs(radius*IShape.PPC)*2.0 arc.setAngleStart(scala.math.toRadians(angle1)) arc.setAngleEnd(scala.math.toRadians(angle2)) arc.setWidth(width) arc.setPosition(centre.getX-width/2.0, centre.getY+width/2.0) arc.setArcStyle(arcType) setArrows(arc, arrows, inverted, ctx) setShapeParameters(arc, ctx) if(hasStar) setShapeForStar(arc) Some(arc) } } /** Inverts the arrows (the first arrow becomes the second one, etc.). */ private def invertArrows(arrows : (IArrow.ArrowStyle, IArrow.ArrowStyle)) : (IArrow.ArrowStyle, IArrow.ArrowStyle) = Tuple2(arrows._2, arrows._1) } PointUnit.scala000066400000000000000000000016511321075051700352000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.awt.geom.Point2D /** * A point which each coordinate may have a unit.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2013-04-01
    * @author Arnaud BLOUIN * @version 3.0 */ class PointUnit(val x:Double, val y:Double, val xUnit:String, val yUnit:String) { /** * Duplicates the point. */ def dup() = new PointUnit(x, y, xUnit, yUnit) } TextCommandsParser.scala000066400000000000000000000124011321075051700370250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/pst/parserpackage net.sf.latexdraw.parsers.pst.parser import java.awt.Color import net.sf.latexdraw.glib.models.interfaces.shape.IShape import net.sf.latexdraw.glib.views.latex.DviPsColors /** * A parser grouping parsers parsing text commands.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-10-14
    * @author Arnaud BLOUIN * @version 3.0 */ trait TextCommandsParser extends PSTAbstractParser with PSTBracketBlockParser with IPSTCodeParser { /** * Parses commands handling texts. */ def parsetextCommands(ctx:PSTContext) : Parser[List[IShape]] = parseUseFontCommand(ctx) | parseColorCommand(ctx) | parseTextcolorCommand(ctx) | parseTextSizeCommand(ctx) | parsetextCommandWithBlock(ctx) | parsetextCommandWithNoBlock(ctx) | parseFamilyFontCommand(ctx) | parseSerieFontCommand(ctx) | parseShapeFontCommand(ctx) /** Parses the font families. */ private def parseShapeFontCommand(ctx:PSTContext):Parser[List[IShape]] = ("\\upshape" | "\\itshape" | "\\slshape" | "\\scshape" | "\\it" | "\\sc" | "\\sl") ^^ {case cmd => ctx.textParsed +=cmd cmd match { case "\\upshape" => ctx.currFontShape = fontShape.normal case "\\itshape" => ctx.currFontShape = fontShape.italic case "\\it" => ctx.currFontShape = fontShape.italic case "\\slshape" => ctx.currFontShape = fontShape.slanted case "\\sl" => ctx.currFontShape = fontShape.slanted case "\\scshape" => ctx.currFontShape = fontShape.smallCaps case "\\sc" => ctx.currFontShape = fontShape.smallCaps case _ => } Nil } /** Parses the font families. */ private def parseSerieFontCommand(ctx:PSTContext):Parser[List[IShape]] = ("\\mdseries" | "\\bfseries" | "\\bf") ^^ {case cmd => ctx.textParsed +=cmd cmd match { case "\\mdseries" => ctx.currFontSerie = fontSerie.normal case "\\bfseries" => ctx.currFontSerie = fontSerie.bf case "\\bf" => ctx.currFontSerie = fontSerie.bf case _ => } Nil } /** Parses the font families. */ private def parseFamilyFontCommand(ctx:PSTContext):Parser[List[IShape]] = ("\\rmfamily" | "\\sffamily" | "\\ttfamily") ^^ {case cmd => ctx.textParsed +=cmd cmd match { case "\\rmfamily" => ctx.currFontFamily = fontFamily.rm case "\\sffamily" => ctx.currFontFamily = fontFamily.sf case "\\ttfamily" => ctx.currFontFamily = fontFamily.tt case _ => } Nil } /** Parses the accent commands having no bracket block. */ private def parsetextCommandWithNoBlock(ctx:PSTContext):Parser[List[IShape]] = "\\l" ^^ {case cmd => ctx.textParsed +=cmd ctx.parsedTxtNoTxt = false Nil } /** Parses the accent commands that may ba a bracket block. */ private def parsetextCommandWithBlock(ctx:PSTContext):Parser[List[IShape]] = ("\\`" | "\\'" | "\\^" | "\\\"" | "\\H" | "\\~" | "\\c" | "\\k" | "\\=" | "\\b" | "\\." | "\\d" | "\\r" | "\\u" | "\\v" | "\\t" | "\\textsf" | "\\textsc" | "\\textsl" | "\\underline" | "\\texttt" | "\\emph" | "\\textbf" | "\\textit") ~ opt(parseBracket(ctx)) ^^ { case cmd ~ txt => ctx.textParsed +=cmd if(txt.isDefined) ctx.textParsed +="{"+txt.get+"}" ctx.parsedTxtNoTxt = false Nil } /** Parses the text size commands. */ private def parseTextSizeCommand(ctx:PSTContext):Parser[List[IShape]] = ("\\tiny" | "\\scriptsize" | "\\footnotesize" | "\\small" | "\\normalsize" | "\\large" | "\\Large" | "\\huge" | "\\Huge") ^^ { case cmd => ctx.textParsed +=cmd ctx.parsedTxtNoTxt = false Nil } /** Parses the command \textcolor */ private def parseTextcolorCommand(ctx:PSTContext) : Parser[List[IShape]] = { val newCtx = new PSTContext(ctx) "\\textcolor" ~ parseColorBlock(newCtx) ~ parsePSTBlock(newCtx, newCtx.isPsCustom) ^^ { case _ ~ _ ~ shapes => List(shapes) } } /** Parses the colour contained in the block. */ private def parseColorBlock(ctx:PSTContext) : Parser[Unit] = { parseBracket(ctx) ^^ { case colourTxt => DviPsColors.INSTANCE.getColour(colourTxt) match { case c:Color => ctx.textColor = c case _ => } } } /** Parses the command \color */ private def parseColorCommand(ctx:PSTContext) : Parser[List[IShape]] = "\\color" ~ parseColorBlock(ctx) ^^ { case _ ~ _ => Nil } /** Parses the usefont command. */ private def parseUseFontCommand(ctx:PSTContext) : Parser[List[IShape]] = "\\usefont" ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ~ parseBracket(ctx) ^^ { case _ ~ encoding ~ family ~ series ~ shapes => ctx.textParsed += "\\usefont{"+encoding+"}{"+family+"}{"+series+"}{"+shapes+"}" fontShape.toFontShape(shapes) match { case Some(value) => ctx.currFontShape = value case _ => } fontFamily.toFontFamily(family) match { case Some(value) => ctx.currFontFamily = value case _ => } fontSerie.toFontSerie(series) match { case Some(value) => ctx.currFontSerie = value case _ => } Nil } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/000077500000000000000000000000001321075051700310135ustar00rootroot00000000000000AbstractPointsElement.java000066400000000000000000000057261321075051700360630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.awt.geom.Point2D; import java.text.ParseException; import java.util.List; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import org.w3c.dom.Node; /** * Defines a model for shapes that have the points SVG attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public abstract class AbstractPointsElement extends SVGElement { /** The points of the element. @since 2.0.3 */ protected List points; /** * Creates an SVG element that can contains points. * @param node The node used to create the SVG element. * @param parentNode The parentNode SVG element. * @throws MalformedSVGDocument If the element is not well formed. * @throws ParseException If the points string is not well formed. * @since 2.0.3 */ protected AbstractPointsElement(final Node node, final SVGElement parentNode) throws MalformedSVGDocument, ParseException { super(node, parentNode); parsePoints(); } /** * {@link SVGElement#SVGElement(SVGDocument)} */ protected AbstractPointsElement(final SVGDocument doc) { super(doc); try { setPoints("0,0 1,1"); }//$NON-NLS-1$ catch(final ParseException e) { BadaboomCollector.INSTANCE.add(e); } } /** * 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 { final SVGPointsParser parser = new SVGPointsParser(getPoints()); parser.parse(); points = parser.getPoints(); } @Override public boolean checkAttributes() { return getPoints()!=null; } /** * Parses and sets the pts to the element. * @param pts The string corresponding to the SVG pts of this element. * @throws ParseException If the format of the pts is not valid. * @since 2.0.3 */ public void setPoints(final String pts) throws ParseException { if(pts!=null) { setAttribute(SVGAttributes.SVG_POINTS, pts); 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 points is not valid. * @since 0.1 */ public List getPoints2D() { return points; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/CSSColors.java000066400000000000000000001437451321075051700335060ustar00rootroot00000000000000package net.sf.latexdraw.parsers.svg; import java.awt.Color; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import net.sf.latexdraw.badaboom.BadaboomCollector; /** * Defines colours used in CSS2.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 04/06/07
    * @author Arnaud BLOUIN * @version 0.1 */ public final class CSSColors { // /** The colours defined by the user. */ // private List userColours = new ArrayList(); // // /** The name of the colours defined by the user. */ // private List usernameColours = new ArrayList(); private final Map userColours; private final Map colourHashtable; private final Map nameColourHashtable; public static final String CSS_LINEN_NAME = "linen";//$NON-NLS-1$ 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 static final Color CSS_YELLOW_RGB_VALUE = new Color(255, 255, 0); public static final Color CSS_RED_RGB_VALUE = new Color(255, 0, 0); public static final Color CSS_TEAL_RGB_VALUE = new Color(0, 128, 128); public static final Color CSS_PURPLE_RGB_VALUE = new Color(128, 0, 128); public static final Color CSS_SILVER_RGB_VALUE = new Color(192, 192, 192); public static final Color CSS_NAVY_RGB_VALUE = new Color(0, 0, 128); public static final Color CSS_OLIVE_RGB_VALUE = new Color(128, 128, 0); public static final Color CSS_LIME_RGB_VALUE = new Color(0, 255, 0); public static final Color CSS_MAROON_RGB_VALUE = new Color(128, 0, 0); public static final Color CSS_GRAY_RGB_VALUE = new Color(128, 128, 128); public static final Color CSS_GREEN_RGB_VALUE = new Color(0, 128, 0); public static final Color CSS_BLACK_RGB_VALUE = new Color(0, 0, 0); public static final Color CSS_WHITE_RGB_VALUE = new Color(255,255,255); public static final Color CSS_BLUE_RGB_VALUE = new Color(0, 0, 255); public static final 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_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_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_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_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_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_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_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); /** The singleton. */ public static final CSSColors INSTANCE = new CSSColors(); private void createColourHashTable() { colourHashtable.clear(); colourHashtable.put(CSS_LINEN_NAME, CSS_LINEN_RGB_VALUE); colourHashtable.put(CSS_ALICEBLUE_NAME, CSS_ALICEBLUE_RGB_VALUE); colourHashtable.put(CSS_ANTIQUEWHITE_NAME, CSS_ANTIQUEWHITE_RGB_VALUE); colourHashtable.put(CSS_AQUAMARINE_NAME, CSS_AQUAMARINE_RGB_VALUE); colourHashtable.put(CSS_AQUA_NAME, CSS_AQUA_RGB_VALUE); colourHashtable.put(CSS_AZURE_NAME, CSS_AZURE_RGB_VALUE); colourHashtable.put(CSS_BEIGE_NAME, CSS_BEIGE_RGB_VALUE); colourHashtable.put(CSS_BISQUE_NAME, CSS_BISQUE_RGB_VALUE); colourHashtable.put(CSS_BLACK_NAME, CSS_BLACK_RGB_VALUE); colourHashtable.put(CSS_BLANCHEDALMOND_NAME, CSS_BLANCHEDALMOND_RGB_VALUE); colourHashtable.put(CSS_BLUEVIOLET_NAME, CSS_BLUEVIOLET_RGB_VALUE); colourHashtable.put(CSS_BLUE_NAME, CSS_BLUE_RGB_VALUE); colourHashtable.put(CSS_BROWN_NAME, CSS_BROWN_RGB_VALUE); colourHashtable.put(CSS_BURLYWOOD_NAME, CSS_BURLYWOOD_RGB_VALUE); colourHashtable.put(CSS_CADETBLUE_NAME, CSS_CADETBLUE_RGB_VALUE); colourHashtable.put(CSS_CHARTREUSE_NAME, CSS_CHARTREUSE_RGB_VALUE); colourHashtable.put(CSS_CHOCOLATE_NAME, CSS_CHOCOLATE_RGB_VALUE); colourHashtable.put(CSS_CORAL_NAME, CSS_CORAL_RGB_VALUE); colourHashtable.put(CSS_CORNFLOWERBLUE_NAME, CSS_CORNFLOWERBLUE_RGB_VALUE); colourHashtable.put(CSS_CORNSILK_NAME, CSS_CORNSILK_RGB_VALUE); colourHashtable.put(CSS_CRIMSON_NAME, CSS_CRIMSON_RGB_VALUE); colourHashtable.put(CSS_CYAN_NAME, CSS_CYAN_RGB_VALUE); colourHashtable.put(CSS_DARKBLUE_NAME, CSS_DARKBLUE_RGB_VALUE); colourHashtable.put(CSS_DARKCYAN_NAME, CSS_DARKCYAN_RGB_VALUE); colourHashtable.put(CSS_DARKGOLDENROD_NAME, CSS_DARKGOLDENROD_RGB_VALUE); colourHashtable.put(CSS_DARKGRAY_NAME, CSS_DARKGRAY_RGB_VALUE); colourHashtable.put(CSS_DARKGREEN_NAME, CSS_DARKGREEN_RGB_VALUE); colourHashtable.put(CSS_DARKGREY_NAME, CSS_DARKGRAY_RGB_VALUE); colourHashtable.put(CSS_DARKKHAKI_NAME, CSS_DARKKHAKI_RGB_VALUE); colourHashtable.put(CSS_DARKMAGENTA_NAME, CSS_DARKMAGENTA_RGB_VALUE); colourHashtable.put(CSS_DARKOLIVEGREEN_NAME, CSS_DARKOLIVEGREEN_RGB_VALUE); colourHashtable.put(CSS_DARKORANGE_NAME, CSS_DARKORANGE_RGB_VALUE); colourHashtable.put(CSS_DARKORCHID_NAME, CSS_DARKORCHID_RGB_VALUE); colourHashtable.put(CSS_DARKRED_NAME, CSS_DARKRED_RGB_VALUE); colourHashtable.put(CSS_DARKSALMON_NAME, CSS_DARKSALMON_RGB_VALUE); colourHashtable.put(CSS_DARKSEAGREEN_NAME, CSS_DARKSEAGREEN_RGB_VALUE); colourHashtable.put(CSS_DARKSLATEBLUE_NAME, CSS_DARKSLATEBLUE_RGB_VALUE); colourHashtable.put(CSS_DARKSLATEGRAY_NAME, CSS_DARKSLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_DARKSLATEGREY_NAME, CSS_DARKSLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_DARKTURQUOISE_NAME, CSS_DARKTURQUOISE_RGB_VALUE); colourHashtable.put(CSS_DARKVIOLET_NAME, CSS_DARKVIOLET_RGB_VALUE); colourHashtable.put(CSS_DEEPPINK_NAME, CSS_DEEPPINK_RGB_VALUE); colourHashtable.put(CSS_DEEPSKYBLUE_NAME, CSS_DEEPSKYBLUE_RGB_VALUE); colourHashtable.put(CSS_DIMGRAY_NAME, CSS_DIMGRAY_RGB_VALUE); colourHashtable.put(CSS_DIMGREY_NAME, CSS_DIMGRAY_RGB_VALUE); colourHashtable.put(CSS_DODGERBLUE_NAME, CSS_DODGERBLUE_RGB_VALUE); colourHashtable.put(CSS_FIREBRICK_NAME, CSS_FIREBRICK_RGB_VALUE); colourHashtable.put(CSS_FLORALWHITE_NAME, CSS_FLORALWHITE_RGB_VALUE); colourHashtable.put(CSS_FORESTGREEN_NAME, CSS_FORESTGREEN_RGB_VALUE); colourHashtable.put(CSS_FUCHSIA_NAME, CSS_FUCHSIA_RGB_VALUE); colourHashtable.put(CSS_GAINSBORO_NAME, CSS_GAINSBORO_RGB_VALUE); colourHashtable.put(CSS_GHOSTWHITE_NAME, CSS_GHOSTWHITE_RGB_VALUE); colourHashtable.put(CSS_GOLDENROD_NAME, CSS_GOLDENROD_RGB_VALUE); colourHashtable.put(CSS_GOLD_NAME, CSS_GOLD_RGB_VALUE); colourHashtable.put(CSS_GRAY_NAME, CSS_GRAY_RGB_VALUE); colourHashtable.put(CSS_GREENYELLOW_NAME, CSS_GREENYELLOW_RGB_VALUE); colourHashtable.put(CSS_GREEN_NAME, CSS_GREEN_RGB_VALUE); colourHashtable.put(CSS_GREY_NAME, CSS_GRAY_RGB_VALUE); colourHashtable.put(CSS_HONEYDEW_NAME, CSS_HONEYDEW_RGB_VALUE); colourHashtable.put(CSS_HOTPINK_NAME, CSS_HOTPINK_RGB_VALUE); colourHashtable.put(CSS_INDIGO_NAME, CSS_INDIGO_RGB_VALUE); colourHashtable.put(CSS_IVORY_NAME, CSS_IVORY_RGB_VALUE); colourHashtable.put(CSS_INDIANRED_NAME, CSS_INDIANRED_RGB_VALUE); colourHashtable.put(CSS_KHAKI_NAME, CSS_KHAKI_RGB_VALUE); colourHashtable.put(CSS_LAVENDERBLUSH_NAME, CSS_LAVENDERBLUSH_RGB_VALUE); colourHashtable.put(CSS_LAVENDER_NAME, CSS_LAVENDER_RGB_VALUE); colourHashtable.put(CSS_LAWNGREEN_NAME, CSS_LAWNGREEN_RGB_VALUE); colourHashtable.put(CSS_LEMONCHIFFON_NAME, CSS_LEMONCHIFFON_RGB_VALUE); colourHashtable.put(CSS_LIGHTBLUE_NAME, CSS_LIGHTBLUE_RGB_VALUE); colourHashtable.put(CSS_LIGHTCORAL_NAME, CSS_LIGHTCORAL_RGB_VALUE); colourHashtable.put(CSS_LIGHTCYAN_NAME, CSS_LIGHTCYAN_RGB_VALUE); colourHashtable.put(CSS_LIGHTGOLDENRODYELLOW_NAME, CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE); colourHashtable.put(CSS_LIGHTGRAY_NAME, CSS_LIGHTGRAY_RGB_VALUE); colourHashtable.put(CSS_LIGHTGREEN_NAME, CSS_LIGHTGREEN_RGB_VALUE); colourHashtable.put(CSS_LIGHTGREY_NAME, CSS_LIGHTGRAY_RGB_VALUE); colourHashtable.put(CSS_LIGHTPINK_NAME, CSS_LIGHTPINK_RGB_VALUE); colourHashtable.put(CSS_LIGHTSALMON_NAME, CSS_LIGHTSALMON_RGB_VALUE); colourHashtable.put(CSS_LIGHTSEAGREEN_NAME, CSS_LIGHTSEAGREEN_RGB_VALUE); colourHashtable.put(CSS_LIGHTSKYBLUE_NAME, CSS_LIGHTSKYBLUE_RGB_VALUE); colourHashtable.put(CSS_LIGHTSLATEGRAY_NAME, CSS_LIGHTSLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_LIGHTSLATEGREY_NAME, CSS_LIGHTSLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_LIGHTSTEELBLUE_NAME, CSS_LIGHTSTEELBLUE_RGB_VALUE); colourHashtable.put(CSS_LIGHTYELLOW_NAME, CSS_LIGHTYELLOW_RGB_VALUE); colourHashtable.put(CSS_LIMEGREEN_NAME, CSS_LIMEGREEN_RGB_VALUE); colourHashtable.put(CSS_LIME_NAME, CSS_LIME_RGB_VALUE); colourHashtable.put(CSS_MAGENTA_NAME, CSS_MAGENTA_RGB_VALUE); colourHashtable.put(CSS_MAROON_NAME, CSS_MAROON_RGB_VALUE); colourHashtable.put(CSS_MEDIUMAQUAMARINE_NAME, CSS_MEDIUMAQUAMARINE_RGB_VALUE); colourHashtable.put(CSS_MEDIUMBLUE_NAME, CSS_MEDIUMBLUE_RGB_VALUE); colourHashtable.put(CSS_MEDIUMORCHID_NAME, CSS_MEDIUMORCHID_RGB_VALUE); colourHashtable.put(CSS_MEDIUMPURPLE_NAME, CSS_MEDIUMPURPLE_RGB_VALUE); colourHashtable.put(CSS_MEDIUMSEAGREEN_NAME, CSS_MEDIUMSEAGREEN_RGB_VALUE); colourHashtable.put(CSS_MEDIUMSLATEBLUE_NAME, CSS_MEDIUMSLATEBLUE_RGB_VALUE); colourHashtable.put(CSS_MEDIUMSPRINGGREEN_NAME, CSS_MEDIUMSPRINGGREEN_RGB_VALUE); colourHashtable.put(CSS_MEDIUMTURQUOISE_NAME, CSS_MEDIUMTURQUOISE_RGB_VALUE); colourHashtable.put(CSS_MEDIUMVIOLETRED_NAME, CSS_MEDIUMVIOLETRED_RGB_VALUE); colourHashtable.put(CSS_MIDNIGHTBLUE_NAME, CSS_MIDNIGHTBLUE_RGB_VALUE); colourHashtable.put(CSS_MINTCREAM_NAME, CSS_MINTCREAM_RGB_VALUE); colourHashtable.put(CSS_MISTYROSE_NAME, CSS_MISTYROSE_RGB_VALUE); colourHashtable.put(CSS_MOCCASIN_NAME, CSS_MOCCASIN_RGB_VALUE); colourHashtable.put(CSS_NAVAJOWHITE_NAME, CSS_NAVAJOWHITE_RGB_VALUE); colourHashtable.put(CSS_NAVY_NAME, CSS_NAVY_RGB_VALUE); colourHashtable.put(CSS_OLDLACE_NAME, CSS_OLDLACE_RGB_VALUE); colourHashtable.put(CSS_OLIVEDRAB_NAME, CSS_OLIVEDRAB_RGB_VALUE); colourHashtable.put(CSS_OLIVE_NAME, CSS_OLIVE_RGB_VALUE); colourHashtable.put(CSS_ORANGERED_NAME, CSS_ORANGERED_RGB_VALUE); colourHashtable.put(CSS_ORANGE_NAME, CSS_ORANGE_RGB_VALUE); colourHashtable.put(CSS_ORCHID_NAME, CSS_ORCHID_RGB_VALUE); colourHashtable.put(CSS_PALEGOLDENROD_NAME, CSS_PALEGOLDENROD_RGB_VALUE); colourHashtable.put(CSS_PALEGREEN_NAME, CSS_PALEGREEN_RGB_VALUE); colourHashtable.put(CSS_PALETURQUOISE_NAME, CSS_PALETURQUOISE_RGB_VALUE); colourHashtable.put(CSS_PALEVIOLETRED_NAME, CSS_PALEVIOLETRED_RGB_VALUE); colourHashtable.put(CSS_PAPAYAWHIP_NAME, CSS_PAPAYAWHIP_RGB_VALUE); colourHashtable.put(CSS_PEACHPUFF_NAME, CSS_PEACHPUFF_RGB_VALUE); colourHashtable.put(CSS_PERU_NAME, CSS_PERU_RGB_VALUE); colourHashtable.put(CSS_PINK_NAME, CSS_PINK_RGB_VALUE); colourHashtable.put(CSS_PLUM_NAME, CSS_PLUM_RGB_VALUE); colourHashtable.put(CSS_POWDERBLUE_NAME, CSS_POWDERBLUE_RGB_VALUE); colourHashtable.put(CSS_PURPLE_NAME, CSS_PURPLE_RGB_VALUE); colourHashtable.put(CSS_RED_NAME, CSS_RED_RGB_VALUE); colourHashtable.put(CSS_ROSYBROWN_NAME, CSS_ROSYBROWN_RGB_VALUE); colourHashtable.put(CSS_ROYALBLUE_NAME, CSS_ROYALBLUE_RGB_VALUE); colourHashtable.put(CSS_SADDLEBROWN_NAME, CSS_SADDLEBROWN_RGB_VALUE); colourHashtable.put(CSS_SALMON_NAME, CSS_SALMON_RGB_VALUE); colourHashtable.put(CSS_SANDYBROWN_NAME, CSS_SANDYBROWN_RGB_VALUE); colourHashtable.put(CSS_SEAGREEN_NAME, CSS_SEAGREEN_RGB_VALUE); colourHashtable.put(CSS_SEASHELL_NAME, CSS_SEASHELL_RGB_VALUE); colourHashtable.put(CSS_SIENNA_NAME, CSS_SIENNA_RGB_VALUE); colourHashtable.put(CSS_SILVER_NAME, CSS_SILVER_RGB_VALUE); colourHashtable.put(CSS_SKYBLUE_NAME, CSS_SKYBLUE_RGB_VALUE); colourHashtable.put(CSS_SLATEBLUE_NAME, CSS_SLATEBLUE_RGB_VALUE); colourHashtable.put(CSS_SLATEGRAY_NAME, CSS_SLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_SLATEGREY_NAME, CSS_SLATEGRAY_RGB_VALUE); colourHashtable.put(CSS_SNOW_NAME, CSS_SNOW_RGB_VALUE); colourHashtable.put(CSS_SPRINGGREEN_NAME, CSS_SPRINGGREEN_RGB_VALUE); colourHashtable.put(CSS_STEELBLUE_NAME, CSS_STEELBLUE_RGB_VALUE); colourHashtable.put(CSS_TAN_NAME, CSS_TAN_RGB_VALUE); colourHashtable.put(CSS_TEAL_NAME, CSS_TEAL_RGB_VALUE); colourHashtable.put(CSS_THISTLE_NAME, CSS_THISTLE_RGB_VALUE); colourHashtable.put(CSS_TOMATO_NAME, CSS_TOMATO_RGB_VALUE); colourHashtable.put(CSS_TURQUOISE_NAME, CSS_TURQUOISE_RGB_VALUE); colourHashtable.put(CSS_VIOLET_NAME, CSS_VIOLET_RGB_VALUE); colourHashtable.put(CSS_WHEAT_NAME, CSS_WHEAT_RGB_VALUE); colourHashtable.put(CSS_WHITESMOKE_NAME, CSS_WHITESMOKE_RGB_VALUE); colourHashtable.put(CSS_WHITE_NAME, CSS_WHITE_RGB_VALUE); colourHashtable.put(CSS_YELLOWGREEN_NAME, CSS_YELLOWGREEN_RGB_VALUE); colourHashtable.put(CSS_YELLOW_NAME, CSS_YELLOW_RGB_VALUE); } private void createNameColourHashTable() { nameColourHashtable.clear(); nameColourHashtable.put(CSS_ALICEBLUE_RGB_VALUE, CSS_ALICEBLUE_NAME); nameColourHashtable.put(CSS_ANTIQUEWHITE_RGB_VALUE, CSS_ANTIQUEWHITE_NAME); nameColourHashtable.put(CSS_AQUAMARINE_RGB_VALUE, CSS_AQUAMARINE_NAME); nameColourHashtable.put(CSS_AZURE_RGB_VALUE, CSS_AZURE_NAME); nameColourHashtable.put(CSS_BEIGE_RGB_VALUE, CSS_BEIGE_NAME); nameColourHashtable.put(CSS_BISQUE_RGB_VALUE, CSS_BISQUE_NAME); nameColourHashtable.put(CSS_BLACK_RGB_VALUE, CSS_BLACK_NAME); nameColourHashtable.put(CSS_BLANCHEDALMOND_RGB_VALUE, CSS_BLANCHEDALMOND_NAME); nameColourHashtable.put(CSS_BLUEVIOLET_RGB_VALUE, CSS_BLUEVIOLET_NAME); nameColourHashtable.put(CSS_BLUE_RGB_VALUE, CSS_BLUE_NAME); nameColourHashtable.put(CSS_BROWN_RGB_VALUE, CSS_BROWN_NAME); nameColourHashtable.put(CSS_BURLYWOOD_RGB_VALUE, CSS_BURLYWOOD_NAME); nameColourHashtable.put(CSS_CADETBLUE_RGB_VALUE, CSS_CADETBLUE_NAME); nameColourHashtable.put(CSS_CHARTREUSE_RGB_VALUE, CSS_CHARTREUSE_NAME); nameColourHashtable.put(CSS_CHOCOLATE_RGB_VALUE, CSS_CHOCOLATE_NAME); nameColourHashtable.put(CSS_CORAL_RGB_VALUE, CSS_CORAL_NAME); nameColourHashtable.put(CSS_CORNFLOWERBLUE_RGB_VALUE, CSS_CORNFLOWERBLUE_NAME); nameColourHashtable.put(CSS_CORNSILK_RGB_VALUE, CSS_CORNSILK_NAME); nameColourHashtable.put(CSS_CRIMSON_RGB_VALUE, CSS_CRIMSON_NAME); nameColourHashtable.put(CSS_CYAN_RGB_VALUE, CSS_CYAN_NAME); nameColourHashtable.put(CSS_DARKBLUE_RGB_VALUE, CSS_DARKBLUE_NAME); nameColourHashtable.put(CSS_DARKCYAN_RGB_VALUE, CSS_DARKCYAN_NAME); nameColourHashtable.put(CSS_DARKGOLDENROD_RGB_VALUE, CSS_DARKGOLDENROD_NAME); nameColourHashtable.put(CSS_DARKGRAY_RGB_VALUE, CSS_DARKGRAY_NAME); nameColourHashtable.put(CSS_DARKGREEN_RGB_VALUE, CSS_DARKGREEN_NAME); nameColourHashtable.put(CSS_DARKKHAKI_RGB_VALUE, CSS_DARKKHAKI_NAME); nameColourHashtable.put(CSS_DARKMAGENTA_RGB_VALUE, CSS_DARKMAGENTA_NAME); nameColourHashtable.put(CSS_DARKOLIVEGREEN_RGB_VALUE, CSS_DARKOLIVEGREEN_NAME); nameColourHashtable.put(CSS_DARKORANGE_RGB_VALUE, CSS_DARKORANGE_NAME); nameColourHashtable.put(CSS_DARKORCHID_RGB_VALUE, CSS_DARKORCHID_NAME); nameColourHashtable.put(CSS_DARKRED_RGB_VALUE, CSS_DARKRED_NAME); nameColourHashtable.put(CSS_DARKSALMON_RGB_VALUE, CSS_DARKSALMON_NAME); nameColourHashtable.put(CSS_DARKSEAGREEN_RGB_VALUE, CSS_DARKSEAGREEN_NAME); nameColourHashtable.put(CSS_DARKSLATEBLUE_RGB_VALUE, CSS_DARKSLATEBLUE_NAME); nameColourHashtable.put(CSS_DARKSLATEGRAY_RGB_VALUE, CSS_DARKSLATEGRAY_NAME); nameColourHashtable.put(CSS_DARKTURQUOISE_RGB_VALUE, CSS_DARKTURQUOISE_NAME); nameColourHashtable.put(CSS_DARKVIOLET_RGB_VALUE, CSS_DARKVIOLET_NAME); nameColourHashtable.put(CSS_DEEPPINK_RGB_VALUE, CSS_DEEPPINK_NAME); nameColourHashtable.put(CSS_DEEPSKYBLUE_RGB_VALUE, CSS_DEEPSKYBLUE_NAME); nameColourHashtable.put(CSS_DIMGRAY_RGB_VALUE, CSS_DIMGRAY_NAME); nameColourHashtable.put(CSS_DODGERBLUE_RGB_VALUE, CSS_DODGERBLUE_NAME); nameColourHashtable.put(CSS_FIREBRICK_RGB_VALUE, CSS_FIREBRICK_NAME); nameColourHashtable.put(CSS_FLORALWHITE_RGB_VALUE, CSS_FLORALWHITE_NAME); nameColourHashtable.put(CSS_FORESTGREEN_RGB_VALUE, CSS_FORESTGREEN_NAME); nameColourHashtable.put(CSS_GAINSBORO_RGB_VALUE, CSS_GAINSBORO_NAME); nameColourHashtable.put(CSS_GHOSTWHITE_RGB_VALUE, CSS_GHOSTWHITE_NAME); nameColourHashtable.put(CSS_GOLDENROD_RGB_VALUE, CSS_GOLDENROD_NAME); nameColourHashtable.put(CSS_GOLD_RGB_VALUE, CSS_GOLD_NAME); nameColourHashtable.put(CSS_GRAY_RGB_VALUE, CSS_GRAY_NAME); nameColourHashtable.put(CSS_GREENYELLOW_RGB_VALUE, CSS_GREENYELLOW_NAME); nameColourHashtable.put(CSS_GREEN_RGB_VALUE, CSS_GREEN_NAME); nameColourHashtable.put(CSS_HONEYDEW_RGB_VALUE, CSS_HONEYDEW_NAME); nameColourHashtable.put(CSS_HOTPINK_RGB_VALUE, CSS_HOTPINK_NAME); nameColourHashtable.put(CSS_INDIGO_RGB_VALUE, CSS_INDIGO_NAME); nameColourHashtable.put(CSS_INDIANRED_RGB_VALUE, CSS_INDIANRED_NAME); nameColourHashtable.put(CSS_IVORY_RGB_VALUE, CSS_IVORY_NAME); nameColourHashtable.put(CSS_KHAKI_RGB_VALUE, CSS_KHAKI_NAME); nameColourHashtable.put(CSS_LAVENDERBLUSH_RGB_VALUE, CSS_LAVENDERBLUSH_NAME); nameColourHashtable.put(CSS_LAVENDER_RGB_VALUE, CSS_LAVENDER_NAME); nameColourHashtable.put(CSS_LAWNGREEN_RGB_VALUE, CSS_LAWNGREEN_NAME); nameColourHashtable.put(CSS_LEMONCHIFFON_RGB_VALUE, CSS_LEMONCHIFFON_NAME); nameColourHashtable.put(CSS_LIGHTBLUE_RGB_VALUE, CSS_LIGHTBLUE_NAME); nameColourHashtable.put(CSS_LIGHTCORAL_RGB_VALUE, CSS_LIGHTCORAL_NAME); nameColourHashtable.put(CSS_LIGHTCYAN_RGB_VALUE, CSS_LIGHTCYAN_NAME); nameColourHashtable.put(CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE, CSS_LIGHTGOLDENRODYELLOW_NAME); nameColourHashtable.put(CSS_LIGHTGRAY_RGB_VALUE, CSS_LIGHTGRAY_NAME); nameColourHashtable.put(CSS_LIGHTGREEN_RGB_VALUE, CSS_LIGHTGREEN_NAME); nameColourHashtable.put(CSS_LIGHTPINK_RGB_VALUE, CSS_LIGHTPINK_NAME); nameColourHashtable.put(CSS_LIGHTSALMON_RGB_VALUE, CSS_LIGHTSALMON_NAME); nameColourHashtable.put(CSS_LIGHTSEAGREEN_RGB_VALUE, CSS_LIGHTSEAGREEN_NAME); nameColourHashtable.put(CSS_LIGHTSKYBLUE_RGB_VALUE, CSS_LIGHTSKYBLUE_NAME); nameColourHashtable.put(CSS_LIGHTSLATEGRAY_RGB_VALUE, CSS_LIGHTSLATEGRAY_NAME); nameColourHashtable.put(CSS_LIGHTSTEELBLUE_RGB_VALUE, CSS_LIGHTSTEELBLUE_NAME); nameColourHashtable.put(CSS_LIGHTYELLOW_RGB_VALUE, CSS_LIGHTYELLOW_NAME); nameColourHashtable.put(CSS_LIMEGREEN_RGB_VALUE, CSS_LIMEGREEN_NAME); nameColourHashtable.put(CSS_LIME_RGB_VALUE, CSS_LIME_NAME); nameColourHashtable.put(CSS_MAGENTA_RGB_VALUE, CSS_MAGENTA_NAME); nameColourHashtable.put(CSS_MAROON_RGB_VALUE, CSS_MAROON_NAME); nameColourHashtable.put(CSS_MEDIUMAQUAMARINE_RGB_VALUE, CSS_MEDIUMAQUAMARINE_NAME); nameColourHashtable.put(CSS_MEDIUMBLUE_RGB_VALUE, CSS_MEDIUMBLUE_NAME); nameColourHashtable.put(CSS_MEDIUMORCHID_RGB_VALUE, CSS_MEDIUMORCHID_NAME); nameColourHashtable.put(CSS_MEDIUMPURPLE_RGB_VALUE, CSS_MEDIUMPURPLE_NAME); nameColourHashtable.put(CSS_MEDIUMSEAGREEN_RGB_VALUE, CSS_MEDIUMSEAGREEN_NAME); nameColourHashtable.put(CSS_MEDIUMSLATEBLUE_RGB_VALUE, CSS_MEDIUMSLATEBLUE_NAME); nameColourHashtable.put(CSS_MEDIUMSPRINGGREEN_RGB_VALUE, CSS_MEDIUMSPRINGGREEN_NAME); nameColourHashtable.put(CSS_MEDIUMTURQUOISE_RGB_VALUE, CSS_MEDIUMTURQUOISE_NAME); nameColourHashtable.put(CSS_MEDIUMVIOLETRED_RGB_VALUE, CSS_MEDIUMVIOLETRED_NAME); nameColourHashtable.put(CSS_MIDNIGHTBLUE_RGB_VALUE, CSS_MIDNIGHTBLUE_NAME); nameColourHashtable.put(CSS_MINTCREAM_RGB_VALUE, CSS_MINTCREAM_NAME); nameColourHashtable.put(CSS_MISTYROSE_RGB_VALUE, CSS_MISTYROSE_NAME); nameColourHashtable.put(CSS_MOCCASIN_RGB_VALUE, CSS_MOCCASIN_NAME); nameColourHashtable.put(CSS_NAVAJOWHITE_RGB_VALUE, CSS_NAVAJOWHITE_NAME); nameColourHashtable.put(CSS_NAVY_RGB_VALUE, CSS_NAVY_NAME); nameColourHashtable.put(CSS_OLDLACE_RGB_VALUE, CSS_OLDLACE_NAME); nameColourHashtable.put(CSS_OLIVEDRAB_RGB_VALUE, CSS_OLIVEDRAB_NAME); nameColourHashtable.put(CSS_OLIVE_RGB_VALUE, CSS_OLIVE_NAME); nameColourHashtable.put(CSS_ORANGERED_RGB_VALUE, CSS_ORANGERED_NAME); nameColourHashtable.put(CSS_ORANGE_RGB_VALUE, CSS_ORANGE_NAME); nameColourHashtable.put(CSS_ORCHID_RGB_VALUE, CSS_ORCHID_NAME); nameColourHashtable.put(CSS_PALEGOLDENROD_RGB_VALUE, CSS_PALEGOLDENROD_NAME); nameColourHashtable.put(CSS_PALEGREEN_RGB_VALUE, CSS_PALEGREEN_NAME); nameColourHashtable.put(CSS_PALETURQUOISE_RGB_VALUE, CSS_PALETURQUOISE_NAME); nameColourHashtable.put(CSS_PALEVIOLETRED_RGB_VALUE, CSS_PALEVIOLETRED_NAME); nameColourHashtable.put(CSS_PAPAYAWHIP_RGB_VALUE, CSS_PAPAYAWHIP_NAME); nameColourHashtable.put(CSS_PEACHPUFF_RGB_VALUE, CSS_PEACHPUFF_NAME); nameColourHashtable.put(CSS_PERU_RGB_VALUE, CSS_PERU_NAME); nameColourHashtable.put(CSS_PINK_RGB_VALUE, CSS_PINK_NAME); nameColourHashtable.put(CSS_PLUM_RGB_VALUE, CSS_PLUM_NAME); nameColourHashtable.put(CSS_POWDERBLUE_RGB_VALUE, CSS_POWDERBLUE_NAME); nameColourHashtable.put(CSS_PURPLE_RGB_VALUE, CSS_PURPLE_NAME); nameColourHashtable.put(CSS_RED_RGB_VALUE, CSS_RED_NAME); nameColourHashtable.put(CSS_ROSYBROWN_RGB_VALUE, CSS_ROSYBROWN_NAME); nameColourHashtable.put(CSS_ROYALBLUE_RGB_VALUE, CSS_ROYALBLUE_NAME); nameColourHashtable.put(CSS_SADDLEBROWN_RGB_VALUE, CSS_SADDLEBROWN_NAME); nameColourHashtable.put(CSS_SALMON_RGB_VALUE, CSS_SALMON_NAME); nameColourHashtable.put(CSS_SANDYBROWN_RGB_VALUE, CSS_SANDYBROWN_NAME); nameColourHashtable.put(CSS_SEAGREEN_RGB_VALUE, CSS_SEAGREEN_NAME); nameColourHashtable.put(CSS_SEASHELL_RGB_VALUE, CSS_SEASHELL_NAME); nameColourHashtable.put(CSS_SIENNA_RGB_VALUE, CSS_SIENNA_NAME); nameColourHashtable.put(CSS_SILVER_RGB_VALUE, CSS_SILVER_NAME); nameColourHashtable.put(CSS_SKYBLUE_RGB_VALUE, CSS_SKYBLUE_NAME); nameColourHashtable.put(CSS_SLATEBLUE_RGB_VALUE, CSS_SLATEBLUE_NAME); nameColourHashtable.put(CSS_SLATEGRAY_RGB_VALUE, CSS_SLATEGRAY_NAME); nameColourHashtable.put(CSS_SNOW_RGB_VALUE, CSS_SNOW_NAME); nameColourHashtable.put(CSS_SPRINGGREEN_RGB_VALUE, CSS_SPRINGGREEN_NAME); nameColourHashtable.put(CSS_STEELBLUE_RGB_VALUE, CSS_STEELBLUE_NAME); nameColourHashtable.put(CSS_TAN_RGB_VALUE, CSS_TAN_NAME); nameColourHashtable.put(CSS_TEAL_RGB_VALUE, CSS_TEAL_NAME); nameColourHashtable.put(CSS_THISTLE_RGB_VALUE, CSS_THISTLE_NAME); nameColourHashtable.put(CSS_TOMATO_RGB_VALUE, CSS_TOMATO_NAME); nameColourHashtable.put(CSS_TURQUOISE_RGB_VALUE, CSS_TURQUOISE_NAME); nameColourHashtable.put(CSS_VIOLET_RGB_VALUE, CSS_VIOLET_NAME); nameColourHashtable.put(CSS_WHEAT_RGB_VALUE, CSS_WHEAT_NAME); nameColourHashtable.put(CSS_WHITESMOKE_RGB_VALUE, CSS_WHITESMOKE_NAME); nameColourHashtable.put(CSS_WHITE_RGB_VALUE, CSS_WHITE_NAME); nameColourHashtable.put(CSS_YELLOWGREEN_RGB_VALUE, CSS_YELLOWGREEN_NAME); nameColourHashtable.put(CSS_YELLOW_RGB_VALUE, CSS_YELLOW_NAME); } private CSSColors() { super(); colourHashtable = new HashMap<>(); nameColourHashtable = new HashMap<>(); userColours = new HashMap<>(); createColourHashTable(); createNameColourHashTable(); } /** * @param name The name of the wanted colour or null if the colour is not found. * @return The colour. */ public Color getColor(final String name) { if(name==null || name.isEmpty()) return null; final Color col = colourHashtable.get(name); return col==null ? userColours.get(name) : col; } /** * Adds a colour defined by the user. * @param col The colour to add. * @param name The name of this colour. */ public void addUserColor(final Color col, final String name) { if(name==null || col==null || name.isEmpty()) return ; userColours.put(name, col); } /** * @param col 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 String getColorName(final Color col, final boolean create) { if(col==null) return null; final String name = nameColourHashtable.get(col); if(name!=null) return name; final Iterator> itCols = userColours.entrySet().iterator(); Entry entry = null; while(itCols.hasNext() && entry==null) { entry = itCols.next(); if(!entry.getValue().equals(col)) entry = null; } if(entry!=null) return entry.getKey(); if(create) { addUserColor(col, rgbToHex(col)); return getColorName(col, false); } return null; } /** * Converts an hexadecimal colour to an RBG one. * @param hex The colour in hexadecimal. * @return The corresponding colour or null if there is a problem. * @since 2.0.0 */ public Color hexToRBG(final String hex) { if(hex==null || !hex.startsWith("#")) //$NON-NLS-1$ return null; try { final String col = hex.substring(1); String r; String g; String 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.parseInt(r, 16), Integer.parseInt(g, 16), Integer.parseInt(b, 16)); } catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } return null; } /** * 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 String rgbToHex(final 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 str is null, null is returned. * @param str The colour to read. * @return The found colour or null. * @since 2.0.0 */ public Color getRGBColour(final String str) { Color c = null; if(str!=null) if(str.startsWith("#"))//$NON-NLS-1$ c = hexToRBG(str); else if(str.startsWith("rgb("))//$NON-NLS-1$ c = svgRgbtoRgb(str); else c = getColor(str); return c; } /** * 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 Color svgRgbtoRgb(final String str) { if(str==null || !str.startsWith("rgb(") || !str.endsWith(")"))//$NON-NLS-1$//$NON-NLS-2$ return null; Color c = null; final String s = str.substring(4, str.length()-1); final String[] rgbs = s.split(",");//$NON-NLS-1$ try { if(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((float)(Double.parseDouble(rgbs[0].substring(0, rgbs[0].length()-1))/100.), (float)(Double.parseDouble(rgbs[1].substring(0, rgbs[1].length()-1))/100.), (float)(Double.parseDouble(rgbs[2].substring(0, rgbs[2].length()-1))/100.)); } else c = new Color(Integer.parseInt(rgbs[0]), Integer.parseInt(rgbs[1]), Integer.parseInt(rgbs[2])); } } catch(final IllegalArgumentException e) { return null; } return c; } } CSSStyleList.java000066400000000000000000000030141321075051700341020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.util.HashMap; import net.sf.latexdraw.parsers.svg.parsers.CSSStyleHandler; /** * Defines a list of CSS styles.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class CSSStyleList extends HashMap 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(final String name, final 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(final String styleName) { return get(styleName); } @Override public void onCSSStyle(final String name, final String value) { if(name!=null && value!=null) addCSSStyle(name, value); } } MalformedSVGDocument.java000066400000000000000000000016731321075051700355730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; /** * Defines the exception to use when an SVG document is malformed.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class MalformedSVGDocument extends Exception { private static final long serialVersionUID = 1L; @Override public String toString() { return "The SVG document is malformed.";//$NON-NLS-1$ } } OtherNSElement.java000066400000000000000000000027271321075051700344430ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.util.Objects; import org.w3c.dom.Node; /** * Defines a generic element to store a non-SVG tag.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/12/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class OtherNSElement extends SVGElement { /** * See {@link SVGElement#SVGElement(Node, SVGElement)}. * @throws MalformedSVGDocument If the element is not well formed. */ public OtherNSElement(final Node n, final 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(final SVGDocument document) { super(); ownerDocument = Objects.requireNonNull(document); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return false; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/SVGAttr.java000066400000000000000000000156621321075051700331620ustar00rootroot00000000000000package net.sf.latexdraw.parsers.svg; import java.util.Objects; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.TypeInfo; import org.w3c.dom.UserDataHandler; /** * Defines an SVG attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/16/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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; /** * Creates an SVG attribute. * @param n The name of the node. * @param val The value of the node. * @param parent The parent of the node. * @throws IllegalArgumentException If one of the given parameters is null. * @since 0.1 */ public SVGAttr(final String n, final String val, final Element parent) { super(); name = Objects.requireNonNull(n); owner = Objects.requireNonNull(parent); value = Objects.requireNonNull(val); } @Override public String getName() { return name; } @Override public Element getOwnerElement() { return owner; } @Override public String getValue() { return value; } @Override public boolean isId() { return name.equals(SVGAttributes.SVG_ID); } @Override public void setValue(final String value) { if(value==null) throw new DOMException(DOMException.SYNTAX_ERR, "A value cannot be null");//$NON-NLS-1$ this.value = value; } /** No deep allow. */ @Override public Node cloneNode(final boolean deep) { try { return (SVGAttr) clone(); } catch(final CloneNotSupportedException e) { return null; } } @Override public String getNodeName() { return name; } @Override public short getNodeType() { return Node.ATTRIBUTE_NODE; } @Override public String getNodeValue() { return value; } @Override public Node getParentNode() { return owner; } @Override public boolean hasAttributes() { return false; } @Override public boolean hasChildNodes() { return false; } @Override public boolean isEqualNode(final Node node) { return node!=null && node.getNodeName().equals(name) && node.getNodeValue().equals(value) && node.getNodeType()==getNodeType(); } @Override public boolean isSameNode(final Node other) { return other!=null && other==this; } @Override public void setNodeValue(final String nodeValue) { setValue(nodeValue); } @Override public String toString() { return "[" + name + ", " + value + ']'; //$NON-NLS-1$ //$NON-NLS-2$ } @Override public String getPrefix() { if(getNodeName()==null) return null; final int index = getName().indexOf(':'); if(index!=-1) return getName().substring(0, index); return null; } @Override public boolean getSpecified() { return true; } @Override public String getNamespaceURI() { return lookupNamespaceURI(getPrefix()); } @Override public String lookupNamespaceURI(final String prefix) { return owner.lookupNamespaceURI(prefix); } @Override public String getLocalName() { return name; } @Override public TypeInfo getSchemaTypeInfo() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public short compareDocumentPosition(final Node other) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public String getBaseURI() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Object getFeature(final String feature, final String version) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node getNextSibling() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Document getOwnerDocument() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node getPreviousSibling() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public String getTextContent() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Object getUserData(final String key) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public boolean isDefaultNamespace(final String namespaceURI) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public boolean isSupported(final String feature, final String version) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public String lookupPrefix(final String namespaceURI) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void normalize() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node replaceChild(final Node newChild, final Node oldChild) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void setPrefix(final String prefix) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void setTextContent(final String textContent) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Object setUserData(final String key, final Object data, final UserDataHandler handler) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node removeChild(final Node oldChild) { return null; } @Override public Node insertBefore(final Node newChild, final Node refChild) { return null; } @Override public NamedNodeMap getAttributes() { return null; } @Override public NodeList getChildNodes() { return new SVGNodeList(); } @Override public Node getFirstChild() { return null; } @Override public Node getLastChild() { return null; } @Override public Node appendChild(final Node newChild) { return null; } } SVGAttributes.java000066400000000000000000000520551321075051700343140ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; /** * Contains SVG attributes according to the SVG specification version 1.1.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 06/04/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1
    */ public final class SVGAttributes { private SVGAttributes() { super(); } 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_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_DASHOFFSET = "stroke-dashoffset"; //$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_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_LINEJOIN_VALUE_MITER = "butt"; //$NON-NLS-1$ public static final String SVG_LINEJOIN_VALUE_ROUND = "round"; //$NON-NLS-1$ public static final String SVG_LINEJOIN_VALUE_BEVEL = "bevel"; //$NON-NLS-1$ public static final String SVG_VALUE_AUTO = "auto"; //$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_NORMAL = "normal"; //$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_FONT_WEIGHT_NORMAL = "normal"; //$NON-NLS-1$ public static final String SVG_FILL_OPACITY = "fill-opacity"; //$NON-NLS-1$ public static final String SVG_STROKE_OPACITY = "stroke-opacity"; //$NON-NLS-1$ // public static final String SVG_OPACITY = "opacity"; //$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_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_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_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$ } SVGCircleElement.java000066400000000000000000000102351321075051700346730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import net.sf.latexdraw.util.LNumber; import org.w3c.dom.Node; /** * Defines the SVG tag ciricle.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGCircleElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGCircleElement(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * Creates a circle with a radius equal to 0. * @param doc The owner document. * @since 0.1 */ public SVGCircleElement(final SVGDocument doc) { super(doc); setNodeName(SVGElements.SVG_CIRCLE); setAttribute(SVGAttributes.SVG_R, "0");//$NON-NLS-1$ } /** * 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(final double cx, final double cy, final double r, final 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(); } /** * @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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CX); double cx; try { cx = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CY); double cy; try { cy = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_R); double r; try { r = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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(final 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(final 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(final double width) { if(width>=0.) setAttribute(getUsablePrefix()+SVGAttributes.SVG_R, String.valueOf(width)); } @Override public boolean checkAttributes() { final double r = getR(); return !Double.isNaN(r) && r>=0.; } @Override public boolean enableRendering() { return !LNumber.equalsDouble(getR(), 0.0); } } SVGComment.java000066400000000000000000000023361321075051700335650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import org.w3c.dom.Comment; import org.w3c.dom.Node; /** * Defines a comment node.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGComment extends SVGText implements Comment { /** * Creates a comment element. * @param comment The text of the comment. * @param owner The parent of the element. * @since 0.1 */ public SVGComment(final String comment, final SVGDocument owner) { super(comment, owner); } @Override public short getNodeType() { return Node.COMMENT_NODE; } @Override public String getNodeName() { return "#comment";//$NON-NLS-1$ } } SVGDefsElement.java000066400000000000000000000035521321075051700343570ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.util.Objects; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Defines the SVG tag defs.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGDefsElement extends SVGElement { /** * See {@link SVGElement#SVGElement(Node, SVGElement)}. * @throws MalformedSVGDocument If the element is not well formed. */ public SVGDefsElement(final Node n, final 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(final SVGDocument owner) { super(); ownerDocument = Objects.requireNonNull(owner); setNodeName(SVGElements.SVG_DEFS); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return false; } @Override public SVGElement getDef(final String id) { if(id==null) return null; final NodeList nl = getChildNodes(); SVGElement e = null; Node n; for(int i=0, size = nl.getLength(); i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/23/10
    * @author Arnaud BLOUIN * @version 3.0 */ 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 static final 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 root attribute. * @param uri The file to parse. * @throws MalformedSVGDocument If an error occurs. * @throws IOException If the document cannot be opened. * @throws IllegalArgumentException If a n argument is not valid. */ public SVGDocument(final URI uri) throws MalformedSVGDocument, IOException { super(); if (uri == null) throw new IllegalArgumentException(); try { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); builder.setEntityResolver(new SVGEntityResolver()); Document doc; try { doc = builder.parse(uri.getPath()); } catch (final MalformedURLException ex) { doc = builder.parse("file:" + uri.getPath()); //$NON-NLS-1$ } final 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)); } } catch (final SAXException | ParserConfigurationException e) { BadaboomCollector.INSTANCE.add(e); throw new MalformedSVGDocument(); } } /** * Creates an SVG document with an empty SVG element. */ public SVGDocument() { super(); setDocumentURI(null); setXmlVersion("1.1");//$NON-NLS-1$ setXmlStandalone(false); root = new SVGSVGElement(this); } @Override public String toString() { return "SVG Document:" + root; //$NON-NLS-1$ } @Override public SVGSVGElement adoptNode(final Node source) { if(!(source instanceof SVGSVGElement)) throw new DOMException(DOMException.TYPE_MISMATCH_ERR, "SVGSVGElement expected here.");//$NON-NLS-1$ root = (SVGSVGElement)source; root.setOwnerDocument(this); return root; } @Override public SVGSVGElement getDocumentElement() { return root; } @Override public String getDocumentURI() { return documentURI; } @Override public String getXmlEncoding() { return xmlEncoding; } @Override public boolean getXmlStandalone() { return xmlStandalone; } @Override public String getXmlVersion() { return xmlVersion; } @Override public void setDocumentURI(final String documentURI) { this.documentURI = documentURI; } @Override public void setXmlStandalone(final boolean xmlStandalone) { this.xmlStandalone = xmlStandalone; } @Override public void setXmlVersion(final String xmlVersion) { this.xmlVersion = xmlVersion; } @Override public NamedNodeMap getAttributes() { return null; } @Override public NodeList getChildNodes() { return new SVGNodeList(); } @Override public SVGSVGElement getFirstChild() { return root; } @Override public SVGSVGElement getLastChild() { return root; } @Override public Node getNextSibling() { return null; } @Override public String getNodeName() { return "#document";//$NON-NLS-1$ } @Override public short getNodeType() { return Node.DOCUMENT_NODE; } @Override public String getNodeValue() { return null; } @Override public Document getOwnerDocument() { return null; } @Override public Node getParentNode() { return null; } @Override public Node getPreviousSibling() { return null; } @Override public boolean hasAttributes() { return false; } @Override public boolean hasChildNodes() { return root!=null; } @Override public boolean isEqualNode(final Node node) { final boolean equal; if(node instanceof SVGDocument) { final SVGDocument doc = (SVGDocument)node; final boolean encod = xmlEncoding==null ? doc.xmlEncoding==null : xmlEncoding.equals(doc.xmlEncoding); final boolean uri = documentURI==null ? doc.documentURI==null : documentURI.equals(doc.documentURI); equal = xmlStandalone==doc.xmlStandalone && encod && root.isEqualNode(doc.root) && uri; } else equal = false; return equal; } @Override public boolean isSameNode(final Node other) { return other!=null && other==this; } @Override public DocumentType getDoctype() { return null; } @Override public Element createElement(final String tagName) { if(tagName==null) throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid tagName.");//$NON-NLS-1$ final OtherNSElement elt = new OtherNSElement(this); elt.setNodeName(tagName); return elt; } @Override public Text createTextNode(final String data) { if(data==null) throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid data.");//$NON-NLS-1$ return new SVGText(data, this); } @Override public Comment createComment(final String data) { if(data==null) throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid data.");//$NON-NLS-1$ return new SVGComment(data, this); } @Override public CDATASection createCDATASection(final String data) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public DOMConfiguration getDomConfig() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public DOMImplementation getImplementation() { return new SVGDOMImplementation(); } @Override public String getInputEncoding() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public boolean getStrictErrorChecking() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Node importNode(final Node importedNode, final boolean deep) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public void normalizeDocument() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Node renameNode(final Node n, final String namespaceURI, final String qualifiedName) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public void setStrictErrorChecking(final boolean strictErrorChecking) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Node appendChild(final Node newChild) { return null; } @Override public Node cloneNode(final boolean deep) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public short compareDocumentPosition(final Node other) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String getBaseURI() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Object getFeature(final String feature, final String version) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String getLocalName() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String getNamespaceURI() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String getPrefix() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String getTextContent() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Object getUserData(final String key) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public boolean isDefaultNamespace(final String namespaceURI) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Attr createAttribute(final String name) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Attr createAttributeNS(final String namespaceURI, final String qualifiedName) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public DocumentFragment createDocumentFragment() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Element createElementNS(final String namespaceURI, final String qualifiedName) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public EntityReference createEntityReference(final String name) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public ProcessingInstruction createProcessingInstruction(final String target, final String data) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public boolean isSupported(final String feature, final String version) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String lookupNamespaceURI(final String prefix) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public String lookupPrefix(final String namespaceURI) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public void normalize() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Object setUserData(final String key, final Object data, final UserDataHandler handler) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); } @Override public Node insertBefore(final Node newChild, final Node refChild) { return null; } @Override public void setPrefix(final String prefix) { /* Nothing to do. */ } @Override public void setTextContent(final String textContent) { /* Nothing to do. */ } @Override public Node removeChild(final Node oldChild) { return null; } @Override public Node replaceChild(final Node newChild, final Node oldChild) { return null; } @Override public void setNodeValue(final String nodeValue) { /* Nothing to do. */ } @Override public Element getElementById(final String elementId) { return null; } @Override public NodeList getElementsByTagName(final String tagname) { return null; } @Override public NodeList getElementsByTagNameNS(final String namespaceURI, final String localName) { return null; } /** * Serialise the given SVG document. * @param path The file of the future serialised document. * @return True: the document has been successfully saved. * @since 2.0 */ public boolean saveSVGDocument(final String path) { if(path==null) return false; boolean ok = true; try{ final DOMImplementationLS impl = (DOMImplementationLS) DOMImplementationRegistry.newInstance().getDOMImplementation("XML 3.0 LS 3.0"); //$NON-NLS-1$ final Charset charset = Charset.defaultCharset(); try { // First try using the system encoding. serialise(path, impl, charset); }catch(final Exception ex) { // If a problem with the encoding happens, try with the default DOM encoding. serialise(path, impl, null); } }catch(final Exception ex){ ex.printStackTrace(); BadaboomCollector.INSTANCE.add(ex); ok = false; } return ok; } private void serialise(final String path, final DOMImplementationLS impl, final Charset charset) throws IOException { try(final OutputStreamWriter fw = charset == null ? new OutputStreamWriter(new FileOutputStream(path)) : new OutputStreamWriter(new FileOutputStream(path), charset.newEncoder())) { final LSOutput output = impl.createLSOutput(); final LSSerializer serializer = impl.createLSSerializer(); serializer.getDomConfig().setParameter("format-pretty-print", true); //$NON-NLS-1$ serializer.getDomConfig().setParameter("namespaces", false); //$NON-NLS-1$ if(charset != null) { output.setEncoding(charset.name()); } output.setCharacterStream(fw); serializer.write(getDocumentElement(), output); } } /** * Used to avoid freeze when opening an SVG document. */ static class SVGEntityResolver implements EntityResolver { @Override public InputSource resolveEntity(final String publicId, final String systemId) { return new InputSource(new ByteArrayInputStream("".getBytes(Charset.defaultCharset()))); //$NON-NLS-1$ } } static class SVGDOMImplementation implements DOMImplementation { @Override public boolean hasFeature(final String feature, final String version) { return false; } @Override public DocumentType createDocumentType(final String qualifiedName, final String publicId, final String systemId) throws DOMException { return new SVGDocumentType(); } @Override public Document createDocument(final String namespaceURI, final String qualifiedName, final DocumentType doctype) throws DOMException { return new SVGDocument(); } @Override public Object getFeature(final String feature, final String version) { return new Object(); } } static class SVGDocumentType extends SVGElement implements DocumentType { @Override public boolean checkAttributes() { return false; } @Override public boolean enableRendering() { return false; } @Override public String getName() { return ""; } @Override public NamedNodeMap getEntities() { return new SVGNamedNodeMap(); } @Override public NamedNodeMap getNotations() { return new SVGNamedNodeMap(); } @Override public String getPublicId() { return ""; } @Override public String getSystemId() { return ""; } @Override public String getInternalSubset() { return ""; } } } SVGElement.java000066400000000000000000000746311321075051700335630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.parsers.svg.parsers.CSSStyleParser; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.*; import java.awt.*; import java.text.ParseException; import java.util.Objects; /** * Defines an SVG element.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class SVGElement implements Element, Cloneable { /** The attributes of the element. @since 0.1 */ final protected SVGNamedNodeMap attributes; /** The children of this element. @since 0.1 */ final 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 */ protected SVGElement() { super(); children = new SVGNodeList(); attributes = new SVGNamedNodeMap(); 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 */ protected SVGElement(final SVGDocument owner) { this(); ownerDocument = Objects.requireNonNull(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 */ protected SVGElement(final 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 */ protected SVGElement(final Node n, final 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(final ParseException e) { BadaboomCollector.INSTANCE.add(e); } } if(!checkAttributes()) throw new MalformedSVGDocument(); final NodeList nl = n.getChildNodes(); int i; final int size = nl.getLength(); if(size==1 && ("#text".equals(nl.item(0).getNodeName()) || "#cdata-section".equals(nl.item(0).getNodeName())))//$NON-NLS-1$//$NON-NLS-2$ setTextContent(n.getTextContent()); for(i=0; i0) str.append(children.getNodes().get(children.getNodes().size()-1)); str.append('}'); return str.append(']').toString(); } @Override public String getNodeName() { return name; } /** * Sets the name of the SVG element. * @param name Its new name. */ public void setNodeName(final String name) { this.name = name; } @Override public String getAttribute(final String nameAttr) { if(attributes==null || nameAttr==null) return null; final Node n = attributes.getNamedItem(nameAttr); return n==null ? null : n.getNodeValue(); } @Override public Attr getAttributeNode(final String nameAttr) { if(attributes==null) return null; return (Attr)attributes.getNamedItem(nameAttr); } @Override public String getTagName() { return name; } @Override public Node appendChild(final Node newChild) { 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; } @Override public NodeList getChildNodes() { return children; } @Override public Node getFirstChild() { return children.getNodes()==null || children.getNodes().isEmpty() ? null : children.getNodes().get(0); } @Override public Node getLastChild() { return children.getNodes()==null || children.getNodes().isEmpty() ? null : children.getNodes().get(children.getNodes().size()-1); } @Override public short getNodeType() { return Node.ELEMENT_NODE; } @Override public SVGDocument getOwnerDocument() { return ownerDocument; } @Override public Node getParentNode() { return parent; } @Override public boolean hasAttributes() { return attributes!=null && attributes.getAttributes()!=null && !attributes.getAttributes().isEmpty(); } @Override public boolean hasChildNodes() { return children.getNodes()!=null && !children.getNodes().isEmpty(); } @Override public Node insertBefore(final Node newChild, final Node refChild) { boolean ok = false; if(newChild!=null && refChild!=null) { final int pos = children.getNodes().indexOf(refChild); if(pos!=-1 && newChild instanceof SVGElement) { children.getNodes().add(pos, (SVGElement)newChild); ok = true; } } return ok ? newChild : null; } @Override public boolean isEqualNode(final Node node) { if(!(node instanceof SVGElement)) return false; final SVGElement elt = (SVGElement)node; final String uri = lookupNamespaceURI(null); final String val = getNodeValue(); final boolean valEq = val==null ? elt.getNodeValue()==null : val.equals(elt.getNodeValue()); final boolean uriEq = uri==null ? elt.lookupNamespaceURI(null)==null : uri.equals(elt.lookupNamespaceURI(null)); final boolean attrEq = attributes==null ? elt.attributes==null : attributes.equals(elt.attributes); return name.equals(elt.name) && getUsablePrefix().equals(elt.getUsablePrefix()) && uriEq && valEq && attrEq; } @Override public boolean isSameNode(final Node other) { return other!=null && other==this; } @Override public Node removeChild(final Node oldChild) { boolean ok = false; if(oldChild!=null) ok = children.getNodes().remove(oldChild); return ok ? oldChild : null; } @Override public void setTextContent(final String textContent) { if(textContent==null) throw new DOMException(DOMException.DOMSTRING_SIZE_ERR, "textContent is null.");//$NON-NLS-1$ appendChild(new SVGText(textContent, getOwnerDocument())); } @Override public String lookupPrefix(final String namespaceURI) { if(namespaceURI == null) return null; String pref = null; final String xmlns = "xmlns"; //$NON-NLS-1$ if(attributes!=null) { int i=0; final int size = attributes.getLength(); boolean again = true; while(i0; } @Override public String getNamespaceURI() { return lookupNamespaceURI(getPrefix()); } @Override public String lookupNamespaceURI(final String pref) { String uri = null; if(attributes!=null) if(pref==null) { int i=0; final int size = attributes.getLength(); boolean again = true; final String xmlns = "xmlns";//$NON-NLS-1$ while(i=nl.getLength() ? null : nl.getNodes().get(index+1); } @Override public Node getPreviousSibling() { if(parent==null) return null; final SVGNodeList nl = (SVGNodeList)parent.getChildNodes(); final int index = nl.getNodes().indexOf(this); if(index==-1) return null; return index-1<0 ? null : nl.getNodes().get(index+1); } @Override public NodeList getElementsByTagName(final String nameElt) { if("*".equals(nameElt)) //$NON-NLS-1$ return getChildNodes(); final SVGNodeList nl = new SVGNodeList(); if(nameElt!=null) { final NodeList nl2 = getChildNodes(); int i; final int size = nl2.getLength(); Node n; for(i=0; i0) setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(strokeW)); } /** * Sets the line cap of the stroke of the SVG shape. * @param svgLineCap The line cap to set. Must be SVG_LINECAP_VALUE_BUTT or SVG_LINECAP_VALUE_ROUND * or SVG_LINECAP_VALUE_SQUARE. * @since 0.2 */ public void setStrokeLineCap(final String svgLineCap) { if(SVGAttributes.SVG_LINECAP_VALUE_BUTT.equals(svgLineCap) || SVGAttributes.SVG_LINECAP_VALUE_ROUND.equals(svgLineCap) || SVGAttributes.SVG_LINECAP_VALUE_SQUARE.equals(svgLineCap)) setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_LINECAP, svgLineCap); } /** * Sets the miter level of the stroke. * @param miterLevel The miter level to set. Must be greater than or equal to 1. * @since 0.2 */ public void setStrokeMiterLevel(final double miterLevel) { if(miterLevel>=1) setAttribute(SVGAttributes.SVG_STROKE_MITERLIMIT, String.valueOf(miterLevel)); } /** * Sets the dash offset of the stroke. * @param dashOffset The dash offset to set. * @since 0.2 */ public void setStrokeDashOffset(final double dashOffset) { setAttribute(SVGAttributes.SVG_STROKE_DASHOFFSET, String.valueOf(dashOffset)); } /** * Sets the dash array of the stroke. * @param dashArray The dash array to set. Must not be null. * @since 0.2 */ public void setStrokeDashArray(final String dashArray) { if(dashArray!=null) setAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, dashArray); } /** * Sets the line join of the stroke of the SVG shape. * @param svgLineJoin The line join to set. Must be SVG_LINEJOIN_VALUE_BEVEL or SVG_LINEJOIN_VALUE_MITER * or SVG_LINEJOIN_VALUE_ROUND. * @since 0.2 */ public void setStrokeLineJoin(final String svgLineJoin) { if(SVGAttributes.SVG_LINEJOIN_VALUE_BEVEL.equals(svgLineJoin) || SVGAttributes.SVG_LINEJOIN_VALUE_MITER.equals(svgLineJoin) || SVGAttributes.SVG_LINEJOIN_VALUE_ROUND.equals(svgLineJoin)) setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_LINEJOIN, svgLineJoin); } /** * @return The stroke width of the element (if it is possible) or 1. * @since 0.1 */ public double getStrokeWidth() { final String swStr = getSVGAttribute(SVGAttributes.SVG_STROKE_WIDTH, getUsablePrefix()); double sw; try { sw = swStr==null ? parent==null ? 1 : parent.getStrokeWidth() : new SVGLengthParser(swStr).parseLength().getValue(); } catch(final 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() { final String da = getSVGAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, getUsablePrefix()); return da==null ? parent==null ? SVGAttributes.SVG_VALUE_NONE : parent.getStrokeDasharray() : da; } /** * @return The line join of the element or its default value. * @since 3.0 */ public String getStrokeLinejoin() { final String lj = getSVGAttribute(SVGAttributes.SVG_STROKE_LINEJOIN, getUsablePrefix()); return lj==null ? parent==null ? SVGAttributes.SVG_LINEJOIN_VALUE_MITER : parent.getStrokeLinejoin() : lj; } /** * @return The line cap of the element or its default value. * @since 0.1 */ public String getStrokeLinecap() { final String linecap = getSVGAttribute(SVGAttributes.SVG_STROKE_LINECAP, getUsablePrefix()); return linecap==null ? parent==null ? SVGAttributes.SVG_LINECAP_VALUE_BUTT : parent.getStrokeLinecap() : linecap; } /** * @return The miter limit of the element or its default value. * @since 0.1 */ public double getStrokeMiterlimit() { final String linecap = getSVGAttribute(SVGAttributes.SVG_STROKE_MITERLIMIT, getUsablePrefix()); double lc; if(linecap!=null) try { lc = Double.parseDouble(linecap); } catch(final Exception e) { lc = 4.; } else lc = parent==null ? 4. : parent.getStrokeMiterlimit(); return lc; } /** * @return The font-size value in point of the element, or from one of its parents. */ public float getFontSize() { final String fs = getSVGAttribute(SVGAttributes.SVG_FONT_SIZE, getUsablePrefix()); return fs==null ? parent==null ? SVGLengthParser.FontSize.MEDIUM.getPointValue() : parent.getFontSize() : SVGLengthParser.fontSizetoPoint(fs); } /** * @return The defined or inherited font family. Otherwise, an empty string. */ public String getFontFamily() { final String fam = getSVGAttribute(SVGAttributes.SVG_FONT_FAMILY, getUsablePrefix()); return fam==null ? parent==null ? "" : parent.getFontFamily() : fam; //$NON-NLS-1$ } /** * @return The defined or inherited font style. Otherwise, the default value "normal" is returned. */ public String getFontStyle() { final String style = getSVGAttribute(SVGAttributes.SVG_FONT_STYLE, getUsablePrefix()); return style==null ? parent==null ? SVGAttributes.SVG_FONT_STYLE_NORMAL : parent.getFontStyle() : style; } /** * @return The defined or inherited font weight. Otherwise, the default value "normal" is returned. */ public String getFontWeight() { final String weight = getSVGAttribute(SVGAttributes.SVG_FONT_WEIGHT, getUsablePrefix()); return weight==null ? parent==null ? SVGAttributes.SVG_FONT_WEIGHT_NORMAL : parent.getFontWeight() : weight; } /** * Sets the colour of the filling. * @param c The new filling colour. * @since 0.1 */ public void setFill(final Color c) { if(c!=null) setAttribute(getUsablePrefix()+SVGAttributes.SVG_FILL, CSSColors.INSTANCE.getColorName(c, true)); } /** * @return The fill content of the element or its default value. * @since 0.1 */ public String getFill() { final String fill = getSVGAttribute(SVGAttributes.SVG_FILL, getUsablePrefix()); 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(final Color c) { if(c!=null) setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE, CSSColors.INSTANCE.getColorName(c, true)); } /** * @return The fill content of the element (if it is possible) or null. * @since 0.1 */ public Color getStroke() { final String stroke = getSVGAttribute(SVGAttributes.SVG_STROKE, getUsablePrefix()); return stroke==null ? parent==null ? null : parent.getStroke() : CSSColors.INSTANCE.getRGBColour(stroke); } /** * @param uri The URI that will be used parsed to extract a prefix. * @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(final String uri) { final String pref = lookupPrefix(uri); return pref==null || pref.isEmpty() ? "" : 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() { final 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(final SVGDocument doc) { if(doc!=null) { ownerDocument = doc; for(int i=0, size=children.getLength(); i *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 06/03/07
    * @author Arnaud BLOUIN * @version 0.2 */ public final class SVGElements { private SVGElements() { super(); } 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$ } SVGElementsFactory.java000066400000000000000000000077561321075051700353020ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.badaboom.BadaboomCollector; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * This class must be used to create SVG elements.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class SVGElementsFactory { /** The singleton. */ public static final SVGElementsFactory INSTANCE = new SVGElementsFactory(); private SVGElementsFactory() { super(); } /** * 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. * @param parent The parent of the element to create. * @return The created SVG element. * @since 0.1 */ public SVGElement createSVGElement(final Node src, final SVGElement parent) { if(src==null || parent==null) return null; try { final String name = src.getNodeName(); if(name==null) return null; final String pref = src.getNodeName().contains(":") ? src.getNodeName().substring(0, src.getNodeName().indexOf(':')) : null;//$NON-NLS-1$ final NamedNodeMap nnm = src.getAttributes(); final String ns; if(nnm==null) ns = parent.lookupNamespaceURI(pref); else { final 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 if(name.endsWith(SVGElements.SVG_IMAGE)) return new SVGImageElement(src, parent); } else return new OtherNSElement(src, parent); } catch(MalformedSVGDocument | ParseException ex) { BadaboomCollector.INSTANCE.add(ex); return null; } return null; } } SVGEllipseElement.java000066400000000000000000000100551321075051700350670ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; /** * Defines the SVG tag ellipse.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGEllipseElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGEllipseElement(final Node n, final 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(final double cx, final double cy, final double rx, final double ry, final 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(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CX); double cx; try { cx = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CY); double cy; try { cy = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RX); double rx; try { rx = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RY); double ry; try { ry = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { ry = Double.NaN; } return ry; } @Override public boolean checkAttributes() { final double rx = getRx(); final double ry = getRy(); return !Double.isNaN(rx) && !Double.isNaN(ry) && rx>=0 && ry>=0; } @Override public boolean enableRendering() { return getRx()!=0 && getRy()!=0 ; } } SVGGElement.java000066400000000000000000000027201321075051700336600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.util.Objects; import org.w3c.dom.Node; /** * Defines the SVG tag g.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGGElement extends SVGElement { /** * See {@link SVGElement#SVGElement(Node, SVGElement)}. * @throws MalformedSVGDocument If the element is not well formed. */ public SVGGElement(final Node n, final 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(final SVGDocument owner) { super(); ownerDocument = Objects.requireNonNull(owner); setNodeName(SVGElements.SVG_G); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return true; } } SVGImageElement.java000066400000000000000000000074531321075051700345240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.io.File; import java.net.URI; import java.net.URISyntaxException; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; /** * Defines the SVG element defining a picture.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGImageElement extends SVGElement { /** * {@link SVGImageElement#SVGImageElement(SVGDocument, String)} * @param n The node. * @param p The parent SVG element. * @throws MalformedSVGDocument If the element is not well formed. */ public SVGImageElement(final Node n, final 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(final SVGDocument doc, final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X); double x; try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y); double y; try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final ParseException e) { y = 0; } return y; } /** * @return The value of the width attribute. * @since 0.1 */ public double getWidth() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH); double width; try { width = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { width = Double.NaN; } return width; } /** * @return The value of the height attribute. * @since 0.1 */ public double getHeight() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT); double height; try { height = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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() { final double vWidth = getWidth(); final double vHeight = getHeight(); return !(Double.isNaN(vWidth) || Double.isNaN(vHeight) || vWidth < 0 || vHeight < 0); } @Override public boolean enableRendering() { if(getWidth()==0 || getHeight()==0 || getURI()==null) return false; try { final URI uri = new URI(getURI()); final File f = new File(uri.getPath()); if(!f.exists() || !f.canRead()) return false; } catch(final URISyntaxException e) { return false; } return true; } } SVGLineElement.java000066400000000000000000000117051321075051700343640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; /** * Defines the SVG tag line.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGLineElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGLineElement(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * Creates an SVGLine. * @param owner The owner document. * @param x1 The X-coordinate of the first point of the line. * @param x2 The X-coordinate of the second point of the line. * @param y1 The Y-coordinate of the first point of the line. * @param y2 The Y-coordinate of the second point of the line. * @throws MalformedSVGDocument If the given coordinates are not valid. * @since 0.1 */ public SVGLineElement(final double x1, final double y1, final double x2, final double y2, final 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(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X1); double x1; try { x1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y1); double y1; try { y1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X2); double x2; try { x2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2); double y2; try { y2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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(final 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(final 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(final 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(final double y2) { setAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2, String.valueOf(y2)); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return true; } } SVGLinearGradientElement.java000066400000000000000000000162541321075051700363710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.awt.Color; import java.awt.geom.Point2D; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import net.sf.latexdraw.util.LNumber; import org.w3c.dom.Node; /** * Defines the SVG tag linearGradient.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/04/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGLinearGradientElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGLinearGradientElement(final Node n, final 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(final 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() { final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X1); double x1; try { x1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y1); double y1; try { y1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X2); double x2; try { x2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2); double y2; try { y2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final ParseException e) { y2 = 0; } return y2; } /** * @return The start colour of the gradient or null. * @since 0.1 */ public Color getStartColor() { final 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) { final SVGStopElement s1 = (SVGStopElement)nl.item(0); final SVGStopElement s2 = (SVGStopElement)nl.item(1); final SVGStopElement s3 = (SVGStopElement)nl.item(2); if(s1.getOffset()((SVGStopElement)nl.item(1)).getOffset()) return ((SVGStopElement)nl.item(0)).getStopColor(); return ((SVGStopElement)nl.item(1)).getStopColor(); } else if(nl.getLength()==3) { final SVGStopElement s1 = (SVGStopElement)nl.item(0); final SVGStopElement s2 = (SVGStopElement)nl.item(1); final SVGStopElement s3 = (SVGStopElement)nl.item(2); if(s1.getOffset()>s2.getOffset()) { if(s1.getOffset()s2.getOffset()) if(s1.getOffset()marker.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/04/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGMarkerElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} * @param owner The owner document. */ public SVGMarkerElement(final SVGDocument owner) { super(owner); setNodeName(SVGElements.SVG_MARKER); } /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGMarkerElement(final Node n, final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_REF_X); double refx; try { refx = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_REF_Y); double refy; try { refy = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_MARKER_WIDTH); double markerW; try { markerW = v==null ? 3 : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_MARKER_HEIGHT); double markerH; try { markerH = v==null ? 3 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final 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; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/SVGMatrix.java000066400000000000000000000115471321075051700335120ustar00rootroot00000000000000package net.sf.latexdraw.parsers.svg; /** * Defines a matrix according to the SVG specifications.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/16/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1
    */ public class SVGMatrix { public static final int WIDTH = 3; public static final int 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() { super(); initMatrix(); } /** * Initialises the matrix as the identity. * @since 0.1 */ public void initMatrix() { a = 1.; d = 1.; b = 0.; c = 0.; e = 0.; f = 0.; } /** * Rotates the matrix (without reinitialisation). * @param angle The angle of rotation (in radian). * @since 0.1 */ public void rotate(final 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(final double x, final double y) { e = x; f = y; } /** * Scales the matrix (without reinitialisation). * @param scaleFactor The scale factor. * @since 0.1 */ public void scale(final 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(final double scaleFactorX, final double scaleFactorY) { a = scaleFactorX; d = scaleFactorY; } /** * Skews the matrix (without reinitialisation). * @param angle The X angle. * @since 0.1 */ public void skewX(final double angle) { c = Math.tan(angle); } /** * Skews the matrix (without reinitialisation). * @param angle The Y angle. * @since 0.1 */ public void skewY(final 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(final SVGMatrix m) { if(m==null) return null; final 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 The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param b The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param c The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param d The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param e The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param f The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @since 0.1 */ public void setMatrix(final double a, final double b, final double c, final double d, final double e, final 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() { return String.valueOf(a) + ' ' + c + ' ' + e + ' ' + b + ' ' + d + ' ' + f; } } SVGMetadataElement.java000066400000000000000000000026641321075051700352210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import org.w3c.dom.Node; /** * Defines the SVG tag metadata.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGMetadataElement extends SVGElement { /** * See {@link SVGElement#SVGElement(Node, SVGElement)}. * @throws MalformedSVGDocument If the element is not well formed. */ public SVGMetadataElement(final Node n, final 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(final SVGDocument owner) { super(owner); setNodeName(SVGElements.SVG_METADATA); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return false; } } SVGNamedNodeMap.java000066400000000000000000000101471321075051700344520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.util.ArrayList; import java.util.List; import org.w3c.dom.DOMException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * Defines an SVG named node map.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/16/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGNamedNodeMap implements NamedNodeMap, Cloneable { /** The set of nodes. @since 0.1 */ protected List nnm; /** * The constructor by default. * @since 0.1 */ public SVGNamedNodeMap() { super(); nnm = new ArrayList<>(); } @Override public int getLength() { return nnm==null ? 0 : nnm.size(); } @Override public Node getNamedItem(final String name) { if(nnm==null || name==null) return null; int i = 0; final int size = getLength(); boolean found = false; while(i=getLength() ? null : nnm.get(index); } @Override public Node removeNamedItem(final String name) { if(name==null) throw new DOMException(DOMException.NOT_FOUND_ERR, "name is null"); //$NON-NLS-1$ int i = 0; final int size = getLength(); boolean found = false; while(i(); for(final SVGAttr attr : nnm) clone.nnm.add((SVGAttr)attr.cloneNode(false)); return clone; } catch(final CloneNotSupportedException e) { return null; } } @Override public String toString() { final StringBuilder str = new StringBuilder().append('{'); for(final SVGAttr e : nnm) str.append(e).append(',').append(' '); return str.append('}').toString(); } @Override public Node getNamedItemNS(final String namespaceURI, final String localName) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node setNamedItemNS(final Node arg) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Node removeNamedItemNS(final String namespaceURI, final String localName) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } /** * @return the attributes. * @since 0.1 */ public List getAttributes() { return nnm; } @Override public boolean equals(final Object obj) { if(!(obj instanceof SVGNamedNodeMap)) return false; final SVGNamedNodeMap map = (SVGNamedNodeMap)obj; boolean ok = true; int i; final int size = getLength(); if(size!=map.getLength()) return false; for(i=0; i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/16/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGNodeList implements NodeList { /** The nodes of the list. @since 0.1 */ protected List nodes; /** * The constructor by default. */ public SVGNodeList() { super(); nodes = new ArrayList<>(); } @Override public int getLength() { return nodes==null ? 0 : nodes.size(); } @Override public SVGElement item(final int index) { return nodes==null || index<0 || index>=nodes.size() ? null : nodes.get(index); } @Override public String toString() { final StringBuilder str = new StringBuilder().append('{'); for(final SVGElement e : nodes) str.append(e).append(", ");//$NON-NLS-1$ return str.append('}').toString(); } /** * @return the nodes. * @since 0.1 */ public List getNodes() { return nodes; } } SVGPathElement.java000066400000000000000000000105521321075051700343700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.*; import org.w3c.dom.Node; import java.text.ParseException; /** * Defines the SVG tag path.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/06/07
    * @author Arnaud BLOUIN * @version 3.0 * @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(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * Creates an empty SVG path element. * @param owner The owner document. * @since 0.1 */ public SVGPathElement(final 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() { final SVGPathSegList segList = getSegList(); return segList.size()==2 && segList.get(0) instanceof SVGPathSegMoveto && segList.get(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() { final SVGPathSegList segList = getSegList(); if(segList.size()<3 || !(segList.get(0) instanceof SVGPathSegMoveto)) return false; boolean ok = true; int i; final int size; for(i=1, size=segList.size()-1; ipattern.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/04/07
    * @author Arnaud BLOUIN * @version 3.0 * @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(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * Creates a new empty SVG Pattern element. * @param doc The owner document. */ public SVGPatternElement(final SVGDocument doc) { super(doc); setNodeName(SVGElements.SVG_PATTERN); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return !(LNumber.equalsDouble(getWidth(), 0.) || LNumber.equalsDouble(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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X); double x; try { x = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y); double y; try { y = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final ParseException e) { y = 0.; } return y; } /** * @return The value of the width attribute. * @since 0.1 */ public double getWidth() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH); double width; try { width = v==null ? 0. : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { width = 0.; } return width; } /** * @return The value of the height attribute. * @since 0.1 */ public double getHeight() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT); double height; try { height = v==null ? 0. : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { height = 0.; } return height; } /** * @return The coordinate system for the contents of the 'pattern'. * @since 0.1 */ public String getPatternContentUnits() { final 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() { final 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; final int size = children.getLength(); SVGGElement g = null; while(g==null && ipolyline.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGPolyLineElement extends AbstractPointsElement { /** * {@link AbstractPointsElement#AbstractPointsElement(Node, SVGElement)} */ public SVGPolyLineElement(final Node n, final SVGElement p) throws MalformedSVGDocument, ParseException { super(n, p); } /** * {@link AbstractPointsElement#AbstractPointsElement(Node, SVGElement)} * @param doc The owner document. */ public SVGPolyLineElement(final SVGDocument doc) { super(doc); setNodeName(SVGElements.SVG_POLY_LINE); } @Override public boolean enableRendering() { return true; } } SVGPolygonElement.java000066400000000000000000000025341321075051700351240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import org.w3c.dom.Node; /** * Defines the SVG tag polygon.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGPolygonElement extends AbstractPointsElement { /** * {@link AbstractPointsElement#AbstractPointsElement(Node, SVGElement)} */ public SVGPolygonElement(final Node n, final SVGElement p) throws MalformedSVGDocument, ParseException { super(n, p); } /** * {@link AbstractPointsElement#AbstractPointsElement(Node, SVGElement)} * @param doc The owner document. */ public SVGPolygonElement(final SVGDocument doc) { super(doc); setNodeName(SVGElements.SVG_POLYGON); } @Override public boolean enableRendering() { return true; } } SVGRectElement.java000066400000000000000000000126741321075051700344000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; /** * Defines the SVG tag rect.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @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(final Node node, final SVGElement elt) throws MalformedSVGDocument { super(node, elt); } /** * 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(final double x, final double y, final double w, final double h, final 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(final 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() { final double vWidth = getWidth(); final double vHeight = getHeight(); final double vrx = getRx(); final double vry = getRy(); return !(Double.isNaN(vWidth) || Double.isNaN(vHeight) || vWidth < 0 || vHeight < 0 || vrx < 0 || vry < 0); } @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). * The x-axis coordinate of the side of the rectangle which has the smaller x-axis coordinate value in the current user coordinate system. * @since 0.1 */ public double getX() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X); double x; try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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). * The y-axis coordinate of the side of the rectangle which has the smaller y-axis coordinate value in the current user coordinate system. * @since 0.1 */ public double getY() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y); double y; try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final ParseException e) { y = 0; } return y; } /** * @return The value of the width attribute. The width of the rectangle. * @since 0.1 */ public double getWidth() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH); double width; try { width = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { width = Double.NaN; } return width; } /** * @return The value of the height attribute. The height of the rectangle. * @since 0.1 */ public double getHeight() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT); double height; try { height = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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). * For rounded rectangles, the x-axis radius of the ellipse used to round off the corners of the rectangle. * @since 0.1 */ public double getRx() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RX); double rx; try { rx = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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). * For rounded rectangles, the y-axis radius of the ellipse used to round off the corners of the rectangle. * @since 0.1 */ public double getRy() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RY); double ry; try { ry = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { ry = 0; } return ry; } } SVGSVGElement.java000066400000000000000000000131621321075051700341330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import java.util.List; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import net.sf.latexdraw.util.LNumber; import org.w3c.dom.Node; /** * Defines the SVG tag SVG.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/11/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGSVGElement extends SVGElement { /** * See {@link SVGElement#SVGElement()} * @param n The node. * @param owner The owner document. * @throws MalformedSVGDocument If the tag is not valid. */ public SVGSVGElement(final SVGDocument owner, final 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(final Node n, final 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(final 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 chiNodes = children.getNodes(); final int size = chiNodes.size(); for(int i=0; i0) str.append(chiNodes.get(chiNodes.size()-1)); return str.append('}').append(']').toString(); } @Override public boolean checkAttributes() { return true; } @Override public boolean enableRendering() { return !LNumber.equalsDouble(getWidth(), 0.) && !LNumber.equalsDouble(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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X); double x; try { x = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final 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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y); double y; try { y = v==null ? 0. : new SVGLengthParser(v).parseCoordinate().getValue(); } catch(final ParseException e) { y = 0.; } return y; } /** * @return The value of the width attribute (0 if there it does not exist or it is not a length). * @since 0.1 */ public double getWidth() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH); double width; try { width = v==null ? 1. : new SVGLengthParser(v).parseLength().getValue(); } catch(final ParseException e) { width = 1.; } return width;//FIXME: doit retourner 100% } /** * @return The value of the height attribute (0 if there it does not exist or it is not a length). * @since 0.1 */ public double getHeight() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT); double height; try { height = v==null ? 1. : new SVGLengthParser(v).parseLength().getValue(); } catch(final 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); } } SVGStopElement.java000066400000000000000000000043321321075051700344200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; /** * Defines the SVG tag stop.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/06/07
    * @author Arnaud BLOUIN * @version 3.0 * @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(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * Creates a new empty SVG STOP element. * @param doc The owner document. */ public SVGStopElement(final SVGDocument doc) { super(doc); setNodeName(SVGElements.SVG_STOP); } @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() { final String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_OFFSET); double offset; try { offset = v==null ? Double.NaN : new SVGLengthParser(v).parseNumberOrPercent().getValue(); } catch(final 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() { final Color c = CSSColors.INSTANCE.getRGBColour(getAttribute(getUsablePrefix()+SVGAttributes.SVG_STOP_COLOR)); return c==null ? Color.BLACK : c; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/SVGText.java000066400000000000000000000062051321075051700331650ustar00rootroot00000000000000package net.sf.latexdraw.parsers.svg; import java.util.Objects; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.Text; /** * Defines a text node.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/31/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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(final String text, final SVGDocument owner) { super(); ownerDocument = owner; data = Objects.requireNonNull(text); setNodeName(TEXT_NODE_NAME); } @Override public String getNodeValue() { return data; } @Override public void appendData(final String da) { if(da!=null) setData(getData()+da); } @Override public String getData() { return data; } @Override 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; } @Override public void setData(final String data) { if(data!=null) this.data = data; } @Override public String getWholeText() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public boolean isElementContentWhitespace() { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Text replaceWholeText(final String content) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public Text splitText(final int offset) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void deleteData(final int offset, final int count) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void insertData(final int offset, final String arg) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public void replaceData(final int offset, final int count, final String arg) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } @Override public String substringData(final int offset, final int count) { throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); } } SVGTextElement.java000066400000000000000000000064001321075051700344150ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Defines the SVG tag text.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/05/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1 */ public class SVGTextElement extends SVGElement { /** * {@link SVGElement#SVGElement(Node, SVGElement)} * @param owner The owner document. */ public SVGTextElement(final SVGDocument owner) { super(owner); setNodeName(SVGElements.SVG_TEXT); } /** * {@link SVGElement#SVGElement(Node, SVGElement)} */ public SVGTextElement(final Node n, final SVGElement p) throws MalformedSVGDocument { super(n, p); } /** * @return The text of the SVG text element. * @since 0.1 */ public String getText() { final NodeList nl = getChildNodes(); int i; final int size = nl.getLength(); final StringBuilder buf = new StringBuilder(); for(i=0; i *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/16/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1
    */ public class SVGTransform { public static final int SVG_TRANSFORM_UNKNOWN = 0; public static final int SVG_TRANSFORM_MATRIX = 1; public static final int SVG_TRANSFORM_TRANSLATE = 2; public static final int SVG_TRANSFORM_SCALE = 3; public static final int SVG_TRANSFORM_ROTATE = 4; public static final int SVG_TRANSFORM_SKEWX = 5; public static final int SVG_TRANSFORM_SKEWY = 6; /** The type of the transformation. */ protected int type; /** The matrix of the transformation. */ protected SVGMatrix matrix; /** The angle of a possible rotation or skew. */ protected double angle; /** The possible rotation X-position. */ protected double cx; /** The possible rotation Y-position. */ protected double cy; /** * Creates a transformation with no type. */ public SVGTransform() { super(); type = SVG_TRANSFORM_UNKNOWN; matrix = new SVGMatrix(); angle = Double.NaN; cx = Double.NaN; cy = 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(final 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(final 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; final int lgth = code.length(); final int j; int k; if(code.startsWith(SVGAttributes.SVG_TRANSFORM_ROTATE)) { i = SVGAttributes.SVG_TRANSFORM_ROTATE.length(); j = code.indexOf(')'); int k1 = code.indexOf(' '); int 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.parseDouble(code.substring(i+1, j)), 0., 0.); else { final double cx2; final double cy2; final double rotAngle; rotAngle = Double.parseDouble(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(); cx2 = Double.parseDouble(code.substring(i, k)); cy2 = Double.parseDouble(code.substring(k+1, j)); setRotate(rotAngle, cx2, cy2); } } else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_SCALE)) { k = code.indexOf(','); i = SVGAttributes.SVG_TRANSFORM_SCALE.length(); j = code.indexOf(')'); final double sx; final double sy; if(i>=lgth || code.charAt(i)!='(' || j==-1) throw new IllegalArgumentException(); if(k==-1) k = code.indexOf(' '); if(k==-1) { final double val = Double.parseDouble(code.substring(i+1, j)); sx = val; sy = val; } else { sx = Double.parseDouble(code.substring(i+1, k)); sy = Double.parseDouble(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(')'); final double tx; final double ty; if(i>=lgth || code.charAt(i)!='(' || j==-1) throw new IllegalArgumentException(); if(k==-1) k = code.indexOf(' '); if(k==-1) { final double val = Double.parseDouble(code.substring(i+1, j)); tx = val; ty = val; } else { tx = Double.parseDouble(code.substring(i+1, k)); ty = Double.parseDouble(code.substring(k+1, j)); } setTranslate(tx, ty); } else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_MATRIX)) { final int nbPts = 6; int l; int k1; int k2; i = SVGAttributes.SVG_TRANSFORM_MATRIX.length(); j = code.indexOf(')'); final double[] coords = new double[nbPts]; if(i>=lgth || code.charAt(i)!='(' || j==-1) throw new IllegalArgumentException(); i++; for(l=0; l=lgth || code.charAt(i)!='(' || j==-1) throw new IllegalArgumentException(); setSkewX(Double.parseDouble(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.parseDouble(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(final double tx, final 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 The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param b The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param c The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param d The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param e The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @param f The values of the matrix: [a, c, e, b, d, f, 0, 0, 1]. * @since 0.1 */ public void setMatrix(final double a, final double b, final double c, final double d, final double e, final 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(final double sx, final 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(final double angle, final double cx, final double cy) { SVGMatrix m1 = new SVGMatrix(); final 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; this.cx = cx; this.cy = cy; } /** * The transformation will be a X skew. * @param angle The angle of the skew in degree. * @since 0.1 */ public void setSkewX(final 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(final 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 int 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; } /** * @return The rotation X-position or NaN is the transformation is not a rotation. * @since 3.0 */ public double getCx() { return cx; } /** * @return The rotation Y-position or NaN is the transformation is not a rotation. * @since 3.0 */ public double getCy() { return cy; } /** * Creates a translation. * @param x The tx. * @param y The ty. * @return The created translation. * @since 2.0.0 */ public static SVGTransform createTranslation(final double x, final double y) { final 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(final double angle, final double cx, final double cy) { final SVGTransform r = new SVGTransform(); r.setRotate(angle, cx, cy); return r; } /** * Tests if the given transformation cancels the calling one. * @param transform The transformation to test. * @return True if the given transformation cancels the calling one. * @since 3.0 */ public boolean cancels(final SVGTransform transform) { if(transform==null) return false; if(isTranslation()) return cancelsTranslation(transform); if(isRotation()) return cancelsRotation(transform); if(isScale()) return cancelsScale(transform); if(isXSkew()) return cancelsXSkew(transform); return isYSkew() && cancelsYSkew(transform); } /** * @param transform The transformation to test. * @return True: if the given transformation is a rotation that cancels the calling one. * @since 3.0 */ private boolean cancelsRotation(final SVGTransform transform) { return transform.isRotation() && LNumber.equalsDouble(-(getRotationAngle()%360), transform.getRotationAngle()%360) && LNumber.equalsDouble(getCx(), transform.getCx()) && LNumber.equalsDouble(getCy(), transform.getCy()); } /** * @param transform The transformation to test. * @return True: if the given transformation is a translation that cancels the calling one. * @since 3.0 */ private boolean cancelsTranslation(final SVGTransform transform) { return transform.isTranslation() && LNumber.equalsDouble(-getTX(), transform.getTX()) && LNumber.equalsDouble(-getTY(), transform.getTY()); } /** * @param transform The transformation to test. * @return True: if the given transformation is a scaling that cancels the calling one. * @since 3.0 */ private boolean cancelsScale(final SVGTransform transform) { return transform.isScale() && LNumber.equalsDouble(getXScaleFactor()*transform.getXScaleFactor(), 1.) && LNumber.equalsDouble(getYScaleFactor()*transform.getYScaleFactor(), 1.); } /** * @param transform The transformation to test. * @return True: if the given transformation is an X-skewing that cancels the calling one. * @since 3.0 */ private boolean cancelsXSkew(final SVGTransform transform) { throw new IllegalArgumentException("Not yet implemented"); //$NON-NLS-1$ } /** * @param transform The transformation to test. * @return True: if the given transformation is an Y-skewing that cancels the calling one. * @since 3.0 */ private boolean cancelsYSkew(final SVGTransform transform) { throw new IllegalArgumentException("Not yet implemented"); //$NON-NLS-1$ } @Override public String toString() { final StringBuilder code = new StringBuilder(); final SVGMatrix m = getMatrix(); switch(getType()) { case SVG_TRANSFORM_MATRIX: code.append(SVGAttributes.SVG_TRANSFORM_MATRIX).append('(').append(m).append(')'); break; case SVG_TRANSFORM_ROTATE: code.append(SVGAttributes.SVG_TRANSFORM_ROTATE).append('(').append(getRotationAngle()); if(!LNumber.equalsDouble(m.getE(), 0.) || !LNumber.equalsDouble(m.getF(), 0.)) code.append(' ').append(m.getE()).append(' ').append(m.getF()); code.append(')'); break; case SVG_TRANSFORM_SCALE: code.append(SVGAttributes.SVG_TRANSFORM_SCALE).append('(').append(getXScaleFactor()).append(' ').append(getYScaleFactor()).append(')'); break; case SVG_TRANSFORM_SKEWX: code.append(SVGAttributes.SVG_TRANSFORM_SKEW_X).append('(').append(getXSkewAngle()).append(')'); break; case SVG_TRANSFORM_SKEWY: code.append(SVGAttributes.SVG_TRANSFORM_SKEW_Y).append('(').append(getYSkewAngle()).append(')'); break; case SVG_TRANSFORM_TRANSLATE: code.append(SVGAttributes.SVG_TRANSFORM_TRANSLATE).append('(').append(getTX()).append(' ').append(getTY()).append(')'); break; } return code.toString(); } } SVGTransformList.java000066400000000000000000000070701321075051700347720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svgpackage net.sf.latexdraw.parsers.svg; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.regex.PatternSyntaxException; /** * Defines a list containing SVG transformations.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/16/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 0.1
    */ public class SVGTransformList extends ArrayList { 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(final String transformations) { this(); addTransformations(transformations); } @Override public String toString() { final StringBuilder builder = new StringBuilder(); for(final SVGTransform transform : this) builder.append(transform).append(' '); return builder.toString(); } /** * Add some transformations using a string containing the transformations. * @param transformations The set of SVG transformations. * @since 0.1 */ public void addTransformations(final 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$ final String[] trans = code.split("_");//$NON-NLS-1$ for(final String tran : trans) try { add(new SVGTransform(tran)); } catch (final IllegalArgumentException e) { /* */ } } catch(final 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 = get(0).getMatrix(); for(int i=1, size=size(); i *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 2.0.0 */ public abstract class AbstractSVGParser extends CodeParser { /** * The constructor. * @param code The path to parse. */ protected AbstractSVGParser(final String code) { super(code); } @Override public boolean isComment() { return false; } @Override public boolean isWSP() { final 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. */ public void skipWSPComma() { skipWSP(); if(getChar()==',') { nextChar(); skipWSP(); } } @Override public String skipComment() { return null; } } CSSStyleHandler.java000066400000000000000000000017061321075051700362310ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; /** * Defines the model of a CSS style handler.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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. */ void onCSSStyle(final String name, final String value); } CSSStyleParser.java000066400000000000000000000047131321075051700361110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.text.ParseException; import java.util.Objects; import net.sf.latexdraw.parsers.css.AbstractCSSParser; /** * Defines a parser that parses a SVG CSS style attribute.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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 csshandler The CSS style csshandler. * @throws IllegalArgumentException If the given csshandler is null. */ public CSSStyleParser(final String code, final CSSStyleHandler csshandler) { super(code); handler = Objects.requireNonNull(csshandler); } @Override public void parse() throws ParseException { final StringBuilder name = new StringBuilder(); final StringBuilder value = new StringBuilder(); 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 } } Graphics2D2SVG.java000066400000000000000000000461741321075051700356620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.awt.*; import java.awt.RenderingHints.Key; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.awt.geom.Path2D; import java.awt.image.BufferedImage; import java.awt.image.BufferedImageOp; import java.awt.image.ImageObserver; import java.awt.image.RenderedImage; import java.awt.image.renderable.RenderableImage; import java.text.AttributedCharacterIterator; import java.text.ParseException; import java.util.Map; import java.util.Objects; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGGElement; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.SVGTransform; import net.sf.latexdraw.parsers.svg.SVGTransformList; /** * This Graphics can be used to convert Java drawing (using Graphics2D) into SVG. * Instead of the classical Java Graphics2D, this graphics can be given as argument to * paint methods in order to create an SVG element.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/03/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class Graphics2D2SVG extends Graphics2D { /** The generated SVG G element. */ protected SVGGElement element; /** The SVG document used to created SVG elements. */ protected SVGDocument document; /** The current colour. Is null as the initialisation. */ protected Color currentColour; /** The current stroke. Is null as the initialisation. */ protected Stroke currentStroke; /** Corresponds to the last SVG path element created. Is used for optimisation. */ private SVGPathElement lastPathPainted; /** True if the last path was filled. Painted otherwise. Is used for optimisation. */ private boolean lastPathPaintedFilled; /** The list of the current transformations. Can be null. */ private SVGTransformList currentTransforms; /** * Creates the converter. * @param document The SVG document used to created SVG elements. * @since 3.0 */ public Graphics2D2SVG(final SVGDocument document) { super(); this.document = Objects.requireNonNull(document); element = new SVGGElement(document); } protected void clearLastPath() { lastPathPainted = null; } /** * Sets the current stroke, colour, etc. to the given SVG element. * @param elt The SVG element to set. * @since 3.0 */ protected void setShapeAttributes(final SVGElement elt, final boolean fill, final boolean draw) { if(draw) setShapeStroke(elt); if(fill) elt.setFill(currentColour); // TODO gradient, etc. if(currentTransforms!=null && !currentTransforms.isEmpty()) elt.setAttribute(SVGAttributes.SVG_TRANSFORM, currentTransforms.toString()); } /** * Sets the current stroke to the given SVG element. * @param elt The SVG element to set. * @since 3.0 */ protected void setShapeStroke(final SVGElement elt) { if(currentStroke instanceof BasicStroke) { final BasicStroke bs = (BasicStroke)currentStroke; setShapeLineCap(elt, bs.getEndCap()); setShapeLineJoin(elt, bs.getLineJoin()); elt.setStrokeWidth(bs.getLineWidth()); elt.setStrokeMiterLevel(bs.getMiterLimit()); elt.setStrokeDashOffset(bs.getDashPhase()); setShapeDash(elt, bs.getDashArray()); elt.setStroke(currentColour); } } /** * Sets the dashes of the given SVG element. * @param elt The element to set. * @param dashes The dashes to set. * @since 3.0 */ protected void setShapeDash(final SVGElement elt, final float[] dashes) { if(dashes!=null && dashes.length>0) { final StringBuilder sb = new StringBuilder(); sb.append(dashes[0]); for(int i=1; i hints) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void addRenderingHints(final Map hints) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public RenderingHints getRenderingHints() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void translate(final int x, final int y) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void translate(final double tx, final double ty) { clearLastPath(); addTransformation(SVGTransform.createTranslation(tx, ty)); } @Override public void rotate(final double theta) { clearLastPath(); rotate(theta, 0., 0.); } private void addTransformation(final SVGTransform transformation) { if(currentTransforms==null) currentTransforms = new SVGTransformList(); if(currentTransforms.isEmpty()) currentTransforms.add(transformation); else { final SVGTransform transformPrev = currentTransforms.get(currentTransforms.size()-1); if(transformPrev.cancels(transformation)) currentTransforms.remove(currentTransforms.size()-1); else currentTransforms.add(transformation); } } @Override public void rotate(final double theta, final double x, final double y) { clearLastPath(); addTransformation(SVGTransform.createRotation(Math.toDegrees(theta), x, y)); } @Override public void scale(final double sx, final double sy) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void shear(final double shx, final double shy) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void transform(final AffineTransform tx) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setTransform(final AffineTransform tx) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public AffineTransform getTransform() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Paint getPaint() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Composite getComposite() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setBackground(final Color color) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Color getBackground() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Stroke getStroke() { return currentStroke; } @Override public void clip(final Shape s) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public FontRenderContext getFontRenderContext() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Graphics create() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Color getColor() { return currentColour; } @Override public void setColor(final Color col) { if(col!=null) currentColour = col; } @Override public void setPaintMode() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setXORMode(final Color c1) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Font getFont() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setFont(final Font font) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public FontMetrics getFontMetrics(final Font f) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Rectangle getClipBounds() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void clipRect(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setClip(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public Shape getClip() { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void setClip(final Shape clip) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void copyArea(final int x, final int y, final int width, final int height, final int dx, final int dy) { // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawLine(final int x1, final int y1, final int x2, final int y2) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void fillRect(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void clearRect(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawRoundRect(final int x, final int y, final int width, final int height, final int arcWidth, final int arcHeight) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void fillRoundRect(final int x, final int y, final int width, final int height, final int arcWidth, final int arcHeight) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawOval(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void fillOval(final int x, final int y, final int width, final int height) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawArc(final int x, final int y, final int width, final int height, final int startAngle, final int arcAngle) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void fillArc(final int x, final int y, final int width, final int height, final int startAngle, final int arcAngle) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawPolyline(final int[] xPoints, final int[] yPoints, final int nPoints) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void drawPolygon(final int[] xPoints, final int[] yPoints, final int nPoints) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void fillPolygon(final int[] xPoints, final int[] yPoints, final int nPoints) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int x, final int y, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int x, final int y, final int width, final int height, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int x, final int y, final Color bgcolor, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int x, final int y, final int width, final int height, final Color bgcolor, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int dx1, final int dy1, final int dx2, final int dy2, final int sx1, final int sy1, final int sx2, final int sy2, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public boolean drawImage(final Image img, final int dx1, final int dy1, final int dx2, final int dy2, final int sx1, final int sy1, final int sx2, final int sy2, final Color bgcolor, final ImageObserver observer) { clearLastPath(); // TODO Auto-generated method stub throw new IllegalArgumentException(); } @Override public void dispose() { clearLastPath(); if(currentTransforms!=null) { currentTransforms.clear(); currentTransforms = null; } currentStroke = null; currentColour = null; element = null; document = null; } /** * @return the created SVG element after the painting. * @since 3.0 */ public SVGGElement getElement() { return element; } } Path2D2SVGPath.java000066400000000000000000000056041321075051700356240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.awt.geom.Path2D; import java.awt.geom.PathIterator; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGPathElement; import net.sf.latexdraw.parsers.svg.path.SVGPathSegClosePath; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoQuadratic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLineto; import net.sf.latexdraw.parsers.svg.path.SVGPathSegList; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; /** * Defines a parser parsing Java path2D to generate an SVG path element.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/02/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class Path2D2SVGPath extends Shape2D2SVG { /** * Creates the parser. * @param path The Path2D to parse. * @param document The SVG document that will be used to create SVG elements. * @throws IllegalArgumentException If one of the given parameters is null. * @since 3.0 */ public Path2D2SVGPath(final Path2D path, final SVGDocument document) { super(path, document); } @SuppressWarnings("nls") @Override public void parse() throws ParseException { final PathIterator pi = shape.getPathIterator(null); final double[] coords = new double[6]; final SVGPathSegList list = new SVGPathSegList(); element = new SVGPathElement(document); while(!pi.isDone()) { switch(pi.currentSegment(coords)) { case PathIterator.SEG_CLOSE : list.add(new SVGPathSegClosePath()); break; case PathIterator.SEG_LINETO: list.add(new SVGPathSegLineto(coords[0], coords[1], false)); break; case PathIterator.SEG_MOVETO: list.add(new SVGPathSegMoveto(coords[0], coords[1], false)); break; case PathIterator.SEG_CUBICTO: list.add(new SVGPathSegCurvetoCubic(coords[4], coords[5], coords[0], coords[1], coords[2], coords[3], false)); break; case PathIterator.SEG_QUADTO: list.add(new SVGPathSegCurvetoQuadratic(coords[2], coords[3], coords[0], coords[1], false)); break; default: throw new ParseException("Invalid Path2D element:" + pi.currentSegment(coords), -1); } pi.next(); } element.setAttribute(SVGAttributes.SVG_D, list.toString()); list.clear(); // Freeing the memory. } } SVGLength.java000066400000000000000000000042251321075051700350620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; /** * Defines an SVG length implementation.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGLength { public 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). */ public SVGLength(final double value, final LengthType lengthType, final String valueAsString) { super(); if (lengthType == null || valueAsString == null) throw new IllegalArgumentException(); try { Double.valueOf(valueAsString); } catch (final NumberFormatException e) { throw new IllegalArgumentException(); } this.value = value; this.lengthType = lengthType; this.valueAsString = valueAsString; } /** * @return the value */ public double getValue() { return value; } /** * @return the lengthType */ public LengthType getLengthType() { return lengthType; } /** * @return the valueAsString */ public String getValueAsString() { return valueAsString; } } SVGLengthParser.java000066400000000000000000000157351321075051700362470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLength.LengthType; /** * Defines a parser that parses SVG length code.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGLengthParser extends SVGNumberParser { /** * Describes textual value for the font-size attribute. */ public enum FontSize { XXSMALL { @Override public float getPointValue() { return XSMALL.getPointValue()/SCALING_FACTOR; } @Override public String getToken() { return "xx-small"; //$NON-NLS-1$ } }, XSMALL { @Override public float getPointValue() { return SMALL.getPointValue()/SCALING_FACTOR; } @Override public String getToken() { return "x-small"; //$NON-NLS-1$ } }, SMALL { @Override public float getPointValue() { return MEDIUM.getPointValue()/SCALING_FACTOR; } @Override public String getToken() { return "small"; //$NON-NLS-1$ } }, MEDIUM { @Override public float getPointValue() { return 12f; } @Override public String getToken() { return "medium"; //$NON-NLS-1$ } }, LARGE { @Override public float getPointValue() { return MEDIUM.getPointValue()*SCALING_FACTOR; } @Override public String getToken() { return "large"; //$NON-NLS-1$ } }, XLARGE { @Override public float getPointValue() { return LARGE.getPointValue()*SCALING_FACTOR; } @Override public String getToken() { return "x-large"; //$NON-NLS-1$ } }, XXLARGE { @Override public float getPointValue() { return XLARGE.getPointValue()*SCALING_FACTOR; } @Override public String getToken() { return "xx-large"; //$NON-NLS-1$ } }; /** * @return The value in point of the token. */ public abstract float getPointValue(); /** * @return The token of the current font-size used in SVG documents. */ public abstract String getToken(); /** * @param token The token to test. * @return The value in point of the font-size given as argument, or -1 * if 'token' is not valid. */ public static float getFontSize(final String token) { if(token==null) return -1f; if(token.equals(XXSMALL.getToken())) return XXSMALL.getPointValue(); if(token.equals(XSMALL.getToken())) return XSMALL.getPointValue(); if(token.equals(SMALL.getToken())) return SMALL.getPointValue(); if(token.equals(MEDIUM.getToken())) return MEDIUM.getPointValue(); if(token.equals(LARGE.getToken())) return LARGE.getPointValue(); if(token.equals(XLARGE.getToken())) return XLARGE.getPointValue(); if(token.equals(XXLARGE.getToken())) return XXLARGE.getPointValue(); return -1f; } public static final float SCALING_FACTOR=1.2f; } /** * Converts the font-size string value in point value. * @param fontSize The font-size value to convert. * @return the font-size value in point, or -1 if a * problem occurs. */ public static float fontSizetoPoint(final String fontSize) { if(fontSize==null) return -1f; float value; try { value = Double.valueOf(fontSize).floatValue(); }catch(final NumberFormatException e) { try { final SVGLength lgth = new SVGLengthParser(fontSize).parseLength(); value = (float)UnitProcessor.INSTANCE.toPoint(lgth.getValue(), lgth.getLengthType()); } catch(final ParseException ex) { value = FontSize.getFontSize(fontSize); } } return value; } /** * The constructor. * @param code The code to parse. */ public SVGLengthParser(final String code) { super(code); } /** * Parses an SVG length. * @return An SVGLength. The length is always converted in PX. * @throws ParseException If a problem occurs or if not managed unit are parsed (%, em and ex). */ public SVGLength parseLength() throws ParseException { final double value = parseNumber(false); final LengthType lgthType; final String errorUnit = "Invalid unit";//$NON-NLS-1$ final String valueAsStr; setPosition(0); valueAsStr = parseNumberAsString(false); skipWSP(); switch(getChar()) { case EOC: lgthType = LengthType.NUMBER; break; case 'p': switch(nextChar()) { case 't': lgthType = LengthType.PT; break; case 'x': lgthType = LengthType.PX; break; case 'c': lgthType = LengthType.PC; break; case EOC: default: throw new ParseException(errorUnit, getPosition()); } 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: 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()); } default: throw new ParseException(errorUnit, getPosition()); } return new SVGLength(UnitProcessor.INSTANCE.toUserUnit(value, lgthType), LengthType.PX, valueAsStr); } /** * Parses an SVG coordinate. * @return An SVGLength. * @throws ParseException If a problem occurs or if not managed unit are parsed (%, em and ex). */ 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. */ public SVGLength parseNumberOrPercent() throws ParseException { final double value = parseNumber(false); final LengthType type; final String valueAsStr; setPosition(0); valueAsStr = parseNumberAsString(false); skipWSP(); switch(getChar()) { case '%': throw new ParseException("Not yet managed: %", getPosition());//$NON-NLS-1$ case EOC: default: type = LengthType.NUMBER; break; } return new SVGLength(UnitProcessor.INSTANCE.toUserUnit(value, type), type, valueAsStr); } } SVGNumberParser.java000066400000000000000000000073161321075051700362520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.text.ParseException; /** * Defines a SVG number parser.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGNumberParser extends AbstractSVGParser { /** * The constructor. * @param code The code to parse. */ public SVGNumberParser(final 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(); final int c = getChar(); if(c=='0' || c=='1') { nextChar(); return c == '1'; } 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 unsigned is true. */ public String parseNumberAsString(final boolean unsigned) throws ParseException { boolean again = true; int c; final int 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.parseDouble(getCode().substring(start, getPosition())); } catch(final 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 unsigned is true. */ public double parseNumber(final boolean unsigned) throws ParseException { final String number = parseNumberAsString(unsigned); try { return Double.parseDouble(number); } catch(final 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. */ protected boolean isNumber(final boolean unsigned) { final 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. } } SVGPathParser.java000066400000000000000000000237611321075051700357200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import net.sf.latexdraw.parsers.svg.path.*; import java.text.ParseException; /** * Defines an SVGPath parser.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 * @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(final String code, final 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(getChar()=='m'); 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(final boolean isRelative) throws ParseException { double x; double y; double x2; double 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)); } } /** * Parses an SVGPath closepath. */ 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. */ protected void parseHorizontalLineto(final 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. */ protected void parseVerticalLineto(final 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. */ protected void parseEllipticalArcto(final boolean isRelative) throws ParseException { double x; double y; double rx; double ry; double angle; boolean laf; boolean 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. */ protected void parseCurveto(final boolean isRelative) throws ParseException { double x; double y; double x1; double x2; double y1; double 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. */ protected void parseQuadraticBezierCurveto(final boolean isRelative) throws ParseException { double x; double y; double x1; double 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. */ protected void parseShorthandQuadraticBezierCurveto(final boolean isRelative) throws ParseException { double x; double 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. */ protected void parseLineto(final boolean isRelative) throws ParseException { double x; double 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. */ protected void parseMoveto(final boolean isRelative) throws ParseException { double x; double 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)); } } } SVGPointsParser.java000066400000000000000000000071171321075051700362750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.awt.geom.Point2D; import java.text.ParseException; import java.util.ArrayList; import java.util.List; /** * Defines a parser that parses points from polygons and polylines.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/04/08
    * @author Arnaud BLOUIN * @version 3.0 * @since 2.0.3 */ public class SVGPointsParser extends AbstractSVGParser { /** The parsed points. */ protected List 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(final String code) { super(code); points = new ArrayList<>(); } /** * 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 List getPoints(final String code) { try { final SVGPointsParser pp = new SVGPointsParser(code); pp.parse(); return pp.getPoints(); } catch(final Exception e) { return null; } } @Override public void parse() throws ParseException { double c1; double 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 { final double n; final boolean isNegative; boolean isFractional = false; boolean isFloating = false; final StringBuilder strn = new StringBuilder(); 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()); //$NON-NLS-1$ isFractional = true; break; case 'e': case 'E': if(isFloating) throw new ParseException("An unexpected exponantial token was read: "+getCode(), getPosition()); //$NON-NLS-1$ isFloating = true; break; case '-': case '+': if(!isFloating) throw new ParseException("An unexpected sign was read: "+getCode(), getPosition()); //$NON-NLS-1$ break; default: throw new ParseException("The following character is not authorised:" + (char)getChar(), getPosition()); //$NON-NLS-1$ } strn.append((char)getChar()); nextChar(); } try { n = Double.parseDouble(strn.toString()); } catch(final Exception e) { throw new ParseException("Not able to parse to given number:" + strn, getPosition()); } //$NON-NLS-1$ return isNegative ? n*-1 : n; } /** * @return The points. * @since 2.0.3 */ public List getPoints() { return points; } } Shape2D2SVG.java000066400000000000000000000042621321075051700351520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.awt.Shape; import java.util.Objects; import net.sf.latexdraw.parsers.Parser; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; /** * This abstract converter converts a Java Shape into an SVG element.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 08/03/11
    * @author Arnaud BLOUIN * @version 3.0 * @param The type of the shape to convert. * @param The type of the SVG element to create. */ public abstract class Shape2D2SVG implements Parser { /** The Java shape to convert. */ protected S shape; /** The generated SVG element. */ protected T element; /** The SVG document that will be used to create SVG elements. */ protected SVGDocument document; /** * Creates the converter. * @param shape The shape to convert. * @param document The document used to create SVG elements. * @since 3.0 */ protected Shape2D2SVG(final S shape, final SVGDocument document) { super(); this.document = Objects.requireNonNull(document); this.shape = Objects.requireNonNull(shape); } /** * @return The generated SVG element. * @since 3.0 */ public T getSVGElement() { return element; } /** * Sets the SVG document that will be used to create SVG elements. * @param document The new SVG document. * @since 3.0 */ public void setDocument(final SVGDocument document) { if(document!=null) this.document = document; } /** * @param shape The shape to convert. Must not be null. * @since 3.0 */ public void setShape(final S shape) { if(shape!=null) this.shape = shape; } } URIReferenceParser.java000066400000000000000000000034761321075051700367230ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import java.text.ParseException; /** * Defines a parser that parses URI references.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/21/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class URIReferenceParser extends AbstractSVGParser { /** The parsed URI. */ protected String uri; /** * Creates a parser. * @param code The code to parse. */ public URIReferenceParser(final 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)") */ public String getURI() { skipWSP(); final StringBuilder buf = new StringBuilder(); if(getChar()=='u' && nextChar()=='r' && nextChar()=='l' && nextChar()=='(') { nextChar(); skipWSP(); if(getChar()=='#') { while(nextChar()!=')' && !isEOC()) buf.append((char)getChar()); if(getChar()!=')' && buf.length()>0) buf.delete(0, buf.length()); } } return buf.toString(); } @Override public void parse() throws ParseException { uri = getURI(); } /** * @return The parsed URI. * @since 2.0.3 */ public String getUri() { return uri; } } UnitProcessor.java000066400000000000000000000051531321075051700361010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/parserspackage net.sf.latexdraw.parsers.svg.parsers; import net.sf.latexdraw.parsers.svg.parsers.SVGLength.LengthType; /** * This processor manages and transforms value in different units.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/24/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class UnitProcessor { /** The singleton. */ public static final UnitProcessor INSTANCE = new UnitProcessor(); private UnitProcessor() { super(); } /** * Transforms a value in point 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 point. * @throws IllegalArgumentException If the given length type is not valid or not managed. */ public double toPoint(final double value, final LengthType lgthType) { if(lgthType==null) throw new IllegalArgumentException(); if(lgthType==LengthType.PT) return value; return toUserUnit(value, lgthType)/1.25; } /** * 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. */ public double toUserUnit(final double value, final LengthType lgthType) { if(lgthType==null) throw new IllegalArgumentException(); final 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; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/path/000077500000000000000000000000001321075051700317475ustar00rootroot00000000000000CtrlPointsSeg.java000066400000000000000000000022111321075051700352670ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/path/* * This file is part of LaTeXDraw. * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; /** * Defines an interface for segments that have a main control point. * Created by Arnaud Blouin on 22/07/16. */ public interface CtrlPointsSeg extends PointSeg { /** * @return The first control point * @throws IllegalArgumentException If the previous point is null while the segment is relative. */ Point2D getCtrl1(final Point2D prevPoint); /** * @return The second control point * @throws IllegalArgumentException If the previous point is null while the segment is relative. */ Point2D getCtrl2(final Point2D prevPoint); } PointSeg.java000066400000000000000000000016551321075051700342720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/path/* * This file is part of LaTeXDraw. * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; /** * Defines an interface for segments that have a point. * Created by Arnaud Blouin on 22/07/16. */ public interface PointSeg { /** * @return The position of the segment. * @throws IllegalArgumentException If the previous point is null while the segment is relative. */ Point2D getPoint(final Point2D prevPoint); } SVGPathHandler.java000066400000000000000000000016431321075051700353110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the model of a SVGPath handler.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public interface SVGPathHandler { /** * Actions to do when a SVGPath is parsed and created. * @param pathSeg The parsed SVGPath. * @since 2.0 */ void onPathSeg(final SVGPathSeg pathSeg); } SVGPathPointSeg.java000066400000000000000000000041311321075051700354570ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/path/* * This file is part of LaTeXDraw. * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; /** * Defines a path segment composed of 2D coordinates.
    * @author Arnaud BLOUIN */ public abstract class SVGPathPointSeg extends SVGPathSeg implements PointSeg { /** The X-coordinate of the segment. */ protected double x; /** The Y-coordinate of the segment. */ protected double y; /** * The main constructor. * @param isrel True: the path segment is relative, false it is absolute. */ protected SVGPathPointSeg(final boolean isrel, final double xcoord, final double ycoord) { super(isrel); x = xcoord; y = ycoord; } /** * @return the x. */ public double getX() { return x; } /** * @return the y. */ public double getY() { return y; } @Override public Point2D getPoint(final Point2D prevPoint) { return getPoint(x, y, prevPoint, isRelative); } /** * Creates a point from the SVG information. * @param x The X-coordinate of the point. * @param y The Y-coordinate of the point. * @param prevPt The previous point of the path. May be null is the point is not relative. * @param isRelative Defines whether the point is relative. * @return The point converted or not according to isRelative. */ public static Point2D getPoint(final double x, final double y, final Point2D prevPt, final boolean isRelative) { if(isRelative) { if(prevPt==null) throw new IllegalArgumentException("The path is relative but the given previous point is null."); return new Point2D.Double(prevPt.getX()+x, prevPt.getY()+y); } return new Point2D.Double(x, y); } } SVGPathSeg.java000066400000000000000000000025551321075051700344550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines a model for the SVGPath segments.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class SVGPathSeg { /** Defines if the segment path is relative or absolute. @since 2.0 */ protected boolean isRelative; /** * The main constructor. * @param isRelative True: the path segment is relative, false it is absolute. * @since 2.0 */ protected SVGPathSeg(final boolean isRelative) { super(); this.isRelative = isRelative; } /** * @return the isRelative. * @since 2.0 */ public boolean isRelative() { return isRelative; } /** * @param isRelative the isRelative to set. * @since 2.0 */ public void setRelative(final boolean isRelative) { this.isRelative = isRelative; } } SVGPathSegArc.java000066400000000000000000000125011321075051700350730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Arc2D; /** * Defines the SVGPath arc segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegArc extends SVGPathPointSeg { /** The x radius of the arc. @since 2.0 */ protected double rx; /** The y radius of the arc. @since 2.0 */ protected double ry; /** The x-axis rotation angle. @since 2.0 */ protected double angle; /** The value of the large-arc-flag parameter. */ protected boolean largeArcFlag; /** The value of the sweep-flag parameter. */ 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. * @param largeArcFlag The value of the large-arc-flag parameter. * @param sweepFlag The value of the sweep-flag parameter. */ public SVGPathSegArc(final double x, final double y, final double rx, final double ry, final double angle, final boolean largeArcFlag, final boolean sweepFlag, final boolean isRelative) { super(isRelative, x, 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 2.0 */ public Arc2D getArc2D(final double x0, final double y0) { double a = getAngle(); double rx2 = getRX(); double ry2 = getRY(); final double x2 = getX(); final double y2 = getY(); final boolean laf = isLargeArcFlag(); final boolean sf = isSweepFlag(); final double dx2 = (x0-x2)/2.; final double dy2 = (y0-y2)/2.; a = Math.toRadians(a%360.); // Step 1: Compute (x1', y1') final double x1 = Math.cos(a)*dx2 + Math.sin(a)*dy2; final double y1 = -Math.sin(a)*dx2 + Math.cos(a)*dy2; // Ensure radii are large enough rx2 = Math.abs(rx2); ry2 = Math.abs(ry2); double prx = rx2*rx2; double pry = ry2*ry2; final double px1 = x1*x1; final double py1 = y1*y1; final double radiiCheck = px1/prx + py1/pry; if(radiiCheck>1) { rx2 = Math.sqrt(radiiCheck) * rx2; ry2 = Math.sqrt(radiiCheck) * ry2; prx = rx2 * rx2; pry = ry2 * ry2; } // 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; final double coef = sign * Math.sqrt(sq); final double cx1 = coef * (rx2 * y1 / ry2); final double cy1 = coef * -(ry2 * x1 / rx2); // Step 3: Compute (cx, cy) from (cx1, cy1) final double sx2 = (x0+x2)/2.; final double sy2 = (y0+y2)/2.; final double cx = sx2 + (Math.cos(a) * cx1 - Math.sin(a) * cy1); final double cy = sy2 + (Math.sin(a) * cx1 + Math.cos(a) * cy1); // Step 4: Compute the angleStart (angle1) and the angleExtent (dangle) final double ux = (x1 - cx1) / rx2; final double uy = (y1 - cy1) / ry2; final double vx = (-x1 - cx1) / rx2; final double vy = (-y1 - cy1) / ry2; double p = ux; double n = Math.sqrt(ux * ux + uy * uy); sign = uy < 0 ? -1. : 1.; final 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-rx2, cy-ry2, rx2*2., ry2*2., -angleStart%360., -angleExtent%360., Arc2D.OPEN); } /** * @return the rx. * @since 2.0 */ public double getRX() { return rx; } /** * @return the ry. * @since 2.0 */ public double getRY() { return ry; } /** * @return the angle. * @since 2.0 */ public double getAngle() { return angle; } /** * @return the largeArcFlag. * @since 2.0 */ public boolean isLargeArcFlag() { return largeArcFlag; } /** * @return the sweepFlag. * @since 2.0 */ public boolean isSweepFlag() { return sweepFlag; } @Override public String toString() { return String.valueOf(isRelative() ? 'a' : 'A') + ' ' + rx + ' ' + ry + ' ' + angle + ' ' + (largeArcFlag ? '1' : '0') + ' ' + (sweepFlag ? '1' : '0') + ' ' + x + ' ' + y; } } SVGPathSegClosePath.java000066400000000000000000000016711321075051700362560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath closepath segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegClosePath extends SVGPathSeg { /** * The constructor. * @since 2.0 */ public SVGPathSegClosePath() { super(true); } @Override public String toString() { return "z";//$NON-NLS-1$ } } SVGPathSegCurvetoCubic.java000066400000000000000000000044471321075051700367750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; /** * Defines the SVGPath curveto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegCurvetoCubic extends SVGPathPointSeg implements CtrlPointsSeg { /** The x-coordinate of the first control point. @since 2.0 */ protected double x1; /** The y-coordinate of the first control point. @since 2.0 */ protected double y1; /** The x-coordinate of the second control point. @since 2.0 */ protected double x2; /** The y-coordinate of the second control point. @since 2.0 */ 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(final double x, final double y, final double x1, final double y1, final double x2, final double y2, final boolean isRelative) { super(isRelative, x, y); this.x1 = x1; this.x2 = x2; this.y1 = y1; this.y2 = y2; } @Override public String toString() { return String.valueOf(isRelative() ? 'c' : 'C') + ' ' + x1 + ' ' + y1 + ' ' + x2 + ' ' + y2 + ' ' + x + ' ' + y; } @Override public Point2D getCtrl1(final Point2D prevPoint) { return getPoint(x1, y1, prevPoint, isRelative); } @Override public Point2D getCtrl2(final Point2D prevPoint) { return getPoint(x2, y2, prevPoint, isRelative); } } SVGPathSegCurvetoCubicSmooth.java000066400000000000000000000036431321075051700401640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; /** * Defines the SVGPath smooth curveto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegCurvetoCubicSmooth extends SVGPathPointSeg implements CtrlPointsSeg { /** The x-coordinate of the second control point. @since 2.0 */ protected double x2; /** The y-coordinate of the second control point. @since 2.0 */ 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(final double x, final double y, final double x2, final double y2, final boolean isRelative) { super(isRelative, x, y); this.x2 = x2; this.y2 = y2; } @Override public String toString() { return String.valueOf(isRelative() ? 's' : 'S') + ' ' + x2 + ' ' + y2 + ' ' + x + ' ' + y; } @Override public Point2D getCtrl2(final Point2D prevPoint) { return getPoint(x2, y2, prevPoint, isRelative); } @Override public Point2D getCtrl1(final Point2D prevPoint) { return prevPoint; } } SVGPathSegCurvetoQuadratic.java000066400000000000000000000035111321075051700376540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath quadratic curveto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegCurvetoQuadratic extends SVGPathPointSeg { /** The x-coordinate of the first control point. @since 2.0 */ protected double x1; /** The y-coordinate of the first control point. @since 2.0 */ 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(final double x, final double y, final double x1, final double y1, final boolean isRelative) { super(isRelative, x, y); this.x1 = x1; this.y1 = y1; } @Override public String toString() { return String.valueOf(isRelative() ? 'q' : 'Q') + ' ' + x1 + ' ' + y1 + ' ' + x + ' ' + y; } /** * @return the x1. * @since 2.0 */ public double getX1() { return x1; } /** * @return the y1. * @since 2.0 */ public double getY1() { return y1; } } SVGPathSegCurvetoQuadraticSmooth.java000066400000000000000000000024561321075051700410550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath quadratic smooth curveto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegCurvetoQuadraticSmooth extends SVGPathPointSeg { /** * 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(final double x, final double y, final boolean isRelative) { super(isRelative, x, y); } @Override public String toString() { return String.valueOf(isRelative() ? 't' : 'T') + ' ' + x + ' ' + y; } } SVGPathSegLineto.java000066400000000000000000000023241321075051700356220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/path/* * This file is part of LaTeXDraw. * Copyright (c) 2005-2016 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath lineto segment.
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegLineto extends SVGPathPointSeg { /** * 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(final double x, final double y, final boolean isRelative) { super(isRelative, x, y); } @Override public String toString() { return String.valueOf(isRelative() ? 'l' : 'L') + ' ' + x + ' ' + y; } } SVGPathSegLinetoHorizontal.java000066400000000000000000000023721321075051700376770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath horizontal lineto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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(final double x, final boolean isRelative) { super(x, x, isRelative); } @Override public String toString() { return String.valueOf(isRelative() ? 'h' : 'H') + ' ' + x; } @Override public double getY() { return getX(); } } SVGPathSegLinetoVertical.java000066400000000000000000000023651321075051700373210ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath vertical lineto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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(final double y, final boolean isRelative) { super(y, y, isRelative); } @Override public String toString() { return String.valueOf(isRelative() ? 'v' : 'V') + ' ' + y; } @Override public double getX() { return getY(); } } SVGPathSegList.java000066400000000000000000000034101321075051700353000ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; import java.awt.geom.Point2D; import java.util.ArrayList; /** * Defines a list of SVGPath segments.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ public class SVGPathSegList extends ArrayList implements SVGPathHandler { private static final long serialVersionUID = 1L; @Override public String toString() { final StringBuilder path = new StringBuilder(); for(final SVGPathSeg seg : this) if(seg!=null) { path.append(seg); path.append(' '); } return path.toString(); } @Override public void onPathSeg(final SVGPathSeg pathSeg) { if(pathSeg!=null) add(pathSeg); } /** * 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(final int pos) { if(pos<0 || pos>=size()) return null; SVGPathSegMoveto m=null; while(m==null && pos>0) if(!get(pos).isRelative() && get(pos) instanceof SVGPathSegMoveto) m = (SVGPathSegMoveto)get(pos); if(m==null) return null; return new Point2D.Double(m.getX(), m.getY()); } } SVGPathSegMoveto.java000066400000000000000000000022331321075051700356400ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/parsers/svg/pathpackage net.sf.latexdraw.parsers.svg.path; /** * Defines the SVGPath moveto segment.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 10/20/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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(final double x, final double y, final boolean isRelative) { super(x, y, isRelative); } @Override public String toString() { return String.valueOf(isRelative() ? 'm' : 'M') + ' ' + x + ' ' + y; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/000077500000000000000000000000001321075051700271525ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/CloseButton.java000077500000000000000000000030571321075051700322660ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Dimension; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.widget.MButton; /** * This class defines a button which allows the user to close a window
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/21/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class CloseButton extends MButton { private static final long serialVersionUID = 1L; /** 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 constructor by default. */ public CloseButton() { super(); final Dimension dim = new Dimension(ICON_WIDTH, ICON_HEIGHT); setSize(ICON_WIDTH, ICON_HEIGHT); setPreferredSize(dim); setMinimumSize(dim); setMaximumSize(dim); setIcon(LResources.BUTTON_CLOSE_OUT_ICON); setRolloverIcon(LResources.BUTTON_CLOSE_IN_ICON); setToolTipText(LangTool.INSTANCE.getStringOthers("CloseButton.closePanel")); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/DisplayCanvas.java000077500000000000000000000030621321075051700325620ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Image; import java.util.Objects; /** * Allows to display a given image in a panel(canvas).
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/20/06
    * @author Arnaud BLOUIN * @version 3.0 */ public class DisplayCanvas extends Canvas { private static final long serialVersionUID = 1L; /** The image to display */ protected Image image; /** * The constructor by default * @param img The image to display * @throws IllegalArgumentException If the given image is null. */ public DisplayCanvas(final Image img) { super(); image = Objects.requireNonNull(img); prepareImage(image, this); setPreferredSize(new Dimension(image.getWidth(this), image.getHeight(this))); } @Override public void paint(final Graphics g) { g.drawImage(image, (int)Math.max(0,(getWidth()-image.getWidth(null))/2.), 0, this); } /** * Flushes the image. * @since 3.0 */ public void flush() { image.flush(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/LCodePanel.java000066400000000000000000000060631321075051700317700ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.BorderLayout; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.views.pst.PSTCodeGenerator; import net.sf.latexdraw.glib.views.synchroniser.ViewsSynchroniserHandler; import org.malai.presentation.ConcretePresentation; import org.malai.swing.widget.MEditorPane; import org.malai.swing.widget.MPanel; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Defines the panel which contains the code generated from the drawing.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/20/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class LCodePanel extends MPanel implements ConcretePresentation { private static final long serialVersionUID = 1L; /** The editor that contains the code. */ protected MEditorPane editorPane; /** The PSTricks generator. */ protected PSTCodeGenerator pstGenerator; /** * Creates the code panel. * @param drawing The drawing to transform in code. * @param viewsHandler the handler that provides information to a views synchroniser * @throws IllegalArgumentException If the given drawing is null. * @since 3.0 */ public LCodePanel(final IDrawing drawing, final ViewsSynchroniserHandler viewsHandler) { super(false, true); if(drawing==null) throw new IllegalArgumentException(); editorPane = new MEditorPane(true, false); editorPane.setEditable(false); editorPane.setDragEnabled(true); setLayout(new BorderLayout()); add(editorPane.getScrollpane(), BorderLayout.CENTER); pstGenerator = new PSTCodeGenerator(drawing, viewsHandler, true, true); } @Override public void setVisible(final boolean show) { super.setVisible(show); if(show) update(); } /** * @return the PST code generator of the code panel. * @since 3.0 */ public PSTCodeGenerator getPstGenerator() { return pstGenerator; } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { // TODO Auto-generated method stub } @Override public void load(final boolean generalPreferences, final String nsURI, final Element meta) { // TODO Auto-generated method stub } @Override public void update() { if(isVisible()) { pstGenerator.updateFull(); editorPane.setText(pstGenerator.getCache().toString()); } } @Override public void setModified(final boolean modified) { pstGenerator.setModified(modified); } @Override public boolean isModified() { return pstGenerator.isModified(); } @Override public void reinit() { update(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/LFrame.java000066400000000000000000000435271321075051700311760ustar00rootroot00000000000000package net.sf.latexdraw.ui; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.ui.LCanvas; import net.sf.latexdraw.glib.views.pst.PSTCodeGenerator; import net.sf.latexdraw.instruments.*; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.mapping.*; import net.sf.latexdraw.util.LNamespace; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.VersionChecker; import org.malai.instrument.Instrument; import org.malai.mapping.MappingRegistry; import org.malai.presentation.Presentation; import org.malai.swing.instrument.library.Scroller; import org.malai.swing.instrument.library.UndoRedoManager; import org.malai.swing.instrument.library.WidgetZoomer; import org.malai.swing.ui.SwingUI; import org.malai.swing.ui.UIManager; import org.malai.swing.widget.MLayeredPane; import org.malai.swing.widget.MProgressBar; import org.malai.swing.widget.MTabbedPane; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.swing.*; import java.awt.*; /** * This class contains all the elements of the graphical user interface.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 03/11/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class LFrame extends SwingUI { private static final long serialVersionUID = 1L; /** The instrument used to select, move, etc. shapes. */ protected Hand hand; /** The instrument used to draw shapes. */ protected Pencil pencil; /** The instrument used to add and modify texts. */ protected TextSetter textSetter; /** The instrument used to select/activate the hand, the pencil, or any of the editing instruments. */ protected EditingSelector editingSelector; /** This instrument manages the instruments that customise shapes and the pencil. */ protected MetaShapeCustomiser metaShapeCustomiser; /** The instrument that manages undo/redo actions. */ protected UndoRedoManager undoManager; /** The instrument that zoomes in/out the canvas. */ protected WidgetZoomer zoomer; /** The scroller used to scroll the canvas. */ protected Scroller scroller; /** The instrument that saves and loads SVG documents. */ protected FileLoaderSaver fileLoader; /** The instrument that (des-)activates the scale rulers. */ protected ScaleRulersCustomiser scaleRulersCustomiser; /** The instrument that manages help features. */ protected Helper helper; /** The instrument that exports drawings as picture or code. */ protected Exporter exporter; /** The instrument allows to see exceptions. */ protected ExceptionsManager exceptionsManager; /** The instrument that activates the preferences setter. */ protected PreferencesActivator prefActivator; /** The instrument that sets the preferences. */ protected PreferencesSetter prefSetters; /** The instrument that removes shapes. */ protected ShapeDeleter deleter; /** The status-bar of the frame. */ protected JLabel statusBar; /** The ruler used to display X-dimensions. */ protected XScaleRuler xScaleRuler; /** The ruler used to display X-dimensions. */ protected YScaleRuler yScaleRuler; /** The instrument that customises the magnetic grid. */ protected MagneticGridCustomiser gridCustomiser; /** The instrument that customises the properties of the drawing. */ protected DrawingPropertiesCustomiser drawingPropCustomiser; /** The instrument that copies, cuts and pastes selected shapes. */ protected CopierCutterPaster paster; /** The instrument that selects the current tab. */ protected TabSelector tabSelector; /** The instrument that manages the templates. */ protected TemplateManager templateManager; /** The instrument that converts PST code into shapes. */ protected CodeInserter codeInserter; /** The layered panel used to display widgets upon shapes (e.g. text setters). */ protected MLayeredPane layeredPanel; /** The panel that contains the tabs of the app. */ protected MTabbedPane tabbedPanel; /** * Creates and initialises the frame. * @param progressBar The progress bar used to show the progression of the construction of the frame. Can be null. * @since 3.0 */ public LFrame(final MProgressBar progressBar) { super(); composer = new UIBuilder(this); buildFrame(progressBar); } /** * The builder of the frame. * @since 3.0 */ private void buildFrame(final MProgressBar progressBar) { final LCanvas canvas = getCanvas(); final IDrawing drawing = getDrawing(); tabbedPanel = new MTabbedPane(true); layeredPanel = new MLayeredPane(false, false); layeredPanel.add(canvas.getScrollpane(), JLayeredPane.DEFAULT_LAYER); layeredPanel.addComponentsToResize(canvas.getScrollpane()); if(progressBar!=null) progressBar.addToProgressBar(5); /* Creation of the rulers. */ yScaleRuler = new YScaleRuler(canvas); xScaleRuler = new XScaleRuler(canvas, yScaleRuler); if(progressBar!=null) progressBar.addToProgressBar(5); /* Initialisation of the mapping between the model and the canvas. */ MappingRegistry.REGISTRY.addMapping(new ShapeList2ViewListMapping(drawing.getShapes(), canvas.getViews(), canvas.getBorderInstrument())); MappingRegistry.REGISTRY.addMapping(new Drawing2CanvasMapping(drawing, canvas)); MappingRegistry.REGISTRY.addMapping(new Selection2BorderMapping(drawing.getSelection().getShapes(), canvas.getBorderInstrument())); MappingRegistry.REGISTRY.addMapping(new Zoom2ScaleRuler(canvas.getZoomUnary(), xScaleRuler)); MappingRegistry.REGISTRY.addMapping(new Zoom2ScaleRuler(canvas.getZoomUnary(), yScaleRuler)); MappingRegistry.REGISTRY.addMapping(new Unit2ScaleRuler(ScaleRuler.getUnitSingleton(), xScaleRuler)); MappingRegistry.REGISTRY.addMapping(new Unit2ScaleRuler(ScaleRuler.getUnitSingleton(), yScaleRuler)); if(progressBar!=null) progressBar.addToProgressBar(5); // Initialisation of the status bar. statusBar = new JLabel("");//$NON-NLS-1$ statusBar.setVisible(true); /* Creation of the instruments. */ instantiateInstruments(canvas, drawing); if(progressBar!=null) progressBar.addToProgressBar(15); textSetter.setPencil(pencil); MappingRegistry.REGISTRY.addMapping(new ShapeList2ExporterMapping(drawing.getShapes(), exporter)); MappingRegistry.REGISTRY.addMapping(new Selection2MetaCustumiserMapping(drawing.getSelection().getShapes(), metaShapeCustomiser)); MappingRegistry.REGISTRY.addMapping(new Selection2DeleterMapping(drawing.getSelection().getShapes(), deleter)); MappingRegistry.REGISTRY.addMapping(new Selection2TemplateManager(drawing.getSelection().getShapes(), templateManager)); if(progressBar!=null) progressBar.addToProgressBar(5); try{setIconImage(LResources.LATEXDRAW_ICON.getImage());}catch(final Exception ex){BadaboomCollector.INSTANCE.add(ex);} setTitle(LResources.LABEL_APP); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); UIManager.INSTANCE.registerUI(this); if(progressBar!=null) progressBar.addToProgressBar(5); } @Override public UIBuilder getComposer() { return (UIBuilder)composer; } private void instantiateInstruments(final LCanvas canvas, final IDrawing drawing) { final PSTCodeGenerator gen = getCodePanel().getPstGenerator(); exceptionsManager = new ExceptionsManager(); helper = new Helper(composer); try { gridCustomiser= new MagneticGridCustomiser(composer, canvas.getMagneticGrid()); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { drawingPropCustomiser= new DrawingPropertiesCustomiser(composer, gen); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { scaleRulersCustomiser = new ScaleRulersCustomiser(xScaleRuler, yScaleRuler); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { scroller = new Scroller(canvas); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { zoomer = new WidgetZoomer(canvas, true, true, LResources.ZOOM_DEFAULT_ICON, LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.113"), //$NON-NLS-1$ new Dimension(55, 28), LangTool.INSTANCE.getString19("ShortcutsFrame.30"), true); } //$NON-NLS-1$ catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { textSetter = new TextSetter(layeredPanel); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { deleter = new ShapeDeleter(composer); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { hand = new Hand(canvas, textSetter); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { pencil = new Pencil(canvas, textSetter, layeredPanel, statusBar); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { metaShapeCustomiser = new MetaShapeCustomiser(composer, hand, pencil, canvas.getBorderInstrument()); canvas.getBorderInstrument().setMetaCustomiser(metaShapeCustomiser); hand.setMetaCustomiser(metaShapeCustomiser); textSetter.setTestCustomiser(metaShapeCustomiser.getTextCustomiser()); textSetter.setPlotCustomiser(metaShapeCustomiser.getPlotCustomiser()); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { codeInserter = new CodeInserter(this, canvas, getStatusBar()); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { editingSelector = new EditingSelector(composer, pencil, hand, metaShapeCustomiser, canvas.getBorderInstrument(), deleter, codeInserter); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } undoManager = new UndoRedoManager(composer); try { paster = new CopierCutterPaster(composer, drawing, canvas.getMagneticGrid()); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } prefSetters = new PreferencesSetter(this); try { prefActivator = new PreferencesActivator(composer, prefSetters); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { fileLoader = new FileLoaderSaver(this, statusBar, prefSetters); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { exporter = new Exporter(composer, canvas, statusBar, gen, fileLoader); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { tabSelector = new TabSelector(this); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } try { templateManager = new TemplateManager(composer, this, drawing); } catch(final IllegalArgumentException ex) {BadaboomCollector.INSTANCE.add(ex); } } @Override public void reinit() { super.reinit(); setTitle(LResources.LABEL_APP); } /** * @return The drawing that contains the shapes. * @since 3.0 */ public IDrawing getDrawing() { return getPresentation(IDrawing.class, LCanvas.class).getAbstractPresentation(); } /** * @return The canvas that contains the views of the shapes. * @since 3.0 */ public LCanvas getCanvas() { return getPresentation(IDrawing.class, LCanvas.class).getConcretePresentation(); } /** * @return The code panel of the system. * @since 3.0 */ public LCodePanel getCodePanel() { return getPresentation(IDrawing.class, LCodePanel.class).getConcretePresentation(); } @Override public void initialisePresentations() { final IDrawing drawing = ShapeFactory.createDrawing(); final LCanvas canvas = new LCanvas(drawing); presentations.add(new Presentation<>(drawing, canvas)); presentations.add(new Presentation<>(drawing, new LCodePanel(drawing, canvas))); } @Override public void save(final boolean generalPreferences, final String nsURI, final Document document, final Element root) { super.save(generalPreferences, nsURI, document, root); Element elt = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_VERSION); Element elt2; // Saving the version. elt.appendChild(document.createTextNode(VersionChecker.VERSION)); root.appendChild(elt); // Saving the dimensions of the frame. elt = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_SIZE); root.appendChild(elt); elt2 = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_WIDTH); elt2.setTextContent(String.valueOf(getWidth())); elt.appendChild(elt2); elt2 = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_HEIGHT); elt2.setTextContent(String.valueOf(getHeight())); elt.appendChild(elt2); // Saving the position. final Point location = getLocation(); elt = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION); root.appendChild(elt); elt2 = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION_X); elt2.setTextContent(String.valueOf(location.getX())); elt.appendChild(elt2); elt2 = document.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+LNamespace.XML_POSITION_Y); elt2.setTextContent(String.valueOf(location.getY())); elt.appendChild(elt2); } @Override public void load(final boolean generalPreferences, final String nsURI, final Element meta) { super.load(generalPreferences, nsURI, meta); Node node; final NodeList metaNodes = meta.getChildNodes(); String name; for(int i=0, size = metaNodes.getLength(); i *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2013-04-06
    * @author Arnaud BLOUIN * @version 3.0 */ public class LabelComboBox extends MComboBox { private static final long serialVersionUID = 1L; /** * Converts, or not, the given parameter as its corresponding JLabel if it is a string. * @param obj The object to analyse. * @return The object obj or the JLabel corresponding to obj if it is a String. * @since 3.0 */ protected Object getJLabelFromString(final Object obj) { Object objToSelect = obj; if(obj instanceof String) { final String txt = (String)obj; JLabel lab = null; for(int i=0, size=dataModel.getSize(); i *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 01/20/06
    * @author Arnaud BLOUIN * @version 3.0 */ 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 SELECT_COLOUR = new Color(120, 160, 195); /** * The constructor by default */ public LabelListCellRenderer() { super(); setOpaque(true); } @Override public Component getListCellRendererComponent(final JList list, final JLabel value, final int index, final boolean isSelected, final boolean cellHasFocus) { setBackground(isSelected ? SELECT_COLOUR : Color.WHITE); setIcon(value.getIcon()); setEnabled(list.isEnabled()); setFont(list.getFont()); return this; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/MenubarBuilder.java000066400000000000000000000110131321075051700327110ustar00rootroot00000000000000package net.sf.latexdraw.ui; import javax.swing.JMenuBar; import net.sf.latexdraw.lang.LangTool; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MCheckBoxMenuItem; import org.malai.swing.widget.MMenu; import org.malai.swing.widget.MProgressBar; /** * The composer that creates the menu bar of the application.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/08/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class MenubarBuilder extends SwingUIComposer { /** The main frame of the application. */ protected LFrame frame; /** This menu contains the menu items related to the visibility of components. */ protected MMenu displayMenu; /** This menu contains menu items related with drawings. */ protected MMenu drawingMenu; /** This menu contains menu items related with the editing of shapes. */ protected MMenu editMenu; /** This menu contains menu items to change the unit of the drawing. */ protected MMenu unitMenu; /** This menu contains menu items related with the help. */ protected MMenu helpMenu; /** * Creates the menu bar. * @param frame The user interface that contains all the instruments. * @throws NullPointerException If one of the given arguments is null. * @since 3.0 */ public MenubarBuilder(final LFrame frame) { super(); this.frame = frame; } @Override public void compose(final MProgressBar progressBar) { widget = new JMenuBar(); composeDrawingMenu(); composeEditMenu(); if(progressBar!=null) progressBar.addToProgressBar(5); composeDisplayMenu(); composeHelpMenu(); if(progressBar!=null) progressBar.addToProgressBar(5); } protected void composeDrawingMenu() { drawingMenu = new MMenu(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.91"), true); //$NON-NLS-1$ unitMenu = new MMenu(LangTool.INSTANCE.getStringActions("MenuBuilder.1"), true); //$NON-NLS-1$ widget.add(drawingMenu); drawingMenu.add(frame.fileLoader.getNewMenu()); drawingMenu.add(frame.fileLoader.getLoadMenu()); drawingMenu.add(frame.fileLoader.getSaveMenu()); drawingMenu.add(frame.fileLoader.getSaveAsMenu()); drawingMenu.add(frame.fileLoader.getRecentFilesMenu()); drawingMenu.addSeparator(); drawingMenu.add(frame.exporter.getExportMenu()); drawingMenu.addSeparator(); drawingMenu.add(frame.templateManager.templateMenu()); drawingMenu.add(unitMenu); unitMenu.add(frame.scaleRulersCustomiser.getUnitCmItem()); unitMenu.add(frame.scaleRulersCustomiser.getUnitInchItem()); frame.exporter.getExportMenu().add(frame.templateManager.exportTemplateMenu()); } protected void composeEditMenu() { editMenu = new MMenu(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.89"), true); //$NON-NLS-1$ editMenu.add(frame.paster.getCutMenu()); editMenu.add(frame.paster.getCopyMenu()); editMenu.add(frame.paster.getPasteMenu()); editMenu.addSeparator(); editMenu.add(frame.prefActivator.getShowPreferencesMenu()); widget.add(editMenu); } protected void composeHelpMenu() { helpMenu = new MMenu(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.93"), true); //$NON-NLS-1$ helpMenu.add(frame.helper.getShortcutItem()); helpMenu.add(frame.helper.getDonateItem()); helpMenu.add(frame.helper.getManuelItem()); helpMenu.add(frame.helper.getReportBugItem()); helpMenu.add(frame.helper.getForumItem()); helpMenu.addSeparator(); helpMenu.add(frame.helper.getAboutItem()); widget.add(helpMenu); } /** * Initialises the menu "Display" * @since 3.0 */ protected void composeDisplayMenu() { displayMenu = new MMenu(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.90"), true); //$NON-NLS-1$ widget.add(displayMenu); MCheckBoxMenuItem menuCBItem = frame.scaleRulersCustomiser.getxRulerItem(); menuCBItem.setSelected(true); displayMenu.add(menuCBItem); menuCBItem = frame.scaleRulersCustomiser.getyRulerItem(); menuCBItem.setSelected(true); displayMenu.add(menuCBItem); displayMenu.addSeparator(); displayMenu.add(menuCBItem); } } PropertiesToolbarBuilder.java000066400000000000000000000737741321075051700347460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/uipackage net.sf.latexdraw.ui; import java.awt.Component; import java.awt.FlowLayout; import java.util.IdentityHashMap; import java.util.Map; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JComponent; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; import net.sf.latexdraw.glib.ui.LCanvas; import net.sf.latexdraw.instruments.*; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MPanel; import org.malai.swing.widget.MProgressBar; /** * The composer that creates the properties tool bar of the application.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 12/08/11
    * @author Arnaud BLOUIN * @since 3.0 */ public class PropertiesToolbarBuilder extends SwingUIComposer { /** The main frame of the application. */ protected final LFrame frame; /** The hash map used to map a widget to its container. */ protected final Map mapContainers; /** * Creates the bottom panel that contains a set of widgets to modify shapes. * @param frame The frame that will contains the tool bar. * @throws IllegalArgumentException If the given instrument is null. * @since 3.0 */ public PropertiesToolbarBuilder(final LFrame frame) { super(); this.frame = frame; mapContainers = new IdentityHashMap<>(); } @Override public void compose(final MProgressBar progressBar) { final LCanvas canvas = frame.getCanvas(); final MetaShapeCustomiser metaShapeCustomiser = frame.getMetaShapeCustomiser(); widget = new MPanel(false, true); widget.setLayout(new FlowLayout(FlowLayout.LEFT)); // Creation of the widgets layout of the shape properties instruments. composeJoinShapesWidgets(metaShapeCustomiser.getShapeGrouper()); widget.add(composeRotationToolbar(metaShapeCustomiser.getRotationCustomiser(), canvas)); widget.add(composeShapePositionerWidgets(metaShapeCustomiser.getShapePositioner(), canvas)); widget.add(composeMirrorShapes(metaShapeCustomiser.getShapeTransformer(), canvas)); widget.add(composeAlignShapes(metaShapeCustomiser.getShapeTransformer(), canvas)); widget.add(composeDistributeShapes(metaShapeCustomiser.getShapeTransformer(), canvas)); widget.add(composeDimPosPropertiesToolbar(metaShapeCustomiser.getDimPosCustomiser(), canvas)); widget.add(composeBorderPropertiesPanel(metaShapeCustomiser.getBorderCustomiser(), canvas)); if(progressBar!=null) progressBar.addToProgressBar(5); widget.add(composeDoubleBorderPropertiesPanel(metaShapeCustomiser.getDoubleBorderCustomiser(), canvas)); widget.add(composeShadowPropertiesPanel(metaShapeCustomiser.getShadowCustomiser(), canvas)); widget.add(composeFillingPanel(metaShapeCustomiser.getFillingCustomiser(), canvas)); if(progressBar!=null) progressBar.addToProgressBar(5); widget.add(composeArrowToolbar(metaShapeCustomiser.getArrowCustomiser(), canvas)); widget.add(composeDotToolbar(metaShapeCustomiser.getDotCustomiser(), metaShapeCustomiser.getBorderCustomiser(), canvas)); widget.add(composeTextPositionToolbar(metaShapeCustomiser.getTextCustomiser(), canvas)); widget.add(composeTextPropertiesToolbar(metaShapeCustomiser.getTextCustomiser(), canvas)); widget.add(composeArcPropertiesWidgets(metaShapeCustomiser.getArcCustomiser(), canvas)); widget.add(composeStandardGridPropertiesToolbar(metaShapeCustomiser.getStandardGridCustomiser(), canvas)); widget.add(composeGridPropertiesToolbar(metaShapeCustomiser.getGridCustomiser(), canvas)); widget.add(composeAxesPropertiesToolbar(metaShapeCustomiser.getAxesCustomiser(), canvas)); widget.add(composeGridLabelsPropertiesToolbar(metaShapeCustomiser.getAxesCustomiser(), metaShapeCustomiser.getGridCustomiser(), metaShapeCustomiser.getStandardGridCustomiser(), canvas)); widget.add(composePlotWidgets(metaShapeCustomiser.getPlotCustomiser(), canvas)); widget.add(composeFreeHandPropertiesToolbar(metaShapeCustomiser.getFreeHandCustomiser(), canvas)); if(progressBar!=null) progressBar.addToProgressBar(5); } protected WidgetMiniToolbar composePlotWidgets(final ShapePlotCustomiser plotCustom, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.PLOT_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText("Customizes plots' properties."); list.addComponent(plotCustom.getPolarCB()); list.addComponent(plotCustom.getPlotStyleCB()); UIBuilder.addSpinner(list, plotCustom.getNbPtsSpinner(), 70); UIBuilder.addSpinner(list, plotCustom.getMinXSpinner(), 70); UIBuilder.addSpinner(list, plotCustom.getMaxXSpinner(), 70); UIBuilder.addSpinner(list, plotCustom.getXScaleSpinner(), 70); UIBuilder.addSpinner(list, plotCustom.getYScaleSpinner(), 70); list.addSeparator(); mapContainers.put(plotCustom.getNbPtsSpinner(), list); mapContainers.put(plotCustom.getMinXSpinner(), list); mapContainers.put(plotCustom.getMaxXSpinner(), list); mapContainers.put(plotCustom.getXScaleSpinner(), list); mapContainers.put(plotCustom.getYScaleSpinner(), list); mapContainers.put(plotCustom.getPolarCB(), list); mapContainers.put(plotCustom.getPlotStyleCB(), list); plotCustom.addEventable(list.getToolbar()); list.setVisible(false); return list; } // Creates the tool bar for place shapes. protected WidgetMiniToolbar composeShapePositionerWidgets(final ShapePositioner ins, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.FOREGROUND_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getString17("LaTeXDrawFrame.6")); //$NON-NLS-1$ list.addComponent(ins.getForegroundButton()); list.addComponent(ins.getBackgroundButton()); list.addSeparator(); mapContainers.put(ins.getForegroundButton(), list); mapContainers.put(ins.getBackgroundButton(), list); ins.addEventable(list.getToolbar()); list.setVisible(false); return list; } // Creates the tool bar for mirroring shapes. protected WidgetMiniToolbar composeDistributeShapes(final ShapeTransformer transformer, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.DIST_VERT_EQUAL_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.8")); //$NON-NLS-1$ list.addComponent(transformer.distribVertEq()); list.addComponent(transformer.distribVertMid()); list.addComponent(transformer.distribVertTop()); list.addComponent(transformer.distribVertBot()); list.addComponent(transformer.distribHorizEq()); list.addComponent(transformer.distribHorizMid()); list.addComponent(transformer.distribHorizLeft()); list.addComponent(transformer.distribHorizRight()); list.addSeparator(); mapContainers.put(transformer.distribHorizEq(), list); mapContainers.put(transformer.distribHorizLeft(), list); mapContainers.put(transformer.distribHorizRight(), list); mapContainers.put(transformer.distribHorizMid(), list); mapContainers.put(transformer.distribVertEq(), list); mapContainers.put(transformer.distribVertTop(), list); mapContainers.put(transformer.distribVertBot(), list); mapContainers.put(transformer.distribVertMid(), list); transformer.addEventable(list.getToolbar()); list.setVisible(false); return list; } // Creates the tool bar for mirroring shapes. protected WidgetMiniToolbar composeAlignShapes(final ShapeTransformer transformer, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.ALIGN_LEFT_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringLaTeXDrawFrame("LFrame2.1"));//$NON-NLS-1$ list.addComponent(transformer.alignLeft()); list.addComponent(transformer.alignRight()); list.addComponent(transformer.alignBot()); list.addComponent(transformer.alignTop()); list.addComponent(transformer.alignMidHoriz()); list.addComponent(transformer.alignMidVert()); list.addSeparator(); mapContainers.put(transformer.alignLeft(), list); mapContainers.put(transformer.alignRight(), list); mapContainers.put(transformer.alignBot(), list); mapContainers.put(transformer.alignTop(), list); mapContainers.put(transformer.alignMidHoriz(), list); mapContainers.put(transformer.alignMidVert(), list); transformer.addEventable(list.getToolbar()); list.setVisible(false); return list; } // Creates the tool bar for mirroring shapes. protected WidgetMiniToolbar composeMirrorShapes(final ShapeTransformer transformer, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.MIRROR_H_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.6")); //$NON-NLS-1$ list.addComponent(transformer.mirrorH()); list.addComponent(transformer.mirrorV()); list.addSeparator(); mapContainers.put(transformer.mirrorH(), list); mapContainers.put(transformer.mirrorV(), list); transformer.addEventable(list.getToolbar()); list.setVisible(false); return list; } // Composition of the widgets that joins/separates shapes. protected void composeJoinShapesWidgets(final ShapeGrouper grouper) { widget.add(grouper.getGroupB()); widget.add(grouper.getSepB()); grouper.addEventable(widget); } /** Creates the toolbar containing the widgets that customises axes. */ protected WidgetMiniToolbar composeFreeHandPropertiesToolbar(final ShapeFreeHandCustomiser cust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.FREE_HAND_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.1")); //$NON-NLS-1$ UIBuilder.addCombobox(list, cust.getFreeHandType()); UIBuilder.addSpinner(list, cust.getGapPoints(), 60); list.addComponent(cust.getOpen()); list.addSeparator(); mapContainers.put(cust.getFreeHandType(), list); mapContainers.put(cust.getGapPoints(), list); mapContainers.put(cust.getOpen(), list); cust.addEventable(list.getToolbar()); list.setVisible(false); return list; } /** Creates the toolbar containing the widgets that customises grids' labels. */ protected WidgetMiniToolbar composeGridLabelsPropertiesToolbar(final ShapeAxesCustomiser axeCust, final ShapeGridCustomiser gridCust, final ShapeStandardGridCustomiser stdGridCust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.GRID_LABELS, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.2")); //$NON-NLS-1$ final MPanel p1 = new MPanel(false, true); final MPanel p2 = new MPanel(false, true); final MPanel p3 = new MPanel(false, false); p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS)); p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS)); p3.setLayout(new BoxLayout(p3, BoxLayout.Y_AXIS)); UIBuilder.addSpinner(p1, stdGridCust.getLabelsSizeS(), 60); UIBuilder.addCombobox(p1, axeCust.getShowLabels()); p1.add(gridCust.getColourLabels()); p1.add(axeCust.getShowOrigin()); p1.add(gridCust.getLabelsXInvertedCB()); p1.add(gridCust.getLabelsYInvertedCB()); UIBuilder.addSpinner(p2, axeCust.getIncrLabelX(), 60); UIBuilder.addSpinner(p2, axeCust.getIncrLabelY(), 60); UIBuilder.addSpinner(p2, axeCust.getDistLabelsX(), 60); UIBuilder.addSpinner(p2, axeCust.getDistLabelsY(), 60); p3.add(p1); p3.add(p2); list.addComponent(p3); list.addSeparator(); mapContainers.put(axeCust.getShowLabels(), list); mapContainers.put(gridCust.getColourLabels(), list); mapContainers.put(axeCust.getShowOrigin(), list); mapContainers.put(axeCust.getIncrLabelX(), list); mapContainers.put(axeCust.getIncrLabelY(), list); mapContainers.put(axeCust.getDistLabelsX(), list); mapContainers.put(axeCust.getDistLabelsY(), list); mapContainers.put(stdGridCust.getLabelsSizeS(), list); mapContainers.put(gridCust.getLabelsXInvertedCB(), list); mapContainers.put(gridCust.getLabelsYInvertedCB(), list); axeCust.addEventable(p1); stdGridCust.addEventable(p1); gridCust.addEventable(p1); axeCust.addEventable(p2); stdGridCust.addEventable(p2); gridCust.addEventable(p2); list.setVisible(false); return list; } /** Creates the toolbar containing the widgets that customises axes. */ protected WidgetMiniToolbar composeAxesPropertiesToolbar(final ShapeAxesCustomiser cust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.AXES_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.3")); //$NON-NLS-1$ final MPanel panel = new MPanel(false, true); final MPanel ticksPanel = new MPanel(false, true); ticksPanel.setBorder(new CompoundBorder(new TitledBorder(null, LangTool.INSTANCE.getString18("ParametersAxeFrame.17"), //$NON-NLS-1$ TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0))); panel.add(cust.getShapeAxes()); UIBuilder.addCombobox(ticksPanel, cust.getShapeTicks()); // UIBuilder.addSpinner(ticksPanel, cust.getTicksSizeS(), 70); UIBuilder.addCombobox(ticksPanel, cust.getShowTicks()); list.addComponent(panel); list.addComponent(ticksPanel); list.addSeparator(); mapContainers.put(cust.getShapeAxes(), list); mapContainers.put(cust.getShapeTicks(), list); // mapContainers.put(cust.getTicksSizeS(), list); mapContainers.put(cust.getShowTicks(), list); list.setVisible(false); cust.addEventable(panel); cust.addEventable(ticksPanel); return list; } protected WidgetMiniToolbar composeGridPropertiesToolbar(final ShapeGridCustomiser cust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.SUBGRID_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.4")); //$NON-NLS-1$ UIBuilder.addSpinner(list, cust.getGridWidth(), 60); UIBuilder.addSpinner(list, cust.getSubGridWidth(), 60); list.addComponent(cust.getColourSubGrid()); UIBuilder.addSpinner(list, cust.getGridDots(), 60); UIBuilder.addSpinner(list, cust.getSubGridDots(), 60); UIBuilder.addSpinner(list, cust.getSubGridDiv(), 60); list.addSeparator(); mapContainers.put(cust.getColourSubGrid(), list); mapContainers.put(cust.getGridWidth(), list); mapContainers.put(cust.getSubGridWidth(), list); mapContainers.put(cust.getGridDots(), list); mapContainers.put(cust.getSubGridDots(), list); mapContainers.put(cust.getSubGridDiv(), list); cust.addEventable(list.getToolbar()); list.setVisible(false); return list; } protected WidgetMiniToolbar composeStandardGridPropertiesToolbar(final ShapeStandardGridCustomiser cust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.GRID_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.5")); //$NON-NLS-1$ UIBuilder.addSpinner(list, cust.getxStartS(), 60); UIBuilder.addSpinner(list, cust.getyStartS(), 60); UIBuilder.addSpinner(list, cust.getxEndS(), 60); UIBuilder.addSpinner(list, cust.getyEndS(), 60); UIBuilder.addSpinner(list, cust.getxOriginS(), 60); UIBuilder.addSpinner(list, cust.getyOriginS(), 60); list.addSeparator(); mapContainers.put(cust.getxStartS(), list); mapContainers.put(cust.getyStartS(), list); mapContainers.put(cust.getxEndS(), list); mapContainers.put(cust.getyEndS(), list); mapContainers.put(cust.getxOriginS(), list); mapContainers.put(cust.getyOriginS(), list); list.setVisible(false); cust.addEventable(list.getToolbar()); return list; } protected WidgetMiniToolbar composeDimPosPropertiesToolbar(final ShapeCoordDimCustomiser cust, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.DIM_POS_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.6")); //$NON-NLS-1$ UIBuilder.addSpinner(list, cust.getTlxS(), 90); UIBuilder.addSpinner(list, cust.getTlyS(), 90); list.addSeparator(); mapContainers.put(cust.getTlxS(), list); mapContainers.put(cust.getTlyS(), list); list.setVisible(false); cust.addEventable(list.getToolbar()); return list; } protected WidgetMiniToolbar composeTextPropertiesToolbar(final TextCustomiser textCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.TEXT_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.7")); //$NON-NLS-1$ list.addComponent(textCustomiser.getPackagesLabel()); list.addComponent(textCustomiser.getPackagesField().getScrollpane()); list.addComponent(textCustomiser.getLogField().getScrollpane()); list.addSeparator(); mapContainers.put(textCustomiser.getPackagesLabel(), list); mapContainers.put(textCustomiser.getPackagesField().getScrollpane(), list); mapContainers.put(textCustomiser.getLogField().getScrollpane(), list); list.setVisible(false); textCustomiser.addEventable(textCustomiser.getPackagesField()); return list; } protected WidgetMiniToolbar composeTextPositionToolbar(final TextCustomiser textCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.TEXTPOS_BL, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.8")); //$NON-NLS-1$ list.addComponent(textCustomiser.getBlButton()); list.addComponent(textCustomiser.getBButton()); list.addComponent(textCustomiser.getBrButton()); list.addComponent(textCustomiser.getTlButton()); list.addComponent(textCustomiser.getTButton()); list.addComponent(textCustomiser.getTrButton()); list.addComponent(textCustomiser.getCentreButton()); list.addComponent(textCustomiser.getLButton()); list.addComponent(textCustomiser.getRButton()); mapContainers.put(textCustomiser.getBlButton(), list); mapContainers.put(textCustomiser.getBButton(), list); mapContainers.put(textCustomiser.getBrButton(), list); mapContainers.put(textCustomiser.getTlButton(), list); mapContainers.put(textCustomiser.getTButton(), list); mapContainers.put(textCustomiser.getTrButton(), list); mapContainers.put(textCustomiser.getCentreButton(), list); mapContainers.put(textCustomiser.getLButton(), list); mapContainers.put(textCustomiser.getRButton(), list); list.addSeparator(); list.setVisible(false); textCustomiser.addEventable(list.getToolbar()); return list; } protected JComponent composeArcPropertiesWidgets(final ShapeArcCustomiser ins, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.ARC_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.9")); //$NON-NLS-1$ list.addComponent(ins.getArcB()); list.addComponent(ins.getChordB()); list.addComponent(ins.getWedgeB()); UIBuilder.addSpinner(list, ins.getStartAngleS(), 70); UIBuilder.addSpinner(list, ins.getEndAngleS(), 70); list.addSeparator(); mapContainers.put(ins.getArcB(), list); mapContainers.put(ins.getChordB(), list); mapContainers.put(ins.getWedgeB(), list); mapContainers.put(ins.getStartAngleS(), list); mapContainers.put(ins.getEndAngleS(), list); ins.addEventable(list.getToolbar()); list.setVisible(false); return list; } protected JComponent composeDotToolbar(final ShapeDotCustomiser ins, final ShapeBorderCustomiser sbc, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.DOT_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.10")); //$NON-NLS-1$ list.addComponent(sbc.getShowPoints()); list.addComponent(ins.getDotCB()); UIBuilder.addSpinner(list, ins.getDotSizeField(), 70); list.addComponent(ins.getFillingB()); list.addSeparator(); mapContainers.put(sbc.getShowPoints(), list); mapContainers.put(ins.getDotCB(), list); mapContainers.put(ins.getDotSizeField(), list); mapContainers.put(ins.getFillingB(), list); ins.addEventable(list.getToolbar()); sbc.addEventable(list.getToolbar()); list.setVisible(false); return list; } protected JComponent composeArrowToolbar(final ShapeArrowCustomiser ins, final LCanvas canvas) { final int size = 70; final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.ARROW_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.11")); //$NON-NLS-1$ list.addComponent(ins.getArrowLeftCB()); list.addComponent(ins.getArrowRightCB()); UIBuilder.addSpinner(list, ins.getArrowInset(), size); UIBuilder.addSpinner(list, ins.getArrowLength(), size); UIBuilder.addSpinner(list, ins.getArrowSizeNum(), size); UIBuilder.addSpinner(list, ins.getArrowSizeDim(), size); UIBuilder.addSpinner(list, ins.getBracketNum(), size); UIBuilder.addSpinner(list, ins.getTbarsizeNum(), size); UIBuilder.addSpinner(list, ins.getTbarsizeDim(), size); UIBuilder.addSpinner(list, ins.getDotSizeNum(), size); UIBuilder.addSpinner(list, ins.getDotSizeDim(), size); UIBuilder.addSpinner(list, ins.getRbracketNum(), size); list.addSeparator(); mapContainers.put(ins.getArrowLeftCB(), list); mapContainers.put(ins.getArrowRightCB(), list); mapContainers.put(ins.getArrowInset(), list); mapContainers.put(ins.getArrowLength(), list); mapContainers.put(ins.getArrowSizeNum(), list); mapContainers.put(ins.getArrowSizeDim(), list); mapContainers.put(ins.getTbarsizeNum(), list); mapContainers.put(ins.getTbarsizeDim(), list); mapContainers.put(ins.getBracketNum(), list); mapContainers.put(ins.getRbracketNum(), list); mapContainers.put(ins.getDotSizeNum(), list); mapContainers.put(ins.getDotSizeDim(), list); ins.addEventable(list.getToolbar()); list.setVisible(false); return list; } protected JComponent composeRotationToolbar(final ShapeRotationCustomiser ins, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.ROTATE_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.2")); //$NON-NLS-1$ UIBuilder.addSpinner(list, ins.getRotationField(), 65); list.addComponent(ins.getRotate90Button()); list.addComponent(ins.getRotate180Button()); list.addComponent(ins.getRotate270Button()); list.addSeparator(); mapContainers.put(ins.getRotationField(), list); mapContainers.put(ins.getRotate90Button(), list); mapContainers.put(ins.getRotate180Button(), list); mapContainers.put(ins.getRotate270Button(), list); ins.addEventable(list.getToolbar()); list.setVisible(false); return list; } /** * Creates the widget that contains the widgets dedicated to the modification of shapes filling properties. * @param fillingCustomiser The instrument that contains the widgets. * @return The created widget. Cannot be null. * @since 3.0 */ protected JComponent composeFillingPanel(final ShapeFillingCustomiser fillingCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.FILLING_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.12")); //$NON-NLS-1$ list.addComponent(fillingCustomiser.getFillStyleCB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(fillingCustomiser.getFillColButton()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(fillingCustomiser.getHatchColButton()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, fillingCustomiser.getHatchAngleField(), 65); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, fillingCustomiser.getHatchWidthField(), 60); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, fillingCustomiser.getHatchSepField(), 65); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(fillingCustomiser.getGradStartColButton()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(fillingCustomiser.getGradEndColButton()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, fillingCustomiser.getGradAngleField(), 60); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, fillingCustomiser.getGradMidPtField(), 70); list.addSeparator(); mapContainers.put(fillingCustomiser.getFillStyleCB(), list); mapContainers.put(fillingCustomiser.getFillColButton(), list); mapContainers.put(fillingCustomiser.getHatchColButton(), list); mapContainers.put(fillingCustomiser.getHatchAngleField(), list); mapContainers.put(fillingCustomiser.getHatchWidthField(), list); mapContainers.put(fillingCustomiser.getHatchSepField(), list); mapContainers.put(fillingCustomiser.getGradStartColButton(), list); mapContainers.put(fillingCustomiser.getGradEndColButton(), list); mapContainers.put(fillingCustomiser.getGradAngleField(), list); mapContainers.put(fillingCustomiser.getGradMidPtField(), list); fillingCustomiser.addEventable(list.getToolbar()); list.setVisible(false); return list; } /** * Creates the widget that contains the widgets dedicated to the modification of shapes double border properties. * @param shadowCustomiser The instrument that contains the widgets. * @return The created widget. Cannot be null. * @since 3.0 */ protected JComponent composeShadowPropertiesPanel(final ShapeShadowCustomiser shadowCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.SHADOW_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.13")); //$NON-NLS-1$ list.addComponent(shadowCustomiser.getShadowCB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(shadowCustomiser.getShadowColB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, shadowCustomiser.getShadowSizeField(), 75); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, shadowCustomiser.getShadowAngleField(), 75); list.addSeparator(); mapContainers.put(shadowCustomiser.getShadowCB(), list); mapContainers.put(shadowCustomiser.getShadowColB(), list); mapContainers.put(shadowCustomiser.getShadowSizeField(), list); mapContainers.put(shadowCustomiser.getShadowAngleField(), list); shadowCustomiser.addEventable(list.getToolbar()); list.setVisible(false); return list; } /** * Creates the widget that contains the widgets dedicated to the modification of shapes double border properties. * @param dbleBorderCustomiser The instrument that contains the widgets. * @return The created widget. Cannot be null. * @since 3.0 */ protected JComponent composeDoubleBorderPropertiesPanel(final ShapeDoubleBorderCustomiser dbleBorderCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.DOUBLE_BORDER_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.14")); //$NON-NLS-1$ list.addComponent(dbleBorderCustomiser.getDbleBoundCB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(dbleBorderCustomiser.getDbleBoundColB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, dbleBorderCustomiser.getDbleSepField(), 55); list.addSeparator(); mapContainers.put(dbleBorderCustomiser.getDbleBoundCB(), list); mapContainers.put(dbleBorderCustomiser.getDbleBoundColB(), list); mapContainers.put(dbleBorderCustomiser.getDbleSepField(), list); dbleBorderCustomiser.addEventable(list.getToolbar()); list.setVisible(false); return list; } /** * Creates the widget that contains the widgets dedicated to the modification of shapes border properties. * @param borderCustomiser The instrument that contains the widgets. * @return The created widget. Cannot be null. * @since 3.0 */ protected JComponent composeBorderPropertiesPanel(final ShapeBorderCustomiser borderCustomiser, final LCanvas canvas) { final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.BORDER_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas); list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.15")); //$NON-NLS-1$ UIBuilder.addSpinner(list, borderCustomiser.getThicknessField(), 65); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(borderCustomiser.getLineColButton()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(borderCustomiser.getLineCB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); list.addComponent(borderCustomiser.getBordersPosCB()); list.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); UIBuilder.addSpinner(list, borderCustomiser.getFrameArcField(), 65); list.addSeparator(); mapContainers.put(borderCustomiser.getThicknessField(), list); mapContainers.put(borderCustomiser.getLineColButton(), list); mapContainers.put(borderCustomiser.getLineCB(), list); mapContainers.put(borderCustomiser.getBordersPosCB(), list); mapContainers.put(borderCustomiser.getFrameArcField(), list); borderCustomiser.addEventable(list.getToolbar()); list.setVisible(false); return list; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/ScaleRuler.java000066400000000000000000000176531321075051700320720ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.event.AdjustmentEvent; import java.awt.event.AdjustmentListener; import java.util.Objects; import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; import javax.accessibility.AccessibleRole; import javax.swing.JComponent; import net.sf.latexdraw.glib.ui.ICanvas; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.lang.LangTool; import org.malai.interaction.Eventable; import org.malai.mapping.ActiveUnary; import org.malai.mapping.IUnary; import org.malai.picking.Pickable; import org.malai.picking.Picker; import org.malai.swing.interaction.SwingEventManager; import org.malai.swing.widget.SwingWidgetUtilities; /** * This class defines an abstract scale ruler.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/12/10
    * @author Arnaud BLOUIN * @version 3.0 */ public abstract class ScaleRuler extends JComponent implements Pickable, Eventable, Accessible, AdjustmentListener { private static final long serialVersionUID = 1L; /** * Defines the different possible units used by the rulers. */ public enum Unit { /** Centimetre */ CM { @Override public String getLabel() { return LangTool.INSTANCE.getStringOthers("XScale.cm"); //$NON-NLS-1$ } }, /** Inch */ INCH { @Override public String getLabel() { return LangTool.INSTANCE.getStringOthers("XScale.inch"); //$NON-NLS-1$ } }; /** * @return The label of the unit. * @since 3.0 */ public abstract String getLabel(); /** * @param label The label to test. * @return The unit corresponding to the given label, or null. * @since 3.0 */ public static Unit getUnit(final String label) { final Unit unit; if(label==null) unit = null; else if(label.equals(CM.getLabel())) unit = CM; else if(label.equals(INCH.getLabel())) unit = INCH; else unit = null; return unit; } } /** The current unit of the rulers. */ protected static final IUnary UNIT = new ActiveUnary<>(Unit.CM); /** The stroke of the ruler. */ protected static final BasicStroke STROKE = new BasicStroke(0, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER); /** This value defines the threshold under which sub-lines of the rule will be not drawn. */ protected static final double MIN_PCC_SUBLINES = 20.; /** The canvas that the ruler manages. */ protected ICanvas canvas; /** The event manager that listens events produced by the panel. */ protected SwingEventManager eventManager; /** The size of the lines in axes */ public static final int SIZE = 10; /** * Creates the ruler. * @param canvas The canvas that the ruler manages. * @throws IllegalArgumentException If the given canvas is null. */ protected ScaleRuler(final ICanvas canvas) { super(); this.canvas = Objects.requireNonNull(canvas); eventManager = new SwingEventManager(); eventManager.attachTo(this); setDoubleBuffered(true); canvas.getScrollpane().getVerticalScrollBar().addAdjustmentListener(this); canvas.getScrollpane().getHorizontalScrollBar().addAdjustmentListener(this); } @Override public void adjustmentValueChanged(final AdjustmentEvent e) { repaint(); } /** * @return The starting position where the ruler must be drawn. * @since 3.0 */ protected abstract double getStart(); /** * @return The length of the ruler. * @since 3.0 */ protected abstract double getLength(); /** * Draws a line of the ruler. * @param g2 The graphics where the line will be drawn. Must not be null. * @param positionA The static position of the vertical or horizontal line. * @param positionB1 The starting point of the line. * @param positionB2 The ending point of the line. * @throws NullPointerException if the given graphics is null. * @since 3.0 */ protected abstract void drawLine(final Graphics2D g2, final double positionA, final double positionB1, final double positionB2); /** * Adapts the given graphics to the current position of the grid. * @param g The graphics of the ruler. * @since 3.1 */ protected abstract void adaptGraphicsToViewpoint(final Graphics2D g); /** * @return The gap between the origin (0) and the current position of the painted view. * @since 3.1 */ protected abstract double getClippingGap(); @Override public void paintComponent(final Graphics g) { super.paintComponent(g); if(!(g instanceof Graphics2D)) return; final double zoom = canvas.getZoom(); final double lgth = getLength()/zoom; final double start = getStart()/zoom; double ppc = canvas.getPPCDrawing(); final Graphics2D g2 = (Graphics2D)g; final double sizeZoomed = SIZE/zoom; double i; double j; double cpt; // adjusting the ppc value according to the current unit. if(getUnit()==Unit.INCH) ppc*=PSTricksConstants.INCH_VAL_CM; // Optimisation for limitating the painting to the visible part only. final double clipStart = (int)(getClippingGap()/zoom/ppc)*ppc; // Settings the parameters of the graphics. adaptGraphicsToViewpoint(g2); g2.scale(zoom, zoom); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); g2.setStroke(STROKE); g2.setColor(Color.BLACK); // If the ppc is not to small sub-lines are drawn. if(ppc>MIN_PCC_SUBLINES/zoom) { final double ppc10 = ppc/10.; final double halfSizeZoomed = sizeZoomed/2.; for(i=start+ppc10+clipStart; i getUnitSingleton() { return ScaleRuler.UNIT; } @Override public SwingEventManager getEventManager() { return eventManager; } @Override public AccessibleContext getAccessibleContext() { if(accessibleContext==null) accessibleContext = new AccessibleScaleRuler(); return accessibleContext; } /** * This class implements accessibility support for the * ScaleRuler class. It provides an implementation of the * Java Accessibility API appropriate to panel user-interface elements. */ protected class AccessibleScaleRuler extends AccessibleJComponent { private static final long serialVersionUID = 1L; @Override public AccessibleRole getAccessibleRole() { return AccessibleRole.RULER; } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/SplashScreen.java000077500000000000000000000066401321075051700324200ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Image; import java.awt.MediaTracker; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Window; import javax.swing.JFrame; import javax.swing.UIManager; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import org.malai.swing.widget.MProgressBar; /** * 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.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/23/10
    * @author Arnaud BLOUIN * @version 3.0 * @since 1.9 */ public class SplashScreen extends JFrame { private static final long serialVersionUID = 1L; /** The progress bar showing us the progression of the loading of the LaTeXDraw interface.*/ protected MProgressBar progressBar; /** The canvas that contains the image to display. */ protected DisplayCanvas canvas; /** * The constructor by default. * @param lookAndFeel the class of the look and feel; default LaF if null. */ public SplashScreen(final String lookAndFeel) { super(); try { if(lookAndFeel==null || lookAndFeel.isEmpty()) UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); else UIManager.setLookAndFeel(lookAndFeel); }catch(final Exception ex) { BadaboomCollector.INSTANCE.add(ex); } try{setIconImage(LResources.LATEXDRAW_ICON.getImage());}catch(final Exception ex){BadaboomCollector.INSTANCE.add(ex);} setUndecorated(true); setType(Window.Type.UTILITY); final Dimension dim = LSystem.INSTANCE.getScreenDimension(); final Rectangle frameBound = getGraphicsConfiguration().getBounds(); progressBar = new MProgressBar(0, 100); final Image img = Toolkit.getDefaultToolkit().getImage( getClass().getClassLoader().getResource("res/LaTeXDrawSmall.png"));//$NON-NLS-1$ final MediaTracker tracker=new MediaTracker(this); tracker.addImage(img,0); try { tracker.waitForID(0); } catch(final InterruptedException e) { BadaboomCollector.INSTANCE.add(e); } canvas = new DisplayCanvas(img); setLayout(new BorderLayout()); getContentPane().add(canvas, BorderLayout.CENTER); getContentPane().add(progressBar, BorderLayout.SOUTH); // In case of dual screen, frameBound provides the position of the current screen. setLocation((int)(frameBound.getX()+(dim.width-img.getWidth(null))/2.), (int)(frameBound.getY()+(dim.height-img.getHeight(null))/2.)); setSize(img.getWidth(null), img.getHeight(null)+15); } /** * Flushes the resources taken by the spash screen. * @since 3.0 */ public void flush() { canvas.flush(); } /** * @return The progress bar used to show the progress of the initialisation. * @since 3.0 */ public MProgressBar getProgressBar() { return progressBar; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/TextAreaAutoSize.java000066400000000000000000000112621321075051700332200ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Color; import java.awt.FontMetrics; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.geom.Rectangle2D; import javax.swing.BorderFactory; import javax.swing.JTextArea; import javax.swing.KeyStroke; import javax.swing.text.DefaultEditorKit; import org.malai.swing.interaction.SwingEventManager; import org.malai.swing.widget.MTextArea; /** * This widgets is a text area which automatically resizes is width and height * according to its text.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 20/12/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class TextAreaAutoSize extends MTextArea { private static final long serialVersionUID = 1L; /** States whether the text typed in the filed is valid. If not, the background of the filed is painted in red. * That feature can be used when the text typed needed to be validated. */ protected boolean valid; protected final JTextArea msg = new JTextArea(); /** * Creates the widget. */ public TextAreaAutoSize() { super(false, true); valid = true; setRows(1); setColumns(1); setBorder(null); getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK), "insertBreakLD"); //$NON-NLS-1$ getActionMap().put("insertBreakLD", new DefaultEditorKit.InsertBreakAction()); //$NON-NLS-1$ addKeyListener(new TextAreaKeyListener()); eventManager = new SwingEventManager(); eventManager.attachTo(this); msg.setEditable(false); msg.setFocusable(false); msg.setBorder(null); msg.setBorder(BorderFactory.createLineBorder(Color.WHITE)); msg.setBackground(Color.WHITE); msg.setForeground(Color.GRAY); } @Override public void setVisible(final boolean visible) { super.setVisible(visible); if(visible){ updateDimension(); updateBackground(); msg.setVisible(!msg.getText().isEmpty()); }else msg.setVisible(false); } /** * @return The text field that contains a message associated to the text area. */ public JTextArea getMessageField() { return msg; } /** * Defines whether the text typed in the filed is valid. If not, the background of the filed is painted in red. * That feature can be used when the text typed needed to be validated. * @param ok Valid or not. * @since 3.2 */ public void setValid(final boolean ok) { valid = ok; updateBackground(); } /** * @return Whether the text typed in the filed is valid. * @since 3.1 */ public boolean isValidText() { return valid;} protected void updateBackground() { setBackground(valid?Color.WHITE:Color.RED); } @Override public void setText(final String text) { super.setText(text); updateDimension(); } /** * Updates the size of the widget according to its text. */ public void updateDimension() { // A space is added at the end of the text to consider all the \n characters. final String text = getText() + ' '; final String[] textSplited = text.split("\n"); //$NON-NLS-1$ Rectangle2D rec; double width = 0.; double height = 0.; final FontMetrics fm = getFontMetrics(getFont()); final double heightInc = fm.getHeight(); if(textSplited.length>0) // Removing the space added at the beginning of the method. textSplited[textSplited.length-1] = textSplited[textSplited.length-1].substring(0, textSplited[textSplited.length-1].length()-1); for(final String str : textSplited) { rec = fm.getStringBounds(str, null); if(rec.getWidth()>width) width = rec.getWidth(); height += heightInc; } setBounds(getX(), getY(), (int)width+10, (int)height); if(!msg.getText().isEmpty()) msg.setBounds(getX(), getY()+getHeight(), (int)fm.getStringBounds(msg.getText(), null).getWidth()+2, (int)heightInc+2); } /** * This listener is used to override the key binding "enter" that adds an end of line * character. */ class TextAreaKeyListener implements KeyListener { @Override public void keyTyped(final KeyEvent e) { // } @Override public void keyReleased(final KeyEvent e) { updateDimension(); } @Override public void keyPressed(final KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER && e.getModifiers()==0) e.consume(); } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/ToolbarBuilder.java000066400000000000000000000157561321075051700327440ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Component; import java.awt.Dimension; import java.util.IdentityHashMap; import java.util.Map; import javax.swing.Box; import javax.swing.JLabel; import net.sf.latexdraw.glib.ui.LCanvas; import net.sf.latexdraw.instruments.DrawingPropertiesCustomiser; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MProgressBar; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MToolBar; /** * The composer that creates the tool bar of the application.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/08/11
    * @author Arnaud BLOUIN * @version 3.0 */ public class ToolbarBuilder extends SwingUIComposer { /** The main frame of the interactive system. */ protected LFrame frame; /** The toolbar that contains the widgets to customise the magnetic grid. */ protected WidgetMiniToolbar magneticGridB; /** The toolbar that contains the widgets to customise the drawing's properties. */ protected WidgetMiniToolbar drawingB; /** The hash map used to map a widget to its container. */ protected Map mapContainers; /** * Creates the toolbar of the interactive system. * @param lframe The main frame of the interactive system. * @throws NullPointerException If frame is null. * @since 3.0 */ public ToolbarBuilder(final LFrame lframe) { super(); frame = lframe; mapContainers = new IdentityHashMap<>(); } @Override public void compose(final MProgressBar progressBar) { widget = new MToolBar(true); final LCanvas canvas = frame.getCanvas(); // Adding new/open/save buttons widget.add(frame.fileLoader.getNewButton()); widget.add(frame.fileLoader.getLoadButton()); widget.add(frame.fileLoader.getSaveButton()); // Adding the pdf button widget.add(frame.exporter.getPdfButton()); // Adding the zoom buttons. widget.add(frame.zoomer.getZoomSpinner()); widget.add(frame.zoomer.getZoomDefaultButton()); if(progressBar!=null) progressBar.addToProgressBar(5); composeMagneticGridToolbar(canvas); composeDrawingPropertiesToolbar(canvas); // Adding the undo/redo buttons. widget.add(frame.undoManager.getUndoB()); widget.add(frame.undoManager.getRedoB()); //Adding a widget to select shape. widget.add(frame.editingSelector.getHandB()); widget.add(frame.deleter.getDeleteB()); if(progressBar!=null) progressBar.addToProgressBar(5); //Adding a widget to create lines. widget.add(frame.editingSelector.getLinesB()); composeRectangleLikeToolbar(); composeEllipseLikeToolbar(); composePolygonLikeToolbar(); if(progressBar!=null) progressBar.addToProgressBar(5); composeCurveLikeToolbar(); composeGridLikeToolbar(); widget.add(frame.editingSelector.getPlotB()); widget.add(frame.editingSelector.getArcB()); widget.add(frame.editingSelector.getTextB()); widget.add(frame.editingSelector.getFreeHandB()); widget.add(frame.editingSelector.getDotB()); widget.add(frame.editingSelector.getPicB()); widget.add(frame.editingSelector.getCodeB()); widget.add(frame.exceptionsManager.getExceptionB()); if(progressBar!=null) progressBar.addToProgressBar(5); } protected void composeDrawingPropertiesToolbar(final LCanvas canvas) { final DrawingPropertiesCustomiser cust = frame.getDrawingPropCustomiser(); drawingB = new WidgetMiniToolbar(LResources.DRAWING_PROP_ICON, WidgetMiniToolbar.LOCATION_SOUTH, canvas); drawingB.setToolTipText(LangTool.INSTANCE.getStringActions("ToolbarBuilder.1")); //$NON-NLS-1$ widget.add(drawingB); cust.getTitleField().setColumns(15); cust.getLabelField().setColumns(10); UIBuilder.addSpinner(drawingB, cust.getScaleSpinner(), 65); drawingB.addComponent(new JLabel(LangTool.INSTANCE.getStringActions("ToolbarBuilder.2"))); //$NON-NLS-1$ drawingB.addComponent(cust.getTitleField()); drawingB.addComponent(new JLabel(LangTool.INSTANCE.getStringActions("ToolbarBuilder.3"))); //$NON-NLS-1$ drawingB.addComponent(cust.getLabelField()); drawingB.addComponent(cust.getMiddleHorizPosCB()); drawingB.addComponent(cust.getPositionCB().getLabel()); drawingB.addComponent(cust.getPositionCB()); drawingB.addSeparator(); } /** * Adds widgets to select the type of shape to create. Here rectangle/square shape. * @since 3.0 */ protected void composeRectangleLikeToolbar() { widget.add(frame.editingSelector.getRecB()); widget.add(frame.editingSelector.getSquareB()); } /** * Adds a widgets to create ellipse/circle shapes. * @since 3.0 */ protected void composeEllipseLikeToolbar() { widget.add(frame.editingSelector.getEllipseB()); widget.add(frame.editingSelector.getCircleB()); } /** * Adds a widgets to create polygon/rhombus/triangle shapes. * @since 3.0 */ protected void composePolygonLikeToolbar() { widget.add(frame.editingSelector.getPolygonB()); widget.add(frame.editingSelector.getRhombusB()); widget.add(frame.editingSelector.getTriangleB()); } /** * Adds a widgets to create bezier curve shapes. * @since 3.0 */ protected void composeCurveLikeToolbar() { widget.add(frame.editingSelector.getBezierClosedB()); widget.add(frame.editingSelector.getBezierB()); } /** * Adds a widgets to create grid/axes shapes. * @since 3.0 */ protected void composeGridLikeToolbar() { widget.add(frame.editingSelector.getGridB()); widget.add(frame.editingSelector.getAxesB()); } protected void composeMagneticGridToolbar(final LCanvas canvas) { magneticGridB = new WidgetMiniToolbar(LResources.DISPLAY_GRID_ICON, WidgetMiniToolbar.LOCATION_SOUTH, canvas); magneticGridB.setToolTipText(LangTool.INSTANCE.getString18("LaTeXDrawFrame.12")); //$NON-NLS-1$ widget.add(magneticGridB); magneticGridB.addComponent(frame.gridCustomiser.getStyleList()); mapContainers.put(frame.gridCustomiser.getStyleList(), magneticGridB); magneticGridB.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); magneticGridB.addComponent(frame.gridCustomiser.getMagneticCB()); mapContainers.put(frame.gridCustomiser.getMagneticCB(), magneticGridB); magneticGridB.addComponent(Box.createHorizontalStrut(UIBuilder.SEPARATION_WIDTH)); final MSpinner spinner = frame.gridCustomiser.getGridSpacing(); spinner.setPreferredSize(new Dimension(65, UIBuilder.HEIGHT_TEXTFIELD)); if(spinner.getLabel()!=null) magneticGridB.addComponent(spinner.getLabel()); magneticGridB.addComponent(spinner); mapContainers.put(spinner, magneticGridB); magneticGridB.addSeparator(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/UIBuilder.java000066400000000000000000000202471321075051700316460ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import javax.swing.BoxLayout; import net.sf.latexdraw.glib.ui.LCanvas; import net.sf.latexdraw.lang.LangTool; import org.malai.instrument.Instrument; import org.malai.swing.ui.SwingUIComposer; import org.malai.swing.widget.MComboBox; import org.malai.swing.widget.MPanel; import org.malai.swing.widget.MProgressBar; import org.malai.swing.widget.MSpinner; import org.malai.swing.widget.MToolBar; import org.malai.swing.widget.ScrollableWidget; /** * This composer composes the latexdraw user interface.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify 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. *
    * LaTeXDraw is distributed without any warranty; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
    *
    * 20/31/2010
    * @author Arnaud BLOUIN * @since 3.0 */ public class UIBuilder extends SwingUIComposer { /** The max height of the textfield widget. */ protected static final int HEIGHT_TEXTFIELD = 30; /** The space added between widgets. */ protected static final int SEPARATION_WIDTH = 5; /** The menu bar composer. */ protected MenubarBuilder menubarBuilder; /** The tool bar composer. */ protected ToolbarBuilder toolbarBuilder; /** The properties tool bar composer. */ protected PropertiesToolbarBuilder propToolbarBuilder; /** * Creates the composer of the latexdraw user interface. * @param frame The frame of the interactive system that contains the instruments and presentations to compose. * @since 3.0 */ public UIBuilder(final LFrame frame) { super(); widget = frame; menubarBuilder = new MenubarBuilder(widget); toolbarBuilder = new ToolbarBuilder(widget); propToolbarBuilder = new PropertiesToolbarBuilder(widget); } /** * @return The toolbar of the application. * @since 3.0 */ public MToolBar getToolbar() { return toolbarBuilder.getWidget(); } // FIXME SCALA: When a trait will be used, this trait could be used as type of the parameter instead of several operations. protected static void addSpinner(final Container cont, final MSpinner spinner, final int width) { spinner.setPreferredSize(new Dimension(width, HEIGHT_TEXTFIELD)); if(spinner.getLabel()!=null) cont.add(spinner.getLabel()); cont.add(spinner); } protected static void addCombobox(final Container cont, final MComboBox spinner) { if(spinner.getLabel()!=null) cont.add(spinner.getLabel()); cont.add(spinner); } @Override public void setWidgetVisible(final Component widget, final boolean visible) { final Component comp; if(widget==null || visible==widget.isVisible()) return; // For widgets having a ScrollPane we must check their containing ScollPane. if(widget instanceof ScrollableWidget && ((ScrollableWidget)widget).hasScrollPane()) comp = ((ScrollableWidget)widget).getScrollpane(); else comp = widget; super.setWidgetVisible(comp, visible); WidgetMiniToolbar list = toolbarBuilder.mapContainers.get(comp); if(list==null) list = propToolbarBuilder.mapContainers.get(comp); if(list!=null) { list.setVisible(visible || list.isContentVisible()); if(list.isVisible() && list.getWindowToolBar().isVisible()) list.update(); } } @Override public void compose(final MProgressBar progressBar) { final MPanel statusPanel = new MPanel(false, false); menubarBuilder.compose(progressBar); toolbarBuilder.compose(progressBar); propToolbarBuilder.compose(progressBar); /* Creation of the drawing area composed of the canvas, the scales, etc. */ final MPanel drawingArea = new MPanel(false, false); drawingArea.setLayout(new BorderLayout()); drawingArea.add(widget.xScaleRuler, BorderLayout.NORTH); drawingArea.add(widget.yScaleRuler, BorderLayout.WEST); drawingArea.add(widget.layeredPanel, BorderLayout.CENTER); drawingArea.add(propToolbarBuilder.getWidget(), BorderLayout.SOUTH); if(progressBar!=null) progressBar.addToProgressBar(5); /* Creation of the tabbed pane. */ widget.tabbedPanel.addTab(LangTool.INSTANCE.getStringActions("UIBuilder.1"), drawingArea); //$NON-NLS-1$ widget.tabbedPanel.addTab("PST", widget.getCodePanel()); //$NON-NLS-1$ statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.LINE_AXIS)); statusPanel.add(widget.fileLoader.getProgressBar()); statusPanel.add(widget.statusBar); widget.fileLoader.getProgressBar().setMaximumSize(new Dimension(200, 60)); widget.setLayout(new BorderLayout()); widget.add(toolbarBuilder.getWidget(), BorderLayout.NORTH); widget.add(widget.tabbedPanel, BorderLayout.CENTER); widget.add(statusPanel, BorderLayout.SOUTH); if(progressBar!=null) progressBar.addToProgressBar(5); widget.setJMenuBar(menubarBuilder.getWidget()); // Updating the concrete presentations. widget.updatePresentations(); setEventableToInstruments(); initialiseInstrumentsActivation(); if(progressBar!=null) progressBar.addToProgressBar(5); } /** * Sets the eventable objects to the instruments. * @since 3.0 */ protected void setEventableToInstruments() { final LCanvas canvas = widget.getCanvas(); final MToolBar toolbar = toolbarBuilder.getWidget(); widget.prefActivator.addEventable(menubarBuilder.editMenu); widget.exceptionsManager.addEventable(toolbar); widget.scroller.addEventable(canvas); widget.editingSelector.addEventable(toolbar); widget.hand.addEventable(canvas); widget.pencil.addEventable(canvas); widget.exporter.addEventable(toolbar); widget.exporter.addEventable(widget.exporter.getExportMenu()); widget.scaleRulersCustomiser.addEventable(menubarBuilder.displayMenu); widget.scaleRulersCustomiser.addEventable(menubarBuilder.unitMenu); widget.fileLoader.addEventable(widget.fileLoader.getRecentFilesMenu()); widget.gridCustomiser.addEventable(toolbarBuilder.magneticGridB.getToolbar()); widget.helper.addEventable(menubarBuilder.helpMenu); setGlobalShortcutEventable(widget.undoManager, canvas); setGlobalShortcutEventable(widget.zoomer, canvas); setGlobalShortcutEventable(widget.deleter, canvas); setGlobalShortcutEventable(widget.paster, canvas); setGlobalShortcutEventable(widget.fileLoader, canvas); widget.fileLoader.addEventable(widget); widget.tabSelector.addEventable(widget.tabbedPanel); widget.drawingPropCustomiser.addEventable(toolbarBuilder.drawingB.getToolbar()); widget.templateManager.addEventable(widget.templateManager.templateMenu()); widget.templateManager.addEventable(widget.exporter.getExportMenu()); } protected void setGlobalShortcutEventable(final Instrument instrument, final LCanvas canvas) { if(instrument!=null) { instrument.addEventable(toolbarBuilder.getWidget()); instrument.addEventable(propToolbarBuilder.getWidget()); instrument.addEventable(canvas); instrument.addEventable(widget.getTabbedPanel()); instrument.addEventable(widget.getCodePanel()); instrument.addEventable(menubarBuilder.displayMenu); instrument.addEventable(menubarBuilder.drawingMenu); instrument.addEventable(menubarBuilder.editMenu); instrument.addEventable(menubarBuilder.helpMenu); instrument.addEventable(menubarBuilder.unitMenu); } } protected void initialiseInstrumentsActivation() { widget.prefActivator.setActivated(true); widget.helper.setActivated(true); widget.gridCustomiser.setActivated(true); widget.scroller.setActivated(true); widget.exporter.setActivated(false); widget.editingSelector.setActivated(true); widget.hand.setActivated(true); widget.pencil.setActivated(false); widget.deleter.setActivated(false); widget.undoManager.setActivated(true); widget.zoomer.setActivated(true); widget.fileLoader.setActivated(true); widget.scaleRulersCustomiser.setActivated(true); widget.paster.setActivated(true); widget.tabSelector.setActivated(true); widget.drawingPropCustomiser.setActivated(true); widget.templateManager.setActivated(true); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/WidgetMiniToolbar.java000077500000000000000000000305521321075051700334100ustar00rootroot00000000000000package net.sf.latexdraw.ui; import net.sf.latexdraw.badaboom.BadaboomCollector; import org.malai.interaction.Eventable; import org.malai.picking.Pickable; import org.malai.picking.Picker; import org.malai.swing.interaction.SwingEventManager; import org.malai.swing.widget.MToolBar; import org.malai.swing.widget.SwingWidgetUtilities; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; /** * This class defines a button which displays a frame containing * others buttons; a kind of menu with buttons.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/02/06
    * @author Arnaud BLOUIN * @version 3.0 */ public class WidgetMiniToolbar extends JButton implements ActionListener, WindowFocusListener, Picker, Eventable { private static final long serialVersionUID = 1L; /** The frame which displays the toolbar */ protected JFrame buttonsFrame; /** The toolbar which contains the buttons */ protected MToolBar 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 component to give the focus when the toolbar is closed. */ protected Component componentFocusOnClose; /** The frame is at the north of the button. */ public static final int LOCATION_NORTH = 1; /** The frame is at the south of the button. */ public static final int LOCATION_SOUTH = 2; private static final int WIDTH_ICON = 10; private static final int HEIGHT_ICON = 20; private static final int TRIANGLE_NB_POINT = 3; private static final int TRIANGLE_GAP = 4; /** * The constructor using a text. * @param txt The text of the ListJToggleButton. * @param locate The position of the mini toolbar. * @param componentFocusOnClose The component to give the focus when the toolbar is closed. Can be null. * @since 3.0 */ public WidgetMiniToolbar(final String txt, final int locate, final Component componentFocusOnClose) { super(txt); setIcon(); intializing(locate); this.componentFocusOnClose = componentFocusOnClose; } /** * The constructor using an icon. * @param icon The icon of the ListJToggleButton. * @param locate The position of the mini toolbar. * @param componentFocusOnClose The component to give the focus when the toolbar is closed. Can be null. */ public WidgetMiniToolbar(final Icon icon, final int locate, final Component componentFocusOnClose) { super(icon); intializing(locate); this.componentFocusOnClose = componentFocusOnClose; } /** * Initialises the ListJToggleButton. * @param locate The position of the mini toolbar. * @since 1.9.1 */ protected void intializing(final int locate) { try{ setLocation(locate); } catch(final IllegalArgumentException e) {location = LOCATION_SOUTH;} toolbar = new MToolBar(true); toolbar.setFloatable(false); final JPanel buttonsPanel = new JPanel(); buttonsPanel.add(toolbar); buttonsPanel.setBorder(BorderFactory.createEtchedBorder()); buttonsFrame = new WindowWidgets(buttonsPanel); addActionListener(this); addComponent(new CloseButton()); // The mini-toolbar must disappear when a click or a press occurs somewhere else. Toolkit.getDefaultToolkit().addAWTEventListener( new ListToggleButtonAWTEventListener(), AWTEvent.MOUSE_EVENT_MASK); } /** * @return True if at least one of the widgets of the list is visible. * @since 3.0 */ public boolean isContentVisible() { return isContentVisibleContainer(toolbar); } private static boolean isContentVisibleContainer(final Container cont) { boolean visible = false; Component comp; for(int i=0, size=cont.getComponentCount(); iLOCATION_NORTH nor LOCATION_SOUTH. */ public void setLocation(final int locat) { if(locat==LOCATION_NORTH || locat==LOCATION_SOUTH) location = locat; else throw new IllegalArgumentException(); } /** * Adds a separator to the toolbar. */ public void addSeparator() { final 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 comp The new button to add. */ public void addComponent(final Component comp) { toolbar.add(comp, null, toolbar.getComponentCount()-1); buttonsFrame.pack(); if(comp instanceof AbstractButton) { final AbstractButton ab = (AbstractButton) comp; ab.addActionListener(this); } } @Override public Component add(final Component comp) { addComponent(comp); return comp; } /** * 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(final Graphics g, final int width, final int height) { if(g==null || width<1 || height<1) return ; if(g instanceof Graphics2D) { final 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); } final int xs[] = new int[TRIANGLE_NB_POINT]; final int ys[] = new int[TRIANGLE_NB_POINT]; 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-TRIANGLE_GAP; ys[1] = height-HEIGHT_TRIANGLE-TRIANGLE_GAP; ys[2] = height-TRIANGLE_GAP; } else { xs[0] = width-WIDTH_TRIANGLE>>1; xs[1] = width+WIDTH_TRIANGLE>>1; xs[2] = width>>1; ys[0] = HEIGHT_TRIANGLE+TRIANGLE_GAP; ys[1] = HEIGHT_TRIANGLE+TRIANGLE_GAP; ys[2] = TRIANGLE_GAP; } g.setColor(Color.red); g.fillPolygon(xs, ys, TRIANGLE_NB_POINT); g.setColor(Color.black); g.drawPolygon(xs, ys, TRIANGLE_NB_POINT); } @Override protected void paintComponent(final Graphics g) { super.paintComponent(g); if(getText().isEmpty()) 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())); } @Override public void actionPerformed(final ActionEvent e) { final Object src = e.getSource(); if(src instanceof WidgetMiniToolbar) { final boolean visible = !buttonsFrame.isVisible(); defineToolbarLocation(); setButtonsFrameVisible(visible); return ; } if(src instanceof JCheckBox || src instanceof JRadioButton) return ; if(src instanceof CloseButton) { setButtonsFrameVisible(false); return; } if(src instanceof JToggleButton || src instanceof JButton) { setButtonsFrameVisible(false); } } /** * Sets id the toolbar must be visible or not. * @param visible True: the toolbar will be visible. * @since 3.0 */ public void setButtonsFrameVisible(final boolean visible) { if(visible) update(); buttonsFrame.setVisible(visible); if(visible) buttonsFrame.requestFocusInWindow(); if(!visible && componentFocusOnClose!=null) componentFocusOnClose.requestFocus(); } /** * @return The location of the panel of buttons. */ public int getLocationButtonPanel() { return location; } @Override public void windowGainedFocus(final WindowEvent e) { // toolbar.requestFocusInWindow(); } @Override public void windowLostFocus(final 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(final Icon defaultIcon) { if(getText().isEmpty()) super.setIcon(defaultIcon); else setIcon(); } @Override public boolean contains(final Object obj) { return SwingWidgetUtilities.INSTANCE.contains(toolbar.getComponents(), obj); } @Override public Pickable getPickableAt(final double x, final double y) { return SwingWidgetUtilities.INSTANCE.getPickableAt(this, toolbar.getComponents(), x, y); } @Override public Picker getPickerAt(final double x, final double y) { return SwingWidgetUtilities.INSTANCE.getPickerAt(this, toolbar.getComponents(), x, y); } @Override public boolean hasEventManager() { return false; } @Override public SwingEventManager getEventManager() { return null; } /** * @return The toolbar associated to the toggle button. * @since 3.0 */ public MToolBar getToolbar() { return toolbar; } public JFrame getWindowToolBar() { return buttonsFrame; } /** * Updates the shape of the widgets using its components. * @since 3.0 */ public void update() { if(buttonsFrame!=null) buttonsFrame.pack(); } class ListToggleButtonAWTEventListener implements AWTEventListener { protected ListToggleButtonAWTEventListener() { super(); } @Override public void eventDispatched(final AWTEvent event) { // Only if the toolbar is visible and the event is a mouse event. if(buttonsFrame.isVisible() && (event.getID()==MouseEvent.MOUSE_PRESSED || event.getID()==MouseEvent.MOUSE_CLICKED) && event.getSource() instanceof Component && event instanceof MouseEvent) { final MouseEvent me = (MouseEvent)event; final Component comp = (Component)me.getSource(); final Point pt = new Point(me.getPoint()); // Converting the mouse event point into a screen point. SwingUtilities.convertPointToScreen(pt, comp); // The toolbar is hidden if: // - the button of the toolbar does not contain the point of the event. // - the toolbar does not contain the point of the event. // - the widget concerned by the event is not a widget of the toolbar (necessary to manage widgets // which size is not contained into the toolbar such as ComboBoxes). try{ if(buttonsFrame.isVisible() && !new Rectangle(buttonsFrame.getLocationOnScreen(), buttonsFrame.getSize()).contains(pt) && WidgetMiniToolbar.this.isVisible() && !new Rectangle(WidgetMiniToolbar.this.getLocationOnScreen(), WidgetMiniToolbar.this.getSize()).contains(pt) && SwingUtilities.getAncestorOfClass(WindowWidgets.class, comp)!=buttonsFrame) { WidgetMiniToolbar.this.buttonsFrame.setVisible(false); } }catch(final IllegalComponentStateException ex){ BadaboomCollector.INSTANCE.add(ex); } } } } private static class WindowWidgets extends JFrame { private static final long serialVersionUID=1L; protected WindowWidgets(final Container buttonsPanel) { super(); setUndecorated(true); setType(Window.Type.UTILITY); setFocusable(false); setAlwaysOnTop(true); getContentPane().add(buttonsPanel); pack(); } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/XScaleRuler.java000066400000000000000000000040251321075051700322070ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Line2D; import net.sf.latexdraw.glib.ui.ICanvas; /** * This class defines an X-scale ruler.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/12/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class XScaleRuler extends ScaleRuler { private static final long serialVersionUID = 1L; /** The y rule. used to get information about where the x-scale must be displayed. */ protected YScaleRuler yruler; /** * Defines a x-scale ruler. * @param canvas The canvas to supervises. * @param yruler The opposite ruler. Can be null. * @throws IllegalArgumentException if the given canvas is null. * @since 3.0 */ public XScaleRuler(final ICanvas canvas, final YScaleRuler yruler) { super(canvas); this.yruler = yruler; setPreferredSize(new Dimension(500, SIZE)); } @Override protected void drawLine(final Graphics2D g2, final double positionA, final double positionB1, final double positionB2) { g2.draw(new Line2D.Double(positionA, positionB1, positionA, positionB2)); } @Override protected double getLength() { return getSize().getWidth()+getClippingGap(); } @Override protected double getStart() { return yruler==null || !yruler.isVisible() ? 0. : SIZE; } @Override protected void adaptGraphicsToViewpoint(final Graphics2D g) { g.translate((int)-getClippingGap(), 0); } @Override protected double getClippingGap() { return canvas.getVisibleBound().getMinX(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/YScaleRuler.java000066400000000000000000000034101321075051700322050ustar00rootroot00000000000000package net.sf.latexdraw.ui; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Line2D; import net.sf.latexdraw.glib.ui.ICanvas; /** * This class defines an Y-scale ruler.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/12/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class YScaleRuler extends ScaleRuler { private static final long serialVersionUID = 1L; /** * Defines a y-scale ruler. * @param canvas The canvas to supervises. * @throws IllegalArgumentException if the given canvas is null. * @since 3.0 */ public YScaleRuler(final ICanvas canvas) { super(canvas); setPreferredSize(new Dimension(SIZE, 500)); } @Override protected void drawLine(final Graphics2D g2, final double positionA, final double positionB1, final double positionB2) { g2.draw(new Line2D.Double(positionB1, positionA, positionB2, positionA)); } @Override protected double getLength() { return getSize().getHeight()+getClippingGap(); } @Override protected double getStart() { return 0.; } @Override protected void adaptGraphicsToViewpoint(final Graphics2D g) { g.translate(0, (int)-getClippingGap()); } @Override protected double getClippingGap() { return canvas.getVisibleBound().getMinY(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialog/000077500000000000000000000000001321075051700304115ustar00rootroot00000000000000AboutDialogueBox.java000066400000000000000000000173211321075051700343760ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialogpackage net.sf.latexdraw.ui.dialog; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Image; import java.awt.MediaTracker; import java.awt.Rectangle; import java.awt.Toolkit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.Map; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.DisplayCanvas; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import net.sf.latexdraw.util.VersionChecker; /** * Define the dialogue box describing the latexdraw information.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/20/10
    * @author Arnaud BLOUIN * @version 3.0 */ public class AboutDialogueBox extends JFrame { private static final long serialVersionUID = 1L; /** * Creates the dialogue box. * @since 3.0 */ public AboutDialogueBox() { super(); final int width = 490; final int height = 440; final JTabbedPane tabbedPane = new JTabbedPane(); setTitle(LResources.LABEL_ABOUT); createMainPanel(tabbedPane); createReleaseNotePanel(tabbedPane); createContributorsPanel(tabbedPane); createSystemPanel(tabbedPane); createLicensePanel(tabbedPane); tabbedPane.setPreferredSize(new Dimension(510, 290)); setIconImage(LResources.ABOUT_ICON.getImage()); getContentPane().add(tabbedPane); setSize(width, height); final Dimension dim = LSystem.INSTANCE.getScreenDimension(); final Rectangle rec = getGraphicsConfiguration().getBounds(); setLocation((int)(rec.getX()+dim.width/2.0-getWidth()/2.0), (int)(rec.getY()+dim.height/2.0-getHeight()/2.0)); } /** * Read a text file using the utf-8 encoding and sets it to the given editor panel. */ private void setTextToEditorPane(final JEditorPane editor, final String path) { try { try(final InputStream is = getClass().getResourceAsStream(path); final Reader reader = new InputStreamReader(is, "UTF-8");//$NON-NLS-1$ final BufferedReader br = new BufferedReader(reader)){ final StringBuilder txt = new StringBuilder(); String line = br.readLine(); while(line != null) { txt.append(line).append(LResources.EOL); line = br.readLine(); } editor.setContentType("text/plain");//$NON-NLS-1$ editor.setText(txt.toString()); } }catch(final IOException ex) { BadaboomCollector.INSTANCE.add(ex); } } private void createSystemPanel(final JTabbedPane tabbedPane) { final JEditorPane editorPane = new JEditorPane(); final StringBuilder builder = new StringBuilder(); editorPane.setEditable(false); builder.append("LateXDraw version: ").append(VersionChecker.VERSION).append(", ").append(VersionChecker.ID_BUILD).append(LResources.EOL); //$NON-NLS-1$//$NON-NLS-2$ builder.append("LaTeX version:").append(LSystem.INSTANCE.getLaTeXVersion()).append(LResources.EOL); //$NON-NLS-1$ builder.append("DviPS version:").append(LSystem.INSTANCE.getDVIPSVersion()).append(LResources.EOL); //$NON-NLS-1$ builder.append("PS2PDF version:").append(LResources.EOL).append(LSystem.INSTANCE.getPS2PDFVersion()).append(LResources.EOL); //$NON-NLS-1$ builder.append("PS2EPSI version:").append(LSystem.INSTANCE.getPS2EPSVersion()).append(LResources.EOL); //$NON-NLS-1$ builder.append("PDFcrop version:").append(LSystem.INSTANCE.getPDFCROPVersion()).append(LResources.EOL); //$NON-NLS-1$ builder.append("Java properties:").append(LResources.EOL); //$NON-NLS-1$ for(final Map.Entry entry : System.getProperties().entrySet()) builder.append(entry.getKey()).append(':').append(' ').append(entry.getValue()).append(LResources.EOL); editorPane.setText(builder.toString()); tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("About.1"), new JScrollPane(editorPane)); //$NON-NLS-1$ editorPane.setCaretPosition(0); } private void createLicensePanel(final JTabbedPane tabbedPane) { try { final JEditorPane editorPane = new JEditorPane(); setTextToEditorPane(editorPane, "/res/license.txt");//$NON-NLS-1$ initEditorPane(editorPane); tabbedPane.add(LangTool.INSTANCE.getString18("LaTeXDrawFrame.28"), new JScrollPane(editorPane)); //$NON-NLS-1$ editorPane.setCaretPosition(0); }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } } private void createReleaseNotePanel(final JTabbedPane tabbedPane) { try { final JEditorPane editorPane = new JEditorPane(); setTextToEditorPane(editorPane, "/res/release_note.txt");//$NON-NLS-1$ initEditorPane(editorPane); tabbedPane.add(LangTool.INSTANCE.getString18("LaTeXDrawFrame.27"), new JScrollPane(editorPane)); //$NON-NLS-1$ editorPane.setCaretPosition(0); }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } } private void createContributorsPanel(final JTabbedPane tabbedPane) { try { final JEditorPane editorPane = new JEditorPane(); setTextToEditorPane(editorPane, "/res/contributors.txt");//$NON-NLS-1$ initEditorPane(editorPane); tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("About.2"), new JScrollPane(editorPane)); //$NON-NLS-1$ editorPane.setCaretPosition(0); }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } } private void createMainPanel(final JTabbedPane tabbedPane) { try { final Image i = Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("res/LaTeXDrawSmall.png"));//$NON-NLS-1$ final MediaTracker tracker = new MediaTracker(this); tracker.addImage(i,0); try { tracker.waitForID(0); } catch(final InterruptedException e) { BadaboomCollector.INSTANCE.add(e); } final JPanel panel = new JPanel(); final JEditorPane editorPane = new JEditorPane(); initEditorPane(editorPane); panel.setLayout(new BorderLayout()); editorPane.setContentType("text/html");//$NON-NLS-1$ editorPane.setBackground(tabbedPane.getBackground()); editorPane.setText("

    "+ //$NON-NLS-1$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.219")+ " " + //$NON-NLS-1$ //$NON-NLS-2$ VersionChecker.VERSION + VersionChecker.VERSION_STABILITY + //$NON-NLS-1$ //$NON-NLS-2$ LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.220") + " " + VersionChecker.ID_BUILD+"

    "+//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ LResources.LABEL_APP+LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.221")+"
    "+//$NON-NLS-1$//$NON-NLS-2$ "Copyright(c) 2005-2017 - Arnaud BLOUIN

    "+//$NON-NLS-1$ "http://latexdraw.sourceforge.net/
    ");//$NON-NLS-1$ panel.add(new DisplayCanvas(i), BorderLayout.NORTH); panel.add(new JScrollPane(editorPane), BorderLayout.SOUTH); tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.general"), panel); //$NON-NLS-1$ }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); } } protected static void initEditorPane(final JEditorPane editorPane) { editorPane.setEditable(false); editorPane.setDragEnabled(true); } } ExportDialog.java000066400000000000000000000053211321075051700335770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialogpackage net.sf.latexdraw.ui.dialog; import java.awt.Component; import java.io.File; import javax.swing.BoxLayout; import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.SwingConstants; import net.sf.latexdraw.filters.JPGFilter; import net.sf.latexdraw.lang.LangTool; /** * Define a JFileChooser that exports the drawing in a graphical format.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 04/08/07
    * @author Arnaud BLOUIN * @version 3.0 */ 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; /** * Creates the dialogue box used to export drawings. * @param path The path of a file or directory to focus on. * @since 3.0 */ public ExportDialog(final String path) { super(path); setApproveButtonText(LangTool.INSTANCE.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(LangTool.INSTANCE.getStringDialogFrame("ExportDialog.0"))); //$NON-NLS-1$ compressionSlide = new JSlider(SwingConstants.VERTICAL, 0, 100, 20); compressionSlide.setMajorTickSpacing(10); compressionSlide.setPaintTicks(true); compressionSlide.setPaintLabels(true); pCompression.add(compressionSlide); setAccessory(pCompression); } @Override public int showDialog(final Component parent, final String approveButtonText) { pCompression.setVisible(accept(new File(JPGFilter.JPG_EXTENSION))); 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() { return accept(new File(JPGFilter.JPG_EXTENSION)) ? compressionSlide.getValue() : -1; } } InsertCodeDialog.java000066400000000000000000000104411321075051700343540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialogpackage net.sf.latexdraw.ui.dialog; import java.awt.Component; import java.awt.Dimension; import java.awt.Frame; import java.awt.Rectangle; import javax.swing.BoxLayout; import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; import javax.swing.SwingConstants; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import org.malai.instrument.Instrument; import org.malai.swing.widget.MButton; import org.malai.swing.widget.MDialog; import org.malai.swing.widget.MEditorPane; import org.malai.swing.widget.MPanel; /** * This dialogue box allows users to insert code that will be converted into shapes. *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-10-23
    * @author Arnaud BLOUIN
    * @version 3.0
    */ public class InsertCodeDialog extends MDialog { private static final long serialVersionUID = 1L; /** This editor containing code */ private final MEditorPane editor; private final MButton okButton; private final MButton cancelButton; private final JEditorPane errorMessages; /** * Creates the code dialog box. * @param parentIns The instrument managing this dialogue box. */ public InsertCodeDialog(final Frame parent, final Instrument parentIns) { super(parent, LangTool.INSTANCE.getString16("InsertPSTricksCodeFrame.0"), true); //$NON-NLS-1$ setIconImage(LResources.INSERT_PST_ICON.getImage()); final MPanel pButton = new MPanel(false, true); okButton = new MButton(LResources.LABEL_OK); cancelButton = new MButton(LResources.LABEL_CANCEL); editor = new MEditorPane(true, true); parentIns.addEventable(pButton); parentIns.addEventable(editor); // The scroller of the editor final JScrollPane scrollPane = new JScrollPane(editor); scrollPane.setMinimumSize(new Dimension(450, 250)); scrollPane.setPreferredSize(new Dimension(450, 250)); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); final JLabel label = new JLabel(LangTool.INSTANCE.getString16("LaTeXDrawFrame.16"), SwingConstants.CENTER); //$NON-NLS-1$ label.setAlignmentX(Component.CENTER_ALIGNMENT); errorMessages = new JEditorPane(); errorMessages.setEditable(false); final JScrollPane scrollPaneErr = new JScrollPane(errorMessages); scrollPaneErr.setMinimumSize(new Dimension(450, 50)); scrollPaneErr.setPreferredSize(new Dimension(450, 50)); editor.setText("");//$NON-NLS-1$ pButton.add(okButton); pButton.add(cancelButton); 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(scrollPaneErr); getContentPane().add(pButton); final Dimension dim = LSystem.INSTANCE.getScreenDimension(); final Rectangle rec = getGraphicsConfiguration().getBounds(); pack(); setLocation((int)(rec.getX()+dim.width/2.0-getWidth()/2.0), (int)(rec.getY()+dim.height/2.0-getHeight()/2.0)); setVisible(false); } /** * @return The text of the editor. * @since 3.0 */ public String getText() { return editor.getText(); } @Override public void setVisible(final boolean visible) { if(visible) editor.setText("");//$NON-NLS-1$ super.setVisible(visible); } /** * @return the okButton. * @since 3.0 */ public MButton getOkButton() { return okButton; } /** * @return the cancelButton. * @since 3.0 */ public MButton getCancelButton() { return cancelButton; } public void setErrorMessage(final String message) { okButton.setEnabled(false); errorMessages.setText(message); } public void cleanErrorMessage() { okButton.setEnabled(true); errorMessages.setText(""); } } PreferencesFrame.java000077500000000000000000000203071321075051700344160ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialogpackage net.sf.latexdraw.ui.dialog; import net.sf.latexdraw.instruments.PreferencesSetter; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; import net.sf.latexdraw.util.VersionChecker; import org.malai.swing.widget.MFrame; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTabbedPane; import java.awt.*; import java.util.Objects; /** * This frame allows the user to set his preferences concerning the program and its components.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/14/06
    * @author Arnaud BLOUIN * @version 3.0 */ public class PreferencesFrame extends MFrame { private static final long serialVersionUID = 1L; /** The instrument that modifies the preferences. */ protected PreferencesSetter prefSetter; private static final String FOR_NEW_DRAWINGS = LangTool.INSTANCE.getStringDialogFrame("Pref.1"); //$NON-NLS-1$ /** * The constructor using a frame. * @param setter The instrument that modifies the preferences. * @throws IllegalArgumentException If the given parameter is null. */ public PreferencesFrame(final PreferencesSetter setter) { super(true); this.prefSetter = Objects.requireNonNull(setter); final Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); setIconImage(LResources.PROPERTIES_ICON.getImage()); setTitle(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.Pref")); //$NON-NLS-1$ setLocation(dim.width/3, dim.height/4); final JTabbedPane tabbedPane = new JTabbedPane(); final JPanel pGeneral = new JPanel(new BorderLayout()); tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.general"), createGeneralPanel()); //$NON-NLS-1$ tabbedPane.add("LaTeX", createLatexPanel()); //$NON-NLS-1$ tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.folders"), createFoldersPanel()); //$NON-NLS-1$ tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.quality"), createQualityPanel()); //$NON-NLS-1$ tabbedPane.add(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.90"), createDisplayPanel()); //$NON-NLS-1$ tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.grid"), createGridPanel()); //$NON-NLS-1$ pGeneral.add(tabbedPane, BorderLayout.CENTER); getContentPane().add(pGeneral); setSize(460, 320); setVisible(false); } private JPanel createLatexPanel() { final JPanel pLatex = new JPanel(); pLatex.setLayout(new BoxLayout(pLatex, BoxLayout.Y_AXIS)); pLatex.add(new JLabel(LangTool.INSTANCE.getStringDialogFrame("Pref.2"))); //$NON-NLS-1$ pLatex.add(prefSetter.getLatexIncludes().getScrollpane()); return pLatex; } /** * Creates the panel which allows the user to set the general preferences of latexdraw. * @return The created panel. */ private JPanel createGeneralPanel() { final JPanel pGeneral = new JPanel(); final JPanel pLang = new JPanel(); final JPanel pRecent = new JPanel(); final JPanel pTheme = new JPanel(); pTheme.setLayout(new BoxLayout(pTheme, BoxLayout.X_AXIS)); pLang.setLayout(new BoxLayout(pLang, BoxLayout.X_AXIS)); pGeneral.setLayout(new GridLayout(6, 1)); pRecent.setLayout(new FlowLayout(FlowLayout.LEFT)); pRecent.add(prefSetter.getNbRecentFilesField().getLabel()); pRecent.add(prefSetter.getNbRecentFilesField()); pTheme.add(prefSetter.getThemeList().getLabel()); pTheme.add(prefSetter.getThemeList()); pLang.add(new JLabel(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.lge"))); //$NON-NLS-1$ pLang.add(prefSetter.getLangList()); pGeneral.add(pLang); pGeneral.add(pTheme); if(VersionChecker.WITH_UPDATE) pGeneral.add(prefSetter.getCheckNewVersion()); pGeneral.add(pRecent); return pGeneral; } @Override public void setVisible(final boolean visible) { super.setVisible(visible); if(visible) { final Dimension dim = LSystem.INSTANCE.getScreenDimension(); final Rectangle rec = getGraphicsConfiguration().getBounds(); setLocation((int)(rec.getX()+dim.width/2.0-getWidth()/2.0), (int)(rec.getY()+dim.height/2.0-getHeight()/2.0)); } } /** * Creates a JPanel containing elements allowing the set of the grid parameters. * @return The created JPanel. */ private JPanel createGridPanel() { final JPanel pGrid = new JPanel(new GridLayout(6, 1)); final JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.add(prefSetter.getPersoGridGapField().getLabel()); panel.add(prefSetter.getPersoGridGapField()); pGrid.add(new JLabel(FOR_NEW_DRAWINGS)); pGrid.add(prefSetter.getDisplayGridCB()); pGrid.add(prefSetter.getClassicGridRB()); pGrid.add(prefSetter.getPersoGridRB()); pGrid.add(prefSetter.getMagneticGridCB()); pGrid.add(panel); return pGrid; } /** * Creates the panel which allows the user to set the preferences about displayable elements. * @return The created panel. */ private JPanel createDisplayPanel() { final JPanel pDisplay = new JPanel(new GridLayout(5, 1)); final JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.add(prefSetter.getUnitChoice()); pDisplay.add(new JLabel(FOR_NEW_DRAWINGS)); pDisplay.add(prefSetter.getDisplayXScaleCB()); pDisplay.add(prefSetter.getDisplayYScaleCB()); pDisplay.add(panel); return pDisplay; } /** * Creates the panel which allows the user to set preferences about paths. * @return The created panel. */ private JPanel createFoldersPanel() { final JPanel pFolders = new JPanel(new GridBagLayout()); final JButton bExport = new JButton(LResources.OPEN_ICON); final JButton bOpen = new JButton(LResources.OPEN_ICON); final 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(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.defOpenSave")), constraint); //$NON-NLS-1$ constraint.gridy = 1; constraint.weightx = 10; pFolders.add(prefSetter.getPathOpenField(), constraint); constraint.gridx = 6; constraint.gridwidth = 1; constraint.weightx = 0.1; constraint.fill = GridBagConstraints.NONE; pFolders.add(bOpen, constraint); constraint.gridx = 0; constraint.gridy = 2; constraint.gridwidth = 6; constraint.fill = GridBagConstraints.HORIZONTAL; pFolders.add(new JLabel(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.defFold")), constraint); //$NON-NLS-1$ constraint.gridy = 3; constraint.weightx = 10; pFolders.add(prefSetter.getPathExportField(), constraint); constraint.gridx = 6; constraint.gridwidth = 1; constraint.weightx = 0.1; constraint.fill = GridBagConstraints.NONE; pFolders.add(bExport, constraint); return pFolders; } /** * Creates the panel which allows the user to set preferences about the rendering. * @return The created panel. */ private JPanel createQualityPanel() { final JPanel pQuality = new JPanel(new GridLayout(5, 1)); pQuality.add(new JLabel(FOR_NEW_DRAWINGS)); pQuality.add(prefSetter.getOpenGLCheckBox()); pQuality.add(prefSetter.getAntialiasingCheckBox()); pQuality.add(prefSetter.getRenderingCheckBox()); pQuality.add(prefSetter.getColorRenderCheckBox()); pQuality.add(prefSetter.getAlpaInterCheckBox()); return pQuality; } } ShortcutsFrame.java000077500000000000000000000162531321075051700341600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/ui/dialogpackage net.sf.latexdraw.ui.dialog; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JViewport; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableColumnModel; import javax.swing.table.TableModel; import net.sf.latexdraw.instruments.FileLoaderSaver; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.util.LResources; import net.sf.latexdraw.util.LSystem; /** * A frame containing the shortcuts of the program.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/18/06
    * @author Arnaud BLOUIN * @since 1.9
    */ public class ShortcutsFrame extends JFrame { private static final long serialVersionUID = 1L; /** Creates a frame containing a table with all the shortcuts. */ public ShortcutsFrame() { super(LangTool.INSTANCE.getString19("LaTeXDrawFrame.3")); //$NON-NLS-1$ setIconImage(LResources.LATEXDRAW_ICON.getImage()); final JTable table; final String[] titles = {LangTool.INSTANCE.getString19("ShortcutsFrame.1"), //$NON-NLS-1$ LangTool.INSTANCE.getString16("ParserMessagesFrame.0"), //$NON-NLS-1$ LangTool.INSTANCE.getString19("ShortcutsFrame.3")}; //$NON-NLS-1$ final String catEdit = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.89"); //$NON-NLS-1$ final String catNav = LangTool.INSTANCE.getString19("ShortcutsFrame.4"); //$NON-NLS-1$ final String catTran = LangTool.INSTANCE.getString19("ShortcutsFrame.5"); //$NON-NLS-1$ final String catDraw = LangTool.INSTANCE.getString19("ShortcutsFrame.6"); //$NON-NLS-1$ final String catFile = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.88"); //$NON-NLS-1$ final JButton okB = new JButton(LangTool.INSTANCE.getString18("LaTeXDrawFrame.23")); //$NON-NLS-1$ final JPanel panel = new JPanel(); final String ctrl = KeyEvent.getKeyModifiersText(InputEvent.CTRL_MASK); final String shift = KeyEvent.getKeyModifiersText(InputEvent.SHIFT_MASK); final String leftClick = LangTool.INSTANCE.getString19("ShortcutsFrame.8"); //$NON-NLS-1$ final String st1 = LangTool.INSTANCE.getString19("ShortcutsFrame.9"); //$NON-NLS-1$ final String st2 = LangTool.INSTANCE.getString19("ShortcutsFrame.10"); //$NON-NLS-1$ final String st3 = LangTool.INSTANCE.getString19("ShortcutsFrame.11"); //$NON-NLS-1$ final String st4 = LangTool.INSTANCE.getString19("ShortcutsFrame.12"); //$NON-NLS-1$ final Object[][] data = { {ctrl+"+C", LResources.LABEL_COPY, catEdit},//$NON-NLS-1$ {ctrl+"+V", LResources.LABEL_PASTE, catEdit},//$NON-NLS-1$ {ctrl+"+X", LResources.LABEL_CUT, catEdit},//$NON-NLS-1$ {ctrl+"+Z", LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.23"), catEdit},//$NON-NLS-1$ //$NON-NLS-2$ {ctrl+"+Y", LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.22"), catEdit},//$NON-NLS-1$ //$NON-NLS-2$ {ctrl+"+N", LResources.LABEL_NEW, catFile},//$NON-NLS-1$ {ctrl+"+O", FileLoaderSaver.LABEL_OPEN, catFile},//$NON-NLS-1$ {ctrl+"+S", FileLoaderSaver.LABEL_SAVE, catFile},//$NON-NLS-1$ {ctrl+"+W", LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.18"), catFile},//$NON-NLS-1$ //$NON-NLS-2$ {KeyEvent.getKeyText(KeyEvent.VK_ADD), LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.57"), catNav}, //$NON-NLS-1$ {KeyEvent.getKeyText(KeyEvent.VK_SUBTRACT), LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.58"), catNav}, //$NON-NLS-1$ {KeyEvent.getKeyText(KeyEvent.VK_DELETE), LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.17"), catDraw}, //$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}, //TODO // {shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_RIGHT), LangTool.INSTANCE.getString19("ShortcutsFrame.18"), catNav}, //$NON-NLS-1$ // {shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_LEFT), LangTool.INSTANCE.getString19("ShortcutsFrame.19"), catNav}, //$NON-NLS-1$ // {shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_UP), LangTool.INSTANCE.getString19("ShortcutsFrame.20"), catNav}, //$NON-NLS-1$ // {shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_DOWN), LangTool.INSTANCE.getString19("ShortcutsFrame.21"), catNav}, //$NON-NLS-1$ {ctrl+"+U", LangTool.INSTANCE.getString19("ShortcutsFrame.23"), catTran}, //$NON-NLS-1$ //$NON-NLS-2$ {ctrl+"+A", LangTool.INSTANCE.getString19("ShortcutsFrame.25"), catDraw}, //$NON-NLS-1$ //$NON-NLS-2$ {ctrl+'+'+leftClick, LangTool.INSTANCE.getString19("ShortcutsFrame.26"), catDraw}, //$NON-NLS-1$ {shift+'+'+leftClick, LangTool.INSTANCE.getString19("ShortcutsFrame.27"), catDraw}, //$NON-NLS-1$ {ctrl+'+'+LangTool.INSTANCE.getString19("ShortcutsFrame.29"), LangTool.INSTANCE.getString19("ShortcutsFrame.30"), catDraw} //$NON-NLS-1$ //$NON-NLS-2$ }; final TableModel dataModel = new AbstractTableModel() { private static final long serialVersionUID = 1L; @Override public int getColumnCount() { return titles.length; } @Override public int getRowCount() { return data.length;} @Override public Object getValueAt(final int row, final int col) {return data[row][col];} @Override public String getColumnName(final int column) {return titles[column];} @Override public Class getColumnClass(final int c) {return getValueAt(0, c).getClass();} @Override public boolean isCellEditable(final int row, final int col) {return false;} @Override public void setValueAt(final Object aValue, final int row, final int column) { data[row][column] = aValue; } }; table = new JTable(dataModel); table.getTableHeader().setReorderingAllowed(false); final TableColumnModel colmodel = table.getColumnModel(); colmodel.getColumn(0).setPreferredWidth(100); colmodel.getColumn(1).setPreferredWidth(350); colmodel.getColumn(2).setPreferredWidth(80); final JScrollPane scrollPane = new JScrollPane(); final JViewport vp = scrollPane.getViewport(); vp.add(table); okB.addActionListener(e -> setVisible(false)); panel.add(okB); getContentPane().setLayout(new BorderLayout()); getContentPane().add(scrollPane, BorderLayout.CENTER); getContentPane().add(panel, BorderLayout.SOUTH); setSize(700, 500); final Dimension dim = LSystem.INSTANCE.getScreenDimension(); final Rectangle rec = getGraphicsConfiguration().getBounds(); setLocation((int)(rec.getX()+dim.width/2.0-getWidth()/2.0), (int)(rec.getY()+dim.height/2.0-getHeight()/2.0)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/000077500000000000000000000000001321075051700275125ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/ImageCropper.java000077500000000000000000000066171321075051700327470ustar00rootroot00000000000000/* * This file is part of LaTeXDraw * Copyright (c) 2005-2014 Arnaud BLOUIN * LaTeXDraw is free software; you can redistribute it and/or modify * 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. * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. */ package net.sf.latexdraw.util; import java.awt.*; import java.awt.image.BufferedImage; /** * This singleton removes white margins of an image. */ public final class ImageCropper { public static final ImageCropper INSTANCE = new ImageCropper(); private ImageCropper() { super(); } /** * Removes the white margins of the given image. * @param img The image to crop. * @return The cropped image or null if the given image is null or fully white. * @since 3.0 */ public Image cropImage(final BufferedImage img) { if(img==null) return null; final int width = img.getWidth(); final int height = img.getHeight(); if(width==0 && height==0) return null; final int left = getLeft(img, width, height); final int right = getRight(img, width, height); final int top = getTop(img, width, height, left, right); final int bottom = getBottom(img, width, height, left, right); final int newWidth = img.getWidth(null)-left-right; final int newHeight = img.getHeight(null)-top-bottom; final BufferedImage cropped = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_ARGB_PRE); Graphics g = cropped.getGraphics(); g.drawImage(img, 0, 0, newWidth, newHeight, left, top, newWidth+left, newHeight+top, null); g.dispose(); return cropped; } /** * Gets the bottom position where a pixel is not white. */ private int getBottom(final BufferedImage img, final int width, final int height, final int left, final int right) { int bottom = 0; int y = height-1; while(y>=0 && !hasColouredPixelRow(img, y, left, width-right)) { bottom++; y--; } return bottom; } /** * Gets the top position where a pixel is not white. */ private int getTop(final BufferedImage img, final int width, final int height, final int left, final int right) { int top = 0; while(top=0 && !hasColouredPixelColumn(img, x, height)) { right++; x--; } return right; } /** * Gets the left position where a pixel is not white. */ private int getLeft(final BufferedImage img, final int width, final int height) { int left = 0; while(left *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/28/08
    * @author Arnaud BLOUIN * @version 3.0 */ public class LCommandLine { /** The different states of the command line. */ public enum CmdLineState { /** If the command line states that latexdraw must start without a file to open. */ APPLICATION, /** If the command line states that latexdraw must start with a file to open. */ APPLICATION_FILENAME, /** If the command line states that latexdraw must stop. */ STOP } /** The option for show the help. */ public static final String OPTION_HELP = "-h"; //$NON-NLS-1$ /** The file name given in argument. */ protected String filename; /** * Parses the given arguments. * @param args The arguments to parse. * @return The result of the parsing. * @since 2.0.3 */ public CmdLineState parse(final String[] args) { if(args==null || args.length==0) return CmdLineState.APPLICATION; if(args[0].equals(OPTION_HELP)) { displayHelp(); return CmdLineState.STOP; } filename = getFileName(args); return filename==null ? CmdLineState.APPLICATION : CmdLineState.APPLICATION_FILENAME; } /** * 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.3 */ public static String getFileName(final String[] args) { if(args==null || args.length==0) return null; StringBuilder name = new StringBuilder(args[0]); if(args.length!=1) { File f = new File(args[0]); boolean ok = f.exists(); int i = 1; while(!ok && i\t\t\tOpens the given file into latexdraw."); //$NON-NLS-1$ System.out.println("If no argument is given, latexdraw will started with a new drawing."); //$NON-NLS-1$ } /** * @return The filename. * @since 2.0.3 */ public String getFilename() { return filename; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LCursor.java000077500000000000000000000037701321075051700317600ustar00rootroot00000000000000package net.sf.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.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/20/06
    * @author Arnaud BLOUIN * @version 2.0.0
    * @since 1.9
    */ public final class LCursor { /** The singleton. */ public static final LCursor INSTANCE = new LCursor(); /** The cursor that should be used during rotation. */ // FIXME: use the cursor on rotation. public static final Cursor CURSOR_ROTATE = INSTANCE.getCursor("/main/res/cursors/RotCWDown.gif", "rotate");//$NON-NLS-1$//$NON-NLS-2$ private LCursor() { super(); } /** * 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 Cursor getCursor(final String path, final String name) { final BufferedImage bi = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB); final Graphics2D graphic = (Graphics2D)bi.getGraphics(); final URL url = LCursor.class.getClass().getResource(path); final ImageIcon img = new ImageIcon(url); graphic.drawImage(img.getImage(), null, null); return Toolkit.getDefaultToolkit().createCustomCursor(bi,new Point(0,0), name); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LFileUtils.java000066400000000000000000000070741321075051700324010ustar00rootroot00000000000000package net.sf.latexdraw.util; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Random; /** * Defines some workarounds to deal with the problem of the renameto function. * The renameto function cannot rename a file from one filesystem to one other.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/22/09
    * @author Arnaud BLOUIN * @version 3.0 */ public final class LFileUtils { /** The singleton. */ public static final LFileUtils INSTANCE = new LFileUtils(); private LFileUtils() { super(); } /** * Replaces ~ characters by \string~. * @param str The string to process. * @return The normalised string. Can be null. */ public String normalizeForLaTeX(final String str) { if(str==null) return null; if(LSystem.INSTANCE.isWindows()) return str.replaceAll("\\\\", "/").replaceAll("~", "\\\\string~"); return str.replaceAll("~", "\\\\string~"); } /** * 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. */ public File createTempDir() { final String pathTmp = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$ final String path = pathTmp + (pathTmp.endsWith(LResources.FILE_SEP) ? "" : LResources.FILE_SEP) + "latexdraw" + LResources.FILE_SEP + //$NON-NLS-1$ //$NON-NLS-2$ "latexdrawTmp" + System.currentTimeMillis() + new Random().nextInt(100000); //$NON-NLS-1$ final File tmpDir = new File(path); final boolean ok = tmpDir.mkdirs(); if(ok) { 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); tmpDir.deleteOnExit(); } return ok ? tmpDir : null; } /** * Copies a file. * The renameTo method does not allow action across NFS mounted filesystems * this method is the workaround * @param fromFile The existing File * @param toFile The new File * @return true if and only if the renaming succeeded; * false otherwise */ public boolean copy(final File fromFile, final File toFile) { if(fromFile==null || toFile==null) return false; boolean ok = true; try { try(FileInputStream in = new FileInputStream(fromFile); FileOutputStream out = new FileOutputStream(toFile); BufferedInputStream inBuffer = new BufferedInputStream(in); BufferedOutputStream outBuffer= new BufferedOutputStream(out)){ int theByte = inBuffer.read(); while(theByte > -1){ outBuffer.write(theByte); theByte = inBuffer.read(); } } }catch(final Exception ex) { ok = false; } // cleanup if files are not the same length if(fromFile.length() != toFile.length()) { toFile.delete(); ok = false; } return ok; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LNamespace.java000066400000000000000000000167101321075051700323720ustar00rootroot00000000000000package net.sf.latexdraw.util; /** * Defines the elements of the latexdraw namespace.
    *
    * This file is part of LaTeXDraw.
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 11/06/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class LNamespace { 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_FREEHAND = "akinPoints"; //$NON-NLS-1$ public static final String XML_TYPE_ARC = "arc"; //$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_GROUP = "drawing"; //$NON-NLS-1$ public static final String XML_TYPE_ELLIPSE = "ellipse"; //$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_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 = "centreHoriz"; //$NON-NLS-1$ public static final String XML_COMMENTS = "comments"; //$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_MAGNETIC_GRID_STYLE = "magneticGridStyle"; //$NON-NLS-1$ public static final String XML_GRID_GAP = "gridGap"; //$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_DISPLAY_GRID = "displayGrid"; //$NON-NLS-1$ public static final String XML_ROOT_PREFERENCES = "preferences"; //$NON-NLS-1$ public static final String XML_OPENGL = "openGL"; //$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_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_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_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_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$ private LNamespace() { super(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LNumber.scala000077500000000000000000000072161321075051700320740ustar00rootroot00000000000000package net.sf.latexdraw.util /** * The class define some useful methods to manage numbers. * * This file is part of LaTeXDraw.
    * Copyright(c) 2005-2013 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 12/18/06
    * @author Arnaud BLOUIN * @version 3.0
    */ object LNumber { /** The threshold used to compare double values. */ val THRESHOLD = 0.001 /** * Compares two double values to know if they are approximately equal. * @param a The first double value. * @param b The second double value. * @param threshold The threshold used to compare the given values. * @return True if both values are approximatively equal using a threshold approximation value. * @since 3.0 */ def equalsDouble(a:Double, b:Double, threshold:Double) = Math.abs(a - b) <= threshold /** * Compares two double values to know if they are approximatively equal. * @param a The first double value. * @param b The second double value. * @return True if both values are approximatively equal using a threshold approximation value. * @since 3.0 */ def equalsDouble(a:Double, b:Double) : Boolean = equalsDouble(a, b, THRESHOLD) /** * See getCutNumber(float value, double threshold). The threshold is by default the constant value THRESHOLD. * @param value The value to cut. * @return The cut or the intact number. * @since 3.0 */ def getCutNumber(value:Float) : Float = getCutNumber(value, THRESHOLD) /** * See getCutNumber(double value, double threshold). The threshold is by default the constant value THRESHOLD. * @param value The value to cut. * @return The cut or the intact number. * @since 3.0 */ def getCutNumber(value:Double) : Double = getCutNumber(value, THRESHOLD) /** * See getCutNumber(double value, double threshold). The threshold is by default the constant value THRESHOLD. * @param value The value to cut. * @return The cut or the intact number. * @since 3.0 */ def getCutNumberFloat(value:Double) : Float = getCutNumber(value, THRESHOLD).toFloat /** * 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 */ def getCutNumber(value:Float, threshold:Double) : Float = if(Math.abs(value) < threshold) 0f else 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 */ def getCutNumber(value:Double, threshold:Double) : Double = if(Math.abs(value) < threshold) 0.0 else value } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LPath.java000077500000000000000000000112501321075051700313670ustar00rootroot00000000000000package net.sf.latexdraw.util; import java.io.File; import net.sf.latexdraw.badaboom.BadaboomCollector; /** * This class defines paths used in LaTeXDraw.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/11/07
    * @author Arnaud BLOUIN * @version 3.0 */ public final class LPath { /** The singleton. */ public static final LPath INSTANCE = new LPath(); /** 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 = INSTANCE.getPathLocalUser(); public static final String PATH_TEMPLATES_DIR_USER = PATH_LOCAL_USER + File.separator + TEMPLATE_DIR; public static final String PATH_PREFERENCES_XML_FILE = PATH_LOCAL_USER + File.separator + ".preferences.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 = INSTANCE.getPathTemplatesShared(); public static final String PATH_SHARED = INSTANCE.getPathShared(); private LPath() { super(); } /** * Normalises the given namespace URI: if the given namespace is null or empty, an empty * string is returned. Otherwise, the namespace followed by character ':' is returned. * @param nsURI The namespace to normalise. * @return The normalised namespace. * @since 3.0 */ public String getNormaliseNamespaceURI(final String nsURI) { return nsURI==null || nsURI.isEmpty() ? "" : nsURI + ':'; //$NON-NLS-1$ } /** * @return The home directory of the user depending of his operating system. * @since 3.0 */ private String getPathLocalUser() { final String home = System.getProperty("user.home");//$NON-NLS-1$ final String path; if(LSystem.INSTANCE.isVista() || LSystem.INSTANCE.isSeven() || LSystem.INSTANCE.is8() || LSystem.INSTANCE.is10()) path = home + "\\AppData\\Local\\latexdraw";//$NON-NLS-1$ else if(LSystem.INSTANCE.isXP()) path = home + "\\Application Data\\latexdraw";//$NON-NLS-1$ else if(LSystem.INSTANCE.isMac()) path = home + "/Library/Preferences/latexdraw";//$NON-NLS-1$ else path = home + "/.latexdraw";//$NON-NLS-1$ return path; } /** * @return The path of the directory where the templates shared by the different users are located. * @since 3.0 */ private String getPathTemplatesShared() { return getPathShared()+File.separator+TEMPLATE_DIR; } /** * @return The path where files are shared by users. * @since 3.0 */ private String getPathShared() { final String home = System.getProperty("user.home");//$NON-NLS-1$ if(LSystem.INSTANCE.isMac()) return "/Users/Shared/latexdraw";//$NON-NLS-1$ if(LSystem.INSTANCE.isVista()) { File dir = new File("C:\\ProgramData");//$NON-NLS-1$ int cpt = 0; final int max = 10; while(!dir.exists() && cpt * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/21/07
    * @author Arnaud BLOUIN * @version 3.0 * @since 2.0.0 */ public final class LResources { private LResources() { super(); } /** The line separator of the current system. */ public static final String EOL = System.getProperty("line.separator"); //$NON-NLS-1$ /** The file separator of the current system. */ public static final String FILE_SEP = System.getProperty("file.separator"); //$NON-NLS-1$ /** The name of the application */ public static final String LABEL_APP = "LaTeXDraw";//$NON-NLS-1$ /** The label of the menu "aboutTexDraw" */ public static final String LABEL_ABOUT = LangTool.INSTANCE.getStringDialogFrame("Res.1"); //$NON-NLS-1$ /** The label of the newMenu item */ public static final String LABEL_NEW = LangTool.INSTANCE.getStringDialogFrame("Res.2"); //$NON-NLS-1$ public static final String LABEL_NEW_WITH_SEL =LangTool.INSTANCE.getStringLaTeXDrawFrame("LRes.0"); //$NON-NLS-1$ /** The label of the menu copy */ public static final String LABEL_COPY = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.40"); //$NON-NLS-1$ /** The label of the menu paste */ public static final String LABEL_PASTE = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.43"); //$NON-NLS-1$ /** The label of the menu cut */ public static final String LABEL_CUT = LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.44"); //$NON-NLS-1$ public static final String LABEL_DISPLAY_PERSO_GRID = LangTool.INSTANCE.getStringDialogFrame("Res.3"); //$NON-NLS-1$ /** The label of the menuItem displayGrid */ public static final String LABEL_DISPLAY_GRID = LangTool.INSTANCE.getString18("PreferencesFrame.4"); //$NON-NLS-1$ public static final String LABEL_UPDATE_TO_GRID = LangTool.INSTANCE.getString19("DrawPanel.0"); //$NON-NLS-1$ public static final ImageIcon DIM_POS_ICON; public static final ImageIcon ARROW_ICON; public static final ImageIcon TEXTPOS_L; public static final ImageIcon TEXTPOS_R; public static final ImageIcon TEXTPOS_T; public static final ImageIcon TEXTPOS_TL; public static final ImageIcon TEXTPOS_TR; public static final ImageIcon TEXTPOS_B; public static final ImageIcon TEXTPOS_BR; public static final ImageIcon TEXTPOS_BL; public static final ImageIcon TEXTPOS_CENTRE; public static final ImageIcon FILLING_ICON; public static final ImageIcon BORDER_ICON; public static final ImageIcon DOUBLE_BORDER_ICON; public static final ImageIcon SHADOW_ICON; public static final ImageIcon PDF_ICON; public static final ImageIcon BEZIER_CURVE_ICON; public static final ImageIcon CHORD_ICON; public static final ImageIcon NEW_ICON; public static final ImageIcon LINE_STYLE_NONE_ICON; public static final ImageIcon OPEN_ICON; public static final ImageIcon LINE_STYLE_DASHED_ICON; public static final ImageIcon SAVE_ICON ; public static final ImageIcon LINE_STYLE_DOTTED_ICON; public static final ImageIcon SAVE_AS_ICON; public static final ImageIcon DOT_STYLE_NONE_ICON; public static final ImageIcon CIRCLE_ICON; public static final ImageIcon DOT_STYLE_SQUARE_ICON; public static final ImageIcon DEL_ICON; public static final ImageIcon DOT_STYLE_SQUARE_F_ICON; public static final ImageIcon DOT_ICON; public static final ImageIcon DOT_STYLE_PENTAGON_ICON; public static final ImageIcon ELLIPSE_ICON; public static final ImageIcon DOT_STYLE_PENTAGON_F_ICON; public static final ImageIcon EMPTY_ICON; public static final ImageIcon DOT_STYLE_TRIANGLE_ICON; public static final ImageIcon DOT_STYLE_TRIANGLE_F_ICON; public static final ImageIcon RECT_ICON; public static final ImageIcon DOT_STYLE_BAR_ICON; public static final ImageIcon RHOMBUS_ICON; public static final ImageIcon DOT_STYLE_ASTERISK_ICON; public static final ImageIcon SELECT_ICON; public static final ImageIcon DOT_STYLE_CROSS_ICON; public static final ImageIcon SQUARE_ICON; public static final ImageIcon DOT_STYLE_DIAMOND_ICON; public static final ImageIcon TRIANGLE_ICON; public static final ImageIcon DOT_STYLE_DIAMOND_F_ICON; public static final ImageIcon PROPERTIES_ICON; public static final ImageIcon DOT_STYLE_O_ICON; public static final ImageIcon DOT_STYLE_O_PLUS_ICON; public static final ImageIcon DOT_STYLE_O_CROSS_ICON; public static final ImageIcon UPDATE_ICON; public static final ImageIcon DOT_STYLE_PLUS_ICON; public static final ImageIcon ARROW_STYLE_ARC_L_ICON; public static final ImageIcon ARROW_STYLE_ARC_R_ICON; public static final ImageIcon ARROW_STYLE_ARC_RR_ICON; public static final ImageIcon ARROW_STYLE_ARC_LR_ICON; public static final ImageIcon ABOUT_ICON; public static final ImageIcon ARROW_STYLE_ARROW_L_ICON; public static final ImageIcon HELP_ICON; public static final ImageIcon ARROW_STYLE_ARROW_R_ICON; public static final ImageIcon PREFERENCES_ICON; public static final ImageIcon ARROW_STYLE_BAR_END_L_ICON; public static final ImageIcon ARROW_STYLE_BAR_END_R_ICON; public static final ImageIcon DRAWING_PROP_ICON; public static final ImageIcon ARC_ICON; public static final ImageIcon ARROW_STYLE_BAR_IN_L_ICON; public static final ImageIcon WEDGE_ICON; public static final ImageIcon ARROW_STYLE_BAR_IN_R_ICON; public static final ImageIcon ARROW_STYLE_BRACK_L_ICON; public static final ImageIcon PLOT_ICON; public static final ImageIcon ARROW_STYLE_BRACK_LR_ICON; public static final ImageIcon ARROW_STYLE_BRACK_RR_ICON; public static final ImageIcon ARROW_STYLE_BRACK_R_ICON; public static final ImageIcon ZOOM_DEFAULT_ICON; public static final ImageIcon ARROW_STYLE_CIRCLE_END_L_ICON; public static final ImageIcon UNDO_ICON; public static final ImageIcon ARROW_STYLE_CIRCLE_END_R_ICON; public static final ImageIcon REDO_ICON; public static final ImageIcon ARROW_STYLE_CIRCLE_IN_L_ICON; public static final ImageIcon BACKGROUND_ICON; public static final ImageIcon ARROW_STYLE_CIRCLE_IN_R_ICON; public static final ImageIcon FOREGROUND_ICON; public static final ImageIcon ARROW_STYLE_DBLE_ARROW_L_ICON; public static final ImageIcon ARROW_STYLE_DBLE_ARROW_R_ICON; public static final ImageIcon ARROW_STYLE_DISK_END_L_ICON; public static final ImageIcon ROTATE_ICON; public static final ImageIcon ARROW_STYLE_DISK_END_R_ICON; public static final ImageIcon POLYGON_ICON; public static final ImageIcon ARROW_STYLE_DISK_IN_L_ICON; public static final ImageIcon TEXT_ICON; public static final ImageIcon ARROW_STYLE_DISK_IN_R_ICON; public static final ImageIcon FREE_HAND_ICON; public static final ImageIcon ARROW_STYLE_NONE_L_ICON; public static final ImageIcon ARROW_STYLE_NONE_R_ICON; public static final ImageIcon ARROW_STYLE_R_DBLE_ARROW_L_ICON; public static final ImageIcon ARROW_STYLE_R_DBLE_ARROW_R_ICON; public static final ImageIcon ARROW_STYLE_R_ARROW_L_ICON; public static final ImageIcon ARROW_STYLE_R_ARROW_R_ICON; public static final ImageIcon COPY_ICON; public static final ImageIcon PASTE_ICON; public static final ImageIcon CUT_ICON; public static final ImageIcon ARROW_STYLE_ROUND_IN_L_ICON; public static final ImageIcon ARROW_STYLE_ROUND_IN_R_ICON; public static final ImageIcon HATCH_NONE_ICON; public static final ImageIcon HATCH_SOLID_ICON; public static final ImageIcon HATCH_HORIZ_ICON; public static final ImageIcon HACTH_VERT_ICON; public static final ImageIcon HATCH_F_HORIZ_ICON; public static final ImageIcon HATCH_F_VERT_ICON; public static final ImageIcon HATCH_CROSS_ICON; public static final ImageIcon HATCH_F_CROSS_ICON; public static final ImageIcon GRID_ICON; public static final ImageIcon SUBGRID_ICON; public static final ImageIcon JOIN_ICON; public static final ImageIcon SEPARATE_ICON; public static final ImageIcon MIDDLE_ICON; public static final ImageIcon INNER_ICON; public static final ImageIcon OUTER_ICON; public static final ImageIcon COMMENT_ICON; public static final ImageIcon LINES_ICON; public static final ImageIcon LATEXDRAW_ICON; public static final ImageIcon ERR_ICON; public static final ImageIcon STOP_ICON; public static final ImageIcon INSERT_PIC_ICON; public static final ImageIcon INSERT_PST_ICON; public static final ImageIcon THICKNESS_ICON; public static final ImageIcon GRADIENT_ICON; public static final ImageIcon DISPLAY_GRID_ICON; public static final ImageIcon ROTATE_270_ICON; public static final ImageIcon ROTATE_180_ICON; public static final ImageIcon ROTATE_90_ICON; public static final ImageIcon MIRROR_V_ICON; public static final ImageIcon MIRROR_H_ICON; public static final ImageIcon AXES_ICON; public static final ImageIcon TEX_EDITOR_ICON; public static final ImageIcon CURVES_FREEHAND_ICON; public static final ImageIcon LINES_FREEHAND_ICON; public static final ImageIcon CLOSED_BEZIER_ICON; public static final ImageIcon ALIGN_BOTTOM_ICON; public static final ImageIcon ALIGN_LEFT_ICON; public static final ImageIcon ALIGN_MID_HORIZ_ICON; public static final ImageIcon ALIGN_MID_VERT_ICON; public static final ImageIcon ALIGN_RIGHT_ICON; public static final ImageIcon ALIGN_TOP_ICON; public static final ImageIcon DIST_VERT_BOTTOM_ICON; public static final ImageIcon DIST_HORIZ_EQUAL_ICON; public static final ImageIcon DIST_VERT_MID_ICON; public static final ImageIcon DIST_VERT_TOP_ICON; public static final ImageIcon DIST_VERT_EQUAL_ICON; public static final ImageIcon DIST_HORIZ_MID_ICON; public static final ImageIcon DIST_HORIZ_LEFT_ICON; public static final ImageIcon DIST_HORIZ_RIGHT_ICON; public static final ImageIcon ROUNDNESS_ICON; public static final ImageIcon GRID_GAP_ICON; public static final ImageIcon BUTTON_CLOSE_IN_ICON; public static final ImageIcon BUTTON_CLOSE_OUT_ICON; public static final ImageIcon GRID_X_LABEL; public static final ImageIcon GRID_Y_LABEL; public static final ImageIcon GRID_LABELS; public static final ImageIcon RELOAD_ICON; static { PLOT_ICON = loadImageIcon("/res/plot.png");//$NON-NLS-1$ RELOAD_ICON = loadImageIcon("/res/view-refresh.png");//$NON-NLS-1$ GRID_LABELS = loadImageIcon("/res/gridLabels.png");//$NON-NLS-1$ GRID_X_LABEL = loadImageIcon("/res/xGridLabel.png");//$NON-NLS-1$ GRID_Y_LABEL = loadImageIcon("/res/yGridLabel.png");//$NON-NLS-1$ DIM_POS_ICON = loadImageIcon("/res/dimPos.png");//$NON-NLS-1$ TEXTPOS_L = loadImageIcon("/res/textPosLeft.png");//$NON-NLS-1$ TEXTPOS_R = loadImageIcon("/res/textPosRight.png");//$NON-NLS-1$ TEXTPOS_BL = loadImageIcon("/res/textPosBL.png");//$NON-NLS-1$ TEXTPOS_B = loadImageIcon("/res/textPosB.png");//$NON-NLS-1$ TEXTPOS_BR = loadImageIcon("/res/textPosBR.png");//$NON-NLS-1$ TEXTPOS_TL = loadImageIcon("/res/textPosTL.png");//$NON-NLS-1$ TEXTPOS_T = loadImageIcon("/res/textPosT.png");//$NON-NLS-1$ TEXTPOS_TR = loadImageIcon("/res/textPosTR.png");//$NON-NLS-1$ TEXTPOS_CENTRE = loadImageIcon("/res/textPosCentre.png");//$NON-NLS-1$ FILLING_ICON = loadImageIcon("/res/filling.png");//$NON-NLS-1$ BORDER_ICON = loadImageIcon("/res/border.png");//$NON-NLS-1$ DOUBLE_BORDER_ICON = loadImageIcon("/res/doubleBorder.png");//$NON-NLS-1$ SHADOW_ICON = loadImageIcon("/res/shadow.png");//$NON-NLS-1$ ROUNDNESS_ICON = loadImageIcon("/res/roundness.png");//$NON-NLS-1$ GRID_GAP_ICON = loadImageIcon("/res/gridGap.png");//$NON-NLS-1$ HATCH_NONE_ICON = loadImageIcon("/res/hatch/hatch.none.png");//$NON-NLS-1$ HACTH_VERT_ICON = loadImageIcon("/res/hatch/hatch.vert.png");//$NON-NLS-1$ HATCH_HORIZ_ICON = loadImageIcon("/res/hatch/hatch.horiz.png");//$NON-NLS-1$ HATCH_CROSS_ICON = loadImageIcon("/res/hatch/hatch.cross.png");//$NON-NLS-1$ HATCH_SOLID_ICON = loadImageIcon("/res/hatch/hatch.solid.png");//$NON-NLS-1$ HATCH_F_VERT_ICON = loadImageIcon("/res/hatch/hatchf.vert.png");//$NON-NLS-1$ HATCH_F_HORIZ_ICON= loadImageIcon("/res/hatch/hatchf.horiz.png");//$NON-NLS-1$ HATCH_F_CROSS_ICON= loadImageIcon("/res/hatch/hatchf.cross.png");//$NON-NLS-1$ ARROW_ICON = loadImageIcon("/res/arrowStyles/arrowIcon.png");//$NON-NLS-1$ ARROW_STYLE_ARC_L_ICON = loadImageIcon("/res/arrowStyles/line.arc.left.png");//$NON-NLS-1$ ARROW_STYLE_ARC_R_ICON = loadImageIcon("/res/arrowStyles/line.arc.right.png");//$NON-NLS-1$ ARROW_STYLE_ARC_LR_ICON = loadImageIcon("/res/arrowStyles/line.arc.r.left.png");//$NON-NLS-1$ ARROW_STYLE_ARC_RR_ICON = loadImageIcon("/res/arrowStyles/line.arc.r.right.png");//$NON-NLS-1$ ARROW_STYLE_ARROW_L_ICON = loadImageIcon("/res/arrowStyles/line.arrow.left.png");//$NON-NLS-1$ ARROW_STYLE_ARROW_R_ICON = loadImageIcon("/res/arrowStyles/line.arrow.right.png");//$NON-NLS-1$ ARROW_STYLE_BAR_END_L_ICON = loadImageIcon("/res/arrowStyles/line.barEnd.left.png");//$NON-NLS-1$ ARROW_STYLE_BAR_END_R_ICON = loadImageIcon("/res/arrowStyles/line.barEnd.right.png");//$NON-NLS-1$ ARROW_STYLE_BAR_IN_L_ICON = loadImageIcon("/res/arrowStyles/line.barIn.left.png");//$NON-NLS-1$ ARROW_STYLE_BAR_IN_R_ICON = loadImageIcon("/res/arrowStyles/line.barIn.right.png");//$NON-NLS-1$ ARROW_STYLE_BRACK_L_ICON = loadImageIcon("/res/arrowStyles/line.bracket.left.png");//$NON-NLS-1$ ARROW_STYLE_BRACK_R_ICON = loadImageIcon("/res/arrowStyles/line.bracket.right.png");//$NON-NLS-1$ ARROW_STYLE_BRACK_LR_ICON = loadImageIcon("/res/arrowStyles/line.bracket.r.left.png");//$NON-NLS-1$ ARROW_STYLE_BRACK_RR_ICON = loadImageIcon("/res/arrowStyles/line.bracket.r.right.png");//$NON-NLS-1$ ARROW_STYLE_CIRCLE_END_L_ICON = loadImageIcon("/res/arrowStyles/line.circle.end.left.png");//$NON-NLS-1$ ARROW_STYLE_CIRCLE_END_R_ICON = loadImageIcon("/res/arrowStyles/line.circle.end.right.png");//$NON-NLS-1$ ARROW_STYLE_CIRCLE_IN_L_ICON = loadImageIcon("/res/arrowStyles/line.circle.in.left.png");//$NON-NLS-1$ ARROW_STYLE_CIRCLE_IN_R_ICON = loadImageIcon("/res/arrowStyles/line.circle.in.right.png");//$NON-NLS-1$ ARROW_STYLE_DBLE_ARROW_L_ICON = loadImageIcon("/res/arrowStyles/line.dbleArrow.left.png");//$NON-NLS-1$ ARROW_STYLE_DBLE_ARROW_R_ICON = loadImageIcon("/res/arrowStyles/line.dbleArrow.right.png");//$NON-NLS-1$ ARROW_STYLE_DISK_END_L_ICON = loadImageIcon("/res/arrowStyles/line.disk.end.left.png");//$NON-NLS-1$ ARROW_STYLE_DISK_END_R_ICON = loadImageIcon("/res/arrowStyles/line.disk.end.right.png");//$NON-NLS-1$ ARROW_STYLE_DISK_IN_L_ICON = loadImageIcon("/res/arrowStyles/line.disk.in.left.png");//$NON-NLS-1$ ARROW_STYLE_DISK_IN_R_ICON = loadImageIcon("/res/arrowStyles/line.disk.in.right.png");//$NON-NLS-1$ ARROW_STYLE_NONE_L_ICON = loadImageIcon("/res/arrowStyles/line.none.left.png");//$NON-NLS-1$ ARROW_STYLE_NONE_R_ICON = loadImageIcon("/res/arrowStyles/line.none.right.png");//$NON-NLS-1$ ARROW_STYLE_R_ARROW_L_ICON = loadImageIcon("/res/arrowStyles/line.rarrow.left.png");//$NON-NLS-1$ ARROW_STYLE_R_ARROW_R_ICON = loadImageIcon("/res/arrowStyles/line.rarrow.right.png");//$NON-NLS-1$ ARROW_STYLE_R_DBLE_ARROW_L_ICON = loadImageIcon("/res/arrowStyles/line.rdbleArrow.left.png");//$NON-NLS-1$ ARROW_STYLE_R_DBLE_ARROW_R_ICON = loadImageIcon("/res/arrowStyles/line.rdbleArrow.right.png");//$NON-NLS-1$ ARROW_STYLE_ROUND_IN_L_ICON = loadImageIcon("/res/arrowStyles/line.roundIn.left.png");//$NON-NLS-1$ ARROW_STYLE_ROUND_IN_R_ICON = loadImageIcon("/res/arrowStyles/line.roundIn.right.png");//$NON-NLS-1$ DOT_STYLE_ASTERISK_ICON = loadImageIcon("/res/dotStyles/dot.asterisk.png");//$NON-NLS-1$ DOT_STYLE_NONE_ICON = loadImageIcon("/res/dotStyles/dot.none.png");//$NON-NLS-1$ DOT_STYLE_BAR_ICON = loadImageIcon("/res/dotStyles/dot.bar.png");//$NON-NLS-1$ DOT_STYLE_O_ICON = loadImageIcon("/res/dotStyles/dot.o.png");//$NON-NLS-1$ DOT_STYLE_CROSS_ICON = loadImageIcon("/res/dotStyles/dot.cross.png");//$NON-NLS-1$ DOT_STYLE_DIAMOND_ICON = loadImageIcon("/res/dotStyles/dot.diamond.png");//$NON-NLS-1$ DOT_STYLE_DIAMOND_F_ICON = loadImageIcon("/res/dotStyles/dot.diamondF.png");//$NON-NLS-1$ DOT_STYLE_O_CROSS_ICON = loadImageIcon("/res/dotStyles/dot.ocross.png");//$NON-NLS-1$ DOT_STYLE_O_PLUS_ICON = loadImageIcon("/res/dotStyles/dot.oplus.png");//$NON-NLS-1$ DOT_STYLE_PENTAGON_ICON = loadImageIcon("/res/dotStyles/dot.pentagon.png");//$NON-NLS-1$ DOT_STYLE_PENTAGON_F_ICON = loadImageIcon("/res/dotStyles/dot.pentagonF.png");//$NON-NLS-1$ DOT_STYLE_PLUS_ICON = loadImageIcon("/res/dotStyles/dot.plus.png");//$NON-NLS-1$ DOT_STYLE_SQUARE_ICON = loadImageIcon("/res/dotStyles/dot.square.png");//$NON-NLS-1$ DOT_STYLE_SQUARE_F_ICON = loadImageIcon("/res/dotStyles/dot.squareF.png");//$NON-NLS-1$ DOT_STYLE_TRIANGLE_ICON = loadImageIcon("/res/dotStyles/dot.triangle.png");//$NON-NLS-1$ DOT_STYLE_TRIANGLE_F_ICON = loadImageIcon("/res/dotStyles/dot.triangleF.png");//$NON-NLS-1$ LINE_STYLE_NONE_ICON = loadImageIcon("/res/lineStyles/lineStyle.none.png");//$NON-NLS-1$ LINE_STYLE_DASHED_ICON = loadImageIcon("/res/lineStyles/lineStyle.dashed.png");//$NON-NLS-1$ LINE_STYLE_DOTTED_ICON = loadImageIcon("/res/lineStyles/lineStyle.dotted.png");//$NON-NLS-1$ MIDDLE_ICON = loadImageIcon("/res/doubleBoundary/double.boundary.middle.png");//$NON-NLS-1$ INNER_ICON = loadImageIcon("/res/doubleBoundary/double.boundary.into.png");//$NON-NLS-1$ OUTER_ICON = loadImageIcon("/res/doubleBoundary/double.boundary.out.png");//$NON-NLS-1$ GRID_ICON = loadImageIcon("/res/grid.png");//$NON-NLS-1$ SUBGRID_ICON = loadImageIcon("/res/subgrid.png");//$NON-NLS-1$ COPY_ICON = loadImageIcon("/res/Copy.png");//$NON-NLS-1$ PASTE_ICON = loadImageIcon("/res/Paste.png");//$NON-NLS-1$ CUT_ICON = loadImageIcon("/res/Cut.png");//$NON-NLS-1$ FREE_HAND_ICON = loadImageIcon("/res/Draw.png"); //$NON-NLS-1$ TEXT_ICON = loadImageIcon("/res/text.png"); //$NON-NLS-1$ POLYGON_ICON = loadImageIcon("/res/polygon.png"); //$NON-NLS-1$ ROTATE_ICON = loadImageIcon("/res/rotation.png"); //$NON-NLS-1$ BACKGROUND_ICON = loadImageIcon("/res/background.png"); //$NON-NLS-1$ FOREGROUND_ICON = loadImageIcon("/res/foreground.png");//$NON-NLS-1$ UNDO_ICON = loadImageIcon("/res/Undo.png");//$NON-NLS-1$ REDO_ICON = loadImageIcon("/res/Redo.png"); //$NON-NLS-1$ ZOOM_DEFAULT_ICON = loadImageIcon("/res/Magnify.png"); //$NON-NLS-1$ WEDGE_ICON = loadImageIcon("/res/wedge.png");//$NON-NLS-1$ ARC_ICON = loadImageIcon("/res/Arc.png"); //$NON-NLS-1$ PREFERENCES_ICON = loadImageIcon("/res/preferences-system.png"); //$NON-NLS-1$ NEW_ICON = loadImageIcon("/res/New.png"); //$NON-NLS-1$ OPEN_ICON = loadImageIcon("/res/document-open.png"); //$NON-NLS-1$ SAVE_ICON = loadImageIcon("/res/document-save.png"); //$NON-NLS-1$ SAVE_AS_ICON = loadImageIcon("/res/document-save-as.png");//$NON-NLS-1$ CIRCLE_ICON = loadImageIcon("/res/circle.png"); //$NON-NLS-1$ DEL_ICON = loadImageIcon("/res/del.png"); //$NON-NLS-1$ DOT_ICON = loadImageIcon("/res/dot.png"); //$NON-NLS-1$ ELLIPSE_ICON = loadImageIcon("/res/ellipse.png");//$NON-NLS-1$ EMPTY_ICON = loadImageIcon("/res/empty.png"); //$NON-NLS-1$ RECT_ICON = loadImageIcon("/res/rectangle.png"); //$NON-NLS-1$ RHOMBUS_ICON = loadImageIcon("/res/rhombus.png");//$NON-NLS-1$ SELECT_ICON = loadImageIcon("/res/select.png"); //$NON-NLS-1$ SQUARE_ICON = loadImageIcon("/res/square.png"); //$NON-NLS-1$ TRIANGLE_ICON = loadImageIcon("/res/triangle.png");//$NON-NLS-1$ PROPERTIES_ICON = loadImageIcon("/res/preferences-desktop-theme.png"); //$NON-NLS-1$ HELP_ICON = loadImageIcon("/res/help-browser.png"); //$NON-NLS-1$ ABOUT_ICON = loadImageIcon("/res/emblem-important.png"); //$NON-NLS-1$ JOIN_ICON = loadImageIcon("/res/join.png");//$NON-NLS-1$ SEPARATE_ICON = loadImageIcon("/res/separate.png");//$NON-NLS-1$ BEZIER_CURVE_ICON = loadImageIcon("/res/bezierCurve.png");//$NON-NLS-1$ CHORD_ICON = loadImageIcon("/res/chord.png"); //$NON-NLS-1$ COMMENT_ICON = loadImageIcon("/res/comment.png"); //$NON-NLS-1$ LINES_ICON = loadImageIcon("/res/joinedLines.png"); //$NON-NLS-1$ ERR_ICON = loadImageIcon("/res/emblem-unreadable.png"); //$NON-NLS-1$ STOP_ICON = loadImageIcon("/res/stop.png"); //$NON-NLS-1$ INSERT_PIC_ICON = loadImageIcon("/res/image-x-generic.png"); //$NON-NLS-1$ INSERT_PST_ICON = loadImageIcon("/res/text-x-generic.png"); //$NON-NLS-1$ THICKNESS_ICON = loadImageIcon("/res/thickness.png"); //$NON-NLS-1$ GRADIENT_ICON = loadImageIcon("/res/hatch/gradient.png"); //$NON-NLS-1$ DISPLAY_GRID_ICON = loadImageIcon("/res/displayGrid.png"); //$NON-NLS-1$ ROTATE_180_ICON = loadImageIcon("/res/rotation180.png"); //$NON-NLS-1$ ROTATE_90_ICON = loadImageIcon("/res/rotation90.png"); //$NON-NLS-1$ ROTATE_270_ICON = loadImageIcon("/res/rotation270.png"); //$NON-NLS-1$ MIRROR_H_ICON = loadImageIcon("/res/mirrorH.png"); //$NON-NLS-1$ MIRROR_V_ICON = loadImageIcon("/res/mirrorV.png"); //$NON-NLS-1$ AXES_ICON = loadImageIcon("/res/axes.png"); //$NON-NLS-1$ TEX_EDITOR_ICON = loadImageIcon("/res/texEditor.png"); //$NON-NLS-1$ CURVES_FREEHAND_ICON = loadImageIcon("/res/freehand/curve.png"); //$NON-NLS-1$ LINES_FREEHAND_ICON = loadImageIcon("/res/freehand/line.png"); //$NON-NLS-1$ CLOSED_BEZIER_ICON = loadImageIcon("/res/closedBezier.png"); //$NON-NLS-1$ UPDATE_ICON = loadImageIcon("/res/system-software-update.png"); //$NON-NLS-1$ DRAWING_PROP_ICON = loadImageIcon("/res/document-properties.png"); //$NON-NLS-1$ LATEXDRAW_ICON = loadImageIcon("/res/LaTeXDrawIcon.png"); //$NON-NLS-1$ PDF_ICON = loadImageIcon("/res/pdf.png"); //$NON-NLS-1$ BUTTON_CLOSE_OUT_ICON = loadImageIcon("/res/closeOut.png"); //$NON-NLS-1$ BUTTON_CLOSE_IN_ICON = loadImageIcon("/res/closeIn.png"); //$NON-NLS-1$ ALIGN_BOTTOM_ICON = loadImageIcon("/res/align/alignBottom.png"); //$NON-NLS-1$ ALIGN_LEFT_ICON = loadImageIcon("/res/align/alignLeft.png"); //$NON-NLS-1$ ALIGN_MID_HORIZ_ICON= loadImageIcon("/res/align/alignMiddleHoriz.png"); //$NON-NLS-1$ ALIGN_MID_VERT_ICON = loadImageIcon("/res/align/alignMiddleVert.png"); //$NON-NLS-1$ ALIGN_RIGHT_ICON = loadImageIcon("/res/align/alignRight.png"); //$NON-NLS-1$ ALIGN_TOP_ICON = loadImageIcon("/res/align/alignTop.png"); //$NON-NLS-1$ DIST_VERT_BOTTOM_ICON = loadImageIcon("/res/distrib/distVertBottom.png"); //$NON-NLS-1$ DIST_VERT_EQUAL_ICON = loadImageIcon("/res/distrib/distVertEqual.png"); //$NON-NLS-1$ DIST_VERT_MID_ICON = loadImageIcon("/res/distrib/distVertMiddle.png"); //$NON-NLS-1$ DIST_VERT_TOP_ICON = loadImageIcon("/res/distrib/distVertTop.png"); //$NON-NLS-1$ DIST_HORIZ_EQUAL_ICON = loadImageIcon("/res/distrib/distHorizEqual.png"); //$NON-NLS-1$ DIST_HORIZ_MID_ICON = loadImageIcon("/res/distrib/distHorizMiddle.png"); //$NON-NLS-1$ DIST_HORIZ_RIGHT_ICON = loadImageIcon("/res/distrib/distHorizRight.png"); //$NON-NLS-1$ DIST_HORIZ_LEFT_ICON = 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(final String path) { try { final URL url = LaTeXDraw.class.getResource(path); if(url==null) throw new MalformedURLException(path); return new ImageIcon(url); } catch(final Exception e) { e.printStackTrace(); BadaboomCollector.INSTANCE.add(e); return null; } } public static final String LABEL_CANCEL = LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.6"); //$NON-NLS-1$ public static final String LABEL_OK = LangTool.INSTANCE.getStringDialogFrame("AbstractParametersFrame.4"); //$NON-NLS-1$ } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/LSystem.java000066400000000000000000000225301321075051700317570ustar00rootroot00000000000000package net.sf.latexdraw.util; import java.awt.Dimension; import java.awt.DisplayMode; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.event.KeyEvent; import java.io.File; import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sf.latexdraw.badaboom.BadaboomCollector; /** * Defines some routines that provides information about the operating system currently used.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/14/10
    * @author Arnaud BLOUIN, Jan-Cornelius MOLNAR * @version 3.0 */ public final class LSystem { /** * The different operating systems managed. */ public enum OperatingSystem { VISTA, XP, SEVEN, EIGHT, TEN, MAC_OS_X_CAPITAN { @Override public String getPS2EPSBinPath() { return "/usr/local/bin/ps2epsi"; //$NON-NLS-1$ } @Override public String getLatexBinPath() { return "/Library/TeX/texbin/latex"; //$NON-NLS-1$ } @Override public String getDvipsBinPath() { return "/Library/TeX/texbin/dvips"; //$NON-NLS-1$ } @Override public String getPs2pdfBinPath() { return "/usr/local/bin/ps2pdf"; //$NON-NLS-1$ } @Override public String getPdfcropBinPath() { return "/Library/TeX/texbin/pdfcrop"; //$NON-NLS-1$ } }, MAC_OS_X { @Override public String getPS2EPSBinPath() { return "/usr/local/bin/ps2epsi"; //$NON-NLS-1$ } @Override public String getLatexBinPath() { return "/usr/texbin/latex"; //$NON-NLS-1$ } @Override public String getDvipsBinPath() { return "/usr/texbin/dvips"; //$NON-NLS-1$ } @Override public String getPs2pdfBinPath() { return "/usr/local/bin/ps2pdf"; //$NON-NLS-1$ } @Override public String getPdfcropBinPath() { return "pdfcrop"; //$NON-NLS-1$ } }, LINUX; /** * @return The path where is the ps2eps binary. * @since 3.1 */ public String getPS2EPSBinPath() { return "ps2epsi"; //$NON-NLS-1$ } /** * @return The path where is the latex binary. * @since 3.0 */ public String getLatexBinPath() { return "latex"; //$NON-NLS-1$ } /** * @return The path where is the dvips binary. * @since 3.0 */ public String getDvipsBinPath() { return "dvips"; //$NON-NLS-1$ } /** * @return The path where is the ps2pdf binary. * @since 3.0 */ public String getPs2pdfBinPath() { return "ps2pdf"; //$NON-NLS-1$ } /** * @return The path where is the pdfcrop binary. * @since 3.0 */ public String getPdfcropBinPath() { return "pdfcrop"; //$NON-NLS-1$ } } /** The singleton. */ public static final LSystem INSTANCE = new LSystem(); /** * Creates the singleton. */ private LSystem() { super(); } /** * @return True: the operating system currently used is Windows. * @since 3.0 */ public boolean isWindows() { return isSeven() || isVista() || isXP() || is8() || is10(); } /** * @return True: the operating system currently used is Windows 10. */ public boolean is10() { return getSystem()==OperatingSystem.TEN; } /** * @return True: the operating system currently used is Windows 8. * @since 3.0 */ public boolean is8() { return getSystem()==OperatingSystem.EIGHT; } /** * @return True: the operating system currently used is Vista. * @since 3.0 */ public boolean isVista() { return getSystem()==OperatingSystem.VISTA; } /** * @return True: the operating system currently used is XP. * @since 3.0 */ public boolean isXP() { return getSystem()==OperatingSystem.XP; } /** * @return True: the operating system currently used is Seven. * @since 3.0 */ public boolean isSeven() { return getSystem()==OperatingSystem.SEVEN; } /** * @return True: the operating system currently used is Linux. * @since 3.0 */ public boolean isLinux() { return getSystem()==OperatingSystem.LINUX; } /** * @return True: the operating system currently used is Mac OS X. * @since 3.0 */ public boolean isMacOSX() { return getSystem()==OperatingSystem.MAC_OS_X; } /** * @return True: the operating system currently used is Mac OS X El Capitan. * @since 3.3 */ public boolean isMacOSXElCapitan() { return getSystem()==OperatingSystem.MAC_OS_X_CAPITAN; } /** * @return True: the operating system currently used is Mac OS. * @since 3.3 */ public boolean isMac() { return isMacOSX() || isMacOSXElCapitan(); } /** * @return The control modifier used by the currently used operating system. * @since 3.0 */ public int getControlKey() { if(LSystem.INSTANCE.isMac()) return KeyEvent.VK_META; return KeyEvent.VK_CONTROL; } /** * @return The name of the operating system currently used. * @since 3.0 */ public OperatingSystem getSystem() { final String os = System.getProperty("os.name"); //$NON-NLS-1$ if("linux".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.LINUX; if("windows 7".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.SEVEN; if("windows vista".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.VISTA; if("windows xp".equalsIgnoreCase(os)) //$NON-NLS-1$ return OperatingSystem.XP; if("mac os x".equalsIgnoreCase(os)) { //$NON-NLS-1$ final String[] v = System.getProperty("os.version").split("\\."); final double[] d = new double[v.length]; for(int i=0; i=1 && d[0]>10) || (d.length>=2 && d[0]==10 && d[1]>=11)) // A change since El Capitan return OperatingSystem.MAC_OS_X_CAPITAN; return OperatingSystem.MAC_OS_X; //$NON-NLS-1$ } if(os.toLowerCase().contains("windows 8")) //$NON-NLS-1$ return OperatingSystem.EIGHT; if(os.toLowerCase().contains("windows 10")) //$NON-NLS-1$ return OperatingSystem.TEN; BadaboomCollector.INSTANCE.add(new IllegalArgumentException("This OS is not supported: " + os)); //$NON-NLS-1$ return null; } /** * @return The version of the current LaTeX. * @since 3.1 */ public String getLaTeXVersion() { return execute(new String[]{getSystem().getLatexBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current dvips. * @since 3.1 */ public String getDVIPSVersion() { return execute(new String[]{getSystem().getDvipsBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current ps2pdf. * @since 3.1 */ public String getPS2PDFVersion() { return execute(new String[]{getSystem().getPs2pdfBinPath()}, null); } /** * @return The version of the current ps2eps. * @since 3.1 */ public String getPS2EPSVersion() { return execute(new String[]{getSystem().getPS2EPSBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The version of the current pdfcrop. * @since 3.1 */ public String getPDFCROPVersion() { return execute(new String[]{getSystem().getPdfcropBinPath(), "--version"}, null); //$NON-NLS-1$ } /** * @return The precise latex error messages that the latex compilation produced. * @since 3.0 */ public String getLatexErrorMessageFromLog(final String log) { if(log == null) return ""; final Matcher matcher = Pattern.compile(".*\r?\n").matcher(log); //$NON-NLS-1$ final StringBuilder errors = new StringBuilder(); while(matcher.find()) { String line = matcher.group(); if(line.startsWith("!") && !line.equals("! Emergency stop.\n")) { //$NON-NLS-1$ errors.append(line.substring(2, line.length())); } } return errors.toString(); } /** * @return Returns the dimension of the first available screen. If in dual screen mode, * the first screen is used. If no screen is available (Oo), the dimension (0,0) is returned. * @since 3.0 */ public Dimension getScreenDimension() { final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); final GraphicsDevice[] gs = ge.getScreenDevices(); if(gs.length>0) { final DisplayMode mode = gs[0].getDisplayMode(); return new Dimension(mode.getWidth(), mode.getHeight()); } return new Dimension(); } /** * Executes a command. * @param cmd The execution command * @param tmpdir The working dir * @return The log. * @since 3.1 */ public String execute(final String[] cmd, final File tmpdir) { if(cmd==null || cmd.length==0) return null; try { final Process process = Runtime.getRuntime().exec(cmd, null, tmpdir); // Command launched final StreamExecReader err = new StreamExecReader(process.getErrorStream());// Catch the error log final 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() + LResources.EOL + inp.getLog(); }catch(final Exception e) {return "ERR while execute the command : " + Arrays.toString(cmd) + ": " + e.getMessage();} //$NON-NLS-1$ //$NON-NLS-2$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/Preference.java000066400000000000000000000023531321075051700324360ustar00rootroot00000000000000package net.sf.latexdraw.util; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.parsers.DocumentBuilderFactory; import java.io.File; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class Preference { private static Map preferences = null; public static Map readXMLPreferencesFromFile(final File xmlFile) { if(xmlFile==null || !xmlFile.canRead()) return Collections.emptyMap(); if(preferences!=null) return preferences; try { Node node = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlFile).getFirstChild(); if(node==null || !node.getNodeName().equals(LNamespace.XML_ROOT_PREFERENCES)) throw new IllegalArgumentException(); final NodeList nl = node.getChildNodes(); String name; preferences = new HashMap<>(); for(int i=0, size=nl.getLength(); i * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 09/14/09
    * @author Arnaud BLOUIN * @version 2.0.4
    */ public class StreamExecReader extends Thread { /** The stream to listen. */ private final InputStream stream; /** The read log. */ private StringBuilder log; /** * Default constructor. * @param is The stream to listen. */ public StreamExecReader(final InputStream is) { super(); stream = Objects.requireNonNull(is); } @Override public void run() { try { try(final InputStreamReader isr = new InputStreamReader(stream); final BufferedReader br = new BufferedReader(isr)){ log = new StringBuilder(); String line = br.readLine(); while(line != null) { log.append(line).append(LResources.EOL); line = br.readLine(); } } }catch(final IOException ex) { BadaboomCollector.INSTANCE.add(ex); } } /** * @return The read log. */ public String getLog() { return log==null ? "" : log.toString(); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/Theme.scala000066400000000000000000000051641321075051700315670ustar00rootroot00000000000000package net.sf.latexdraw.util import javax.swing.UIManager import net.sf.latexdraw.badaboom.BadaboomCollector import org.w3c.dom.NodeList import java.io.File import org.w3c.dom.Node import javax.xml.parsers.DocumentBuilderFactory import scala.collection.JavaConversions._ import javax.swing.UIManager.LookAndFeelInfo /** * This singleton contains methods to handle look-and feel objects.
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 2012-04-18
    * * @author Arnaud BLOUIN * @version 3.0 */ object Theme { /** The look and feel of the program. */ private var _lookAndFeel : String = "" /** * @return The current look and feel. * @since 3.0 */ def lookAndFeel = _lookAndFeel /** * Sets the current look and feel. * * @since 3.0 */ def setTheme() = { try{ _lookAndFeel = readTheme System.setProperty("apple.laf.useScreenMenuBar", "true") //$NON-NLS-1$ //$NON-NLS-2$ System.setProperty("com.apple.mrj.application.apple.menu.about.name", LResources.LABEL_APP)//$NON-NLS-1$ UIManager.setLookAndFeel(_lookAndFeel) } catch { case ex: Throwable => BadaboomCollector.INSTANCE.add(ex) } } /** * @return The look and feel identifier of the current platform. * @since 3.0 */ def platformLnF : String = { if(LSystem.INSTANCE.isLinux) return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" //$NON-NLS-1$ if(LSystem.INSTANCE.isMac) return "com.apple.laf.AquaLookAndFeel"//$NON-NLS-1$ if(LSystem.INSTANCE.isWindows) return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"//$NON-NLS-1$ return UIManager.getCrossPlatformLookAndFeelClassName } /** * Allows to get the theme of the program. * * @since 3.0 * @return The class of the theme. */ def readTheme() : String = { val node = Preference.readXMLPreferencesFromFile(new File(LPath.PATH_PREFERENCES_XML_FILE)).get(LNamespace.XML_LAF) if(node != null) { UIManager.getInstalledLookAndFeels.find { lnfInfo => lnfInfo.getName.equals(node.getTextContent) } match { case Some(lnfInfo) => return lnfInfo.getClassName case _ => } } return platformLnF } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/main/net/sf/latexdraw/util/VersionChecker.java000077500000000000000000000067551321075051700333070ustar00rootroot00000000000000package net.sf.latexdraw.util; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URI; import java.net.URL; import javax.swing.JButton; import net.sf.latexdraw.badaboom.BadaboomCollector; import net.sf.latexdraw.lang.LangTool; import net.sf.latexdraw.ui.UIBuilder; import org.malai.action.library.OpenWebPage; /** * 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 starts.
    *
    * This file is part of LaTeXDraw
    * Copyright (c) 2005-2014 Arnaud BLOUIN
    *
    * LaTeXDraw is free software; you can redistribute it and/or modify * 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.
    *
    * LaTeXDraw is distributed without any warranty; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details.
    *
    * 05/20/2010
    * @author Arnaud BLOUIN * @version 3.0 * @since 1.8 */ public class VersionChecker extends Thread { /** The version of the application */ public static final String VERSION = "3.3.8";//$NON-NLS-1$ public static final String VERSION_STABILITY = ""; //$NON-NLS-1$ /** The identifier of the build */ public static final String ID_BUILD = "20171203";//$NON-NLS-1$ /** To change if update is needed or not. */ public static final boolean WITH_UPDATE = true; /** The path of the file containing the news */ public static final String PATH_MSG = "http://latexdraw.sourceforge.net/news.txt"; //$NON-NLS-1$ /** The field where messages will be displayed. */ protected JButton buttonUpdate; /** The composer of the application. */ protected UIBuilder builder; /** * Creates the version checker. * @param builder The composer of the application. */ public VersionChecker(final UIBuilder builder) { super(); this.builder = builder; } @Override public void run() { checkNewVersion(); } /** * Checks if a new version of latexdraw is out. */ protected void checkNewVersion() { try { try(InputStream is = new URL(PATH_MSG).openStream(); DataInputStream dis = new DataInputStream(is); InputStreamReader isr = new InputStreamReader(dis); BufferedReader br = new BufferedReader(isr)){ final String line = br.readLine(); final String[] div = line==null ? null : line.split("_"); //$NON-NLS-1$ if(div!=null && div.length>3 && div[3].compareTo(VERSION)>0) { buttonUpdate = new JButton(LResources.UPDATE_ICON); buttonUpdate.setToolTipText("" + //$NON-NLS-1$ LangTool.INSTANCE.getStringDialogFrame("Version.1") + ' ' + div[3]+ ""); //$NON-NLS-1$ //$NON-NLS-2$ buttonUpdate.setVisible(true); buttonUpdate.addActionListener(evt -> { try { final OpenWebPage action = new OpenWebPage(); action.setUri(new URI("http://latexdraw.sourceforge.net/")); //$NON-NLS-1$ if(action.canDo()) action.doIt(); action.flush(); buttonUpdate.setVisible(false); }catch(final Exception ex) { BadaboomCollector.INSTANCE.add(ex); } }); builder.getToolbar().add(buttonUpdate); } } }catch(final IOException e) { /* Nothing to do. */ } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/000077500000000000000000000000001321075051700244325ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/000077500000000000000000000000001321075051700253565ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/000077500000000000000000000000001321075051700262775ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/000077500000000000000000000000001321075051700266625ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/1_6.properties000066400000000000000000000012751321075051700313720ustar00rootroot00000000000000LaTeXDrawFrame.0=Insereix codi PSTricks LaTeXDrawFrame.1=Insereix una imatge LaTeXDrawFrame.3=atura LaTeXDrawFrame.6=Imatge BMP LaTeXDrawFrame.7=Imatge PNG LaTeXDrawFrame.10=Insereix LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=No s'ha trobat cap figura per importar! LaTeXDrawFrame.34=No s'ha pogut importar el fitxer PSTricks! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Insereix figures a partir de codi PSTricks Picture.0=% Atenci\u00f3: el cam\u00ed de la seg\u00fcent imatge cont\u00e9 espais i no ser\u00e0 compilat pel TeX! ParserMessagesFrame.0=Comanda latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/1_7.properties000066400000000000000000000006671321075051700313770ustar00rootroot00000000000000LaTeXDrawFrame.0=Ombra LaTeXDrawFrame.1=Degradat 1 LaTeXDrawFrame.2=Degradat 2 LaTeXDrawFrame.4=Afegeix una ombra a la imatge. LaTeXDrawFrame.5=Escull el color de l'ombra. LaTeXDrawFrame.6=Posiciona figures en el dibuix (davant de, darrere, ...). LaTeXDrawFrame.7=Escull el primer color del degradat. LaTeXDrawFrame.8=Escull el segon color del degradat. AbstractParametersFrame.3=Angle del degradat AbstractParametersFrame.4=Punt intermig latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/1_8.properties000066400000000000000000000027551321075051700314000ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=Forma: ParametersAxeFrame.1=Mostra l'origen ParametersAxeFrame.6=Dist\u00e0ncia entre etiquetes a l'eix X: ParametersAxeFrame.7=Dist\u00e0ncia entre etiquetes a l'eix Y: ParametersAxeFrame.8=Increment d'etiquetes a l'eix X: ParametersAxeFrame.9=Increment d'etiquetes a l'eix Y: ParametersAxeFrame.13=Mida: ParametersAxeFrame.17=Marques PreferencesFrame.3=Direcci\u00f3 del vostre editor LaTeX: PreferencesFrame.4=Graella est\u00e0ndard PreferencesFrame.5=Graella personalitzada PreferencesFrame.6=Graella magn\u00e8tica PreferencesFrame.7=Interval: LaTeXDrawFrame.2=Gira les figures seleccionades LaTeXDrawFrame.3=Gira les figures seleccionades 90\u00ba. LaTeXDrawFrame.4=Gira les figures seleccionades 180\u00ba. LaTeXDrawFrame.5=Gira les figures seleccionades 270\u00ba. LaTeXDrawFrame.6=Inverteix les figures per simetria. LaTeXDrawFrame.7=Inverteix horitzontalment les figures seleccionades. LaTeXDrawFrame.8=Inverteix verticalment les figures seleccionades. LaTeXDrawFrame.12=Cont\u00e9 els par\u00e0metres de la graella (magn\u00e8tica) LaTeXDrawFrame.13=magn\u00e8tiques LaTeXDrawFrame.14=Si est\u00e0 seleccionat, les figures seran magn\u00e8tiques amb la graella. LaTeXDrawFrame.15=Defineix l'interval entre l\u00ednies de la graella personalitzada (en p\u00edxels). LaTeXDrawFrame.17=Dibuixa eixos. LaTeXDrawFrame.23=Tanca LaTeXDrawFrame.27=Notes de la versi\u00f3 LaTeXDrawFrame.28=License Axe.1=Destral Axe.2=Marc Axe.3=Full Axe.4=Top Axe.5=Bottom latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/1_9.properties000066400000000000000000000042761321075051700314010ustar00rootroot00000000000000LaTeXDrawFrame.0=Fitxers recents LaTeXDrawFrame.3=Dreceres LaTeXDrawFrame.11=Dibuixa una corba de B\u00e9zier tancada DrawPanel.0=Actualitza les figures a la graella ParametersAkinPointsFrame.0=Interval dels punts: ParametersAkinPointsFrame.1=Obre ParametersAkinPointsFrame.2=tipus: PreferencesFrame.0=Nombre de fitxers recents: PreferencesFrame.1=Tema (cal reiniciar): ShortcutsFrame.1=Seq\u00fc\u00e8ncia ShortcutsFrame.3=Categoria ShortcutsFrame.4=Navegaci\u00f3 ShortcutsFrame.5=Transformaci\u00f3 ShortcutsFrame.6=Dibuix ShortcutsFrame.8=clic esquerre ShortcutsFrame.9=Mou la barra de despla\u00e7ament horitzontal cap a la dreta ShortcutsFrame.10=Mou la barra de despla\u00e7ament horitzontal cap a l'esquerra ShortcutsFrame.11=Mou la barra de despla\u00e7ament vertical cap amunt ShortcutsFrame.12=Mou la barra de despla\u00e7ament vertical cap avall ShortcutsFrame.18=Mou les figures seleccionades cap a la dreta ShortcutsFrame.19=Mou les figures seleccionades cap a l'esquerra ShortcutsFrame.20=Mou les figures seleccionades cap amunt ShortcutsFrame.21=Mou les figures seleccionades cap avall ShortcutsFrame.23=Actualitza les figures seleccionades a la graella mostrada ShortcutsFrame.25=Selecciona totes les figures del dibuix ShortcutsFrame.26=Afegeix la figura clicada a la selecci\u00f3 ShortcutsFrame.27=Elimina la figura clicada de la selecci\u00f3 ShortcutsFrame.29=Roda del ratol\u00ed ShortcutsFrame.30=Apropa/allunya MenusListener.0=Premeu el bot\u00f3 esquerre i arrossegueu el ratol\u00ed per situar el segon punt. Deixeu anar el bot\u00f3 per finalitzar la creaci\u00f3. MenusListener.1=Un clic esquerre per afegir un punt, un clic dret o un doble clic per situar el darrer punt i acabar la creaci\u00f3. MenusListener.4=Premeu el bot\u00f3 esquerre i arrossegueu el ratol\u00ed per situar el darrer punt. Deixeu anar el bot\u00f3 per finalitzar la creaci\u00f3. MenusListener.5=Un clic esquerre afegeix text. MenusListener.6=Un clic esquerre afegeix una graella. MenusListener.7=Un clic esquerre afegeix eixos. MenusListener.8=Premeu el bot\u00f3 esquerre i arrossegueu el ratol\u00ed per dibuixar la forma. Deixeu anar el bot\u00f3 per finalitzar la creaci\u00f3. MenusListener.9=Un clic esquerre afegeix un punt. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/LaTeXDrawFrame.properties000066400000000000000000000104431321075051700335500ustar00rootroot00000000000000LaTeXDrawFrame.0=\ ajuda LaTeXDrawFrame.7=A m\u00e0 al\u00e7ada LaTeXDrawFrame.16=Exporta com a... LaTeXDrawFrame.17=Esborra la figura LaTeXDrawFrame.18=Surt LaTeXDrawFrame.19=Codi PSTricks LaTeXDrawFrame.20=Imatge JPEG LaTeXDrawFrame.22=Ref\u00e9s LaTeXDrawFrame.23=Desf\u00e9s LaTeXDrawFrame.38=Escala X LaTeXDrawFrame.39=Escala Y LaTeXDrawFrame.40=Copia LaTeXDrawFrame.41=Actualitza les plantilles LaTeXDrawFrame.42=Exporta com a plantilla LaTeXDrawFrame.43=Enganxa LaTeXDrawFrame.44=Retalla LaTeXDrawFrame.48=Interior LaTeXDrawFrame.49=Ombrejats LaTeXDrawFrame.56=Prefer\u00e8ncies LaTeXDrawFrame.57=Apropa LaTeXDrawFrame.58=Allunya LaTeXDrawFrame.60=Afegeix text LaTeXDrawFrame.65=Canvia el gruix de la figura LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Posa la figura en primer pla LaTeXDrawFrame.71=Posa la figura en segon pla LaTeXDrawFrame.75=Agrupa v\u00e0ries figures LaTeXDrawFrame.76=Separa v\u00e0ries figures LaTeXDrawFrame.77=Defineix la posici\u00f3 de les vores de la figura LaTeXDrawFrame.78=Si es selecciona, la figura tindr\u00e0 vores dobles LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=Fitxer LaTeXDrawFrame.89=Edita LaTeXDrawFrame.90=Visualitza LaTeXDrawFrame.91=Dibuixa LaTeXDrawFrame.93=Ajuda LaTeXDrawFrame.103=Plantilles LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Dibuixa un punt LaTeXDrawFrame.119=Dibuixa un rectangle LaTeXDrawFrame.120=Dibuixa un quadrat LaTeXDrawFrame.121=Dibuixa un pol\u00edgon LaTeXDrawFrame.123=Dibuixa un rombe LaTeXDrawFrame.124=Dibuixa un triangle LaTeXDrawFrame.125=Dibuixa una el\u00b7lipse LaTeXDrawFrame.127=Dibuixa un cercle LaTeXDrawFrame.128=Dibuixa un arc LaTeXDrawFrame.130=Dibuixa una falca LaTeXDrawFrame.131=Dibuixa una corda LaTeXDrawFrame.132=Dibuixa una corba de B\u00e9zier LaTeXDrawFrame.133=Dibuixa una graella LaTeXDrawFrame.136=Seleccioneu una o v\u00e0ries figures
    LaTeXDrawFrame.137=Consell: per seleccionar v\u00e0ries LaTeXDrawFrame.138=figures, feu clic i
    arrossegueu el ratol\u00ed sobre les figures que vulgueu LaTeXDrawFrame.139=Esborra les figures seleccionades LaTeXDrawFrame.146=Copiat... LaTeXDrawFrame.147=Enganxat... LaTeXDrawFrame.148=Retallat... LaTeXDrawFrame.149=Esborrat... LaTeXDrawFrame.154=Agrupades... LaTeXDrawFrame.155=Separades... LaTeXDrawFrame.169=Plantilla exportada! LaTeXDrawFrame.171=Selecciona LaTeXDrawFrame.173=Voleu sobreescriure el fitxer? LaTeXDrawFrame.175=Codi PSTricks exportat! LaTeXDrawFrame.176=No s'ha pogut exportar el codi PSTricks! LaTeXDrawFrame.184=Exportar com a imatge fet! LaTeXDrawFrame.185=No s'ha pogut exportar com a imatge! LaTeXDrawFrame.188=Desa el dibuix LaTeXDrawFrame.200=Obre un dibuix LaTeXDrawFrame.219=Versi\u00f3 LaTeXDrawFrame.220=, compilaci\u00f3 LaTeXDrawFrame.221=\ es distribueix sota els termes de la Llic\u00e8ncia P\u00fablica General de GNU LFrame2.1=Alinea les figures seleccionades LFrame2.10=Distribueix verticalment, de manera equidistant, les figures seleccionades. LFrame2.11=Distribueix verticalment de manera equidistant respecte del seu centre les figures seleccionades. LFrame2.12=Distribueix verticalment de manera equidistant respecte del seu costat superior les figures seleccionades. LFrame2.13=Distribueix horitzontalment de manera equidistant respecte del seu costat esquerre les figures seleccionades. LFrame2.14=Distribueix horitzontalment, de manera equidistant, les figures seleccionades. LFrame2.15=Distribueix horitzontalment de manera equidistant respecte del seu centre les figures seleccionades. LFrame2.16=Distribueix horitzontalment de manera equidistant respecte del seu costat dret les figures seleccionades. LFrame2.2=Alinea a l'esquerra les figures seleccionades. LFrame2.3=Alinea a la dreta les figures seleccionades. LFrame2.4=Alinea per dalt les figures seleccionades. LFrame2.5=Alinea per sota les figures seleccionades. LFrame2.6=Alinea horitzontalment pel mig les figures seleccionades. LFrame2.7=Alinea verticalment pel mig les figures seleccionades. LFrame2.8=Distribueix de manera equidistant les figures seleccionades. LFrame2.9=Distribueix verticalment, de manera equidistant respecte del costat inferior de les figures seleccionades. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/actions.properties000066400000000000000000000073371321075051700324520ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/dialogFrames.properties000066400000000000000000000045301321075051700333770ustar00rootroot00000000000000PreferencesFrame.Pref=Prefer\u00e8ncies... PreferencesFrame.grid=Graella PreferencesFrame.codePanel=Plaf\u00f3 de codi PreferencesFrame.antiAl=Antiali\u00e0sing PreferencesFrame.rendQ=Qualitat de renderitzaci\u00f3 PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Qualitat de la interpolaci\u00f3 alpha PreferencesFrame.newVers=Comprova si hi ha noves versions a l'iniciar PreferencesFrame.lge=Idioma (cal reiniciar) PreferencesFrame.general=General PreferencesFrame.folders=Carpetes PreferencesFrame.quality=Qualitat PreferencesFrame.selectFolder=Seleccioneu una carpeta PreferencesFrame.defOpenSave=Carpeta predeterminada per a les accions d'obrir/desar: PreferencesFrame.defFold=Carpeta predeterminada per a les accions d'importar/exportar: AbstractParametersFrame.0=Doble l\u00edmit AbstractParametersFrame.2=Separador: AbstractParametersFrame.4=D'acord AbstractParametersFrame.6=Cancel\u00b7la AbstractParametersFrame.7=Angle de rotaci\u00f3: AbstractParametersFrame.11=Amplada de l'ombra AbstractParametersFrame.20=Di\u00e0metre del punt = AbstractParametersFrame.21=Amplada de la barra = AbstractParametersFrame.22=Longitud del claud\u00e0tor = AbstractParametersFrame.23=Longitud del par\u00e8ntesi = AbstractParametersFrame.24=gruix x + AbstractParametersFrame.26=Longitud de la fletxa AbstractParametersFrame.27=Interior de la fletxa AbstractParametersFrame.28=Amplada de la fletxa ParametersArcFrame.0=angle inicial: ParametersArcFrame.1=angle final: ParametersGridFrame.0=Origen Y: ParametersGridFrame.1=Origen X: ParametersGridFrame.4=Punts de la subgraella: ParametersGridFrame.5=Punts de la graella: ParametersGridFrame.6=Amplada de la graella: ParametersGridFrame.7=Amplada de la subgraella: ParametersGridFrame.8=Divisi\u00f3 de la subgraella: ParametersGridFrame.9=Mida de l'etiqueta: ParametersGridFrame.11=X m\u00e0x: ParametersGridFrame.12=X m\u00edn: ParametersGridFrame.13=Y m\u00e0x: ParametersGridFrame.14=Y m\u00edn: ExportDialog.0=Compressi\u00f3 Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ca/others.properties000066400000000000000000000005441321075051700323070ustar00rootroot00000000000000XScale.cm=cm XScale.inch=polzada Arc.arc=Arc Arc.wedge=Falca Arc.chord=Corda DrawContainer.nameTemplate=Introdu\u00efu el nom de la plantilla DrawContainer.overwriteTemplate=Aquesta plantilla ja existeix. Voleu sobreescriure-la? CloseButton.closePanel=Close the window UndoRedoManager.create=Crea UndoRedoManager.join=Uneix UndoRedoManager.seperate=Separa latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/000077500000000000000000000000001321075051700267045ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/1_6.properties000066400000000000000000000013431321075051700314100ustar00rootroot00000000000000LaTeXDrawFrame.0=Vlo\u017eit PSTricks k\u00f3d LaTeXDrawFrame.1=Vlo\u017eit obr\u00e1zek LaTeXDrawFrame.3=zastavit LaTeXDrawFrame.6=BMP obr\u00e1zek LaTeXDrawFrame.7=PNG obr\u00e1zek LaTeXDrawFrame.10=Insert LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Nenalezen obr\u00e1zek pro import! LaTeXDrawFrame.34=Nelze importovat PSTricks soubor! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Vlo\u017eit obr\u00e1zky z PSTricks k\u00f3du Picture.0=% Varov\u00e1n\u00ed: cesta k n\u00e1sleduj\u00edc\u00edmu obr\u00e1zku obsahuje mezery, nebude zkompilov\u00e1na texem! ParserMessagesFrame.0=P\u0159\u00edkaz latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/1_7.properties000066400000000000000000000007251321075051700314140ustar00rootroot00000000000000LaTeXDrawFrame.0=St\u00edn LaTeXDrawFrame.1=Gradient 1 LaTeXDrawFrame.2=Gradient 2 LaTeXDrawFrame.4=P\u0159idat st\u00edn k obr\u00e1zku. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Um\u00edstit prvky do obr\u00e1zku (p\u0159ed, za,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=\u00dahel gradientu AbstractParametersFrame.4=St\u0159edn\u00ed bod latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/1_8.properties000066400000000000000000000031361321075051700314140ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=Tvar: ParametersAxeFrame.1=Zobrazit po\u010d\u00e1tek ParametersAxeFrame.6=X-popisky vzd\u00e1lenost: ParametersAxeFrame.7=Y-popisky vzd\u00e1lenost: ParametersAxeFrame.8=X-popisek p\u0159\u00edrustek: ParametersAxeFrame.9=Y-popisek p\u0159\u00edrustek: ParametersAxeFrame.13=Velikost: ParametersAxeFrame.17=Znam\u00e9nka PreferencesFrame.3=Cesta k va\u0161emu LaTeX editoru: PreferencesFrame.4=Standartn\u00ed m\u0159\u00edzka PreferencesFrame.5=Osobn\u00ed m\u0159\u00edzka PreferencesFrame.6=Magnetick\u00e1 m\u0159\u00ed\u017eka PreferencesFrame.7=Interval: LaTeXDrawFrame.2=Oto\u010dit vybran\u00e9 obr\u00e1zky. LaTeXDrawFrame.3=Oto\u010dit vybran\u00e9 obr\u00e1zky o 90\u00b0. LaTeXDrawFrame.4=Oto\u010dit vybran\u00e9 obr\u00e1zky o 180\u00b0. LaTeXDrawFrame.5=Oto\u010dit vybran\u00e9 obr\u00e1zky o 270\u00b0. LaTeXDrawFrame.6=Symmetricky obr\u00e1t\u00ed obr\u00e1zky. LaTeXDrawFrame.7=Horizont\u00e1ln\u011b obr\u00e1t\u00ed vybran\u00e9 obr\u00e1zky. LaTeXDrawFrame.8=Vertik\u00e1ln\u011b obr\u00e1t\u00ed vybran\u00e9 obr\u00e1zky. LaTeXDrawFrame.12=Obsahuje parametry (magnetick\u00e9) m\u0159i\u017eky LaTeXDrawFrame.13=magnetick\u00fd LaTeXDrawFrame.14=Pokud je zvoleno, obr\u00e1zky budou p\u0159itahov\u00e1ny k m\u0159\u00edzce. LaTeXDrawFrame.15=Definovat interval mezi \u0159\u00e1dky osobn\u00ed m\u0159\u00ed\u017eky (v pixelech). LaTeXDrawFrame.17=Vykreslit osy. LaTeXDrawFrame.23=Zav\u0159\u00edt LaTeXDrawFrame.27=Pozn\u00e1mka k vyd\u00e1n\u00ed LaTeXDrawFrame.28=License Axe.1=Osa Axe.2=R\u00e1mec Axe.3=Pln\u00fd Axe.4=Naho\u0159e Axe.5=Dole latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/1_9.properties000066400000000000000000000053451321075051700314210ustar00rootroot00000000000000LaTeXDrawFrame.0=Ned\u00e1vno otev\u0159en\u00e9 soubory LaTeXDrawFrame.3=Zkratky LaTeXDrawFrame.11=Vykreslit uzav\u0159enou B\u00e9zierovu k\u0159ivku DrawPanel.0=Aktualoizovat prvky v m\u0159\u00ed\u017ece ParametersAkinPointsFrame.0=Interva bod\u016f: ParametersAkinPointsFrame.1=Otev\u0159\u00edt ParametersAkinPointsFrame.2=typ: PreferencesFrame.0=Po\u010det ned\u00e1vn\u00fdch soubor\u016f: PreferencesFrame.1=Motiv (t\u0159eba restartovat): ShortcutsFrame.1=Sekvence ShortcutsFrame.3=Kategorie ShortcutsFrame.4=Navigace ShortcutsFrame.5=Transformace ShortcutsFrame.6=Kreslen\u00ed ShortcutsFrame.8=lev\u00e9 tla\u010d\u00edtko my\u0161i ShortcutsFrame.9=P\u0159esunout horizont\u00e1ln\u00ed rolovac\u00ed li\u0161tu doprava ShortcutsFrame.10=P\u0159esunout horizont\u00e1ln\u00ed rolovac\u00ed li\u0161tu doleva ShortcutsFrame.11=P\u0159esunout vertik\u00e1ln\u00ed rolovac\u00ed li\u0161tu nahoru ShortcutsFrame.12=P\u0159esunout vertik\u00e1ln\u00ed rolovac\u00ed li\u0161tu dol\u016f ShortcutsFrame.18=P\u0159esunout vybran\u00e9 prvky vpravo ShortcutsFrame.19=P\u0159esunout vybran\u00e9 prvky vlevo ShortcutsFrame.20=P\u0159esunout vybran\u00e9 prvky nahoru ShortcutsFrame.21=P\u0159esunout vybran\u00e9 prvky dol\u016f ShortcutsFrame.23=Zobraz vybran\u00e9 prvky ve m\u0159i\u017ece ShortcutsFrame.25=Vybrat v\u0161echny prvky kresby ShortcutsFrame.26=P\u0159idat prvek k v\u00fdb\u011bru ShortcutsFrame.27=Odstranit prvek z v\u00fdb\u011bru ShortcutsFrame.29=Kole\u010dko my\u0161i ShortcutsFrame.30=P\u0159ibl\u00ed\u017eit/Odd\u00e1lit MenusListener.0=Dr\u017ete stisknut\u00e9 lev\u00e9 tla\u010d\u00edtko a t\u00e1hn\u011bte my\u0161 na m\u00edsto druh\u00e9ho bodu. Pro ukon\u010den\u00ed vytv\u00e1\u0159en\u00ed tla\u010d\u00edtko uvoln\u011bte. MenusListener.1=Stisknut\u00ed lev\u00e9ho tla\u010d\u00edtka p\u0159id\u00e1 bod, stisnut\u00ed prav\u00e9ho nebo dvojn\u00e1sobn\u00e9 stisknut\u00ed lev\u00e9ho p\u0159id\u00e1 posledn\u00ed bod a ukon\u010d\u00ed vytv\u00e1\u0159en\u00ed. MenusListener.4=Dr\u017ete stisknut\u00e9 lev\u00e9 tla\u010d\u00edtko a t\u00e1hn\u011bte my\u0161 na m\u00edsto posledn\u00edho bodu. Pro ukon\u010den\u00ed vytv\u00e1\u0159en\u00ed tla\u010d\u00edtko uvoln\u011bte. MenusListener.5=Stisknut\u00ed lev\u00e9ho tla\u010d\u00edtka p\u0159id\u00e1 text. MenusListener.6=Stisknut\u00ed lev\u00e9ho tla\u010d\u00edtka p\u0159id\u00e1 m\u0159i\u017eku. MenusListener.7=Stisknut\u00ed lev\u00e9ho tla\u010d\u00edtka p\u0159id\u00e1 osy. MenusListener.8=Dr\u017ete stisknut\u00e9 lev\u00e9 tla\u010d\u00edtko a t\u00e1hn\u011bte my\u0161 abyste nakreslily tvar. Pro ukon\u010den\u00ed vytv\u00e1\u0159en\u00ed tla\u010d\u00edtko uvoln\u011bte. MenusListener.9=Stisknut\u00ed lev\u00e9ho tla\u010d\u00edtka p\u0159id\u00e1 te\u010dku. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/LaTeXDrawFrame.properties000066400000000000000000000110051321075051700335650ustar00rootroot00000000000000LaTeXDrawFrame.0=\ n\u00e1pov\u011bda LaTeXDrawFrame.7=\u010c\u00e1ra od ruky LaTeXDrawFrame.16=Exportovat jako... LaTeXDrawFrame.17=Smazat prvek LaTeXDrawFrame.18=Konec LaTeXDrawFrame.19=PSTricks k\u00f3d LaTeXDrawFrame.20=JPEG obr\u00e1zek LaTeXDrawFrame.22=Vp\u0159ed LaTeXDrawFrame.23=Zp\u011bt LaTeXDrawFrame.38=X-Pom\u011br LaTeXDrawFrame.39=Y-Pom\u011br LaTeXDrawFrame.40=Kop\u00edrovat LaTeXDrawFrame.41=Aktualizovat \u0161ablony LaTeXDrawFrame.42=Exportovat jako \u0161ablonu LaTeXDrawFrame.43=Vlo\u017eit LaTeXDrawFrame.44=Vyjmout LaTeXDrawFrame.48=Interi\u00e9r LaTeXDrawFrame.49=\u0160rafov\u00e1n\u00ed LaTeXDrawFrame.56=P\u0159edvolby LaTeXDrawFrame.57=P\u0159ibl\u00ed\u017eit LaTeXDrawFrame.58=Odd\u00e1lit LaTeXDrawFrame.60=P\u0159idat text LaTeXDrawFrame.65=Zm\u011bnit tlou\u0161\u0165ku prvku LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Um\u00edstit prvek do pop\u0159ed\u00ed LaTeXDrawFrame.71=Um\u00edstit prvek do pozad\u00ed LaTeXDrawFrame.75=Slou\u010dit n\u011bkolik prvk\u016f LaTeXDrawFrame.76=Odd\u011blit n\u011bkolik prvk\u016f LaTeXDrawFrame.77=Nastavit LaTeXDrawFrame.78=Pokud je vybr\u00e1no, prvek bude m\u00edt dvojit\u00e9 ohrani\u010den\u00ed LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=Soubor LaTeXDrawFrame.89=Editace LaTeXDrawFrame.90=Zobrazen\u00ed LaTeXDrawFrame.91=Nakreslit LaTeXDrawFrame.93=N\u00e1pov\u011bda LaTeXDrawFrame.103=\u0160ablony LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Nakreslit te\u010dku LaTeXDrawFrame.119=Nakreslit obdeln\u00edk LaTeXDrawFrame.120=Nakreslit \u010dtverec LaTeXDrawFrame.121=Nakreslit mnoho\u00faheln\u00edk LaTeXDrawFrame.123=Nakreslit koso\u010dtverec LaTeXDrawFrame.124=Nakreslti troj\u00faheln\u00edk LaTeXDrawFrame.125=Nakreslit elipsu LaTeXDrawFrame.127=Nakreslit kru\u017enici LaTeXDrawFrame.128=Nakreslit oblouk LaTeXDrawFrame.130=Nakreslit v\u00fdse\u010d LaTeXDrawFrame.131=Nakreslit t\u011btivu LaTeXDrawFrame.132=Nakreslit B\u00e9zierovu k\u0159ivku LaTeXDrawFrame.133=Nakreslit m\u0159\u00ed\u017eku LaTeXDrawFrame.136=Vyber jeden nebo v\u00edce prvk\u016f LaTeXDrawFrame.137=Rada : jak vybrat v\u00edce LaTeXDrawFrame.138=prvk\u016f, klikn\u011bte a
    t\u00e1hn\u011bte my\u0161 na prvky, kter\u00e9 chcete LaTeXDrawFrame.139=Smazat vybran\u00e9 prvky LaTeXDrawFrame.146=Zkop\u00edrov\u00e1no... LaTeXDrawFrame.147=Vlo\u017eeno... LaTeXDrawFrame.148=Vyjmuto... LaTeXDrawFrame.149=Smaz\u00e1no... LaTeXDrawFrame.154=Seskupeno... LaTeXDrawFrame.155=Odd\u011bleno... LaTeXDrawFrame.169=\u0160ablona exportov\u00e1na LaTeXDrawFrame.171=Vybrat LaTeXDrawFrame.173=Chcete nahradit soubor? LaTeXDrawFrame.175=PSTricks k\u00f3d exportov\u00e1n LaTeXDrawFrame.176=Nelze exportovat PSTricks k\u00f3d! LaTeXDrawFrame.184=Exportov\u00e1n\u00ed jako obrazek hotovo! LaTeXDrawFrame.185=Nelze exportovat jako obr\u00e1zek! LaTeXDrawFrame.188=Ulo\u017eit kresbu LaTeXDrawFrame.200=Otev\u0159\u00edt kresbu LaTeXDrawFrame.219=Verze LaTeXDrawFrame.220=, sestaven\u00ed LaTeXDrawFrame.221=\ je distribuov\u00e1no pod podm\u00ednkami GNU General Public License LFrame2.1=Zarovnat vybran\u00e9 prvky. LFrame2.10=Rozlo\u017eit svisle, se stejnou vzd\u00e1lenost\u00ed mezi vybran\u00fdmi prvky. LFrame2.11=Rozlo\u017eit svisle, se stejnou vzd\u00e1lenost\u00ed mezi st\u0159edem vybran\u00fdch prvk\u016f. LFrame2.12=Rozlo\u017eit svisle, se stejnou vzd\u00e1lenost\u00ed mezi vrchn\u00edmi stranami vybran\u00fdch prvk\u016f. LFrame2.13=Rozlo\u017eit vodorovn\u011b, se stejnou vzd\u00e1lenost\u00ed mezi lev\u00fdmi stranami vybran\u00fdch prvk\u016f. LFrame2.14=Rozlo\u017eit vodorovn\u011b, se stejnou vzd\u00e1lenost\u00ed mezi vybran\u00fdmi prvky. LFrame2.15=Rozlo\u017eit vodorovn\u011b,se stejnou vzd\u00e1lenost\u00ed mezi st\u0159edem vybran\u00fdch prvk\u016f. LFrame2.16=Rozlo\u017eit vodorovn\u011b,se stejnou vzd\u00e1lenost\u00ed mezi prav\u00fdmi stranami vybran\u00fdch prvk\u016f. LFrame2.2=Zarovnat vlevo vybran\u00e9 prvky LFrame2.3=Zarovna vpravo vybran\u00e9 prvky. LFrame2.4=Zarovnat nahoru vybran\u00e9 prvky. LFrame2.5=Zarovnat dol\u016f vybran\u00e9 prvky. LFrame2.6=Zarovnat vodorovn\u011b na st\u0159ed vybran\u00e9 prvky. LFrame2.7=Zarovnat svisle nas st\u0159ed vybran\u00e9 prvky. LFrame2.8=Rozlo\u017eit vybran\u00e9 prvky ve sten\u00fdch vzd\u00e1lenostech. LFrame2.9=Rozlo\u017eit svisle, se stejnou vzd\u00e1lenost\u00ed mezi spodky vybran\u00fdch prvk\u016f. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/actions.properties000066400000000000000000000073371321075051700324740ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/dialogFrames.properties000066400000000000000000000051321321075051700334200ustar00rootroot00000000000000PreferencesFrame.Pref=P\u0159edvolby... PreferencesFrame.grid=M\u0159\u00ed\u017eka PreferencesFrame.codePanel=Panel k\u00f3du PreferencesFrame.antiAl=Vyhlazov\u00e1n\u00ed PreferencesFrame.rendQ=Kvalita rendrov\u00e1n\u00ed PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Kvalita alfa interpolace PreferencesFrame.newVers=Ov\u011b\u0159it novou verzi p\u0159i spu\u0161t\u011bn\u00ed PreferencesFrame.lge=Jazyk (nutn\u00fd restart) PreferencesFrame.general=Obecn\u00e9 PreferencesFrame.folders=Adres\u00e1\u0159e PreferencesFrame.quality=Kvalita PreferencesFrame.selectFolder=Vybrat adres\u00e1\u0159 PreferencesFrame.defOpenSave=P\u0159edvolen\u00fd adres\u00e1\u0159 pro otev\u00edr\u00e1n\u00ed/ukl\u00e1d\u00e1n\u00ed: PreferencesFrame.defFold=P\u0159edvolen\u00fd adres\u00e1\u0159 pro import/export: AbstractParametersFrame.0=Dvojit\u00e1 mez AbstractParametersFrame.2=Odd\u011blova\u010d: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Zru\u0161it AbstractParametersFrame.7=\u00dahel rotace: AbstractParametersFrame.11=\u0160\u00edrka \u0161rafov\u00e1n\u00ed: AbstractParametersFrame.20=Pr\u016fm\u011br te\u010dky = AbstractParametersFrame.21=\u0160\u00ed\u0159ka li\u0161ty = AbstractParametersFrame.22=\u0160\u00ed\u0159ka z\u00e1vorek = AbstractParametersFrame.23=Zaokrouhlen\u00e1 \u0161\u00ed\u0159ka = AbstractParametersFrame.24=x tlou\u0161\u0165ka + AbstractParametersFrame.26=D\u00e9lka \u0161ipky AbstractParametersFrame.27=Vsazen\u00ed \u0161ipek AbstractParametersFrame.28=\u0160\u00ed\u0159ka \u0161ipky ParametersArcFrame.0=po\u010d\u00e1te\u010dn\u00ed \u00fahel ParametersArcFrame.1=kone\u010dn\u00fd \u00fahel: ParametersGridFrame.0=Y po\u010d\u00e1tek: ParametersGridFrame.1=X po\u010d\u00e1tek ParametersGridFrame.4=Te\u010dky podm\u0159\u00ed\u017eky: ParametersGridFrame.5=Te\u010dky m\u0159\u00ed\u017eky: ParametersGridFrame.6=\u0160\u00ed\u0159ka m\u0159\u00ed\u017eky: ParametersGridFrame.7=\u0160\u00ed\u0159ka podm\u0159\u00ed\u017eky ParametersGridFrame.8=Rozd\u011blen\u00ed podm\u0159\u00ed\u017eky ParametersGridFrame.9=Velikost popisku: ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Komprese Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/cs/others.properties000066400000000000000000000006031321075051700323250ustar00rootroot00000000000000XScale.cm=cm XScale.inch=palec Arc.arc=Oblouk Arc.wedge=Kl\u00edn Arc.chord=T\u011btiva DrawContainer.nameTemplate=Zadejte jm\u00e9no \u0161ablony DrawContainer.overwriteTemplate=Tato \u0161ablona u\u017e existuje; chce ji p\u0159epsat? CloseButton.closePanel=Close the window UndoRedoManager.create=Vytvo\u0159it UndoRedoManager.join=P\u0159ipojit UndoRedoManager.seperate=Odd\u011blit latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/000077500000000000000000000000001321075051700266675ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/1_6.properties000066400000000000000000000013131321075051700313700ustar00rootroot00000000000000LaTeXDrawFrame.0=PSTricks Code einf\u00fcgen LaTeXDrawFrame.1=Bild einf\u00fcgen LaTeXDrawFrame.3=stopp LaTeXDrawFrame.6=BMP Bild LaTeXDrawFrame.7=PNG Bild LaTeXDrawFrame.10=Einf\u00fcgen LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Keine Figuren zum importieren gefunden! LaTeXDrawFrame.34=Es ist nicht m\u00f6glich das PSTricks file zu importieren! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Figuren aus PSTricks Code einf\u00fcgen Picture.0=% Warnung: der Pfad des folgenden Bildes enth\u00e4llt Leerzeichen und wird nicht von TeX kompiliert! ParserMessagesFrame.0=Befehl latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/1_7.properties000066400000000000000000000007261321075051700314000ustar00rootroot00000000000000LaTeXDrawFrame.0=Schatten LaTeXDrawFrame.1=Farbverlauf 1 LaTeXDrawFrame.2=Farbverlauf 2 LaTeXDrawFrame.4=Schatten zur Figur hinzuf\u00fcgen. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Positioniere Zahlen in der Zeichnung (davor, dahinter,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=Winkel des Farbverlaufs AbstractParametersFrame.4=Mittelpunkt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/1_8.properties000066400000000000000000000026131321075051700313760ustar00rootroot00000000000000AbstractParametersFrame.0=Intervall: ParametersAxeFrame.0=Form: ParametersAxeFrame.1=Ursprung zeigen ParametersAxeFrame.6=X-Labels Abstand: ParametersAxeFrame.7=Y-Labels Abstand: ParametersAxeFrame.8=X-Labels Inkrement: ParametersAxeFrame.9=Y-Labels Inkrement: ParametersAxeFrame.13=Gr\u00f6sse: 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.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=Kehre Gebilde anhand der Symmetrie um. LaTeXDrawFrame.7=Ausgew\u00e4hlte Figuren horizontal spiegeln LaTeXDrawFrame.8=Ausgew\u00e4hlte Figuren vertikal spiegeln 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.23=Schliessen LaTeXDrawFrame.27=Release Note LaTeXDrawFrame.28=License Axe.1=Achse Axe.2=Rahmen Axe.3=Voll Axe.4=Oben Axe.5=Unten latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/1_9.properties000066400000000000000000000043141321075051700313770ustar00rootroot00000000000000LaTeXDrawFrame.0=Letzte Dateien LaTeXDrawFrame.3=Tastenkombinationen LaTeXDrawFrame.11=Geschlossene B\u00e9zier Kurve zeichnen DrawPanel.0=Figuren am Gitter ausrichten ParametersAkinPointsFrame.0=Punkte Intervall: ParametersAkinPointsFrame.1=\u00d6ffnen ParametersAkinPointsFrame.2=Typ: 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/LaTeXDrawFrame.properties000066400000000000000000000107451321075051700335620ustar00rootroot00000000000000LaTeXDrawFrame.0=\ Hilfe LaTeXDrawFrame.7=Freihand LaTeXDrawFrame.16=Exportieren als \u2026 LaTeXDrawFrame.17=Form l\u00f6schen LaTeXDrawFrame.18=Beenden LaTeXDrawFrame.19=PSTricks Code LaTeXDrawFrame.20=JPEG Bild LaTeXDrawFrame.22=Wiederherstellen LaTeXDrawFrame.23=R\u00fcckg\u00e4ngig 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.48=Innenraum LaTeXDrawFrame.49=Schraffuren LaTeXDrawFrame.56=Einstellungen LaTeXDrawFrame.57=Hineinzoomen LaTeXDrawFrame.58=Herauszoomen LaTeXDrawFrame.60=Text hinzuf\u00fcgen LaTeXDrawFrame.65=Liniendicke der Form \u00e4ndern LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Form in den Vordergund verschieben LaTeXDrawFrame.71=Form in den Hintergrund verschieben LaTeXDrawFrame.75=Mehrere Formen gruppieren LaTeXDrawFrame.76=Mehrere Formen separieren LaTeXDrawFrame.77=Die Position der Grenzen der Form festlegen LaTeXDrawFrame.78=Die ausgew\u00e4hlte Form mit doppelten Rahmenlinien zeichnen LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=Datei LaTeXDrawFrame.89=Bearbeiten LaTeXDrawFrame.90=Anzeigen LaTeXDrawFrame.91=Zeichnen LaTeXDrawFrame.93=Hilfe LaTeXDrawFrame.103=Vorlagen LaTeXDrawFrame.113=100% 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=Eine oder mehrere Formen ausw\u00e4hlen
    LaTeXDrawFrame.137=Textvorschlag : mehrere ausw\u00e4hlen LaTeXDrawFrame.138=Formen, klicken Sie auf und
    ziehen Sie die gew\u00fcnschten Formen mit der Maus LaTeXDrawFrame.139=Ausgew\u00e4hlte Form(en) l\u00f6schen LaTeXDrawFrame.146=Kopiert \u2026 LaTeXDrawFrame.147=Eingef\u00fcgt \u2026 LaTeXDrawFrame.148=Ausgeschnitten \u2026 LaTeXDrawFrame.149=Gel\u00f6scht \u2026 LaTeXDrawFrame.154=Gruppiert \u2026 LaTeXDrawFrame.155=Separiert \u2026 LaTeXDrawFrame.169=Vorlage exportiert! LaTeXDrawFrame.171=Ausw\u00e4hlen LaTeXDrawFrame.173=Wollen Sie die Datei ersetzen? LaTeXDrawFrame.175=PSTricks Code wurde exportiert! LaTeXDrawFrame.176=Exportieren als PSTricks-Quelltext nicht m\u00f6glich! LaTeXDrawFrame.184=Exportieren als Bild erfolgreich LaTeXDrawFrame.185=Export als Bild nicht m\u00f6glich! LaTeXDrawFrame.188=Zeichnung speichern LaTeXDrawFrame.200=Eine Zeichnung \u00f6ffnen LaTeXDrawFrame.219=Version LaTeXDrawFrame.220=, Build LaTeXDrawFrame.221=\ wurde unter den Bedingungen der \u00bbGNU General Public License\u00ab ver\u00f6ffentlicht LFrame2.1=Ausgew\u00e4hlte Formen ausrichten. LFrame2.10=Vertikal verteilen mit gleichem Abstand zwischen den ausgew\u00e4hlten Formen. LFrame2.11=Vertikal verteilen mit gleichem Abstand zwischen den Mittelpunkten der ausgew\u00e4hlten Formen. LFrame2.12=Vertikal verteilen mit gleichem Abstsand zwischen den Oberkanten der ausgew\u00e4hlten Formen. LFrame2.13=Horizontal verteilen mit gleichem Abstand zwischen den linken R\u00e4ndern der ausgew\u00e4hlten Formen. LFrame2.14=Horizontal verteilen mit gleichem Abstand zwischen den ausgew\u00e4hlten Formen. LFrame2.15=Horizontal verteilen mit gleichem Abstand zwischen den Mittelpunkten der ausgew\u00e4hlten Formen. LFrame2.16=Horizontal verteilen mit gleichem Abstand zwischen den rechten R\u00e4ndern der ausgew\u00e4hlten Formen. LFrame2.2=Ausgew\u00e4hlte Formen am linken Rand ausrichten. LFrame2.3=Ausgew\u00e4hlte Formen am rechten Rand ausrichten. LFrame2.4=Ausgew\u00e4hlte Formen am oberen Rand ausrichten. LFrame2.5=Ausgew\u00e4hlte Formen am unteren Rand ausrichten. LFrame2.6=Ausgew\u00e4hlte Formen horizontal zentriert ausrichten. LFrame2.7=Ausgew\u00e4hlte Formen vertikal zentriert ausrichten. LFrame2.8=Ausgew\u00e4hlte Formen mit gleichem Abstand verteilen. LFrame2.9=Vertikal verteilen mit gleichem Abstand zwischen den unteren R\u00e4ndern der ausgew\u00e4hlten Formen. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/actions.properties000066400000000000000000000073371321075051700324570ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/dialogFrames.properties000066400000000000000000000043041321075051700334030ustar00rootroot00000000000000PreferencesFrame.Pref=Einstellungen... PreferencesFrame.grid=Tabellengitter PreferencesFrame.codePanel=Code Feld PreferencesFrame.antiAl=Antialiasing PreferencesFrame.rendQ=Render Qualit\u00e4t PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Alpha Interpolation Qualit\u00e4t PreferencesFrame.newVers=Beim Start 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: AbstractParametersFrame.0=Doppelte Begrenzung AbstractParametersFrame.2=Trennzeichen: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Abbrechen AbstractParametersFrame.7=Rotationswinkel AbstractParametersFrame.11=Schraffurbreite: AbstractParametersFrame.20=Punkt Durchmesser = AbstractParametersFrame.21=Balkenbreite = AbstractParametersFrame.22=Klammerbreite = AbstractParametersFrame.23=Gerundete Klammer L\u00e4nge = AbstractParametersFrame.24=x Breite + AbstractParametersFrame.26=Pfeil L\u00e4nge AbstractParametersFrame.27=Pfeil Inset AbstractParametersFrame.28=Pfeil Breite ParametersArcFrame.0=Anfangswinkel: ParametersArcFrame.1=Endwinkel: ParametersGridFrame.0=Y Ursprung: ParametersGridFrame.1=X Ursprung ParametersGridFrame.4=Untergitter Punkte: ParametersGridFrame.5=Gitter Punkte ParametersGridFrame.6=Gitter Breite: ParametersGridFrame.7=Untergitter Breite: ParametersGridFrame.8=Untergitter Einteilung: ParametersGridFrame.9=Label Gr\u00f6sse ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Komprimierung Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/de/others.properties000066400000000000000000000005751321075051700323200ustar00rootroot00000000000000XScale.cm=cm XScale.inch=Zoll Arc.arc=Kreisbogen Arc.wedge=Kreissektor Arc.chord=Kreissegment DrawContainer.nameTemplate=Name der Vorlage eingeben DrawContainer.overwriteTemplate=Diese Vorlage exisiert bereits; \u00fcberschreiben? CloseButton.closePanel=Close the window UndoRedoManager.create=Erstellen UndoRedoManager.join=Zusammenf\u00fcgen UndoRedoManager.seperate=Unterteilen latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/000077500000000000000000000000001321075051700272265ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/1_6.properties000066400000000000000000000012241321075051700317300ustar00rootroot00000000000000LaTeXDrawFrame.0=Insert PSTricks code LaTeXDrawFrame.1=Insert a picture LaTeXDrawFrame.3=stop LaTeXDrawFrame.6=BMP picture LaTeXDrawFrame.7=PNG picture LaTeXDrawFrame.10=Insert LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=No figure found to import\! LaTeXDrawFrame.34=Not able to import the PSTricks file\! LaTeXDrawFrame.36=Code converted in figures\! InsertPSTricksCodeFrame.0=Insert figures from PSTricks code Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex\! ParserMessagesFrame.0=Command latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/1_7.properties000066400000000000000000000006741321075051700317410ustar00rootroot00000000000000LaTeXDrawFrame.0=Shadow 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. AbstractParametersFrame.3=Gradient angle AbstractParametersFrame.4=Middle Pt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/1_8.properties000066400000000000000000000024301321075051700317320ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=Shape: ParametersAxeFrame.1=Show origin ParametersAxeFrame.6=X-labels distance: ParametersAxeFrame.7=Y-labels distance: ParametersAxeFrame.8=X-labels increment: ParametersAxeFrame.9=Y-labels increment: ParametersAxeFrame.13=Size: 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.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.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.17=Draw axes. LaTeXDrawFrame.23=Close LaTeXDrawFrame.27=Release note LaTeXDrawFrame.28=License Axe.1=Axe Axe.2=Frame Axe.3=Full Axe.4=Top Axe.5=Bottom latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/1_9.properties000066400000000000000000000036271321075051700317440ustar00rootroot00000000000000LaTeXDrawFrame.0=Recent files LaTeXDrawFrame.3=Shortcuts LaTeXDrawFrame.11=Draw a closed B\u00E9zier curve DrawPanel.0=Update figures to the grid ParametersAkinPointsFrame.0=Points interval: ParametersAkinPointsFrame.1=Open ParametersAkinPointsFrame.2=type: 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.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.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.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. LaTeXDrawFrame.properties000066400000000000000000000076541321075051700340470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-USLaTeXDrawFrame.0=\ help LaTeXDrawFrame.7=Freehand LaTeXDrawFrame.16=Export as... LaTeXDrawFrame.17=Delete Figure LaTeXDrawFrame.18=Quit LaTeXDrawFrame.19=PSTricks code LaTeXDrawFrame.20=JPEG picture LaTeXDrawFrame.22=Redo LaTeXDrawFrame.23=Undo 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.48=Interior LaTeXDrawFrame.49=Hatchings LaTeXDrawFrame.56=Preferences LaTeXDrawFrame.57=Zoom in LaTeXDrawFrame.58=Zoom out LaTeXDrawFrame.60=Add text LaTeXDrawFrame.65=Change the thickness of the figure LaTeXDrawFrame.66=Change the color of the borders of the figure 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.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.88=File LaTeXDrawFrame.89=Edit LaTeXDrawFrame.90=Display LaTeXDrawFrame.91=Draw LaTeXDrawFrame.93=Help LaTeXDrawFrame.103=Templates LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Draw a dot 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=Select one or several figures
    LaTeXDrawFrame.137=Piece of advice : to select several LaTeXDrawFrame.138=figures, click and
    drag the mouse on the figures you want LaTeXDrawFrame.139=Delete the selected figure(s) LaTeXDrawFrame.146=Copied... LaTeXDrawFrame.147=Pasted... LaTeXDrawFrame.148=Cut... LaTeXDrawFrame.149=Deleted... LaTeXDrawFrame.154=Grouped... LaTeXDrawFrame.155=Separated... LaTeXDrawFrame.169=Template exported\! LaTeXDrawFrame.171=Select LaTeXDrawFrame.173=Do you want to replace the file? LaTeXDrawFrame.175=PSTricks code exported\! LaTeXDrawFrame.176=Not able to export PSTricks code\! LaTeXDrawFrame.184=Export as picture done\! LaTeXDrawFrame.185=Not able to export as picture\! LaTeXDrawFrame.188=Save the drawing LaTeXDrawFrame.200=Open a drawing LaTeXDrawFrame.219=Version LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ is distributed under the terms of the GNU General Public License 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.2=Align on the left the selected figures. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/actions.properties000066400000000000000000000073371321075051700330160ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=DrawingdialogFrames.properties000066400000000000000000000040761321075051700336710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-USPreferencesFrame.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.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: AbstractParametersFrame.0=Double boundary AbstractParametersFrame.2=Separator: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Cancel AbstractParametersFrame.7=Angle of rotation: AbstractParametersFrame.11=Hatchings Width: AbstractParametersFrame.20=Dot diameter = AbstractParametersFrame.21=Bar width = AbstractParametersFrame.22=Bracket length = AbstractParametersFrame.23=Rounded bracket lgth = AbstractParametersFrame.24=x thickness + AbstractParametersFrame.26=Arrow length AbstractParametersFrame.27=Arrow inset AbstractParametersFrame.28=Arrow width ParametersArcFrame.0=start angle: ParametersArcFrame.1=end angle: ParametersGridFrame.0=Y Origin: ParametersGridFrame.1=X Origin: ParametersGridFrame.4=Subgrid dots: ParametersGridFrame.5=Grid dots: ParametersGridFrame.6=Grid width: ParametersGridFrame.7=Subgrid width: ParametersGridFrame.8=Subgrid division: ParametersGridFrame.9=Label size: ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Compression Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en-US/others.properties000066400000000000000000000005221321075051700326470ustar00rootroot00000000000000XScale.cm=cm XScale.inch=inch Arc.arc=Arc Arc.wedge=Wedge Arc.chord=Chord DrawContainer.nameTemplate=Enter the name of the template DrawContainer.overwriteTemplate=This template already exists; overwrite it? CloseButton.closePanel=Close the window UndoRedoManager.create=Create UndoRedoManager.join=Join UndoRedoManager.seperate=Separate latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/000077500000000000000000000000001321075051700267015ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/1_6.properties000066400000000000000000000012201321075051700313770ustar00rootroot00000000000000LaTeXDrawFrame.0=Insert PSTricks code LaTeXDrawFrame.1=Insert a picture LaTeXDrawFrame.3=stop LaTeXDrawFrame.6=BMP picture LaTeXDrawFrame.7=PNG picture LaTeXDrawFrame.10=Insert LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=No figure found to import! LaTeXDrawFrame.34=Not able to import the PSTricks file! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Insert figures from PSTricks code Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex! ParserMessagesFrame.0=Command latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/1_7.properties000066400000000000000000000006771321075051700314170ustar00rootroot00000000000000LaTeXDrawFrame.0=Shadow 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. AbstractParametersFrame.3=Gradient angle AbstractParametersFrame.4=Middle Pt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/1_8.properties000066400000000000000000000024301321075051700314050ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=Shape: ParametersAxeFrame.1=Show origin ParametersAxeFrame.6=X-labels distance: ParametersAxeFrame.7=Y-labels distance: ParametersAxeFrame.8=X-labels increment: ParametersAxeFrame.9=Y-labels increment: ParametersAxeFrame.13=Size: 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.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.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.17=Draw axes. LaTeXDrawFrame.23=Close LaTeXDrawFrame.27=Release note LaTeXDrawFrame.28=Licence Axe.1=Axe Axe.2=Frame Axe.3=Full Axe.4=Top Axe.5=Bottom latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/1_9.properties000066400000000000000000000036271321075051700314170ustar00rootroot00000000000000LaTeXDrawFrame.0=Recent files LaTeXDrawFrame.3=Shortcuts LaTeXDrawFrame.11=Draw a closed B\u00e9zier curve DrawPanel.0=Update figures to the grid ParametersAkinPointsFrame.0=Points interval: ParametersAkinPointsFrame.1=Open ParametersAkinPointsFrame.2=type: 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/LaTeXDrawFrame.properties000066400000000000000000000076531321075051700336000ustar00rootroot00000000000000LaTeXDrawFrame.0=\ help LaTeXDrawFrame.7=Freehand LaTeXDrawFrame.16=Export as... LaTeXDrawFrame.17=Delete Figure LaTeXDrawFrame.18=Quit LaTeXDrawFrame.19=PSTricks code LaTeXDrawFrame.20=JPEG picture LaTeXDrawFrame.22=Redo LaTeXDrawFrame.23=Undo 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.48=Interior LaTeXDrawFrame.49=Hatchings LaTeXDrawFrame.56=Preferences LaTeXDrawFrame.57=Zoom in LaTeXDrawFrame.58=Zoom out LaTeXDrawFrame.60=Add text LaTeXDrawFrame.65=Change the thickness of the figure LaTeXDrawFrame.66=Change the colour of the borders of the figure 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.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.88=File LaTeXDrawFrame.89=Edit LaTeXDrawFrame.90=Display LaTeXDrawFrame.91=Draw LaTeXDrawFrame.93=Help LaTeXDrawFrame.103=Templates LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Draw a dot 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=Select one or several figures
    LaTeXDrawFrame.137=Piece of advice : to select several LaTeXDrawFrame.138=figures, click and
    drag the mouse on the figures you want LaTeXDrawFrame.139=Delete the selected figure(s) LaTeXDrawFrame.146=Copied... LaTeXDrawFrame.147=Pasted... LaTeXDrawFrame.148=Cut... LaTeXDrawFrame.149=Deleted... LaTeXDrawFrame.154=Grouped... LaTeXDrawFrame.155=Separated... LaTeXDrawFrame.169=Template exported! LaTeXDrawFrame.171=Select LaTeXDrawFrame.173=Do you want to replace the file? LaTeXDrawFrame.175=PSTricks code exported! LaTeXDrawFrame.176=Not able to export PSTricks code! LaTeXDrawFrame.184=Export as picture done! LaTeXDrawFrame.185=Not able to export as picture! LaTeXDrawFrame.188=Save the drawing LaTeXDrawFrame.200=Open a drawing LaTeXDrawFrame.219=Version LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ is distributed under the terms of the GNU General Public License 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.2=Align on the left the selected figures. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/actions.properties000066400000000000000000000073421321075051700324650ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line colour Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Colour ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the centre point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customises the dots. PropBuilder.11=Customises the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawing latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/dialogFrames.properties000066400000000000000000000041001321075051700334070ustar00rootroot00000000000000PreferencesFrame.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.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: AbstractParametersFrame.0=Double boundary AbstractParametersFrame.2=Separator: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Cancel AbstractParametersFrame.7=Angle of rotation: AbstractParametersFrame.11=Hatchings Width: AbstractParametersFrame.20=Dot diameter = AbstractParametersFrame.21=Bar width = AbstractParametersFrame.22=Bracket length = AbstractParametersFrame.23=Rounded bracket lgth = AbstractParametersFrame.24=x thickness + AbstractParametersFrame.26=Arrow length AbstractParametersFrame.27=Arrow inset AbstractParametersFrame.28=Arrow width ParametersArcFrame.0=start angle: ParametersArcFrame.1=end angle: ParametersGridFrame.0=Y Origin: ParametersGridFrame.1=X Origin: ParametersGridFrame.4=Subgrid dots: ParametersGridFrame.5=Grid dots: ParametersGridFrame.6=Grid width: ParametersGridFrame.7=Subgrid width: ParametersGridFrame.8=Subgrid division: ParametersGridFrame.9=Label size: ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Compression Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customised grid Version.1=New version available: latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/en/others.properties000066400000000000000000000005221321075051700323220ustar00rootroot00000000000000XScale.cm=cm XScale.inch=inch Arc.arc=Arc Arc.wedge=Wedge Arc.chord=Chord DrawContainer.nameTemplate=Enter the name of the template DrawContainer.overwriteTemplate=This template already exists; overwrite it? CloseButton.closePanel=Close the window UndoRedoManager.create=Create UndoRedoManager.join=Join UndoRedoManager.seperate=Separate latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/000077500000000000000000000000001321075051700267065ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/1_6.properties000066400000000000000000000013441321075051700314130ustar00rootroot00000000000000LaTeXDrawFrame.0=Insertar c\u00f3digo PSTricks LaTeXDrawFrame.1=Insertar una imagen LaTeXDrawFrame.3=stop LaTeXDrawFrame.6=imagen BMP LaTeXDrawFrame.7=imagen PNG LaTeXDrawFrame.10=Insertar LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=\u00a1No se ha encontrado ninguna figura para importar! LaTeXDrawFrame.34=\u00a1 No es posible importar el archivo PSTricks ! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Insertar figuras basadas en c\u00f3digo PSTricks Picture.0=% Advertencia : la ruta de la siguiente figura contiene espacios y no podr\u00e1 ser compilada usando TeX ! ParserMessagesFrame.0=Comando latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/1_7.properties000066400000000000000000000007221321075051700314130ustar00rootroot00000000000000LaTeXDrawFrame.0=Sombreado LaTeXDrawFrame.1=Gradiente 1 LaTeXDrawFrame.2=Gradiente 2 LaTeXDrawFrame.4=A\u00f1adir sombreado a la figura. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Posicionar figuras en el dibujo (en frente, detr\u00e1s, ...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=Angulo del gradiente AbstractParametersFrame.4=Punto medio latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/1_8.properties000066400000000000000000000026441321075051700314210ustar00rootroot00000000000000AbstractParametersFrame.0=intervalo: ParametersAxeFrame.0=Forma: ParametersAxeFrame.1=Mostrar origen ParametersAxeFrame.6=Distancia etiquetas-X: ParametersAxeFrame.7=Distancia etiquetas-Y: ParametersAxeFrame.8=Incremento etiquetas-X: ParametersAxeFrame.9=Incremento etiquetas-Y: ParametersAxeFrame.13=Tama\u00f1o: 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.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.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.17=Dibujar ejes. LaTeXDrawFrame.23=Cerrar LaTeXDrawFrame.27=Nota de lanzamiento LaTeXDrawFrame.28=License Axe.1=Eje Axe.2=Ventana Axe.3=Relleno Axe.4=Arriba Axe.5=Abajo latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/1_9.properties000066400000000000000000000043561321075051700314240ustar00rootroot00000000000000LaTeXDrawFrame.0=Archivos recientes LaTeXDrawFrame.3=Atajos LaTeXDrawFrame.11=Dibujar una curva B\u00e9zier cerrada DrawPanel.0=Actualizar figuras en la cuadr\u00edcula ParametersAkinPointsFrame.0=Intervalo para puntos: ParametersAkinPointsFrame.1=Abrir ParametersAkinPointsFrame.2=tipo: 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/LaTeXDrawFrame.properties000066400000000000000000000104141321075051700335720ustar00rootroot00000000000000LaTeXDrawFrame.0=\ ayuda LaTeXDrawFrame.7=Trazo libre LaTeXDrawFrame.16=Exportar como ... LaTeXDrawFrame.17=Borrar Objeto LaTeXDrawFrame.18=Cerrar LaTeXDrawFrame.19=C\u00f3digo PSTricks LaTeXDrawFrame.20=figura JPEG LaTeXDrawFrame.22=Rehacer LaTeXDrawFrame.23=Deshacer 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.48=Interior LaTeXDrawFrame.49=Incubando LaTeXDrawFrame.56=Preferencias LaTeXDrawFrame.57=Acercar LaTeXDrawFrame.58=Alejar LaTeXDrawFrame.60=A\u00f1adir texto LaTeXDrawFrame.65=Cambiar ancho del objeto LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Poner objeto en primer plano LaTeXDrawFrame.71=Poner objeto al fondo 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=Change to color of the space between the double borders LaTeXDrawFrame.88=Archivo LaTeXDrawFrame.89=Editar LaTeXDrawFrame.90=Mostrar LaTeXDrawFrame.91=Dibujar LaTeXDrawFrame.93=Ayuda LaTeXDrawFrame.103=Plantillas LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Dibujar un punto 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=Seleccione una o varias figuras
    LaTeXDrawFrame.137=Consejo : para seleccionar varios LaTeXDrawFrame.138=Objetos,
    seleccione los objetos deseados LaTeXDrawFrame.139=Eliminar los objetos seleccionados LaTeXDrawFrame.146=Copiado ... LaTeXDrawFrame.147=Pegado ... LaTeXDrawFrame.148=Cortado ... LaTeXDrawFrame.149=Borrado ... LaTeXDrawFrame.154=Agrupado ... LaTeXDrawFrame.155=Desagrupado ... LaTeXDrawFrame.169=\u00a1 Plantilla exportada ! LaTeXDrawFrame.171=Seleccionar LaTeXDrawFrame.173=\u00bf Desea reemplazar el archivo ? LaTeXDrawFrame.175=\u00a1 C\u00f3digo PStricks exportado ! LaTeXDrawFrame.176=\u00a1 No es posible exportar el c\u00f3digo PSTricks ! LaTeXDrawFrame.184=\u00a1 Exportado como figura ! LaTeXDrawFrame.185=\u00a1 No es posible exportar como figura ! LaTeXDrawFrame.188=Guardar el dibujo LaTeXDrawFrame.200=Abrir un dibujo LaTeXDrawFrame.219=Versi\u00f3n LaTeXDrawFrame.220=, compilado LaTeXDrawFrame.221=\ est\u00e1 distribuido bajo los t\u00e9rminos de la Licencia P\u00fablica General GNU 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.2=Alinear los objetos seleccionados a la izquierda. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/actions.properties000066400000000000000000000073371321075051700324760ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/dialogFrames.properties000066400000000000000000000046221321075051700334250ustar00rootroot00000000000000PreferencesFrame.Pref=Preferencias\u2026 PreferencesFrame.grid=Cuadr\u00edcula PreferencesFrame.codePanel=Panel de c\u00f3digo PreferencesFrame.antiAl=Suavizado de bordes PreferencesFrame.rendQ=Calidad de dibujo PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Calidad de interpolaci\u00f3n alfa 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: AbstractParametersFrame.0=L\u00edmite de borde doble AbstractParametersFrame.2=Separador: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Cancelar AbstractParametersFrame.7=Angulo de rotaci\u00f3n: AbstractParametersFrame.11=Anchura del sombreado: 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.26=Long. punta de flecha AbstractParametersFrame.27=Long. interior punta de flecha AbstractParametersFrame.28=Ancho punta de flecha ParametersArcFrame.0=\u00e1ngulo inicial: ParametersArcFrame.1=\u00e1ngulo final: ParametersGridFrame.0=Origen en Y: ParametersGridFrame.1=Origen en X: 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: ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Compresi\u00f3n Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/es/others.properties000066400000000000000000000005501321075051700323300ustar00rootroot00000000000000XScale.cm=cm XScale.inch=pulgadas Arc.arc=Arco Arc.wedge=Angulo Arc.chord=Cuerda DrawContainer.nameTemplate=Escriba el nombre de la plantilla DrawContainer.overwriteTemplate=Esta plantilla ya existe, \u00bfdesea reemplazarla? CloseButton.closePanel=Close the window UndoRedoManager.create=Crear UndoRedoManager.join=Agrupar UndoRedoManager.seperate=Desagrupar latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/000077500000000000000000000000001321075051700267065ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/1_6.properties000066400000000000000000000014611321075051700314130ustar00rootroot00000000000000LaTeXDrawFrame.0=Ins\u00e9rer du code PSTricks LaTeXDrawFrame.1=Ins\u00e9rer une figure LaTeXDrawFrame.3=Arr\u00eater LaTeXDrawFrame.6=Image BMP LaTeXDrawFrame.7=Image PNG LaTeXDrawFrame.10=Ins\u00e9rer LaTeXDrawFrame.16=L'actuel analyseur syntaxique PSTricks ne peut analyser qu'un petit nombre de commandes.
    Il est conseill\u00e9 d'importer uniquement les commandes g\u00e9r\u00e9es par LaTeXDraw. LaTeXDrawFrame.33=Pas de figure trouv\u00e9e \u00e0 importer ! LaTeXDrawFrame.34=Impossible d'importer le fichier PSTricks ! LaTeXDrawFrame.36=Code converti en figures ! InsertPSTricksCodeFrame.0=Ins\u00e9rer des figures \u00e0 partir de code PSTricks Picture.0=% Attention : le chemin de la figure contient des espaces et ne pourra pas \u00eatre compil\u00e9 par TeX ! ParserMessagesFrame.0=Commande latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/1_7.properties000066400000000000000000000010011321075051700314020ustar00rootroot00000000000000LaTeXDrawFrame.0=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. AbstractParametersFrame.3=Angle du d\u00e9grad\u00e9 AbstractParametersFrame.4=Pt du milieu latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/1_8.properties000066400000000000000000000030501321075051700314110ustar00rootroot00000000000000AbstractParametersFrame.0=intervalle : ParametersAxeFrame.0=Forme : ParametersAxeFrame.1=Afficher origine ParametersAxeFrame.6=Dist. \u00e9tiquettes X : ParametersAxeFrame.7=Dist. \u00e9tiquettes Y : ParametersAxeFrame.8=Incr\u00e9ment \u00e9tiq. X : ParametersAxeFrame.9=Incr\u00e9ment \u00e9tiq. Y : ParametersAxeFrame.13=Taille : 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.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.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.17=Dessiner axes. LaTeXDrawFrame.23=Fermer LaTeXDrawFrame.27=Note des versions LaTeXDrawFrame.28=Licence Axe.1=Axe Axe.2=Rectangle Axe.3=Tout Axe.4=Haut Axe.5=Bas latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/1_9.properties000066400000000000000000000045111321075051700314150ustar00rootroot00000000000000LaTeXDrawFrame.0=Fichiers r\u00e9cents LaTeXDrawFrame.3=Raccourcis LaTeXDrawFrame.11=Tracer une courbe de B\u00e9zier close DrawPanel.0=Accorder figures \u00e0 la grille ParametersAkinPointsFrame.0=intervalle points : ParametersAkinPointsFrame.1=Ouvrir ParametersAkinPointsFrame.2=type : 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/LaTeXDrawFrame.properties000066400000000000000000000112401321075051700335700ustar00rootroot00000000000000LaTeXDrawFrame.0=\ aide LaTeXDrawFrame.7=Trac\u00e9 \u00e0 main lev\u00e9e LaTeXDrawFrame.16=Exporter en... LaTeXDrawFrame.17=Supprimer Figure LaTeXDrawFrame.18=Quitter LaTeXDrawFrame.19=Code PSTricks LaTeXDrawFrame.20=Image JPEG LaTeXDrawFrame.22=Refaire LaTeXDrawFrame.23=D\u00e9faire 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.48=Int\u00e9rieur LaTeXDrawFrame.49=Hachures LaTeXDrawFrame.56=Pr\u00e9f\u00e9rences LaTeXDrawFrame.57=Zoom avant LaTeXDrawFrame.58=Zoom arri\u00e8re LaTeXDrawFrame.60=Ajouter texte LaTeXDrawFrame.65=Change l'\u00e9paisseur de la figure LaTeXDrawFrame.66=Changer la couleur des contours de la figure LaTeXDrawFrame.68=Changer la couleur int\u00e9rieure 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.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 de la double bordure LaTeXDrawFrame.88=Fichier LaTeXDrawFrame.89=Edition LaTeXDrawFrame.90=Affichage LaTeXDrawFrame.91=Dessin LaTeXDrawFrame.93=Aide LaTeXDrawFrame.103=Mod\u00e8les LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Dessiner un point 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=S\u00e9lectionner une ou plusieurs figures
    LaTeXDrawFrame.137=Conseil : pour s\u00e9lectionner plusieurs LaTeXDrawFrame.138=figures, cliquez et
    faites glisser la souris sur les figures de votre choix. LaTeXDrawFrame.139=Supprimer les figures selectionn\u00e9es LaTeXDrawFrame.146=Copi\u00e9 ... LaTeXDrawFrame.147=Coll\u00e9 ... LaTeXDrawFrame.148=Coup\u00e9 ... LaTeXDrawFrame.149=Supprim\u00e9 ... LaTeXDrawFrame.154=Joint ... LaTeXDrawFrame.155=S\u00e9par\u00e9 ... LaTeXDrawFrame.169=Mod\u00e8le export\u00e9 ! LaTeXDrawFrame.171=S\u00e9lectionner LaTeXDrawFrame.173=Voulez-vous remplacer le fichier ? LaTeXDrawFrame.175=Code PStricks export\u00e9 ! LaTeXDrawFrame.176=Impossible d'exporter le code PSTricks ! LaTeXDrawFrame.184=Exportation en une image termin\u00e9e ! LaTeXDrawFrame.185=Impossible d'exporter en fichier image ! LaTeXDrawFrame.188=Enregistrer le dessin LaTeXDrawFrame.200=Ouvrir un dessin LaTeXDrawFrame.219=Version LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ est distribu\u00e9 sous les termes de la licence publique g\u00e9n\u00e9rale GNU 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.2=Aligner le c\u00f4t\u00e9 gauche des figures s\u00e9lectionn\u00e9es. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/actions.properties000066400000000000000000000105561321075051700324730ustar00rootroot00000000000000Actions.0=Modification d'un propri\u00e9t\u00e9 d'un dessin Actions.1=Modification de la grille magn\u00e9tique Actions.2=voulez-vous enregistrer le dessin ? Actions.3=Changer l\u2019unit\u00e9 de mesure Actions.4=Insertion de code PST Actions.5=supprimer Actions.6=distribuer Actions.7=mirroir Actions.8=d\u00e9placer en avant/arri\u00e8re Actions.9=Bouger un point de contr\u00f4le Actions.10=Bouger un point Actions.11=Redimensionnement Actions.12=Monter les points Actions.13=param\u00e8tres de l'axe Actions.14=param\u00e8tres de la grille Actions.15=param\u00e8tres du dessin \u00e0 main lever Actions.16=param\u00e8tres des fl\u00e8ches Actions.17=param\u00e8tres de l'arc Actions.18=param\u00e8tres du texte Actions.19=param\u00e8tres des hachures Actions.20=param\u00e8tre du gradient Actions.21=arrondi du coin Actions.22=param\u00e8tres de remplissage Actions.23=couleur de la ligne Actions.24=param\u00e8tres des bordures doubles Actions.25=param\u00e8tres de l'ombre Actions.26=\u00e9paisseur de la ligne Actions.27=position de la bordure Actions.28=style de ligne Actions.29=param\u00e8tres des points Actions.30=alignement Actions.31=rotation Actions.32=translation Actions.33=faire coller \u00e0 la grille Instruments.1=Centr\u00e9 Instruments.2=Position\u00a0: Instruments.3=Redimensionner Instruments.4=Dessiner des lignes jointes Instruments.5=Tracer une fonction FileLoaderSaver.1=Sauver le dessin FileLoaderSaver.2=Sauver le dessin sous FileLoaderSaver.3=Ouvrir le dessin FileLoaderSaver.4=Cr\u00e9er un nouveau dessin. Helper.1=Faire une donation\u00a0! Helper.2=Rapporter des bugs Helper.3=Se rendre sur les forums Helper.4=Manuel PreferencesSetter.1=Inclure dans cette liste les paquets LaTeX vous utilisez r\u00e9guli\u00e8rement, p. ex. : AxesCust.1=Visibilit\u00e9\u00a0: ShapeBord.1=Couleur ShapeBord.2=Montrer les points ShapeBord.3=Afficher les points de contr\u00f4le sous la forme de points. ShapeCoord.1=D\u00e9finit l'abscisse de la position haut-gauche ShapeCoord.2=D\u00e9finit l'ordonn\u00e9e de la position top-gauche ShapeDot.1=D\u00e9finir la taille d'un point. ShapeDot.2=S\u00e9lectionner le type du point. ShapeFill.1=Angle\u00a0: ShapeGrid.1=\u00c9tiquettes ShapeGrid.2=Sous-grie ShapeGrid.3=Change les coordonn\u00e9es Y des labels. ShapeGrid.4=Change les coordonn\u00e9es X des labels. ShapeShad.1=Taille\u00a0: ShapeStdGrid.1=D\u00e9finit l'abscisse de la grille. ShapeStdGrid.2=D\u00e9finit l'ordonn\u00e9e minimale de la grille. ShapeStdGrid.3=D\u00e9finit l'abscisse maximale de la grille. ShapeStdGrid.4=D\u00e9finit l'ordonn\u00e9e maximale de la grille. ShapeStdGrid.5=D\u00e9finit la taille des labels de la grille. ShapeStdGrid.6=D\u00e9finit l'abscisse de l'origine de la grille. ShapeStdGrid.7=D\u00e9finit l'ordonn\u00e9e de l'origine de la grille. TextCust.1=Paquets : TextCust.2=Contient les paquets LaTeX \u00e0 utiliser pour compiler le texte. TextCust.3=La position du point est en-dessous \u00e0 gauche. TextCust.4=La position du point est en-dessous au milieu. TextCust.5=La position du point est en-dessous \u00e0 droite. TextCust.6=La position du point est au-dessus \u00e0 gauche. TextCust.7=La position du point est au-dessus au milieu. TextCust.8=La position du point est au-dessus \u00e0 droite. TextCust.9=La position du point est au centre. TextCust.10=La position du point est \u00e0 gauche. TextCust.11=La position du point est \u00e0 droite. MenuBuilder.1=Unit\u00e9 PropBuilder.1=Modifie les propri\u00e9t\u00e9s des dessins \u00e0 main lev\u00e9e. PropBuilder.2=Modifie les propri\u00e9t\u00e9s des labels des grilles. PropBuilder.3=Modifie les propri\u00e9t\u00e9s des axes. PropBuilder.4=Modifie les propri\u00e9t\u00e9s des grilles. PropBuilder.5=Modifie les propri\u00e9t\u00e9s des axes et des grilles. PropBuilder.6=Modifie la position et les dimensions. PropBuilder.7=Modifie les propri\u00e9t\u00e9s du texte. PropBuilder.8=Modifie la position du texte. PropBuilder.9=Personnalise les arcs. PropBuilder.10=Personnalise les points. PropBuilder.11=Personnalise les fl\u00e8ches. PropBuilder.12=Personnalise le contenu des formes. PropBuilder.13=Modifie les propri\u00e9t\u00e9s des ombres. PropBuilder.14=Modifie les propri\u00e9t\u00e9s des doubles bordures. PropBuilder.15=Modifie les propri\u00e9t\u00e9s des bordures. ToolbarBuilder.1=Modifie les propri\u00e9t\u00e9s du dessin. ToolbarBuilder.2=L\u00e9gende\u00a0: ToolbarBuilder.3=\u00c9tiquette\u00a0: UIBuilder.1=Dessin latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/dialogFrames.properties000066400000000000000000000046021321075051700334230ustar00rootroot00000000000000PreferencesFrame.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.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 : AbstractParametersFrame.0=Doubles bords AbstractParametersFrame.2=S\u00e9parateur : AbstractParametersFrame.4=Valider AbstractParametersFrame.6=Annuler AbstractParametersFrame.7=Angle de rotation : AbstractParametersFrame.11=Largeur hachures : AbstractParametersFrame.20=Diam\u00e8tre point = AbstractParametersFrame.21=Largeur bar = AbstractParametersFrame.22=Lgr crochet = AbstractParametersFrame.23=Lgr crochet arrondi = AbstractParametersFrame.24=x \u00e9paisseur + AbstractParametersFrame.26=Longueur fl\u00e8che AbstractParametersFrame.27=Encart fl\u00e8che AbstractParametersFrame.28=Largeur fl\u00e8che ParametersArcFrame.0=Angle de d\u00e9part : ParametersArcFrame.1=Angle d'arriv\u00e9 : ParametersGridFrame.0=Origine Y : ParametersGridFrame.1=Origine X : 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 : ParametersGridFrame.11=X max : ParametersGridFrame.12=X min : ParametersGridFrame.13=Y max : ParametersGridFrame.14=Y min : ExportDialog.0=Compression Filter.1=Image SVG.1=Dessin enregistr\u00e9. Exporter.1=Exporter dessin Exporter.2=Image EPS (LaTeX) Exporter.3=Image PDF (LaTeX) Exporter.4=Image PDF (LaTeX+pdfcrop) About.1=Syst\u00e8me About.2=Contributeurs Pref.1=Sera utilis\u00e9 pour les prochains dessins Pref.2=Paquets utilis\u00e9s pendant la compilation LaTeX: Res.1=\u00c0 propos de LaTeXDraw Res.2=Nouveau dessin Res.3=Grille personnalis\u00e9e Version.1=Nouvelle version disponible : latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/fr/others.properties000066400000000000000000000005721321075051700323340ustar00rootroot00000000000000XScale.cm=cm XScale.inch=pouce Arc.arc=Arc Arc.wedge=Camenbert Arc.chord=Arc ferm\u00e9 DrawContainer.nameTemplate=Entrez le nom du mod\u00e8le DrawContainer.overwriteTemplate=Ce mod\u00e8le existe d\u00e9j\u00e0 ; l'\u00e9craser ? CloseButton.closePanel=Ferme la fen\u00eatre UndoRedoManager.create=Cr\u00e9er UndoRedoManager.join=Joindre UndoRedoManager.seperate=S\u00e9parer latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/000077500000000000000000000000001321075051700267135ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/1_6.properties000066400000000000000000000014661321075051700314250ustar00rootroot00000000000000LaTeXDrawFrame.0=PSTricks k\u00f3d besz\u00far\u00e1sa LaTeXDrawFrame.1=K\u00e9p besz\u00far\u00e1sa LaTeXDrawFrame.3=le\u00e1ll\u00edt\u00e1s LaTeXDrawFrame.6=BMP k\u00e9p LaTeXDrawFrame.7=PNG k\u00e9p LaTeXDrawFrame.10=Besz\u00far\u00e1s LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Import\u00e1land\u00f3 \u00e1bra nem tal\u00e1lhat\u00f3! LaTeXDrawFrame.34=PSTricks f\u00e1jl import\u00e1l\u00e1sa sikertelen! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=\u00c1bra besz\u00far\u00e1sa PSTricks k\u00f3db\u00f3l Picture.0=% Figyelem: az al\u00e1bbi k\u00e9p el\u00e9r\u00e9si \u00fatvonala sz\u00f3k\u00f6zt tartalmaz, TeX nem fogja leford\u00edtani! ParserMessagesFrame.0=Parancs latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/1_7.properties000066400000000000000000000010451321075051700314170ustar00rootroot00000000000000LaTeXDrawFrame.0=\u00c1rny\u00e9k LaTeXDrawFrame.1=Sz\u00edn\u00e1tmenet 1 LaTeXDrawFrame.2=Sz\u00edn\u00e1tmenet 2 LaTeXDrawFrame.4=\u00c1rny\u00e9k hozz\u00e1ad\u00e1sa az \u00e1br\u00e1hoz. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=\u00c1bra elhelyez\u00e9se a rajzon (el\u00e9, m\u00f6g\u00e9, ...) LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=A sz\u00edn\u00e1tmenet sz\u00f6ge AbstractParametersFrame.4=K\u00f6z\u00e9ppont latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/1_8.properties000066400000000000000000000032031321075051700314160ustar00rootroot00000000000000AbstractParametersFrame.0=intervallum: ParametersAxeFrame.0=Forma: ParametersAxeFrame.1=Kezd\u0151pont megjelen\u00edt\u00e9se ParametersAxeFrame.6=X-cimk\u00e9k t\u00e1vols\u00e1ga ParametersAxeFrame.7=Y-cimk\u00e9k t\u00e1vols\u00e1ga ParametersAxeFrame.8=X-labels increment: ParametersAxeFrame.9=Y-labels increment: ParametersAxeFrame.13=M\u00e9ret: ParametersAxeFrame.17=Ticks PreferencesFrame.3=LaTeX szerkeszt\u0151 el\u00e9r\u00e9si \u00fatvonala PreferencesFrame.4=Alap r\u00e1csoz\u00e1s PreferencesFrame.5=Szem\u00e9lyre szabott r\u00e1csoz\u00e1s PreferencesFrame.6=M\u00e1gneses r\u00e1csoz\u00e1s PreferencesFrame.7=Intervallum: LaTeXDrawFrame.2=A kijel\u00f6lt \u00e1br\u00e1k forgat\u00e1sa LaTeXDrawFrame.3=A kiv\u00e1lasztott \u00e1br\u00e1k elforgat\u00e1sa 90\u00b0-al. LaTeXDrawFrame.4=A kiv\u00e1lasztott \u00e1br\u00e1k elforgat\u00e1sa 180\u00b0-al. LaTeXDrawFrame.5=A kiv\u00e1lasztott \u00e1br\u00e1k elforgat\u00e1saof 270\u00b0-al. LaTeXDrawFrame.6=Reverse figures by symmetry. LaTeXDrawFrame.7=A kiv\u00e1lasztott \u00e1br\u00e1k t\u00fckr\u00f6z\u00e9se horizont\u00e1lisan LaTeXDrawFrame.8=A kiv\u00e1lasztott \u00e1br\u00e1k t\u00fckr\u00f6z\u00e9se vertik\u00e1lisan. LaTeXDrawFrame.12=Contains the parameters of the (magnetic) grid LaTeXDrawFrame.13=m\u00e1gneses 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.17=Tengelyek megjelen\u00edt\u00e9se. LaTeXDrawFrame.23=Bez\u00e1r LaTeXDrawFrame.27=Release note LaTeXDrawFrame.28=License Axe.1=Axe Axe.2=Keret Axe.3=Teljes Axe.4=Fels\u0151 Axe.5=Als\u00f3 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/1_9.properties000066400000000000000000000056511321075051700314300ustar00rootroot00000000000000LaTeXDrawFrame.0=Legut\u00f3bb haszn\u00e1lt f\u00e1jlok LaTeXDrawFrame.3=Gyorsbillenty\u0171k LaTeXDrawFrame.11=Z\u00e1rt B\u00e9zier-g\u00f6rbe rajzol\u00e1sa DrawPanel.0=\u00c1br\u00e1k hozz\u00e1igaz\u00edt\u00e1sa a r\u00e1csokhoz ParametersAkinPointsFrame.0=Pont intervallum: ParametersAkinPointsFrame.1=Megnyit\u00e1s ParametersAkinPointsFrame.2=t\u00edpus: PreferencesFrame.0=Utolj\u00e1ra haszn\u00e1lt f\u00e1jlok sz\u00e1ma: PreferencesFrame.1=T\u00e9ma (\u00fajraind\u00edt\u00e1s sz\u00fcks\u00e9ges): ShortcutsFrame.1=Sorozat ShortcutsFrame.3=Kateg\u00f3ria ShortcutsFrame.4=Navig\u00e1l\u00e1s ShortcutsFrame.5=\u00c1talak\u00edt\u00e1s ShortcutsFrame.6=Rajzol\u00e1s ShortcutsFrame.8=bal kattint\u00e1s ShortcutsFrame.9=A horizont\u00e1lis g\u00f6rget\u0151s\u00e1v mozgat\u00e1sa jobbra ShortcutsFrame.10=A horizont\u00e1lis g\u00f6rget\u0151s\u00e1v mozgat\u00e1sa balra ShortcutsFrame.11=A f\u00fcgg\u0151leges g\u00f6rget\u0151s\u00e1v mozgat\u00e1sa felfel\u00e9 ShortcutsFrame.12=A f\u00fcgg\u0151leges g\u00f6rget\u0151s\u00e1v mozgat\u00e1sa lefel\u00e9 ShortcutsFrame.18=A kiv\u00e1lasztott \u00e1bra mozgat\u00e1sa jobbra ShortcutsFrame.19=A kiv\u00e1lasztott \u00e1bra mozgat\u00e1sa balra ShortcutsFrame.20=A kiv\u00e1lasztott \u00e1bra mozgat\u00e1sa felfel\u00e9 ShortcutsFrame.21=A kiv\u00e1lasztott \u00e1bra mozgat\u00e1sa lefel\u00e9 ShortcutsFrame.23=A kiv\u00e1lasztott \u00e1br\u00e1k hozz\u00e1igaz\u00edt\u00e1sa a megjelen\u00edtett r\u00e1csoz\u00e1shoz ShortcutsFrame.25=A rajz \u00f6sszes \u00e1br\u00e1j\u00e1nak kiv\u00e1laszt\u00e1sa ShortcutsFrame.26=Az kattintott \u00e1br\u00e1k hozz\u00e1ad\u00e1sa a kiv\u00e1laszt\u00e1shoz ShortcutsFrame.27=A kattintott \u00e1bra elt\u00e1vol\u00edt\u00e1sa a kiv\u00e1laszt\u00e1sb\u00f3l ShortcutsFrame.29=Eg\u00e9rg\u00f6rg\u0151 ShortcutsFrame.30=Nagy\u00edt\u00e1s/kicsiny\u00edt\u00e9s MenusListener.0=Nyomja le a bal eg\u00e9rgombot, \u00e9s mozgassa az eg\u00e9rkurzort arra a helyre, ahol a m\u00e1sodik pontot szeretn\u00e9 meghat\u00e1rozni. Engedje fel a gombot, hogy a folyamatot lez\u00e1rja. MenusListener.1=Pont hozz\u00e1ad\u00e1sa bal eg\u00e9rkattint\u00e1ssal, jobb eg\u00e9rkattint\u00e1s vagy kett\u0151s bal eg\u00e9rkattint\u00e1s hat\u00e1rozza meg az utols\u00f3 pont hely\u00e9t, \u00e9s befejez\u0151dik a folyamat. MenusListener.4=Nyomja le a bal eg\u00e9rgombot, \u00e9s mozgassa az eg\u00e9rkurzort arra a helyre, ahol az utols\u00f3 pontot szeretn\u00e9 meghat\u00e1rozni. Engedje fel a gombot, hogy a folyamatot lez\u00e1rja. MenusListener.5=Bal eg\u00e9rkattint\u00e1s sz\u00f6veget ad hozz\u00e1. MenusListener.6=Bal kattint\u00e1s egy r\u00e1csvonalat ad hozz\u00e1. MenusListener.7=A bal kattint\u00e1s tengelyeket ad hozz\u00e1. MenusListener.8=Nyomja meg a bal eg\u00e9rgombot, \u00e9s mozgassa az egeret, hogy egy alakzatot rajzoljon. Engedje el a gombot, hogy a folyamatot lez\u00e1rja. MenusListener.9=Bal eg\u00e9rkattint\u00e1s egy pontot ad hozz\u00e1. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/LaTeXDrawFrame.properties000066400000000000000000000114151321075051700336010ustar00rootroot00000000000000LaTeXDrawFrame.0=\ seg\u00edts\u00e9g LaTeXDrawFrame.7=Szabadk\u00e9zi rajz LaTeXDrawFrame.16=Export\u00e1l\u00e1s m\u00e1sk\u00e9nt... LaTeXDrawFrame.17=\u00c1bra t\u00f6rl\u00e9se LaTeXDrawFrame.18=Kil\u00e9p\u00e9s LaTeXDrawFrame.19=PSTricks k\u00f3d LaTeXDrawFrame.20=JPEG k\u00e9p LaTeXDrawFrame.22=\u00dajra LaTeXDrawFrame.23=Visszavon LaTeXDrawFrame.38=X-sk\u00e1la LaTeXDrawFrame.39=Y-sk\u00e1la LaTeXDrawFrame.40=M\u00e1sol\u00e1s LaTeXDrawFrame.41=Sablonok friss\u00edt\u00e9se LaTeXDrawFrame.42=Export\u00e1l\u00e1s sablonk\u00e9nt LaTeXDrawFrame.43=Beilleszt\u00e9s LaTeXDrawFrame.44=Kiv\u00e1g\u00e1s LaTeXDrawFrame.48=Bels\u0151 LaTeXDrawFrame.49=Hatchings LaTeXDrawFrame.56=Be\u00e1ll\u00edt\u00e1sok LaTeXDrawFrame.57=Nagy\u00edt\u00e1s LaTeXDrawFrame.58=Kicsiny\u00edt\u00e9s LaTeXDrawFrame.60=Sz\u00f6veg hozz\u00e1ad\u00e1sa LaTeXDrawFrame.65=Change the thickness of the figure LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=\u00c1bra el\u0151t\u00e9rbe helyez\u00e9se LaTeXDrawFrame.71=\u00c1bra h\u00e1tt\u00e9rbe helyez\u00e9se LaTeXDrawFrame.75=\u00c1br\u00e1k csoportos\u00edt\u00e1sa LaTeXDrawFrame.76=\u00c1br\u00e1k k\u00fcl\u00f6nv\u00e1laszt\u00e1sa LaTeXDrawFrame.77=Az \u00e1bra sz\u00e9l\u00e9nek a poz\u00edci\u00f3j\u00e1nak a defini\u00e1l\u00e1sa LaTeXDrawFrame.78=Ha kiv\u00e1lasztva, az \u00e1br\u00e1nak dupla szeg\u00e9lye lesz LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=F\u00e1jl LaTeXDrawFrame.89=Szerkeszt\u00e9s LaTeXDrawFrame.90=Megjelen\u00edt\u00e9s LaTeXDrawFrame.91=Rajzol\u00e1s LaTeXDrawFrame.93=S\u00fag\u00f3 LaTeXDrawFrame.103=Sablonok LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Pont rajzol\u00e1sa LaTeXDrawFrame.119=T\u00e9glalap rajzol\u00e1sa LaTeXDrawFrame.120=N\u00e9gyzet rajzol\u00e1sa LaTeXDrawFrame.121=Poligon rajzol\u00e1sa LaTeXDrawFrame.123=Rombusz rajzol\u00e1sa LaTeXDrawFrame.124=H\u00e1romsz\u00f6g rajzol\u00e1sa LaTeXDrawFrame.125=Ellipszis rajzol\u00e1sa LaTeXDrawFrame.127=K\u00f6r rajzol\u00e1sa LaTeXDrawFrame.128=\u00cdv rajzol\u00e1sa LaTeXDrawFrame.130=Draw a wedge LaTeXDrawFrame.131=Draw a chord LaTeXDrawFrame.132=B\u00e9zier-g\u00f6rbe rajzol\u00e1sa LaTeXDrawFrame.133=R\u00e1cs rajzol\u00e1sa LaTeXDrawFrame.136=Egy vagy t\u00f6bb \u00e1bra kiv\u00e1laszt\u00e1sa
    LaTeXDrawFrame.137=J\u00f3tan\u00e1cs: t\u00f6bb \u00e1bra kiv\u00e1laszt\u00e1s\u00e1hoz LaTeXDrawFrame.138=kattintson az \u00e1br\u00e1ra, \u00e9s
    mozgassa az eg\u00e9rrel oda, ahova szeretn\u00e9 LaTeXDrawFrame.139=A kiv\u00e1lasztott \u00e1br\u00e1k t\u00f6rl\u00e9se LaTeXDrawFrame.146=M\u00e1solva... LaTeXDrawFrame.147=Beillesztve... LaTeXDrawFrame.148=Kiv\u00e1gva... LaTeXDrawFrame.149=T\u00f6r\u00f6lve... LaTeXDrawFrame.154=Csoportos\u00edtva... LaTeXDrawFrame.155=Sz\u00e9tv\u00e1lasztva... LaTeXDrawFrame.169=Sablon export\u00e1lva! LaTeXDrawFrame.171=Kiv\u00e1laszt LaTeXDrawFrame.173=Fel\u00fcl akarja \u00edrni a f\u00e1jlt? LaTeXDrawFrame.175=PSTricks k\u00f3d export\u00e1lva! LaTeXDrawFrame.176=PSTricks k\u00f3d export\u00e1l\u00e1sa nem siker\u00fclt! LaTeXDrawFrame.184=K\u00e9p export\u00e1l\u00e1sa befejezve! LaTeXDrawFrame.185=A k\u00e9pet nem lehet export\u00e1lni! LaTeXDrawFrame.188=A rajz ment\u00e9se LaTeXDrawFrame.200=Rajz megnyit\u00e1sa LaTeXDrawFrame.219=Verzi\u00f3sz\u00e1m LaTeXDrawFrame.220=, \u00e9p\u00edteni LaTeXDrawFrame.221=\ kiadva a GNU \u00c1ltal\u00e1nos Nyilv\u00e1nos Licenc felt\u00e9teleivel. LFrame2.1=Kiv\u00e1lasztott \u00e1br\u00e1k egy sorba rendez\u00e9se. 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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/actions.properties000066400000000000000000000073371321075051700325030ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/dialogFrames.properties000066400000000000000000000046621321075051700334360ustar00rootroot00000000000000PreferencesFrame.Pref=Be\u00e1ll\u00edt\u00e1sok\u2026 PreferencesFrame.grid=R\u00e1cs PreferencesFrame.codePanel=K\u00f3d panel PreferencesFrame.antiAl=\u00c9lsim\u00edt\u00e1s PreferencesFrame.rendQ=Renderel\u00e9s min\u0151s\u00e9ge PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Alfa interpol\u00e1ci\u00f3 min\u0151s\u00e9ge PreferencesFrame.newVers=\u00daj verzi\u00f3 keres\u00e9se ind\u00edt\u00e1skor PreferencesFrame.lge=Nylev (\u00fajraind\u00edt\u00e9s sz\u00fcks\u00e9ges hozz\u00e1) PreferencesFrame.general=\u00c1ltal\u00e1nos PreferencesFrame.folders=Mapp\u00e1k PreferencesFrame.quality=Min\u0151s\u00e9g PreferencesFrame.selectFolder=K\u00f6nyvt\u00e1r kiv\u00e1laszt\u00e1sa PreferencesFrame.defOpenSave=Bet\u00f6lt\u00e9s/Ment\u00e9s alapk\u00f6nyvt\u00e1ra: PreferencesFrame.defFold=Import\u00e1l\u00e1s/Export\u00e1l\u00e1s alapk\u00f6nyvt\u00e1ra: AbstractParametersFrame.0=Double boundary AbstractParametersFrame.2=Elv\u00e1laszt\u00f3: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=M\u00e9gsem AbstractParametersFrame.7=A forgat\u00e1s sz\u00f6ge: AbstractParametersFrame.11=Hatchings Width: AbstractParametersFrame.20=Pont \u00e1tm\u00e9r\u0151 = AbstractParametersFrame.21=Bar width = AbstractParametersFrame.22=Bracket length = AbstractParametersFrame.23=Rounded bracket lgth = AbstractParametersFrame.24=x thickness + AbstractParametersFrame.26=Ny\u00edl hossza AbstractParametersFrame.27=Arrow inset AbstractParametersFrame.28=Ny\u00edl sz\u00e9less\u00e9ge ParametersArcFrame.0=kezd\u0151 sz\u00f6g: ParametersArcFrame.1=v\u00e9gs\u0151 sz\u00f6g: ParametersGridFrame.0=Y kezd\u0151pont: ParametersGridFrame.1=X kezd\u0151pont: ParametersGridFrame.4=Subgrid dots: ParametersGridFrame.5=Grid dots: ParametersGridFrame.6=Grid width: ParametersGridFrame.7=Subgrid width: ParametersGridFrame.8=Subgrid division: ParametersGridFrame.9=C\u00edmke m\u00e9rete ParametersGridFrame.11=X max.: ParametersGridFrame.12=X min.: ParametersGridFrame.13=Y max.: ParametersGridFrame.14=Y min.: ExportDialog.0=T\u00f6m\u00f6r\u00edt\u00e9s Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/hu/others.properties000066400000000000000000000006311321075051700323350ustar00rootroot00000000000000XScale.cm=cm XScale.inch=inch Arc.arc=K\u00f6r\u00edv Arc.wedge=K\u00f6rcikk Arc.chord=H\u00far DrawContainer.nameTemplate=Adja meg a sablon nev\u00e9t DrawContainer.overwriteTemplate=Ez a sablon m\u00e1r l\u00e9tezik; fel\u00fcl\u00edrja? CloseButton.closePanel=Close the window UndoRedoManager.create=L\u00e9trehoz UndoRedoManager.join=Csatlakoz\u00e1s UndoRedoManager.seperate=Sz\u00e9tv\u00e1laszt\u00e1s latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/000077500000000000000000000000001321075051700267135ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/1_6.properties000066400000000000000000000013031321075051700314130ustar00rootroot00000000000000LaTeXDrawFrame.0=Inserisci codice PSTricks LaTeXDrawFrame.1=Inserisci un'immagine LaTeXDrawFrame.3=stop LaTeXDrawFrame.6=Immagine BMP LaTeXDrawFrame.7=Immagine PNG LaTeXDrawFrame.10=Inserisci LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Non \u00e8 stata trovata nessuna figura da importare! LaTeXDrawFrame.34=Impossibile importare il file PSTricks! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Inserisci figure da codice PSTricks Picture.0=% Attenzione: il percorso della seguente immagine contiene spazi e non sar\u00e0 compilato da tex! ParserMessagesFrame.0=Comando latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/1_7.properties000066400000000000000000000006741321075051700314260ustar00rootroot00000000000000LaTeXDrawFrame.0=Ombra LaTeXDrawFrame.1=Gradiente 1 LaTeXDrawFrame.2=Gradiente 2 LaTeXDrawFrame.4=Aggiungi un'ombra alla figura. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Posizione figure nel disegno (davanti, dietro, ...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=Angolo gradiente AbstractParametersFrame.4=Punto medio latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/1_8.properties000066400000000000000000000025341321075051700314240ustar00rootroot00000000000000AbstractParametersFrame.0=intervallo: ParametersAxeFrame.0=Forma: ParametersAxeFrame.1=Mostra origine ParametersAxeFrame.6=Distanza etichette X: ParametersAxeFrame.7=Distanza etichette Y: ParametersAxeFrame.8=Incremento etichette X: ParametersAxeFrame.9=Incremento etichette Y: ParametersAxeFrame.13=Dimensione: 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.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.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.17=Disegna assi. LaTeXDrawFrame.23=Chiudi LaTeXDrawFrame.27=Note di release LaTeXDrawFrame.28=License Axe.1=Asse Axe.2=Frame Axe.3=Completo Axe.4=Alto Axe.5=Basso latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/1_9.properties000066400000000000000000000042451321075051700314260ustar00rootroot00000000000000LaTeXDrawFrame.0=File recenti LaTeXDrawFrame.3=Scorciatoie LaTeXDrawFrame.11=Disegna una curva di B\u00e9zier chiusa. DrawPanel.0=Aggiorna le figure rispetto alla griglia ParametersAkinPointsFrame.0=Intervallo punti: ParametersAkinPointsFrame.1=Apri ParametersAkinPointsFrame.2=tipo: 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/LaTeXDrawFrame.properties000066400000000000000000000101661321075051700336030ustar00rootroot00000000000000LaTeXDrawFrame.0=\ Aiuto LaTeXDrawFrame.7=A mano libera LaTeXDrawFrame.16=Esporta come... LaTeXDrawFrame.17=Cancella figura LaTeXDrawFrame.18=Esci LaTeXDrawFrame.19=Codice PSTricks LaTeXDrawFrame.20=Immagine JPEG LaTeXDrawFrame.22=Ripeti LaTeXDrawFrame.23=Annulla 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.48=Interni LaTeXDrawFrame.49=portelli LaTeXDrawFrame.56=Preferenze LaTeXDrawFrame.57=Zoom avanti LaTeXDrawFrame.58=Zoom indietro LaTeXDrawFrame.60=Aggiungi testo LaTeXDrawFrame.65=Cambia lo spessore della figura LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Metti la figura in primo piano LaTeXDrawFrame.71=Metti la figura sullo sfondo LaTeXDrawFrame.75=Raggruppa alcune figure LaTeXDrawFrame.76=Separa alcune figure LaTeXDrawFrame.77=Definisce la posizione dei bordi della figura LaTeXDrawFrame.78=Se selezionata, la figura avr\u00e0 doppi bordi LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=File LaTeXDrawFrame.89=Modifica LaTeXDrawFrame.90=Mostra LaTeXDrawFrame.91=Disegna LaTeXDrawFrame.93=Aiuto LaTeXDrawFrame.103=Modelli LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Disegna un punto 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.130=Disegna un cuneo LaTeXDrawFrame.131=Disegna una corda LaTeXDrawFrame.132=Disegna una curva di B\u00e9zier LaTeXDrawFrame.133=Disegna una griglia LaTeXDrawFrame.136=Seleziona una o pi\u00f9 figure
    LaTeXDrawFrame.137=Informazione : per selezionare diverse LaTeXDrawFrame.138=figure, clicca e
    trascina il mouse sulle figure che vuoi LaTeXDrawFrame.139=Elimina la/le figura/e selezionata/e LaTeXDrawFrame.146=Copiato... LaTeXDrawFrame.147=Incollato... LaTeXDrawFrame.148=Tagliato... LaTeXDrawFrame.149=Cancellato... LaTeXDrawFrame.154=Raggruppato... LaTeXDrawFrame.155=Separato... LaTeXDrawFrame.169=Modello esportato! LaTeXDrawFrame.171=Seleziona LaTeXDrawFrame.173=Vuoi rimpiazzare il file? LaTeXDrawFrame.175=Codice PSTricks esportato! LaTeXDrawFrame.176=Impossibile esportare il codice PSTricks! LaTeXDrawFrame.184=Esportato come immagine! LaTeXDrawFrame.185=Impossibile esportare come immagine! LaTeXDrawFrame.188=Salva il disegno LaTeXDrawFrame.200=Apri un disegno LaTeXDrawFrame.219=Versione LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ \u00e8 distribuito sotto le condizioni della General Public License GNU LFrame2.1=Allinea le figure selezionate. LFrame2.10=Distribuisci verticalmente, alla stessa distanza tra, le figure selezionate. LFrame2.11=Distribuisci verticalmente alla stessa distanza tra la met\u00e0 delle figure selezionate. LFrame2.12=Distribuisci verticalmente alla stessa distanza tra le cime delle figure selezionate. LFrame2.13=Distribuisci orizoontalmente alla stessa distanza tra i lati sinistri delle figure selezionate. LFrame2.14=Distribuisci orizoontalmente, alla stessa distanza tra, le figure selezionate. LFrame2.15=Distribuisci orizoontalmente alla stessa distanza tra le met\u00e0 delle figure selezionate. LFrame2.16=Distribuisci orizoontalmente alla stessa distanza tra i lati destri delle figure selezionate. LFrame2.2=Allinea le figure selezionate sulla sinistra. 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.9=Distribuisci verticalmente, alla stessa distanza tra, i lati bassi delle figure selezionate. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/actions.properties000066400000000000000000000073371321075051700325030ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/dialogFrames.properties000066400000000000000000000044731321075051700334360ustar00rootroot00000000000000PreferencesFrame.Pref=Preferenze... PreferencesFrame.grid=Griglia PreferencesFrame.codePanel=Pannello del codice PreferencesFrame.antiAl=Anti-aliasing PreferencesFrame.rendQ=Qualit\u00e0 del rendering PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Qualit\u00e0 dell'interpolazione alpha 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: AbstractParametersFrame.0=Doppio limite AbstractParametersFrame.2=Separatore: AbstractParametersFrame.4=OK AbstractParametersFrame.6=Annulla AbstractParametersFrame.7=Angolo di rotazione AbstractParametersFrame.11=Larghezza del tratteggio: AbstractParametersFrame.20=DIametro del punto= AbstractParametersFrame.21=Larghezza barra = AbstractParametersFrame.22=Lunghezza della parentesi = AbstractParametersFrame.23=Lunghezza parentesi rotonda AbstractParametersFrame.24=sottigliezza x + AbstractParametersFrame.26=Lunghezza della freccia AbstractParametersFrame.27=Riquadro della freccia AbstractParametersFrame.28=Spessore della freccia ParametersArcFrame.0=angolo iniziale ParametersArcFrame.1=angolo finale ParametersGridFrame.0=Origine X: ParametersGridFrame.1=Origine Y: ParametersGridFrame.4=Punti sotto-griglia: ParametersGridFrame.5=Punti della griglia: ParametersGridFrame.6=Larghezza della griglia ParametersGridFrame.7=Larghezza della sottogriglia: ParametersGridFrame.8=Divisione sotto-griglia: ParametersGridFrame.9=Dimensioni dell'etichetta: ParametersGridFrame.11=X massimo: ParametersGridFrame.12=X minimo: ParametersGridFrame.13=Y massimo: ParametersGridFrame.14=Y minimo: ExportDialog.0=Compressione Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/it/others.properties000066400000000000000000000005271321075051700323410ustar00rootroot00000000000000XScale.cm=cm XScale.inch=pollici Arc.arc=Arco Arc.wedge=Cuneo Arc.chord=Corda DrawContainer.nameTemplate=Inserisci il nome del modello DrawContainer.overwriteTemplate=Questo modello esiste gi\u00e0: sovrascriverlo? CloseButton.closePanel=Close the window UndoRedoManager.create=Crea UndoRedoManager.join=Unisci UndoRedoManager.seperate=Separa latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/000077500000000000000000000000001321075051700266715ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/1_6.properties000066400000000000000000000024331321075051700313760ustar00rootroot00000000000000LaTeXDrawFrame.0=PSTricks\u306e\u30b3\u30fc\u30c9\u3092\u633f\u5165 LaTeXDrawFrame.1=\u753b\u50cf\u3092\u633f\u5165 LaTeXDrawFrame.3=\u505c\u6b62 LaTeXDrawFrame.6=BMP \u753b\u50cf LaTeXDrawFrame.7=PNG \u753b\u50cf LaTeXDrawFrame.10=\u633f\u5165 LaTeXDrawFrame.16=\u73fe\u884c\u306ePSTricks\u89e3\u6790\u5b50\u306f\u82e5\u5e72\u306e\u30b3\u30de\u30f3\u30c9\u3057\u304b\u89e3\u6790\u3067\u304d\u307e\u305b\u3093\u3002
    LaTeXDraw\u304c\u7ba1\u7406\u3057\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306e\u307f\u8aad\u307f\u8fbc\u307f\u53ef\u80fd\u3067\u3059\u3002 LaTeXDrawFrame.33=\u53d6\u308a\u8fbc\u3080\u56f3\u5f62\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\uff01 LaTeXDrawFrame.34=PSTricks\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u308a\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff01 LaTeXDrawFrame.36=\u30b3\u30fc\u30c9\u304c\u56f3\u5f62\u306b\u5909\u63db\u3055\u308c\u307e\u3057\u305f\uff01 InsertPSTricksCodeFrame.0=PSTricks \u306e\u30b3\u30fc\u30c9\u304b\u3089\u56f3\u5f62\u3092\u633f\u5165\u3059\u308b Picture.0=% \u8b66\u544a: \u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u30d1\u30b9\u306f\u7a7a\u767d\u6587\u5b57\u3092\u542b\u3093\u3067\u3044\u308b\u305f\u3081 TeX \u3067\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u307e\u305b\u3093! ParserMessagesFrame.0=\u30b3\u30de\u30f3\u30c9 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/1_7.properties000066400000000000000000000015461321075051700314030ustar00rootroot00000000000000LaTeXDrawFrame.0=\u9670\u5f71 LaTeXDrawFrame.1=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3 1 LaTeXDrawFrame.2=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3 2 LaTeXDrawFrame.4=\u56f3\u5f62\u306b\u9670\u5f71\u3092\u8ffd\u52a0 LaTeXDrawFrame.5=\u9670\u5f71\u8272\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 LaTeXDrawFrame.6=\u56f3\u306e\u88fd\u56f3\u4e2d\u3067\u306e\u4f4d\u7f6e\u3092\u6c7a\u3081\u308b\uff08\u524d\u9762\u30fb\u80cc\u9762\u2026\uff09\u3002 LaTeXDrawFrame.7=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u7b2c1\u8272\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 LaTeXDrawFrame.8=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u7b2c2\u8272\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 AbstractParametersFrame.3=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u89d2\u5ea6 AbstractParametersFrame.4=\u4e2d\u70b9 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/1_8.properties000066400000000000000000000043421321075051700314010ustar00rootroot00000000000000AbstractParametersFrame.0=\u9593\u9694: ParametersAxeFrame.0=\u5f62\u72b6: ParametersAxeFrame.1=\u539f\u70b9\u3092\u8868\u793a ParametersAxeFrame.6=X\u8ef8\u30e9\u30d9\u30eb\u306e\u9593\u9694: ParametersAxeFrame.7=Y\u8ef8\u30e9\u30d9\u30eb\u306e\u9593\u9694: ParametersAxeFrame.8=X\u8ef8\u30e9\u30d9\u30eb\u306e\u5897\u5206: ParametersAxeFrame.9=Y\u8ef8\u30e9\u30d9\u30eb\u306e\u5897\u5206: ParametersAxeFrame.13=\u5bf8\u6cd5: ParametersAxeFrame.17=\u76ee\u76db PreferencesFrame.3=\u304a\u4f7f\u3044\u306eLaTeX\u30a8\u30c7\u30a3\u30bf\u306e\u30d1\u30b9: PreferencesFrame.4=\u6a19\u6e96\u30e1\u30c3\u30b7\u30e5 PreferencesFrame.5=\u81ea\u5df1\u5b9a\u7fa9\u30e1\u30c3\u30b7\u30e5 PreferencesFrame.6=\u7c98\u7740\u7684\u30e1\u30c3\u30b7\u30e5 PreferencesFrame.7=\u9593\u9694: LaTeXDrawFrame.2=\u9078\u629e\u3057\u305f\u56f3\u3092\u56de\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.3=\u9078\u629e\u3057\u305f\u56f3\u309290\u5ea6\u56de\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.4=\u9078\u629e\u3057\u305f\u56f3\u3092180\u5ea6\u56de\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.5=\u9078\u629e\u3057\u305f\u56f3\u3092270\u5ea6\u56de\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.6=\u56f3\u3092\u5bfe\u79f0\u306b\u53cd\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.7=\u9078\u629e\u3057\u305f\u56f3\u3092\u6c34\u5e73\u5bfe\u79f0\u306b\u53cd\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.8=\u9078\u629e\u3057\u305f\u56f3\u3092\u5782\u76f4\u5bfe\u79f0\u306b\u53cd\u8ee2\u3059\u308b\u3002 LaTeXDrawFrame.12=(\u7c98\u7740\u7684)\u30e1\u30c3\u30b7\u30e5\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u542b\u3080 LaTeXDrawFrame.13=\u7c98\u7740\u7684 LaTeXDrawFrame.14=\u9078\u629e\u3059\u308b\u3068\u3001\u56f3\u306f\u30e1\u30c3\u30b7\u30e5\u306b\u5bfe\u3057\u3066\u7c98\u7740\u7684\u306b\u306a\u308a\u307e\u3059\u3002 LaTeXDrawFrame.15=\u81ea\u5df1\u8a2d\u5b9a\u30e1\u30c3\u30b7\u30e5\u306e\u7dda\u9593\u3092(\u30d4\u30af\u30bb\u30eb\u3067)\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 LaTeXDrawFrame.17=\u5ea7\u6a19\u8ef8\u3092\u63cf\u753b\u3059\u308b\u3002 LaTeXDrawFrame.23=\u9589\u3058\u308b LaTeXDrawFrame.27=\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8 LaTeXDrawFrame.28=\u4f7f\u7528\u8a31\u8afe\u66f8 Axe.1=\u5ea7\u6a19\u8ef8\u306e\u307f Axe.2=\u5916\u67a0 Axe.3=\u5341\u5b57 Axe.4=\u5185\u5074 Axe.5=\u5916\u5074 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/1_9.properties000066400000000000000000000072501321075051700314030ustar00rootroot00000000000000LaTeXDrawFrame.0=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb LaTeXDrawFrame.3=\u6377\u5f84 LaTeXDrawFrame.11=\u9589\u30d9\u30b8\u30a8\u66f2\u7dda\u3092\u63cf\u753b DrawPanel.0=\u56f3\u3092\u30e1\u30c3\u30b7\u30e5\u306b\u5408\u308f\u305b\u307e\u3059\u3002 ParametersAkinPointsFrame.0=\u70b9\u306e\u9593\u9694: ParametersAkinPointsFrame.1=\u958b\u56f3\u5f62 ParametersAkinPointsFrame.2=\u578b: PreferencesFrame.0=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u6570: PreferencesFrame.1=\u30c6\u30fc\u30de(\u8981\u518d\u8d77\u52d5) ShortcutsFrame.1=\u6253\u9375\u5217 ShortcutsFrame.3=\u5206\u985e ShortcutsFrame.4=\u79fb\u52d5 ShortcutsFrame.5=\u5909\u63db ShortcutsFrame.6=\u63cf\u753b ShortcutsFrame.8=\u5de6\u30af\u30ea\u30c3\u30af ShortcutsFrame.9=\u6c34\u5e73\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u53f3\u306b\u79fb\u52d5 ShortcutsFrame.10=\u6c34\u5e73\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u5de6\u306b\u79fb\u52d5 ShortcutsFrame.11=\u5782\u76f4\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u4e0a\u306b\u79fb\u52d5 ShortcutsFrame.12=\u5782\u76f4\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u4e0b\u306b\u79fb\u52d5 ShortcutsFrame.18=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u53f3\u306b\u79fb\u52d5 ShortcutsFrame.19=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u5de6\u306b\u79fb\u52d5 ShortcutsFrame.20=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u4e0a\u306b\u79fb\u52d5 ShortcutsFrame.21=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u4e0b\u306b\u79fb\u52d5 ShortcutsFrame.23=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30e1\u30c3\u30b7\u30e5\u306b\u5408\u308f\u305b\u308b ShortcutsFrame.25=\u88fd\u56f3\u4e0a\u306e\u5168\u56f3\u5f62\u3092\u9078\u629e ShortcutsFrame.26=\u30af\u30ea\u30c3\u30af\u3057\u305f\u56f3\u5f62\u3092\u9078\u629e\u306b\u52a0\u3048\u308b ShortcutsFrame.27=\u30af\u30ea\u30c3\u30af\u3057\u305f\u56f3\u5f62\u3092\u9078\u629e\u304b\u3089\u5916\u3059 ShortcutsFrame.29=\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb ShortcutsFrame.30=\u62e1\u5927\u30fb\u7e2e\u5c0f MenusListener.0=\u5de6\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3001\u30de\u30a6\u30b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u7b2c2\u70b9\u3092\u914d\u7f6e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f5c\u6210\u3092\u7d42\u308f\u3063\u305f\u3089\u30dc\u30bf\u30f3\u3092\u653e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 MenusListener.1=\u5de6\u30af\u30ea\u30c3\u30af\u3067\u70b9\u3092\u8ffd\u52a0\u3057\u3001\u53f3\u30af\u30ea\u30c3\u30af\u304b\u5de6\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3067\u6700\u7d42\u70b9\u3092\u914d\u7f6e\u3057\u3001\u4f5c\u6210\u3092\u7d42\u3048\u307e\u3059\u3002 MenusListener.4=\u5de6\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u30de\u30a6\u30b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u3001\u6700\u7d42\u70b9\u3092\u914d\u7f6e\u3057\u307e\u3059\u3002\u4f5c\u6210\u3092\u7d42\u3048\u305f\u3089\u30dc\u30bf\u30f3\u3092\u653e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 MenusListener.5=\u5de6\u30af\u30ea\u30c3\u30af\u3067\u8a9e\u53e5\u304c\u52a0\u3048\u3089\u308c\u307e\u3059\u3002 MenusListener.6=\u5de6\u30af\u30ea\u30c3\u30af\u3067\u30e1\u30c3\u30b7\u30e5\u304c\u52a0\u3048\u3089\u308c\u307e\u3059\u3002 MenusListener.7=\u5de6\u30af\u30ea\u30c3\u30af\u3067\u5ea7\u6a19\u8ef8\u304c\u52a0\u3048\u3089\u308c\u307e\u3059\u3002 MenusListener.8=\u5de6\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u30de\u30a6\u30b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3001\u56f3\u5f62\u3092\u63cf\u753b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f5c\u6210\u304c\u7d42\u308f\u3063\u305f\u3089\u30dc\u30bf\u30f3\u3092\u653e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 MenusListener.9=\u5de6\u30af\u30ea\u30c3\u30af\u3067\u70b9\u304c\u52a0\u3048\u3089\u308c\u307e\u3059\u3002 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/LaTeXDrawFrame.properties000066400000000000000000000155141321075051700335630ustar00rootroot00000000000000LaTeXDrawFrame.0=\ \u30d8\u30eb\u30d7 LaTeXDrawFrame.7=\u624b\u66f8\u304d LaTeXDrawFrame.16=\u66f8\u5f0f\u3092\u6307\u5b9a\u3057\u3066\u66f8\u304d\u51fa\u3057... LaTeXDrawFrame.17=\u56f3\u5f62\u3092\u524a\u9664 LaTeXDrawFrame.18=\u7d42\u4e86 LaTeXDrawFrame.19=PSTricks\u30b3\u30fc\u30c9 LaTeXDrawFrame.20=JPEG\u753b\u50cf LaTeXDrawFrame.22=\u7e70\u308a\u8fd4\u3059 LaTeXDrawFrame.23=\u53d6\u308a\u6d88\u3059 LaTeXDrawFrame.38=X\u8ef8\u76ee\u76db LaTeXDrawFrame.39=Y\u8ef8\u76ee\u76db LaTeXDrawFrame.40=\u30b3\u30d4\u30fc LaTeXDrawFrame.41=\u3072\u306a\u578b\u3092\u66f4\u65b0 LaTeXDrawFrame.42=\u3072\u306a\u578b\u3068\u3057\u3066\u4fdd\u5b58 LaTeXDrawFrame.43=\u8cbc\u308a\u4ed8\u3051 LaTeXDrawFrame.44=\u5207\u308a\u53d6\u308a LaTeXDrawFrame.48=\u5185\u90e8 LaTeXDrawFrame.49=\u30cf\u30c3\u30c1\u30f3\u30b0 LaTeXDrawFrame.56=\u8a2d\u5b9a LaTeXDrawFrame.57=\u62e1\u5927 LaTeXDrawFrame.58=\u7e2e\u5c0f LaTeXDrawFrame.60=\u6587\u5b57\u5217\u3092\u8ffd\u52a0 LaTeXDrawFrame.65=\u56f3\u5f62\u306e\u592a\u3055\u3092\u5909\u66f4 LaTeXDrawFrame.66=\u56f3\u5f62\u306e\u5883\u754c\u8272\u3092\u5909\u66f4 LaTeXDrawFrame.68=\u56f3\u5f62\u306e\u5185\u90e8\u8272\u3092\u5909\u66f4 LaTeXDrawFrame.69=\u30cf\u30c3\u30c1\u30f3\u30b0\u8272\u3092\u5909\u66f4 LaTeXDrawFrame.70=\u56f3\u5f62\u3092\u524d\u666f\u306b\u56de\u3059 LaTeXDrawFrame.71=\u56f3\u5f62\u3092\u80cc\u666f\u306b\u56de\u3059 LaTeXDrawFrame.75=\u8907\u6570\u306e\u56f3\u5f62\u3092\u30b0\u30eb\u30fc\u30d7\u5316 LaTeXDrawFrame.76=\u8907\u6570\u306e\u56f3\u5f62\u3092\u975e\u30b0\u30eb\u30fc\u30d7\u5316 LaTeXDrawFrame.77=\u56f3\u5f62\u306e\u5883\u754c\u4f4d\u7f6e\u3092\u5b9a\u7fa9 LaTeXDrawFrame.78=\u9078\u629e\u3059\u308b\u3068\u3001\u56f3\u5f62\u306e\u5883\u754c\u7dda\u304c\u4e8c\u91cd\u306b\u306a\u308a\u307e\u3059 LaTeXDrawFrame.79=\u4e8c\u91cd\u5883\u754c\u7dda\u306e\u7dda\u9593\u8272\u3092\u5909\u66f4 LaTeXDrawFrame.88=\u30d5\u30a1\u30a4\u30eb LaTeXDrawFrame.89=\u7de8\u96c6 LaTeXDrawFrame.90=\u8868\u793a LaTeXDrawFrame.91=\u56f3\u9762 LaTeXDrawFrame.93=\u30d8\u30eb\u30d7 LaTeXDrawFrame.103=\u3072\u306a\u578b LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u70b9\u3092\u63cf\u753b LaTeXDrawFrame.119=\u9577\u65b9\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.120=\u6b63\u65b9\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.121=\u591a\u89d2\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.123=\u83f1\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.124=\u4e09\u89d2\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.125=\u6955\u5186\u3092\u63cf\u753b LaTeXDrawFrame.127=\u5186\u3092\u63cf\u753b LaTeXDrawFrame.128=\u5f27\u3092\u63cf\u753b LaTeXDrawFrame.130=\u304f\u3055\u3073\u5f62\u3092\u63cf\u753b LaTeXDrawFrame.131=\u5f26\u3092\u63cf\u753b LaTeXDrawFrame.132=\u30d9\u30b8\u30a8\u66f2\u7dda\u3092\u63cf\u753b LaTeXDrawFrame.133=\u57fa\u6e96\u30e1\u30c3\u30b7\u30e5\u3092\u63cf\u753b LaTeXDrawFrame.136=\u56f3\u5f62\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044
    LaTeXDrawFrame.137=\u52a9\u8a00: \u8907\u6570\u306e\u56f3\u5f62\u3092 LaTeXDrawFrame.138=\u9078\u629e\u3059\u308b\u306b\u306f\u3001\u30af\u30ea\u30c3\u30af\u3057\u3066
    \u9078\u629e\u3057\u305f\u56f3\u5f62\u307e\u3067\u30de\u30a6\u30b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u304f\u3060\u3055\u3044 LaTeXDrawFrame.139=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u524a\u9664 LaTeXDrawFrame.146=\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f... LaTeXDrawFrame.147=\u8cbc\u308a\u4ed8\u3051\u307e\u3057\u305f... LaTeXDrawFrame.148=\u5207\u308a\u53d6\u308a\u307e\u3057\u305f... LaTeXDrawFrame.149=\u524a\u9664\u3057\u307e\u3057\u305f... LaTeXDrawFrame.154=\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u307e\u3057\u305f... LaTeXDrawFrame.155=\u975e\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u307e\u3057\u305f... LaTeXDrawFrame.169=\u3072\u306a\u578b\u3092\u66f8\u304d\u51fa\u3057\u307e\u3057\u305f\uff01 LaTeXDrawFrame.171=\u9078\u629e LaTeXDrawFrame.173=\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u304b\uff1f LaTeXDrawFrame.175=PSTricks\u30b3\u30fc\u30c9\u304c\u66f8\u304d\u51fa\u3055\u308c\u307e\u3057\u305f\uff01 LaTeXDrawFrame.176=PSTricks\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\uff01 LaTeXDrawFrame.184=\u753b\u50cf\u3078\u306e\u66f8\u304d\u51fa\u3057\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\uff01 LaTeXDrawFrame.185=\u753b\u50cf\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\uff01 LaTeXDrawFrame.188=\u56f3\u9762\u3092\u4fdd\u5b58 LaTeXDrawFrame.200=\u56f3\u9762\u3092\u958b\u304f LaTeXDrawFrame.219=\u30d0\u30fc\u30b8\u30e7\u30f3 LaTeXDrawFrame.220=\u3001\u30d3\u30eb\u30c9 LaTeXDrawFrame.221=\ \u306f\u3001Free Software Foundation (\u7b2c\uff12\u7248)\u306b\u3088\u3063\u3066\u516c\u8868\u3055\u308c\u3066\u3044\u308b\u901a\u308a LFrame2.1=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u6574\u5217\u3057\u307e\u3059\u3002 LFrame2.10=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u3001\u7b49\u3057\u3044\u9699\u9593\u3092\u7f6e\u3044\u3066\u3001\u5782\u76f4\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.11=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e2d\u5fc3\u3092\u7b49\u9593\u9694\u306b\u3001\u5782\u76f4\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.12=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e0a\u7aef\u3092\u7b49\u9593\u9694\u306b\u3001\u5782\u76f4\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.13=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u5de6\u5074\u3092\u7b49\u9593\u9694\u306b\u3001\u6c34\u5e73\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.14=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u3001\u7b49\u3057\u3044\u9699\u9593\u3092\u7f6e\u3044\u3066\u3001\u6c34\u5e73\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.15=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e2d\u5fc3\u3092\u7b49\u9593\u9694\u306b\u3001\u6c34\u5e73\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.16=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u53f3\u5074\u3092\u7b49\u9593\u9694\u306b\u3001\u6c34\u5e73\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.2=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u5de6\u63c3\u3048\u306b\u3057\u307e\u3059\u3002 LFrame2.3=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u53f3\u63c3\u3048\u306b\u3057\u307e\u3059\u3002 LFrame2.4=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u4e0a\u63c3\u3048\u306b\u3057\u307e\u3059\u3002 LFrame2.5=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u4e0b\u63c3\u3048\u306b\u3057\u307e\u3059\u3002 LFrame2.6=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e2d\u5fc3\u3092\u6c34\u5e73\u65b9\u5411\u306b\u5408\u308f\u305b\u307e\u3059\u3002 LFrame2.7=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e2d\u5fc3\u3092\u5782\u76f4\u65b9\u5411\u306b\u5408\u308f\u305b\u307e\u3059\u3002 LFrame2.8=\u9078\u629e\u3057\u305f\u56f3\u5f62\u3092\u7b49\u9593\u9694\u306b\u914d\u5217\u3057\u307e\u3059\u3002 LFrame2.9=\u9078\u629e\u3057\u305f\u56f3\u5f62\u306e\u4e0b\u7aef\u3092\u7b49\u9593\u9694\u306b\u5782\u76f4\u306b\u914d\u5217\u3057\u307e\u3059\u3002 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/actions.properties000066400000000000000000000143551321075051700324570ustar00rootroot00000000000000Actions.0=\u56f3\u9762\u7279\u6027\u306e\u4fee\u6b63 Actions.1=\u7c98\u7740\u7684\u30e1\u30c3\u30b7\u30e5\u306e\u4fee\u6b63 Actions.2=\u56f3\u9762\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f Actions.3=\u5358\u4f4d\u3092\u5909\u66f4 Actions.4=PST\u30b3\u30fc\u30c9\u3092\u633f\u5165 Actions.5=\u524a\u9664 Actions.6=\u5206\u914d Actions.7=\u93e1\u50cf Actions.8=\u80cc\u666f\u307e\u305f\u306f\u524d\u666f\u306b\u79fb\u52d5 Actions.9=\u5236\u5fa1\u70b9\u3092\u79fb\u52d5 Actions.10=\u70b9\u3092\u79fb\u52d5 Actions.11=\u5927\u304d\u3055\u3092\u5909\u3048\u308b Actions.12=\u70b9\u3092\u8868\u793a Actions.13=\u8ef8\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.14=\u30e1\u30c3\u30b7\u30e5\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.15=\u624b\u66f8\u304d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.16=\u77e2\u5370\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.17=\u5186\u5f27\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.18=\u6587\u5b57\u5217\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.19=\u30cf\u30c3\u30c1\u30f3\u30b0\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.20=\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.21=\u89d2\u306e\u4e38\u307f Actions.22=\u8272\u5857\u308a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.23=\u7dda\u8272 Actions.24=\u4e8c\u91cd\u5883\u754c\u7dda\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.25=\u9670\u5f71\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.26=\u7dda\u306e\u592a\u3055 Actions.27=\u5883\u754c\u7dda\u306e\u4f4d\u7f6e Actions.28=\u7dda\u306e\u69d8\u5f0f Actions.29=\u70b9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc Actions.30=\u63c3\u3048 Actions.31=\u56de\u8ee2 Actions.32=\u7ffb\u8a33 Actions.33=\u30e1\u30c3\u30b7\u30e5\u306b\u5408\u308f\u305b\u3066\u66f4\u65b0 Instruments.1=\u4e2d\u592e\u63c3\u3048 Instruments.2=\u4f4d\u7f6e: Instruments.3=\u62e1\u5927\u7e2e\u5c0f Instruments.4=\u9023\u7d50\u3057\u305f\u7dda\u3092\uff11\u3064\u3082\u3057\u304f\u306f\u8907\u6570\u63cf\u753b Instruments.5=\u51fd\u6570\u3092\u30d7\u30ed\u30c3\u30c8 FileLoaderSaver.1=\u56f3\u9762\u3092\u4fdd\u5b58 FileLoaderSaver.2=\u56f3\u9762\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u4fdd\u5b58 FileLoaderSaver.3=\u56f3\u9762\u3092\u958b\u304f FileLoaderSaver.4=\u65b0\u898f\u56f3\u9762\u306e\u751f\u6210 Helper.1=\u3069\u3046\u304b\u5bc4\u4ed8\u3092\uff01 Helper.2=\u30d0\u30b0\u3092\u5831\u544a Helper.3=\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u884c\u304f Helper.4=\u53d6\u6271\u8aac\u660e\u66f8 PreferencesSetter.1=\u3042\u306a\u305f\u304c\u63cf\u753b\u3067\u5b9a\u671f\u7684\u306b\u4f7f\u3046LaTeX\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3053\u306e\u4e00\u89a7\u306b\u66f8\u304d\u5165\u308c\u3066\u304f\u3060\u3055\u3044\uff0e\u4f8b: AxesCust.1=\u53ef\u8996\u6027: ShapeBord.1=\u8272 ShapeBord.2=\u70b9\u3092\u8868\u793a ShapeBord.3=\u56f3\u5f62\u306e(\u5236\u5fa1)\u70b9\u3092\u30c9\u30c3\u30c8\u3067\u8868\u793a ShapeCoord.1=\u5de6\u4e0a\u89d2\u306eX\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeCoord.2=\u5de6\u4e0a\u89d2\u306eY\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeDot.1=\u70b9\u306e\u5927\u304d\u3055\u3092\u5b9a\u7fa9 ShapeDot.2=\u70b9\u306e\u69d8\u5f0f\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ShapeFill.1=\u89d2\u5ea6: ShapeGrid.1=\u30e9\u30d9\u30eb ShapeGrid.2=\u7d30\u30e1\u30c3\u30b7\u30e5 ShapeGrid.3=\u30e9\u30d9\u30eb\u306eY\u5ea7\u6a19\u3092\u5909\u66f4 ShapeGrid.4=\u30e9\u30d9\u30eb\u306eX\u5ea7\u6a19\u3092\u5909\u66f4 ShapeShad.1=\u5bf8\u6cd5: ShapeStdGrid.1=\u30e1\u30c3\u30b7\u30e5\u306e\u6700\u5c0fX\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeStdGrid.2=\u30e1\u30c3\u30b7\u30e5\u306e\u6700\u5c0fY\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeStdGrid.3=\u30e1\u30c3\u30b7\u30e5\u306e\u6700\u5927X\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeStdGrid.4=\u30e1\u30c3\u30b7\u30e5\u306e\u6700\u5927Y\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeStdGrid.5=\u30e1\u30c3\u30b7\u30e5\u306e\u30e9\u30d9\u30eb\u5bf8\u6cd5\u3092\u8a2d\u5b9a ShapeStdGrid.6=\u30e1\u30c3\u30b7\u30e5\u539f\u70b9\u306eX\u5ea7\u6a19\u3092\u8a2d\u5b9a ShapeStdGrid.7=\u30e1\u30c3\u30b7\u30e5\u539f\u70b9\u306eY\u5ea7\u6a19\u3092\u8a2d\u5b9a TextCust.1=\u30d1\u30c3\u30b1\u30fc\u30b8: TextCust.2=\u6587\u5b57\u5217\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u306e\u306b\u4f7f\u3046LaTeX\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5165\u529b\u3057\u307e\u3059\u3002 TextCust.3=\u914d\u7f6e\u70b9\u3092\u5de6\u4e0b\u306b\u3059\u308b TextCust.4=\u914d\u7f6e\u70b9\u3092\u4e2d\u592e\u4e0b\u306b\u3059\u308b TextCust.5=\u914d\u7f6e\u70b9\u3092\u53f3\u4e0b\u306b\u3059\u308b TextCust.6=\u914d\u7f6e\u70b9\u3092\u5de6\u4e0a\u306b\u3059\u308b TextCust.7=\u914d\u7f6e\u70b9\u3092\u4e2d\u592e\u4e0a\u306b\u3059\u308b TextCust.8=\u914d\u7f6e\u70b9\u3092\u53f3\u4e0a\u306b\u3059\u308b TextCust.9=\u914d\u7f6e\u70b9\u3092\u4e2d\u5fc3\u306b\u3059\u308b TextCust.10=\u914d\u7f6e\u70b9\u3092\u5de6\u4e2d\u592e\u306b\u3059\u308b TextCust.11=\u914d\u7f6e\u70b9\u3092\u53f3\u4e2d\u592e\u306b\u3059\u308b MenuBuilder.1=\u5358\u4f4d PropBuilder.1=\u624b\u66f8\u304d\u63cf\u753b\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.2=\u30e1\u30c3\u30b7\u30e5\u30e9\u30d9\u30eb\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.3=\u8ef8\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.4=\u30e1\u30c3\u30b7\u30e5\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.5=\u30e1\u30c3\u30b7\u30e5\u3068\u8ef8\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.6=\u6b21\u5143\u3068\u4f4d\u7f6e\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.7=\u6587\u5b57\u5217\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.8=\u6587\u5b57\u5217\u4f4d\u7f6e\u306e\u7279\u6027\u3092\u5909\u66f4\u3059\u308b PropBuilder.9=\u5186\u5f27\u3092\u8a2d\u5b9a\u3059\u308b PropBuilder.10=\u70b9\u3092\u8abf\u6574\u3059\u308b PropBuilder.11=\u77e2\u5370\u3092\u8abf\u6574\u3059\u308b PropBuilder.12=\u5857\u308a\u3064\u3076\u3057\u7279\u6027\u3092\u4fee\u6b63\u3059\u308b PropBuilder.13=\u9670\u5f71\u7279\u6027\u3092\u4fee\u6b63\u3059\u308b PropBuilder.14=\u4e8c\u91cd\u5883\u754c\u7dda\u7279\u6027\u3092\u4fee\u6b63\u3059\u308b PropBuilder.15=\u5883\u754c\u7dda\u7279\u6027\u3092\u4fee\u6b63\u3059\u308b ToolbarBuilder.1=\u56f3\u9762\u7279\u6027\u3092\u8abf\u6574\u3059\u308b ToolbarBuilder.2=\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3: ToolbarBuilder.3=\u30e9\u30d9\u30eb: UIBuilder.1=\u56f3\u9762 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/dialogFrames.properties000066400000000000000000000063771321075051700334210ustar00rootroot00000000000000PreferencesFrame.Pref=\u8a2d\u5b9a... PreferencesFrame.grid=\u57fa\u6e96\u30e1\u30c3\u30b7\u30e5 PreferencesFrame.codePanel=\u30b3\u30fc\u30c9\u30d1\u30cd\u30eb PreferencesFrame.antiAl=\u30a2\u30f3\u30c1\u30a8\u30a4\u30ea\u30a2\u30b9 PreferencesFrame.rendQ=\u9ad8\u7cbe\u5ea6\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0 PreferencesFrame.colRendQ=\u9ad8\u7cbe\u5ea6\u8272\u5f69\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0 PreferencesFrame.AlphaQ=\u9ad8\u7cbe\u5ea6\u30a2\u30eb\u30d5\u30a1\u88dc\u9593 PreferencesFrame.newVers=\u8d77\u52d5\u6642\u306b\u65b0\u7248\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b PreferencesFrame.lge=\u8a00\u8a9e(\u518d\u8d77\u52d5\u304c\u5fc5\u8981) PreferencesFrame.general=\u5168\u822c PreferencesFrame.folders=\u30d5\u30a9\u30eb\u30c0 PreferencesFrame.quality=\u7cbe\u5ea6 PreferencesFrame.selectFolder=\u30d5\u30a9\u30eb\u30c0\u306e\u9078\u629e PreferencesFrame.defOpenSave=\u958b\u304f\u30fb\u4fdd\u5b58\u64cd\u4f5c\u306e\u65e2\u5b9a\u30d5\u30a9\u30eb\u30c0: PreferencesFrame.defFold=\u8aad\u307f\u8fbc\u307f\u30fb\u66f8\u304d\u51fa\u3057\u64cd\u4f5c\u306e\u65e2\u5b9a\u30d5\u30a9\u30eb\u30c0: AbstractParametersFrame.0=\u4e8c\u91cd\u5883\u754c\u7dda AbstractParametersFrame.2=\u9593\u9694: AbstractParametersFrame.4=OK AbstractParametersFrame.6=\u4e2d\u6b62 AbstractParametersFrame.7=\u56de\u8ee2\u89d2: AbstractParametersFrame.11=\u30cf\u30c3\u30c1\u30f3\u30b0\u5e45: AbstractParametersFrame.20=\u70b9\u76f4\u5f84\uff1d AbstractParametersFrame.21=\u6a2a\u68d2\u306e\u5e45\uff1d AbstractParametersFrame.22=\u62ec\u5f27\u306e\u6df1\u3055\uff1d AbstractParametersFrame.23=\u4e38\u62ec\u5f27\u306e\u6df1\u3055\uff1d AbstractParametersFrame.24=\u00d7\u592a\u3055\uff0b AbstractParametersFrame.26=\u77e2\u306e\u9577\u3055 AbstractParametersFrame.27=\u77e2\u306e\u5207\u308a\u8fbc\u307f AbstractParametersFrame.28=\u77e2\u306e\u5e45 ParametersArcFrame.0=\u958b\u59cb\u89d2: ParametersArcFrame.1=\u7d42\u4e86\u89d2: ParametersGridFrame.0=Y \u539f\u70b9: ParametersGridFrame.1=X \u539f\u70b9: ParametersGridFrame.4=\u7d30\u30e1\u30c3\u30b7\u30e5\u70b9: ParametersGridFrame.5=\u30e1\u30c3\u30b7\u30e5\u70b9: ParametersGridFrame.6=\u30e1\u30c3\u30b7\u30e5\u5e45: ParametersGridFrame.7=\u7d30\u30e1\u30c3\u30b7\u30e5\u5e45: ParametersGridFrame.8=\u7d30\u30e1\u30c3\u30b7\u30e5\u5206\u5272\u6570: ParametersGridFrame.9=\u30e9\u30d9\u30eb\u5bf8\u6cd5: ParametersGridFrame.11=X \u6700\u5927\u5024: ParametersGridFrame.12=X \u6700\u5c0f\u5024: ParametersGridFrame.13=Y \u6700\u5927\u5024: ParametersGridFrame.14=Y \u6700\u5c0f\u5024: ExportDialog.0=\u5727\u7e2e Filter.1=\u753b\u50cf SVG.1=\u56f3\u9762\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002 Exporter.1=\u56f3\u9762\u306e\u66f8\u304d\u51fa\u3057 Exporter.2=EPS (LaTeX)\u753b\u50cf Exporter.3=PDF (LaTeX)\u753b\u50cf Exporter.4=PDF (LaTeX+PDFCrop)\u753b\u50cf About.1=\u30b7\u30b9\u30c6\u30e0 About.2=\u8ca2\u732e\u3057\u305f\u4eba\u305f\u3061 Pref.1=\u6b21\u306e\u65b0\u898f\u56f3\u9762\u304b\u3089\u9069\u7528\u3055\u308c\u307e\u3059 Pref.2=LaTeX\u30b3\u30f3\u30d1\u30a4\u30eb\u4e2d\u306b\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8: Res.1=LaTeXDraw\u306b\u3064\u3044\u3066 Res.2=\u65b0\u898f\u56f3\u9762 Res.3=\u81ea\u5df1\u5b9a\u7fa9\u30e1\u30c3\u30b7\u30e5 Version.1=\u65b0\u3057\u3044\u7248\u304c\u3042\u308a\u307e\u3059: latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ja/others.properties000066400000000000000000000011161321075051700323120ustar00rootroot00000000000000XScale.cm=\u30bb\u30f3\u30c1 XScale.inch=\u30a4\u30f3\u30c1 Arc.arc=\u5f27 Arc.wedge=\u304f\u3055\u3073 Arc.chord=\u5f26 DrawContainer.nameTemplate=\u3072\u306a\u578b\u540d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044 DrawContainer.overwriteTemplate=\u3053\u306e\u3072\u306a\u578b\u306f\u65e2\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002\u4e0a\u66f8\u304d\u3057\u307e\u3059\u304b\uff1f CloseButton.closePanel=\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u9589\u3058\u308b UndoRedoManager.create=\u4f5c\u6210 UndoRedoManager.join=\u7d50\u5408 UndoRedoManager.seperate=\u5206\u96e2 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/000077500000000000000000000000001321075051700267125ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/1_6.properties000066400000000000000000000012261321075051700314160ustar00rootroot00000000000000LaTeXDrawFrame.0=Wstaw kod PSTricks LaTeXDrawFrame.1=Wstaw obraz LaTeXDrawFrame.3=zatrzymaj LaTeXDrawFrame.6=Obraz BMP LaTeXDrawFrame.7=Obraz PNG LaTeXDrawFrame.10=Wstaw LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Nie znaleziono figury do importu! LaTeXDrawFrame.34=Import pliku PSTricks niemo\u017cliwy! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Wstaw figury z kodu PSTricks Picture.0=% Ostrze\u017cenie: \u015bcie\u017cka do obrazu zawiera spacje i nie zostanie przetworzona przez tex! ParserMessagesFrame.0=Polecenie latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/1_7.properties000066400000000000000000000006471321075051700314250ustar00rootroot00000000000000LaTeXDrawFrame.0=Cie\u0144 LaTeXDrawFrame.1=Gradient 1 LaTeXDrawFrame.2=Gradient 2 LaTeXDrawFrame.4=Dodaj cie\u0144 do figury LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Pozycje figur na rysunku LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=K\u0105t gradientu AbstractParametersFrame.4=Punkt \u015brodkowy latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/1_8.properties000066400000000000000000000030471321075051700314230ustar00rootroot00000000000000AbstractParametersFrame.0=odst\u0119p: ParametersAxeFrame.0=Figura: ParametersAxeFrame.1=Poka\u017c pocz\u0105tek 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.13=Wielko\u015b\u0107: 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.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.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.17=Rysuj osie. LaTeXDrawFrame.23=Zamknij LaTeXDrawFrame.27=Informacja o wydaniu LaTeXDrawFrame.28=License Axe.1=O\u015b Axe.2=Ramka Axe.3=Pe\u0142ny Axe.4=G\u00f3ra Axe.5=D\u00f3\u0142 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/1_9.properties000066400000000000000000000044151321075051700314240ustar00rootroot00000000000000LaTeXDrawFrame.0=Ostatnio otwierane pliki LaTeXDrawFrame.3=Skr\u00f3ty LaTeXDrawFrame.11=Rysuj zamkni\u0119t\u0105 krzyw\u0105 B\u00e9ziera DrawPanel.0=Uaktualnij figury do siatki ParametersAkinPointsFrame.0=Odst\u0119py punkt\u00f3w: ParametersAkinPointsFrame.1=Otw\u00f3rz ParametersAkinPointsFrame.2=typ: 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.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.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.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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/LaTeXDrawFrame.properties000066400000000000000000000107501321075051700336010ustar00rootroot00000000000000LaTeXDrawFrame.0=\ pomoc LaTeXDrawFrame.7=Linia odr\u0119czna LaTeXDrawFrame.16=Eksport jako... LaTeXDrawFrame.17=Usu\u0144 figur\u0119 LaTeXDrawFrame.18=Wyjd\u017a LaTeXDrawFrame.19=Kod PSTricks LaTeXDrawFrame.20=Obraz JPEG LaTeXDrawFrame.22=Powt\u00f3rz LaTeXDrawFrame.23=Cofnij 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.48=Wn\u0119trze LaTeXDrawFrame.49=Kreskowanie LaTeXDrawFrame.56=Ustawienia LaTeXDrawFrame.57=Powi\u0119ksz LaTeXDrawFrame.58=Pomniejsz LaTeXDrawFrame.60=Dodaj tekst LaTeXDrawFrame.65=Zmie\u0144 grubo\u015b\u0107 figury LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Przesu\u0144 figur\u0119 na pierwszy plan LaTeXDrawFrame.71=Przesu\u0144 figur\u0119 w t\u0142o 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=Change to color of the space between the double borders LaTeXDrawFrame.88=Plik LaTeXDrawFrame.89=Edycja LaTeXDrawFrame.90=Opcje widoku LaTeXDrawFrame.91=Rysuj LaTeXDrawFrame.93=Pomoc LaTeXDrawFrame.103=Szablony LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Rysuj punkt 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=Wybierz jedn\u0105 lub wi\u0119cej figur
    LaTeXDrawFrame.137=Rada : aby wybra\u0107 wi\u0119cej LaTeXDrawFrame.138=figur, kliknij
    i przeci\u0105gnij mysz na figury, kt\u00f3re chcesz wybra\u0107 LaTeXDrawFrame.139=Usu\u0144 wybrane figury LaTeXDrawFrame.146=Skopiowano... LaTeXDrawFrame.147=Wklejono... LaTeXDrawFrame.148=Wyci\u0119to... LaTeXDrawFrame.149=Usuni\u0119to... LaTeXDrawFrame.154=Zgrupowano... LaTeXDrawFrame.155=Rozdzielono... LaTeXDrawFrame.169=Szablon wyeksportowano! LaTeXDrawFrame.171=Wybierz LaTeXDrawFrame.173=Czy chcesz zast\u0105pi\u0107 plik? LaTeXDrawFrame.175=Kod PSTricks wyeksportowano! LaTeXDrawFrame.176=Eksport kodu PSTricks niemo\u017cliwy! LaTeXDrawFrame.184=Eksport obrazu uko\u0144czono! LaTeXDrawFrame.185=Eksport obrazu niemo\u017cliwy! LaTeXDrawFrame.188=Zapisz rysunek LaTeXDrawFrame.200=Otw\u00f3rz rysunek LaTeXDrawFrame.219=Wersja LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ jest rozpowszechniany na licencji GNU General Public License 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.2=Wyr\u00f3wnaj do lewej wybrane figury. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/actions.properties000066400000000000000000000073371321075051700325020ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/dialogFrames.properties000066400000000000000000000046551321075051700334370ustar00rootroot00000000000000PreferencesFrame.Pref=Ustawienia... PreferencesFrame.grid=Siatka PreferencesFrame.codePanel=Kod PreferencesFrame.antiAl=Wyg\u0142adzanie kraw\u0119dzi PreferencesFrame.rendQ=Jako\u015b\u0107 renderingu PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Jako\u015b\u0107 interpolacji Alpha 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 katalog PreferencesFrame.defOpenSave=Domy\u015blny folder dla operacji otw\u00f3rz/zapisz PreferencesFrame.defFold=Domy\u015blny folder dla operacji importuj/eksportuj AbstractParametersFrame.0=Podw\u00f3jne kraw\u0119dzie AbstractParametersFrame.2=Separator: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Anuluj AbstractParametersFrame.7=K\u0105t obrotu: AbstractParametersFrame.11=Szeroko\u015b\u0107 kreskowania: 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.26=D\u0142ugo\u015b\u0107 strza\u0142ki AbstractParametersFrame.27=Wstawki strza\u0142ki AbstractParametersFrame.28=Szeroko\u015b\u0107 strza\u0142ki ParametersArcFrame.0=k\u0105t pocz\u0105tkowy: ParametersArcFrame.1=k\u0105t ko\u0144cowy: ParametersGridFrame.0=Y Pocz\u0105tek ParametersGridFrame.1=X Pocz\u0105tek 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: ParametersGridFrame.11=X max: ParametersGridFrame.12=X min: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y min: ExportDialog.0=Kompresja Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pl/others.properties000066400000000000000000000005571321075051700323430ustar00rootroot00000000000000XScale.cm=cm XScale.inch=cal Arc.arc=\u0141uk Arc.wedge=Wycinek ko\u0142a Arc.chord=Odcinek ko\u0142a DrawContainer.nameTemplate=Podaj nazw\u0119 szablonu DrawContainer.overwriteTemplate=Szablon istnieje, nadpisa\u0107? CloseButton.closePanel=Close the window UndoRedoManager.create=Utw\u00f3rz UndoRedoManager.join=Po\u0142\u0105cz UndoRedoManager.seperate=Rozdziel latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/000077500000000000000000000000001321075051700272235ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/1_6.properties000066400000000000000000000013401321075051700317240ustar00rootroot00000000000000LaTeXDrawFrame.0=Inserir c\u00f3digo PSTricks LaTeXDrawFrame.1=Inserir uma gravura LaTeXDrawFrame.3=parar LaTeXDrawFrame.6=Imagem BMP LaTeXDrawFrame.7=Imagem PNG LaTeXDrawFrame.10=Inserir LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Nenhuma ilustra\u00e7\u00e3o foi encontrada para importar! LaTeXDrawFrame.34=Incapaz de importar o arquivo PSTricks! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Inserir figuras no c\u00f3digo PSTricks Picture.0=% Aten\u00e7\u00e3o: o caminho que indica \u00e0 gravura cont\u00e9m espa\u00e7os e n\u00e3o ser\u00e1 compilado pelo tex! ParserMessagesFrame.0=Comando latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/1_7.properties000066400000000000000000000007301321075051700317270ustar00rootroot00000000000000LaTeXDrawFrame.0=Sombra LaTeXDrawFrame.1=Gradiente 1 LaTeXDrawFrame.2=Gradiente 2 LaTeXDrawFrame.4=Adicionar uma sombra para a gravura. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Posicionar gravuras dentro do desenho (na frente de, atr\u00e1s,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=\u00c2ngulo do gradiente AbstractParametersFrame.4=Meio Pt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/1_8.properties000066400000000000000000000027221321075051700317330ustar00rootroot00000000000000AbstractParametersFrame.0=intervalo: ParametersAxeFrame.0=Forma: ParametersAxeFrame.1=Mostrar origem ParametersAxeFrame.6=Dist\u00e2ncia do r\u00f3tulo-X ParametersAxeFrame.7=Dist\u00e2ncia do r\u00f3tulo-Y ParametersAxeFrame.8=Incremento do r\u00f3tulo-X ParametersAxeFrame.9=Incremento do r\u00f3tulo-Y ParametersAxeFrame.13=Tamanho: ParametersAxeFrame.17=Marcas PreferencesFrame.3=Caminho do seu editor LaTeX: PreferencesFrame.4=Grade padr\u00e3o PreferencesFrame.5=Grade personalizada PreferencesFrame.6=Grade magn\u00e9tica PreferencesFrame.7=Intervalo: LaTeXDrawFrame.2=Rotacionar a(s) gravura(s) selecionada(s).. LaTeXDrawFrame.3=Rotacionar a(s) gravura(s) selecionada(s) em 90\u00ba. LaTeXDrawFrame.4=Rotacionar a(s) gravura(s) selecionada(s) em 180\u00ba. LaTeXDrawFrame.5=Rotacionar a(s) gravura(s) selecionada(s) em 270\u00ba. LaTeXDrawFrame.6=Inverter gravuras por simetria. LaTeXDrawFrame.7=Inverter horizontalmente as gravuras selecionadas. LaTeXDrawFrame.8=Inverter verticalmente as gravuras selecionadas. LaTeXDrawFrame.12=Cont\u00e9m os par\u00e2metro da grade (magn\u00e9tica) LaTeXDrawFrame.13=magn\u00e9tico LaTeXDrawFrame.14=Se selecionado, a gravura ir\u00e1 ser magn\u00e9tica na grade. LaTeXDrawFrame.15=Define o intervalo entre as linhas da grade personalizada (em pixels). LaTeXDrawFrame.17=Desenhar eixos. LaTeXDrawFrame.23=Fechar LaTeXDrawFrame.27=Nota de lan\u00e7amento LaTeXDrawFrame.28=License Axe.1=Machado Axe.2=Quadro Axe.3=Completo Axe.4=Topo Axe.5=Base latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/1_9.properties000066400000000000000000000044771321075051700317450ustar00rootroot00000000000000LaTeXDrawFrame.0=Arquivos recentes LaTeXDrawFrame.3=Atalhos LaTeXDrawFrame.11=Desenhar uma curva de B\u00e9zier fechada DrawPanel.0=Atualizar figuras na grade ParametersAkinPointsFrame.0=Intervalo em pontos: ParametersAkinPointsFrame.1=Abrir ParametersAkinPointsFrame.2=tipo: PreferencesFrame.0=N\u00famero de arquivos recentes: PreferencesFrame.1=Tema (necess\u00e1rio reiniciar) ShortcutsFrame.1=Seq\u00fc\u00eancia ShortcutsFrame.3=Categoria ShortcutsFrame.4=Navega\u00e7\u00e3o ShortcutsFrame.5=Transforma\u00e7\u00e3o ShortcutsFrame.6=Desenho ShortcutsFrame.8=bot\u00e3o esquerdo ShortcutsFrame.9=Mova a barra de rolagem horizontal para a direita ShortcutsFrame.10=Mova a barra de rolagem horizontal para a esquerda ShortcutsFrame.11=Mova a barra de rolagem vertical para cima ShortcutsFrame.12=Mova a barra de rolagem vertical para baixo ShortcutsFrame.18=Mova as figuras selecionadas para a direita ShortcutsFrame.19=Mova as figuras selecionadas para a esquerda ShortcutsFrame.20=Mova as figuras selecionadas para cima ShortcutsFrame.21=Mova as figuras selecionadas para baixo ShortcutsFrame.23=Atualizar as figuras selecionadas na grade exibida ShortcutsFrame.25=Selecionar todas as figuras do desenho ShortcutsFrame.26=Adicionar a figura clicada \u00e0 sele\u00e7\u00e3o ShortcutsFrame.27=Remover a figura clicada da sele\u00e7\u00e3o ShortcutsFrame.29=Roda do Mouse ShortcutsFrame.30=Aproximar/Afastar Zoom MenusListener.0=Pressione o bot\u00e3o esquerdo e arraste o mouse para determinar o local do segundo ponto. Solte o bot\u00e3o para terminar a cria\u00e7\u00e3o. MenusListener.1=Um clique com o bot\u00e3o esquerdo para adicionar um ponto, um clique com o bot\u00e3o direito ou duplo clique com o esquerdo para colocar o \u00faltimo ponto e finalizar a cria\u00e7\u00e3o. MenusListener.4=Pressione o bot\u00e3o esquerdo e arrate o mouse para colocar o \u00faltimo ponto. Solte o bot\u00e3o para terminar a cria\u00e7\u00e3o. MenusListener.5=Um clique com o bot\u00e3o esquerdo adiciona o texto. MenusListener.6=Um clique com o bot\u00e3o esquerdo adiciona a grade. MenusListener.7=Um clique com o bot\u00e3o esquerdo adiciona os eixos. MenusListener.8=Pressione o bot\u00e3o esquerdo e arraste o mouse para desenhar a forma. Solte o bot\u00e3o para finalizar a cria\u00e7\u00e3o. MenusListener.9=Um clique com o bot\u00e3o esquerdo adiciona um ponto. LaTeXDrawFrame.properties000066400000000000000000000104721321075051700340340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BRLaTeXDrawFrame.0=\ ajuda LaTeXDrawFrame.7=M\u00e3o livre LaTeXDrawFrame.16=Exportar como... LaTeXDrawFrame.17=Deletar Gravura LaTeXDrawFrame.18=Sair LaTeXDrawFrame.19=C\u00f3digo PSTricks LaTeXDrawFrame.20=Imagem JPEG LaTeXDrawFrame.22=Refazer LaTeXDrawFrame.23=Desfazer LaTeXDrawFrame.38=Escala X LaTeXDrawFrame.39=Escala Y LaTeXDrawFrame.40=Copiar LaTeXDrawFrame.41=Atualizar modelos LaTeXDrawFrame.42=Exportar como modelo LaTeXDrawFrame.43=Colar LaTeXDrawFrame.44=Recortar LaTeXDrawFrame.48=Interior LaTeXDrawFrame.49=Tra\u00e7os Finos LaTeXDrawFrame.56=Prefer\u00eancias LaTeXDrawFrame.57=Mais zoom LaTeXDrawFrame.58=Menos zoom LaTeXDrawFrame.60=Adicionar texto LaTeXDrawFrame.65=Mudar a espessura da gravura LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Colocar a gravura em primeiro plano LaTeXDrawFrame.71=Colocar a gravura em plano de fundo LaTeXDrawFrame.75=Agrupar v\u00e1rias gravuras LaTeXDrawFrame.76=Separa v\u00e1rias gravuras LaTeXDrawFrame.77=Definir a posi\u00e7\u00e3o das bordas da gravura LaTeXDrawFrame.78=Se selecionado, a gravura ter\u00e1 duas bordas LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=Arquivo LaTeXDrawFrame.89=Editar LaTeXDrawFrame.90=Exibi\u00e7\u00e3o LaTeXDrawFrame.91=Desenhar LaTeXDrawFrame.93=Ajuda LaTeXDrawFrame.103=Modelos LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=Desenhar um ponto LaTeXDrawFrame.119=Desenhar um ret\u00e2ngulo LaTeXDrawFrame.120=Desenhar um quadrado LaTeXDrawFrame.121=Desenhar um pol\u00edgono LaTeXDrawFrame.123=Desenhar um losango LaTeXDrawFrame.124=Desenhar um tri\u00e3ngulo LaTeXDrawFrame.125=Desenhar uma elipse LaTeXDrawFrame.127=Desenhar um c\u00edrculo LaTeXDrawFrame.128=Desenhar um arco LaTeXDrawFrame.130=Desenhar uma fatia LaTeXDrawFrame.131=Desenhar uma corda LaTeXDrawFrame.132=Desenhar uma curva B\u00e9zier LaTeXDrawFrame.133=Desenhar um grade LaTeXDrawFrame.136=Selecione uma ou v\u00e1rias gravuras
    LaTeXDrawFrame.137=Parte do aviso : para selecionar v\u00e1rias LaTeXDrawFrame.138=gravuras, click e
    arraste o mouse at\u00e9 as gravuras que quiser LaTeXDrawFrame.139=Deletar gravura(s) selecionada(s) LaTeXDrawFrame.146=Copiando... LaTeXDrawFrame.147=Colando... LaTeXDrawFrame.148=Recortando... LaTeXDrawFrame.149=Deletando... LaTeXDrawFrame.154=Agrupando... LaTeXDrawFrame.155=Separando... LaTeXDrawFrame.169=Modelo exportado! LaTeXDrawFrame.171=Selecionar LaTeXDrawFrame.173=Deseja substituir o arquivo? LaTeXDrawFrame.175=C\u00f3digo PSTricks exportado! LaTeXDrawFrame.176=Incapaz de exportar c\u00f3digo PSTricks! LaTeXDrawFrame.184=Exporta\u00e7\u00e3o como gravura terminado! LaTeXDrawFrame.185=Incapaz de exportar como gravura! LaTeXDrawFrame.188=Salvar desenho LaTeXDrawFrame.200=Abrir um desenho LaTeXDrawFrame.219=Vers\u00e3o LaTeXDrawFrame.220=, construir LaTeXDrawFrame.221=\ \u00e9 distribu\u00eddo sob os termos da Licen\u00e7a P\u00fablica Geral GNU LFrame2.1=Alinhas as gravuras selecionadas. LFrame2.10=Distribuir verticalmente, distanciando igualmente entre as gravuras selecionadas. LFrame2.11=Distribuir verticalmente, distanciando igualmente entre o meio das gravuras selecionadas. LFrame2.12=Distribuir verticalmente, distanciando igualmente entre o topo das gravuras selecionadas. LFrame2.13=Distribuir horizontalmente, distanciando igualmente entre o lado esquerdo das gravuras selecionadas. LFrame2.14=Distribuir horizontalmente, distanciando igualmente entre as bases das gravuras selecionadas. LFrame2.15=Distribuir horizontalmente, distanciando igualmente entre o meio das gravuras selecionadas. LFrame2.16=Distribuir horizontalmente, distanciando igualmente entre o lado direito das gravuras selecionadas. LFrame2.2=Alinhar \u00e0 esquerda as gravuras selecionadas. LFrame2.3=Alinhar \u00e0 direita as gravuras selecionadas. LFrame2.4=Alinhar no topo as gravuras selecionadas. LFrame2.5=Alinhar na base as gravuras selecionadas. LFrame2.6=Alinhar horizontalmente no meio as gravuras selecionadas. LFrame2.7=Alinhar verticalmente no meio as gravuras selecionadas. LFrame2.8=Distribuir em distancias iguais as gravuras selecionadas. LFrame2.9=Distribuir verticalmente, distanciando igualmente entre os lados da base das gravuras selecionadas. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/actions.properties000066400000000000000000000073371321075051700330130ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=DrawingdialogFrames.properties000066400000000000000000000044771321075051700336730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BRPreferencesFrame.Pref=Prefer\u00eancias... PreferencesFrame.grid=Grade PreferencesFrame.codePanel=Painel de c\u00f3digo PreferencesFrame.antiAl=Anti-aliasing PreferencesFrame.rendQ=Qualidade de renderiza\u00e7\u00e3o PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Qualidade da interpola\u00e7\u00e3o alfa PreferencesFrame.newVers=Verificar nova vers\u00e3o ao iniciar PreferencesFrame.lge=Idioma (precisa reiniciar) PreferencesFrame.general=Geral PreferencesFrame.folders=Pastas PreferencesFrame.quality=Qualidade PreferencesFrame.selectFolder=Selecione uma pasta PreferencesFrame.defOpenSave=Pasta padr\u00e3o para abrir/salvar a\u00e7\u00f5es; PreferencesFrame.defFold=Pasta padr\u00e3o para importar/exportar a\u00e7\u00f5es: AbstractParametersFrame.0=Divis\u00e3o dupla AbstractParametersFrame.2=Separador: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=Cancelar AbstractParametersFrame.7=\u00c2ngulo de rota\u00e7\u00e3o: AbstractParametersFrame.11=Largura das eclos\u00f5es: AbstractParametersFrame.20=Di\u00e2metro do ponto = AbstractParametersFrame.21=Largura da barra = AbstractParametersFrame.22=Comprimento do suporte = AbstractParametersFrame.23=Comprimento arredondado do suporte = AbstractParametersFrame.24=+ espessura x AbstractParametersFrame.26=Largura da seta AbstractParametersFrame.27=Interior da seta AbstractParametersFrame.28=Largura da seta ParametersArcFrame.0=\u00e2ngulo inicial: ParametersArcFrame.1=\u00e2ngulo final: ParametersGridFrame.0=Origem Y: ParametersGridFrame.1=Origem X: ParametersGridFrame.4=Pontos da sub-grade: ParametersGridFrame.5=Pontos da grade: ParametersGridFrame.6=Largura da grade: ParametersGridFrame.7=Largura da sub-grade: ParametersGridFrame.8=Divis\u00e3o da sub-grade: ParametersGridFrame.9=Largura do r\u00f3tulo: ParametersGridFrame.11=X m\u00e1x: ParametersGridFrame.12=X m\u00edn: ParametersGridFrame.13=Y max: ParametersGridFrame.14=Y m\u00edn: ExportDialog.0=Compress\u00e3o Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/pt-BR/others.properties000066400000000000000000000005171321075051700326500ustar00rootroot00000000000000XScale.cm=cm XScale.inch=polegadas Arc.arc=Arco Arc.wedge=Fatia Arc.chord=Corda DrawContainer.nameTemplate=Digite o nome do modelo DrawContainer.overwriteTemplate=Este modelo j\u00e1 existe; substitui-lo? CloseButton.closePanel=Close the window UndoRedoManager.create=Criar UndoRedoManager.join=Juntar UndoRedoManager.seperate=Separar latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/000077500000000000000000000000001321075051700267255ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/1_6.properties000066400000000000000000000022141321075051700314270ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 PSTricks LaTeXDrawFrame.1=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 LaTeXDrawFrame.3=\u0441\u0442\u043e\u043f LaTeXDrawFrame.6=\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 BMP LaTeXDrawFrame.7=\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 PNG LaTeXDrawFrame.10=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0444\u0438\u0433\u0443\u0440\u044b \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430! LaTeXDrawFrame.34=Not able to import the PSTricks file! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Insert figures from PSTricks code Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex! ParserMessagesFrame.0=Command latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/1_7.properties000066400000000000000000000016651321075051700314410ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0422\u0435\u043d\u044c LaTeXDrawFrame.1=\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442 1 LaTeXDrawFrame.2=\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442 2 LaTeXDrawFrame.4=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043d\u044c \u043a \u0444\u0438\u0433\u0443\u0440\u0435. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 (\u0432\u043f\u0435\u0440\u0435\u0434\u0438, \u043f\u043e\u0437\u0430\u0434\u0438,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=\u0423\u0433\u043e\u043b \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 AbstractParametersFrame.4=\u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0442\u043e\u0447\u043a\u0430 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/1_8.properties000066400000000000000000000067101321075051700314360ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=Shape: ParametersAxeFrame.1=Show origin ParametersAxeFrame.6=X-labels distance: ParametersAxeFrame.7=Y-labels distance: ParametersAxeFrame.8=X-labels increment: ParametersAxeFrame.9=Y-labels increment: ParametersAxeFrame.13=Size: ParametersAxeFrame.17=Ticks PreferencesFrame.3=\u041f\u0443\u0442\u044c \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 LaTeX: PreferencesFrame.4=\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0435\u0442\u043a\u0430 PreferencesFrame.5=\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u043a\u0430 PreferencesFrame.6=\u041c\u0430\u0433\u043d\u0438\u0442\u043d\u0430\u044f \u0441\u0435\u0442\u043a\u0430 PreferencesFrame.7=Interval: LaTeXDrawFrame.2=\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b. LaTeXDrawFrame.3=\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043d\u0430 90\u00b0. LaTeXDrawFrame.4=\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043d\u0430 180\u00b0. LaTeXDrawFrame.5=\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043d\u0430 270\u00b0. LaTeXDrawFrame.6=\u041f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b. LaTeXDrawFrame.7=\u041f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438. LaTeXDrawFrame.8=\u041f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438. LaTeXDrawFrame.12=\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0439) \u0441\u0435\u0442\u043a\u0438 LaTeXDrawFrame.13=\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u0430\u044f LaTeXDrawFrame.14=\u0415\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0444\u0438\u0433\u0443\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u00ab\u043f\u0440\u0438\u043c\u0430\u0433\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f\u00bb \u043a \u043b\u0438\u043d\u0438\u044f\u043c \u0441\u0435\u0442\u043a\u0438. LaTeXDrawFrame.15=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u0438 (\u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0430\u0445). LaTeXDrawFrame.17=Draw axes. LaTeXDrawFrame.23=\u0417\u0430\u043a\u0440\u044b\u0442\u044c LaTeXDrawFrame.27=\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a \u0432\u044b\u043f\u0443\u0441\u043a\u0443 LaTeXDrawFrame.28=License Axe.1=Axe Axe.2=Frame Axe.3=Full Axe.4=Top Axe.5=Bottom latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/1_9.properties000066400000000000000000000162261321075051700314420ustar00rootroot00000000000000LaTeXDrawFrame.0=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b LaTeXDrawFrame.3=\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448 LaTeXDrawFrame.11=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u0443\u044e \u043a\u0440\u0438\u0432\u0443\u044e \u0411\u0435\u0437\u044c\u0435 DrawPanel.0=\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0441\u0435\u0442\u043a\u043e\u0439 ParametersAkinPointsFrame.0=\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u0447\u043a\u0430\u043c\u0438: ParametersAkinPointsFrame.1=\u041d\u0435 \u0437\u0430\u043c\u044b\u043a\u0430\u0442\u044c ParametersAkinPointsFrame.2=\u0442\u0438\u043f: PreferencesFrame.0=\u041f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432: PreferencesFrame.1=\u0422\u0435\u043c\u0430 (\u043d\u0443\u0436\u0435\u043d \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a): ShortcutsFrame.1=\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c ShortcutsFrame.3=\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f ShortcutsFrame.4=\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f ShortcutsFrame.5=\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ShortcutsFrame.6=\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 ShortcutsFrame.8=\u043b\u0435\u0432.\u0449\u0435\u043b\u0447\u043e\u043a ShortcutsFrame.9=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u043e\u0441\u0443 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u043f\u0440\u0430\u0432\u043e ShortcutsFrame.10=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u043e\u0441\u0443 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u043b\u0435\u0432\u043e ShortcutsFrame.11=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u043e\u0441\u0443 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u0432\u0435\u0440\u0445 ShortcutsFrame.12=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u043e\u0441\u0443 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u043d\u0438\u0437 ShortcutsFrame.18=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u043f\u0440\u0430\u0432\u043e ShortcutsFrame.19=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u043b\u0435\u0432\u043e ShortcutsFrame.20=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u0432\u0435\u0440\u0445 ShortcutsFrame.21=\u0414\u0432\u0438\u0433\u0430\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u043d\u0438\u0437 ShortcutsFrame.23=\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0441\u0435\u0442\u043a\u043e\u0439 ShortcutsFrame.25=\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0440\u0438\u0441\u0443\u043d\u043a\u0430 ShortcutsFrame.26=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 \u043a \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044e ShortcutsFrame.27=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 \u0438\u0437 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f ShortcutsFrame.29=\u041a\u043e\u043b\u0435\u0441\u043e \u043c\u044b\u0448\u0438 ShortcutsFrame.30=\u041c\u0430\u0441\u0448\u0442\u0430\u0431 MenusListener.0=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043b\u0435\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043c\u044b\u0448\u0438 \u0438 \u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c 2-\u044e \u0442\u043e\u0447\u043a\u0443. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f. MenusListener.1=\u041b\u0435\u0432\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443, \u043f\u0440\u0430\u0432\u0430\u044f \u0438\u043b\u0438 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0449\u0435\u043b\u0447\u043e\u043a \u2014 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c 2-\u044e \u0442\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c. MenusListener.4=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043b\u0435\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0442\u043e\u0447\u043a\u0443. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f. MenusListener.5=\u0429\u0435\u043b\u0447\u043e\u043a \u043b\u0435\u0432. \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0441\u0442. MenusListener.6=\u0429\u0435\u043b\u0447\u043e\u043a \u043b\u0435\u0432. \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0442\u043a\u0443. MenusListener.7=\u0429\u0435\u043b\u0447\u043e\u043a \u043b\u0435\u0432. \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u0438. MenusListener.8=\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043b\u0435\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f. MenusListener.9=\u0429\u0435\u043b\u0447\u043e\u043a \u043b\u0435\u0432. \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043a\u0443. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/LaTeXDrawFrame.properties000066400000000000000000000330121321075051700336100ustar00rootroot00000000000000LaTeXDrawFrame.0=\ \u0441\u043f\u0440\u0430\u0432\u043a\u0430 LaTeXDrawFrame.7=\u0420\u0438\u0441\u0443\u043d\u043e\u043a \u043e\u0442 \u0440\u0443\u043a\u0438 LaTeXDrawFrame.16=\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432... LaTeXDrawFrame.17=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 LaTeXDrawFrame.18=\u0412\u044b\u0445\u043e\u0434 LaTeXDrawFrame.19=\u041a\u043e\u0434 PSTricks LaTeXDrawFrame.20=\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 JPEG LaTeXDrawFrame.22=\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c LaTeXDrawFrame.23=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c LaTeXDrawFrame.38=\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0435\u0439\u043a\u0430 LaTeXDrawFrame.39=\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0435\u0439\u043a\u0430 LaTeXDrawFrame.40=\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c LaTeXDrawFrame.41=\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b LaTeXDrawFrame.42=\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d LaTeXDrawFrame.43=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c LaTeXDrawFrame.44=\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c LaTeXDrawFrame.48=\u0426\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438 LaTeXDrawFrame.49=\u0428\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0430 LaTeXDrawFrame.56=\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b LaTeXDrawFrame.57=\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 LaTeXDrawFrame.58=\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 LaTeXDrawFrame.60=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 LaTeXDrawFrame.65=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u0449\u0438\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u044b LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=\u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u043b\u0430\u043d LaTeXDrawFrame.71=\u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 \u043d\u0430 \u0437\u0430\u0434\u043d\u0438\u0439 \u043f\u043b\u0430\u043d LaTeXDrawFrame.75=\u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u0433\u0443\u0440 LaTeXDrawFrame.76=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b LaTeXDrawFrame.77=\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446 \u0444\u0438\u0433\u0443\u0440\u044b LaTeXDrawFrame.78=\u0415\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0444\u0438\u0433\u0443\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0443\u0440 LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=\u0424\u0430\u0439\u043b LaTeXDrawFrame.89=\u041f\u0440\u0430\u0432\u043a\u0430 LaTeXDrawFrame.90=\u0412\u0438\u0434 LaTeXDrawFrame.91=\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 LaTeXDrawFrame.93=\u0421\u043f\u0440\u0430\u0432\u043a\u0430 LaTeXDrawFrame.103=\u0428\u0430\u0431\u043b\u043e\u043d\u044b LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 LaTeXDrawFrame.119=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a LaTeXDrawFrame.120=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442 LaTeXDrawFrame.121=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a LaTeXDrawFrame.123=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u043c\u0431 LaTeXDrawFrame.124=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a LaTeXDrawFrame.125=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u043b\u0438\u043f\u0441 LaTeXDrawFrame.127=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0443\u0433 LaTeXDrawFrame.128=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0443\u0433\u0443 LaTeXDrawFrame.130=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u043a\u0442\u043e\u0440 LaTeXDrawFrame.131=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0433\u043c\u0435\u043d\u0442 LaTeXDrawFrame.132=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0438\u0432\u0443\u044e \u0411\u0435\u0437\u044c\u0435 LaTeXDrawFrame.133=\u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u043a\u0443 LaTeXDrawFrame.136=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u0433\u0443\u0440
    LaTeXDrawFrame.137=\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043e\u0432\u0435\u0442 : \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e LaTeXDrawFrame.138=\u0444\u0438\u0433\u0443\u0440, \u0449\u0451\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u044c\u044e \u0438
    \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0439\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b LaTeXDrawFrame.139=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b LaTeXDrawFrame.146=\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e... LaTeXDrawFrame.147=\u0412\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e... LaTeXDrawFrame.148=\u0412\u044b\u0440\u0435\u0437\u0430\u043d\u043e... LaTeXDrawFrame.149=\u0423\u0434\u0430\u043b\u0435\u043d\u043e... LaTeXDrawFrame.154=\u0421\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b... LaTeXDrawFrame.155=\u0420\u0430\u0437\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b... LaTeXDrawFrame.169=\u0428\u0430\u0431\u043b\u043e\u043d \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d! LaTeXDrawFrame.171=\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c LaTeXDrawFrame.173=\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b? LaTeXDrawFrame.175=\u041a\u043e\u0434 PSTricks \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d! LaTeXDrawFrame.176=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 PSTricks! LaTeXDrawFrame.184=\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043a\u0430\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d! LaTeXDrawFrame.185=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435! LaTeXDrawFrame.188=\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0438\u0441\u0443\u043d\u043e\u043a LaTeXDrawFrame.200=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0440\u0438\u0441\u0443\u043d\u043e\u043a LaTeXDrawFrame.219=\u0412\u0435\u0440\u0441\u0438\u044f LaTeXDrawFrame.220=, \u0441\u0431\u043e\u0440\u043a\u0430 LaTeXDrawFrame.221=\ \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 GNU General Public License, LFrame2.1=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b. LFrame2.10=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0438\u0433\u0443\u0440\u0430\u043c\u0438. LFrame2.11=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0442\u0440\u0430\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. LFrame2.12=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0445\u043d\u0438\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. LFrame2.13=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043b\u0435\u0432\u044b\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. LFrame2.14=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u0438\u0433\u0443\u0440\u0430\u043c\u0438. LFrame2.15=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0442\u0440\u0430\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. LFrame2.16=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0430\u0432\u044b\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. LFrame2.2=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e. LFrame2.3=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e. LFrame2.4=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e. LFrame2.5=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e. LFrame2.6=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443. LFrame2.7=\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443. LFrame2.8=\u0420\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u044b. LFrame2.9=\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u0436\u043d\u0438\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438 \u0444\u0438\u0433\u0443\u0440. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/actions.properties000066400000000000000000000073371321075051700325150ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/dialogFrames.properties000066400000000000000000000117411321075051700334440ustar00rootroot00000000000000PreferencesFrame.Pref=\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b... PreferencesFrame.grid=\u0421\u0435\u0442\u043a\u0430 PreferencesFrame.codePanel=\u041f\u0430\u043d\u0435\u043b\u044c \u043a\u043e\u0434\u0430 PreferencesFrame.antiAl=\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0443\u0440\u043d\u044b\u0445 \u043d\u0435\u0440\u043e\u0432\u043d\u043e\u0441\u0442\u0435\u0439 PreferencesFrame.rendQ=\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043b\u044c\u0444\u0430-\u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 PreferencesFrame.newVers=\u041f\u043e\u0438\u0441\u043a \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 PreferencesFrame.lge=\u042f\u0437\u044b\u043a (\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438) PreferencesFrame.general=\u041e\u0431\u0449\u0438\u0435 PreferencesFrame.folders=\u041f\u0430\u043f\u043a\u0438 PreferencesFrame.quality=\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e PreferencesFrame.selectFolder=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 PreferencesFrame.defOpenSave=\u041f\u0430\u043f\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f/\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f: PreferencesFrame.defFold=\u041f\u0430\u043f\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430/\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430: AbstractParametersFrame.0=\u0414\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0443\u0440 AbstractParametersFrame.2=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c AbstractParametersFrame.7=\u0423\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430: AbstractParametersFrame.11=\u0428\u0438\u0440\u0438\u043d\u0430 \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0438: AbstractParametersFrame.20=\u0414\u0438\u0430\u043c\u0435\u0442\u0440 \u0442\u043e\u0447\u043a\u0438 = AbstractParametersFrame.21=\u0428\u0438\u0440\u0438\u043d\u0430 \u0448\u0442\u0440\u0438\u0445\u0430 = AbstractParametersFrame.22=\u0414\u043b\u0438\u043d\u0430 \u043a\u0432\u0430\u0434\u0440. \u0441\u043a\u043e\u0431\u043a\u0438 = AbstractParametersFrame.23=\u0414\u043b\u0438\u043d\u0430 \u043a\u0440\u0443\u0433. \u0441\u043a\u043e\u0431\u043a\u0438 = AbstractParametersFrame.24=x \u0442\u043e\u043b\u0449\u0438\u043d\u0443 + AbstractParametersFrame.26=\u0414\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 AbstractParametersFrame.27=\u0412\u043e\u0433\u043d\u0443\u0442\u043e\u0441\u0442\u044c \u043d\u0430\u043a\u043e\u043d\u0435\u0447\u043d\u0438\u043a\u0430 AbstractParametersFrame.28=\u0428\u0438\u0440\u0438\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 ParametersArcFrame.0=\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0433\u043e\u043b: ParametersArcFrame.1=\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0443\u0433\u043e\u043b: ParametersGridFrame.0=\u041d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u043e\u0440\u0434. Y: ParametersGridFrame.1=\u041d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u043e\u0440\u0434. X: ParametersGridFrame.4=\u0422\u043e\u0447\u043a\u0438 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u0438: ParametersGridFrame.5=\u0422\u043e\u0447\u0435\u043a \u0441\u0435\u0442\u043a\u0438: ParametersGridFrame.6=\u0428\u0438\u0440\u0438\u043d\u0430 \u0441\u0435\u0442\u043a\u0438: ParametersGridFrame.7=\u0428\u0438\u0440\u0438\u043d\u0430 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u0438: ParametersGridFrame.8=\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u043a\u0438: ParametersGridFrame.9=\u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0434\u043f\u0438\u0441\u0438: ParametersGridFrame.11=X \u043c\u0430\u043a\u0441: ParametersGridFrame.12=X \u043c\u0438\u043d: ParametersGridFrame.13=Y \u043c\u0430\u043a\u0441: ParametersGridFrame.14=Y \u043c\u0438\u043d: ExportDialog.0=\u0421\u0436\u0430\u0442\u0438\u0435 Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/ru/others.properties000066400000000000000000000015121321075051700323460ustar00rootroot00000000000000XScale.cm=\u0441\u043c XScale.inch=\u0434\u044e\u0439\u043c Arc.arc=\u0414\u0443\u0433\u0430 Arc.wedge=\u0421\u0435\u043a\u0442\u043e\u0440 Arc.chord=\u0421\u0435\u0433\u043c\u0435\u043d\u0442 DrawContainer.nameTemplate=\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 DrawContainer.overwriteTemplate=\u0422\u0430\u043a\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c? CloseButton.closePanel=Close the window UndoRedoManager.create=\u0421\u043e\u0437\u0434\u0430\u0442\u044c UndoRedoManager.join=\u0421\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c UndoRedoManager.seperate=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/000077500000000000000000000000001321075051700267125ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/1_6.properties000066400000000000000000000050151321075051700314160ustar00rootroot00000000000000LaTeXDrawFrame.0=PSTricks \u0d9a\u0dda\u0dad\u0dba \u0d87\u0dad\u0dd4\u0dbd\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.1=\u0dbb\u0dd6\u0db4\u0dba \u0d87\u0dad\u0dd4\u0dbd\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.3=\u0db1\u0dc0\u0dad\u0db1\u0dca\u0db1 LaTeXDrawFrame.6=BMP \u0dbb\u0dd6\u0db4\u0dba LaTeXDrawFrame.7=PNG \u0dbb\u0dd6\u0db4\u0dba LaTeXDrawFrame.10=\u0d86\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.16=\u0dc0\u0dad\u0dca\u0db8\u0db1\u0dca PSTricks \u0db4\u0dcf\u0dc3\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0dba\u0ddc\u0daf\u0dcf \u0d9c\u0db1\u0dca\u0db1\u0dcf \u0db8\u0dd8\u0daf\u0dd4\u0d9a\u0dcf\u0d82\u0d9c\u0dba \u0dc4\u0da7 \u0dc4\u0dd0\u0d9a\u0dd2\u0dba\u0dcf\u0dc0 \u0d87\u0dad\u0dca\u0dad\u0dda \u0dc3\u0dd4\u0dc5\u0dd4 \u0dc0\u0dd2\u0db0\u0dcf\u0db1 \u0db4\u0dca\u200d\u0dbb\u0db8\u0dcf\u0dab\u0dba\u0d9a\u0dca \u0db4\u0dcf\u0dc3\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db4\u0db8\u0dab\u0dd2.
    \u0d94\u0db6, LaTeXDraw \u0db8\u0d9c\u0dd2\u0db1\u0dca \u0d9a\u0dc5\u0db8\u0db1\u0dcf\u0d9a\u0dbb\u0dab\u0dba \u0dc0\u0db1\u0dca\u0db1\u0dcf\u0dc0\u0dd6 \u0dc0\u0dd2\u0db0\u0dcf\u0db1 \u0db4\u0db8\u0dab\u0d9a\u0dca \u0d86\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 . LaTeXDrawFrame.33=\u0d86\u0dba\u0dcf\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf \u0dbb\u0dd6\u0db4\u0dba\u0d9a\u0dca \u0dc3\u0ddc\u0dba\u0dcf\u0d9c\u0dd0\u0db1\u0dd3\u0db8\u0da7 \u0d85\u0db4\u0ddc\u0dc4\u0ddc\u0dc3\u0dad\u0dca \u0dc0\u0dd2\u0dba LaTeXDrawFrame.34=PSTricks \u0d9c\u0ddc\u0db1\u0dd4\u0dc0 \u0d86\u0dba\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0d85\u0db4\u0ddc\u0dc4\u0ddc\u0dc3\u0dad\u0dca \u0dc0\u0dd2\u0dba LaTeXDrawFrame.36=\u0d9a\u0dda\u0dad\u0dba \u0dbb\u0dd6\u0db4 \u0dc0\u0dbd\u0dd2\u0db1\u0dca \u0db4\u0dbb\u0dd2\u0dc0\u0dbb\u0dca\u0dad\u0db1\u0dba \u0dc0\u0dd3 \u0d87\u0dad InsertPSTricksCodeFrame.0=PSTricks \u0d9a\u0dda\u0dad\u0dba \u0db8\u0d9c\u0dd2\u0db1\u0dca \u0dbb\u0dd6\u0db4 \u0d86\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 Picture.0=% \u0d85\u0dc0\u0dc0\u0dcf\u0daf\u0dba\u0dba\u0dd2, \u0db4\u0dc4\u0dad \u0daf\u0dd0\u0d9a\u0dca\u0dc0\u0dd9\u0db1 \u0dbb\u0dd6\u0db4\u0dba\u0dd9\u0dc4\u0dd2 \u0db4\u0dd9\u0dad\u0dd9\u0dc4\u0dd2 \u0dc4\u0dd2\u0dc3\u0dca\u0dad\u0dd0\u0db1\u0dca \u0d85\u0da9\u0d82\u0d9c\u0dd4 \u0dc0\u0db1 \u0d85\u0dad\u0dbb \u0d91\u0dba tex \u0db8\u0d9c\u0dd2\u0db1\u0dca \u0dc3\u0db8\u0dca\u0db4\u0dcf\u0daf\u0db1\u0dba \u0db1\u0ddc\u0dc0\u0db1\u0dd4 \u0d87\u0dad! ParserMessagesFrame.0=\u0dc0\u0dd2\u0db0\u0dcf\u0db1\u0dba latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/1_7.properties000066400000000000000000000025451321075051700314240ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0dc3\u0dd9\u0dc0\u0dab\u0dd0\u0dbd\u0dca\u0dbd LaTeXDrawFrame.1=\u0d85\u0db1\u0dd4\u0d9a\u0dca\u200d\u0dbb\u0db8\u0dab\u0dba 1 LaTeXDrawFrame.2=\u0d85\u0db1\u0dd4\u0d9a\u0dca\u200d\u0dbb\u0db8\u0dab\u0dba 2 LaTeXDrawFrame.4=\u0dc3\u0dd9\u0dc0\u0dab\u0dd0\u0dbd\u0dca\u0dbd\u0d9a\u0dca \u0dbb\u0dd6\u0db4\u0dba\u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.5=\u0dc3\u0dd9\u0dc0\u0dab\u0dd0\u0dbd\u0dca\u0dbd\u0da7 \u0db4\u0dcf\u0da7\u0d9a\u0dca \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.6=\u0dbb\u0dd6\u0db4 \u0da0\u0dd2\u0dad\u0dca\u200d\u0dbb\u0dba\u0dda \u0dc3\u0dca\u0dae\u0dcf\u0db1\u0d9c\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 (\u0d89\u0daf\u0dd2\u0dbb\u0dd2\u0dba\u0dd9\u0db1\u0dca \u0db4\u0dd2\u0da7\u0dd4\u0db4\u0dc3\u0dd2\u0db1\u0dca,...). LaTeXDrawFrame.7=\u0d85\u0db1\u0dd4\u0d9a\u0dca\u200d\u0dbb\u0db8\u0dab\u0dba\u0dc4\u0dd2 \u0db4\u0dc5\u0db8\u0dd4\u0dc0\u0dd0\u0db1\u0dd2 \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.8=\u0d85\u0db1\u0dd4\u0d9a\u0dca\u200d\u0dbb\u0db8\u0dab\u0dba\u0dc4\u0dd2 \u0daf\u0dd9\u0dc0\u0dd0\u0db1\u0dd2 \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1 AbstractParametersFrame.3=\u0d85\u0db1\u0dd4\u0d9a\u0dca\u200d\u0dbb\u0db8\u0dab \u0d9a\u0ddd\u0dab\u0dba AbstractParametersFrame.4=\u0db8\u0db0\u0dca\u200d\u0dba\u0db8 Pt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/1_8.properties000066400000000000000000000105351321075051700314230ustar00rootroot00000000000000AbstractParametersFrame.0=\u0dc0\u0dd2\u0dbb\u0dcf\u0db8\u0dba: ParametersAxeFrame.0=\u0dc4\u0dd0\u0da9\u0dba: ParametersAxeFrame.1=\u0db8\u0dd6\u0dc5\u0dcf\u0dbb\u0db8\u0dca\u0db7\u0dba \u0db4\u0dd9\u0db1\u0dca\u0dc0\u0db1\u0dca\u0db1 ParametersAxeFrame.6=X - \u0d85\u0d9a\u0dca\u0dc2\u0dba\u0dda \u0db4\u0dc0\u0dad\u0dd2\u0db1 \u0d85\u0d9c\u0dba\u0db1\u0dca \u0d85\u0dad\u0dbb \u0daf\u0dd4\u0dbb : ParametersAxeFrame.7=Y - \u0d85\u0d9a\u0dca\u0dc2\u0dba\u0dda \u0db4\u0dc0\u0dad\u0dd2\u0db1 \u0d85\u0d9c\u0dba\u0db1\u0dca \u0d85\u0dad\u0dbb \u0daf\u0dd4\u0dbb : ParametersAxeFrame.8=X - \u0d85\u0d9a\u0dca\u0dc2\u0dba\u0dda \u0db4\u0dc0\u0dad\u0dd2\u0db1 \u0d85\u0d9c\u0dba\u0db1\u0dca \u0dc0\u0dbd \u0dc0\u0dbb\u0dca\u0db0\u0db1\u0dba : ParametersAxeFrame.9=Y - \u0d85\u0d9a\u0dca\u0dc2\u0dba\u0dda \u0db4\u0dc0\u0dad\u0dd2\u0db1 \u0d85\u0d9c\u0dba\u0db1\u0dca \u0dc0\u0dbd \u0dc0\u0dbb\u0dca\u0db0\u0db1\u0dba : ParametersAxeFrame.13=\u0dad\u0dbb\u0db8: ParametersAxeFrame.17=\u0dc4\u0dbb\u0dd2 \u0dbd\u0d9a\u0dd4\u0dab\u0dd4 PreferencesFrame.3=\u0d94\u0db6\u0d9c\u0dda Latex \u0dc3\u0db1\u0dca\u0dc3\u0dca\u0d9a\u0dcf\u0dbb\u0d9a\u0dba\u0dd9\u0dc4\u0dd2 \u0db4\u0dae\u0dba PreferencesFrame.4=\u0dc3\u0db8\u0dca\u0db8\u0dad \u0da2\u0dcf\u0dbd\u0d9a\u0dba PreferencesFrame.5=\u0db4\u0dd4\u0daf\u0dca\u0d9c\u0dbd\u0dd2\u0d9a \u0da2\u0dcf\u0dbd\u0d9a\u0dba PreferencesFrame.6=\u0d85\u0dba\u0dc3\u0dca\u0d9a\u0dcf\u0db1\u0dca\u0dad (\u0da0\u0dd4\u0db8\u0dca\u0db6\u0d9a) \u0da2\u0dcf\u0dbd\u0d9a\u0dba PreferencesFrame.7=\u0dc0\u0dd2\u0dbb\u0dcf\u0db8\u0dba: LaTeXDrawFrame.2=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4(\u0dba) \u0db7\u0dca\u200d\u0dbb\u0db8\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1. LaTeXDrawFrame.3=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4(\u0dba) 90\u00b0 \u0d9a\u0dd2\u0db1\u0dca \u0db7\u0dca\u200d\u0dbb\u0db8\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1. LaTeXDrawFrame.4=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4(\u0dba) 180\u00b0 \u0d9a\u0dd2\u0db1\u0dca \u0db7\u0dca\u200d\u0dbb\u0db8\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1. LaTeXDrawFrame.5=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4(\u0dba) 270\u00b0 \u0d9a\u0dd2\u0db1\u0dca \u0db7\u0dca\u200d\u0dbb\u0db8\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1. LaTeXDrawFrame.6=\u0dc3\u0db8\u0db8\u0dd2\u0dad\u0dd2\u0dba\u0da7 \u0d85\u0db1\u0dd6\u0dc0 \u0dbb\u0dd6\u0db4 \u0d85\u0db1\u0dd9\u0d9a\u0dca \u0db4\u0dd0\u0dad\u0dca\u0dad \u0dc4\u0dbb\u0dc0\u0db1\u0dca\u0db1. LaTeXDrawFrame.7=\u0dad\u0dd2\u0dbb\u0dc3\u0da7 \u0d85\u0db1\u0dd6\u0dc0 \u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0d85\u0db1\u0dd9\u0d9a\u0dca \u0db4\u0dd0\u0dad\u0dca\u0dad\u0da7 \u0dc4\u0dbb\u0dc0\u0db1\u0dca\u0db1. LaTeXDrawFrame.8=\u0dc3\u0dd2\u0dbb\u0dc3\u0da7 \u0d85\u0db1\u0dd6\u0dc0 \u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0d85\u0db1\u0dd9\u0d9a\u0dca \u0db4\u0dd0\u0dad\u0dca\u0dad\u0da7 \u0dc4\u0dbb\u0dc0\u0db1\u0dca\u0db1 LaTeXDrawFrame.12=\u0d85\u0dba\u0dc3\u0dca\u0d9a\u0dcf\u0db1\u0dca\u0dad (\u0da0\u0dd4\u0db8\u0dca\u0db6\u0d9a) \u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dc4\u0dd2 \u0db4\u0dbb\u0dcf\u0db8\u0dd2\u0dad\u0dd2\u0dba\u0db1\u0dca \u0d85\u0da9\u0d82\u0d9c\u0dd4 \u0dc0\u0dda LaTeXDrawFrame.13=\u0d85\u0dba\u0dc3\u0dca\u0d9a\u0dcf\u0db1\u0dca\u0dad (\u0da0\u0dd4\u0db8\u0dca\u0db6\u0d9a) LaTeXDrawFrame.14=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0db1\u0dd4 \u0dbd\u0dd0\u0db6\u0dd4\u0dc0\u0dc4\u0ddc\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0da2\u0dcf\u0dbd\u0dba\u0da7 \u0d85\u0dba\u0dc3\u0dca\u0d9a\u0dcf\u0db1\u0dca\u0dad \u0dc0\u0db1\u0dd4 \u0d87\u0dad. LaTeXDrawFrame.15=\u0db4\u0dd4\u0daf\u0dca\u0d9c\u0dbd\u0dd2\u0d9a \u0da2\u0dcf\u0dbd\u0dba\u0dd9\u0dc4\u0dd2 \u0dbb\u0dda\u0d9b\u0dcf \u0d85\u0dad\u0dbb \u0dc0\u0dd2\u0dbb\u0dcf\u0db8 (\u0db4\u0dd2\u0d9a\u0dca\u0dc3\u0dbd\u0dca \u0dc0\u0dbd\u0dd2\u0db1\u0dca) \u0daf\u0d9a\u0dca\u0dc0\u0db1\u0dca\u0db1 . LaTeXDrawFrame.17=\u0d85\u0d9a\u0dca\u0dc2 \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.23=\u0dc0\u0dc3\u0dcf \u0daf\u0db8\u0db1\u0dca\u0db1 LaTeXDrawFrame.27=\u0dc3\u0da7\u0dc4\u0db1 \u0db8\u0dd4\u0daf\u0dcf\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.28=\u0d85\u0dc0\u0dc3\u0dbb \u0db4\u0dad\u0dca\u200d\u0dbb\u0dba Axe.1=\u0d85\u0d9a\u0dca\u0dc2\u0dba Axe.2=\u0dbb\u0dcf\u0db8\u0dd4\u0dc0 Axe.3=\u0dc3\u0db8\u0dca\u0db4\u0dd6\u0dbb\u0dca\u0dab Axe.4=\u0d89\u0dc4\u0dc5 Axe.5=\u0db4\u0dc4\u0dc5 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/1_9.properties000066400000000000000000000151411321075051700314220ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0db8\u0dd1\u0dad\u0d9a\u0daf\u0dd3 \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dba\u0da7 \u0d9c\u0dad\u0dca \u0d9c\u0ddc\u0db1\u0dd4 LaTeXDrawFrame.3=\u0d9a\u0dd9\u0da7\u0dd2 \u0db8\u0d82 LaTeXDrawFrame.11=\u0db6\u0dd9\u0dc3\u0dd2z\u0dba\u0dbb\u0dca \u0dc3\u0d82\u0dc0\u0dd8\u0dad \u0da0\u0d9a\u0dca\u200d\u0dbb\u0dbb\u0dda\u0d9b\u0dcf\u0dc0\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 DrawPanel.0=\u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0da7 \u0dbb\u0dd6\u0db4 \u0dba\u0dcf\u0dc0\u0dad\u0dca\u0d9a\u0dcf\u0dbd\u0dd3\u0db1 \u0d9a\u0dbb\u0db1\u0dca\u0db1 ParametersAkinPointsFrame.0=\u0dad\u0dd2\u0dad\u0dca \u0d85\u0dad\u0dbb \u0dc0\u0dd2\u0dbb\u0dcf\u0db8\u0dba: ParametersAkinPointsFrame.1=\u0dc0\u0dd2\u0dc0\u0dd8\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 ParametersAkinPointsFrame.2=\u0dc0\u0dbb\u0dca\u0d9c\u0dba: PreferencesFrame.0=\u0db8\u0dd1\u0dad\u0d9a\u0daf\u0dd3 \u0db7\u0dcf\u0dc0\u0dd2\u0dad\u0dba\u0da7 \u0d9c\u0dad\u0dca \u0d9c\u0ddc\u0db1\u0dd4 \u0d9c\u0dab\u0db1 PreferencesFrame.1=\u0dad\u0dda\u0db8\u0dcf\u0dc0 (\u0dba\u0dc5\u0dd2 \u0d87\u0dbb\u0db9\u0dd3\u0db8\u0da7 \u0d85\u0dc0\u0dc1\u0dca\u200d\u0dba\u0dba): ShortcutsFrame.1=\u0d85\u0db1\u0dd4\u0db4\u0dd2\u0dc5\u0dd2\u0dc0\u0dd9\u0dc5 ShortcutsFrame.3=\u0db4\u0dca\u200d\u0dbb\u0db7\u0dda\u0daf ShortcutsFrame.4=\u0dc3\u0d82\u0da0\u0dcf\u0dbd\u0db1\u0dba ShortcutsFrame.5=\u0db4\u0dbb\u0dd2\u0dab\u0dcf\u0db8\u0db1\u0dba ShortcutsFrame.6=\u0da0\u0dd2\u0dad\u0dca\u200d\u0dbb\u0dba ShortcutsFrame.8=\u0dc0\u0db8 \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 ShortcutsFrame.9=\u0dad\u0dd2\u0dbb\u0dc3\u0dca \u0dbb\u0ddd\u0dbd\u0dca \u0dad\u0dd3\u0dbb\u0dd4\u0dc0 \u0daf\u0d9a\u0dd4\u0dab\u0dd4 \u0db4\u0dc3\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.10=\u0dad\u0dd2\u0dbb\u0dc3\u0dca \u0dbb\u0ddd\u0dbd\u0dca \u0dad\u0dd3\u0dbb\u0dd4\u0dc0 \u0dc0\u0db8\u0dca \u0db4\u0dc3\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.11=\u0dc3\u0dd2\u0dbb\u0dc3\u0dca \u0dbb\u0ddd\u0dbd\u0dca \u0dad\u0dd3\u0dbb\u0dd4\u0dc0 \u0d8b\u0da9\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.12=\u0dc3\u0dd2\u0dbb\u0dc3\u0dca \u0dbb\u0ddd\u0dbd\u0dca \u0dad\u0dd3\u0dbb\u0dd4\u0dc0 \u0db4\u0dc4\u0dbd\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.18=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0daf\u0d9a\u0dd4\u0dab\u0dd4 \u0db4\u0dc3\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.19=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0dc0\u0db8\u0dca \u0db4\u0dc3\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.20=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0d8b\u0da9\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.21=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0db4\u0dc4\u0dbd\u0da7 \u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 ShortcutsFrame.23=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0db4\u0dd9\u0db1\u0dca\u0db1\u0dd4\u0db8\u0dca \u0d9a\u0dd9\u0dbb\u0dd9\u0db1 \u0da2\u0dbd\u0d9a\u0dba\u0da7 \u0dba\u0dcf\u0dc0\u0dad\u0dca\u0d9a\u0dcf\u0dbd\u0dd3\u0db1 \u0d9a\u0dbb\u0db1\u0dca\u0db1 ShortcutsFrame.25=\u0da0\u0dd2\u0dad\u0dca\u200d\u0dbb\u0dba\u0dda \u0dc3\u0dd2\u0dba\u0dc5\u0dd4\u0db8 \u0dbb\u0dd6\u0db4 \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1 ShortcutsFrame.26=\u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dd9\u0dbb\u0dd6 \u0dbb\u0dd6\u0db4\u0dba \u0dc0\u0dbb\u0dab\u0dba \u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 ShortcutsFrame.27=\u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dd9\u0dbb\u0dd6 \u0dbb\u0dd6\u0db4\u0dba \u0dc0\u0dbb\u0dab\u0dba\u0dd9\u0db1\u0dca \u0d85\u0dba\u0dd2\u0db1\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 ShortcutsFrame.29=\u0db8\u0dd6\u0dc3\u0dd2\u0d9a \u0dbb\u0ddd\u0daf\u0dba ShortcutsFrame.30=\u0dc0\u0dd2\u0dc1\u0dcf\u0dbd \u0d9a\u0dbb\u0db1\u0dca\u0db1/\u0d9a\u0dd4\u0da9\u0dcf \u0d9a\u0dbb\u0db1\u0dca\u0db1 MenusListener.0=\u0dc0\u0db8\u0dca \u0db4\u0dc3 \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d94\u0db6\u0dcf\u0d9c\u0dd9\u0db1, \u0daf\u0dd9\u0dc0\u0dd0\u0db1\u0dd2 \u0dad\u0dd2\u0dad \u0dad\u0dd0\u0db6\u0dd3\u0db8\u0da7 \u0db8\u0dd4\u0dc3\u0dd2\u0d9a\u0dba \u0d85\u0daf\u0dd2\u0db1\u0dca\u0db1. \u0db1\u0dd2\u0dbb\u0dca\u0db8\u0dcf\u0dab\u0dba \u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d85\u0dad\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. MenusListener.1=\u0dad\u0dd2\u0dad\u0d9a\u0dca \u0dad\u0dd0\u0db6\u0dd3\u0db8\u0da7 \u0dc0\u0db8 \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1, \u0d85\u0db1\u0dca\u0dad\u0dd2\u0db8 \u0dad\u0dd2\u0dad \u0dad\u0db6\u0dcf \u0db1\u0dd2\u0dbb\u0dca\u0db8\u0dcf\u0dab\u0dba \u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0daf\u0d9a\u0dd4\u0dab \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 \u0dc4\u0ddd \u0dc0\u0db8 \u0daf\u0dd9\u0db4\u0dcf\u0dbb\u0d9a\u0dca \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1. MenusListener.4=\u0d85\u0db1\u0dca\u0dad\u0dd2\u0db8 \u0dad\u0dd2\u0dad \u0dad\u0dd0\u0db6\u0dd3\u0db8\u0da7, \u0dc0\u0db8\u0dca \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d94\u0db6\u0dcf\u0d9c\u0dd9\u0db1 \u0db8\u0dd6\u0dc3\u0dd2\u0d9a\u0dba \u0d85\u0daf\u0dd2\u0db1\u0dca\u0db1. \u0db1\u0dd2\u0dbb\u0dca\u0db8\u0dcf\u0dab\u0dba \u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d85\u0dad\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. MenusListener.5=\u0dc0\u0db8\u0dca \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dba\u0d9a\u0dca \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0d85\u0d9a\u0dd4\u0dbb\u0dd4 \u0db4\u0dd9\u0dc5\u0d9a\u0dca \u0d91\u0d9a\u0dad\u0dd4 \u0dc0\u0dda MenusListener.6=\u0dc0\u0db8\u0dca \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dba\u0d9a\u0dca \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0d9a\u0dca \u0d91\u0d9a\u0dad\u0dd4 \u0dc0\u0dda. MenusListener.7=\u0dc0\u0db8\u0dca \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dba\u0d9a\u0dca \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0d85\u0d9a\u0dca\u0dc2 \u0d91\u0d9a\u0dad\u0dd4 \u0dc0\u0dda. MenusListener.8=\u0dc4\u0dd0\u0da9\u0dba \u0d87\u0db3\u0dd3\u0db8\u0da7, \u0dc0\u0db8\u0dca \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d94\u0db6\u0dcf\u0d9c\u0dd9\u0db1 \u0db8\u0dd6\u0dc3\u0dd2\u0d9a\u0dba \u0d85\u0daf\u0dd2\u0db1\u0dca\u0db1. \u0db1\u0dd2\u0dbb\u0dca\u0db8\u0dcf\u0dab\u0dba \u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db6\u0ddc\u0dad\u0dca\u0dad\u0db8 \u0d85\u0dad\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. MenusListener.9=\u0dc0\u0db8\u0dca \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dba\u0d9a\u0dca \u0db8\u0d9f\u0dd2\u0db1\u0dca \u0dad\u0dd2\u0dad\u0d9a\u0dca \u0d91\u0d9a\u0dad\u0dd4 \u0dc0\u0dda. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/LaTeXDrawFrame.properties000066400000000000000000000316711321075051700336060ustar00rootroot00000000000000LaTeXDrawFrame.0=\ \u0d8b\u0daf\u0dc0\u0dca LaTeXDrawFrame.7=\u0db1\u0dd2\u0daf\u0dc4\u0dc3\u0dca \u0d85\u0dad LaTeXDrawFrame.16=...\u0dbd\u0dd9\u0dc3 \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.17=\u0dbb\u0dd6\u0db4\u0dba \u0db8\u0d9a\u0db1\u0dca\u0db1 LaTeXDrawFrame.18=\u0d89\u0dc0\u0dad\u0dca\u0dc0 \u0dba\u0db1\u0dca\u0db1 LaTeXDrawFrame.19=PSTricks \u0d9a\u0dda\u0dad\u0dba LaTeXDrawFrame.20=JPEG \u0dbb\u0dd6\u0db4\u0dba LaTeXDrawFrame.22=\u0db1\u0dd0\u0dc0\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 (\u0db1\u0dd0\u0dc0\u0dad \u0d89\u0daf\u0dd2\u0dbb\u0dd2 \u0db4\u0dd2\u0dba\u0dc0\u0dbb\u0da7) LaTeXDrawFrame.23=\u0db1\u0dd2\u0dc2\u0dca\u0db4\u0dca\u200d\u0dbb\u0db7 \u0d9a\u0dbb\u0db1\u0dca\u0db1 (\u0db1\u0dd0\u0dc0\u0dad \u0db4\u0dc3\u0dd4 \u0db4\u0dd2\u0dba\u0dc0\u0dbb\u0da7) LaTeXDrawFrame.38=X - \u0db4\u0dbb\u0dd2\u0db8\u0dcf\u0dab\u0dba LaTeXDrawFrame.39=Y - \u0db4\u0dbb\u0dd2\u0db8\u0dcf\u0dab\u0dba LaTeXDrawFrame.40=\u0db4\u0dd2\u0da7\u0db4\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.41=\u0d85\u0da0\u0dca\u0da0\u0dd4 \u0dba\u0dcf\u0dc0\u0dad\u0dca\u0d9a\u0dcf\u0dbd\u0dd3\u0db1 \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.42=\u0d85\u0da0\u0dca\u0da0\u0dd4\u0dc0\u0d9a\u0dca \u0dbd\u0dd9\u0dc3 \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.43=\u0d85\u0dbd\u0dc0\u0db1\u0dca\u0db1 LaTeXDrawFrame.44=\u0d9a\u0db4\u0db1\u0dca\u0db1 LaTeXDrawFrame.48=\u0d85\u0db7\u0dca\u200d\u0dba\u0db1\u0dca\u0dad\u0dbb LaTeXDrawFrame.49=\u0d9a\u0da9\u0dbb\u0dda\u0d9b\u0db1 LaTeXDrawFrame.56=\u0d85\u0db7\u0dd2\u0db8\u0dad\u0dba\u0db1\u0dca LaTeXDrawFrame.57=\u0dc0\u0dd2\u0dc1\u0dcf\u0dbd \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.58=\u0d9a\u0dd4\u0da9\u0dcf \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.60=\u0d85\u0d9a\u0dd4\u0dbb\u0dd4 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.65=\u0dbb\u0dd6\u0db4\u0dba\u0dd9\u0dc4\u0dd2 \u0d9d\u0db1\u0d9a\u0db8 \u0dc0\u0dd9\u0db1\u0dc3\u0dca\u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.66=\u0dbb\u0dd6\u0db4\u0dba\u0dd9\u0dc4\u0dd2 \u0db6\u0ddd\u0da9\u0dbb\u0dba\u0dda \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dc0\u0dd9\u0db1\u0dc3\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.68=\u0dbb\u0dd6\u0db4\u0dba\u0dd9\u0dc4\u0dd2 \u0d85\u0db7\u0dca\u200d\u0dba\u0db1\u0dca\u0dad\u0dbb \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dc0\u0dd9\u0db1\u0dc3\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.69=\u0d9a\u0da9\u0dbb\u0dda\u0d9b\u0db1\u0dba\u0dd9\u0dc4\u0dd2 \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dc0\u0dd9\u0db1\u0dc3\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.70=\u0dbb\u0dd6\u0db4\u0dba \u0db4\u0dd9\u0dbb\u0db6\u0dd2\u0db8\u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.71=\u0dbb\u0dd6\u0db4\u0dba \u0db4\u0dc3\u0dd4\u0db6\u0dd2\u0db8\u0da7 \u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.75=\u0dbb\u0dd6\u0db4 \u0d9a\u0dd3\u0db4\u0dba\u0d9a\u0dca \u0dc3\u0db8\u0dd6\u0dc4\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.76=\u0dbb\u0dd6\u0db4 \u0d9a\u0dd3\u0db4\u0dba\u0d9a\u0dca \u0dc0\u0dd9\u0db1\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.77=\u0dbb\u0dd6\u0db4\u0dba\u0dd9\u0dc4\u0dd2 \u0db6\u0ddd\u0da9\u0dbb\u0dca \u0dc0\u0dbd \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0dd3\u0db8\u0dca \u0daf\u0d9a\u0dca\u0dc0\u0db1\u0dca\u0db1 LaTeXDrawFrame.78=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0db1\u0dd4 \u0dbd\u0dd0\u0db6\u0dd4\u0dc0\u0dc4\u0ddc\u0dad\u0dca \u0dbb\u0dd6\u0db4\u0dba\u0da7 \u0daf\u0dca\u0dc0\u0dd2\u0dad\u0dca\u0dc0 \u0db6\u0ddd\u0da9\u0dbb\u0dca \u0dbd\u0dd0\u0db6\u0dd9\u0db1\u0dd4 \u0d87\u0dad LaTeXDrawFrame.79=\u0daf\u0dca\u0dc0\u0dd2\u0dad\u0dca\u0dc0 \u0db6\u0ddd\u0da9\u0dbb\u0dca \u0d85\u0dad\u0dbb \u0d87\u0dad\u0dd2 \u0dc4\u0dd2\u0da9\u0dc3\u0dd9\u0dc4\u0dd2 \u0dc0\u0dbb\u0dca\u0dab\u0dba \u0dc0\u0dd9\u0db1\u0dc3\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.88=\u0d9c\u0ddc\u0db1\u0dd4\u0dc0 LaTeXDrawFrame.89=\u0dc3\u0d82\u0dc3\u0dca\u0d9a\u0dbb\u0dab\u0dba LaTeXDrawFrame.90=\u0daf\u0dbb\u0dca\u0dc1\u0dab\u0dba LaTeXDrawFrame.91=\u0d85\u0daf\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.93=\u0d8b\u0daf\u0dc0\u0dca LaTeXDrawFrame.103=\u0d85\u0da0\u0dca\u0da0\u0dd4 LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u0dad\u0dd2\u0dad\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.119=\u0dc3\u0dd8\u0da2\u0dd4\u0d9a\u0ddd\u0dab\u0dcf\u0dc1\u0dca\u200d\u0dbb\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.120=\u0dc3\u0db8\u0da0\u0dad\u0dd4\u0dbb\u0dc1\u0dca\u200d\u0dbb\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.121=\u0db6\u0dc4\u0dd4\u0d85\u0dc3\u0dca\u200d\u0dbb\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.123=\u0dbb\u0ddd\u0db8\u0dca\u0db6\u0dc3\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.124=\u0dad\u0dca\u200d\u0dbb\u0dd2\u0d9a\u0ddd\u0dab\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.125=\u0d89\u0dbd\u0dd2\u0db4\u0dca\u0dc3\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.127=\u0dc0\u0dd8\u0dad\u0dca\u0dad\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.128=\u0da0\u0dcf\u0db4\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.130=\u0dc0\u0dd8\u0dad\u0dca\u0dad\u0dcf\u0d9a\u0dcf\u0dbb \u0d9a\u0dd6\u0da4\u0dca\u0da4\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.131=\u0da2\u0dca\u200d\u0dba\u0dcf\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.132=\u0db6\u0dd9\u0dc3\u0dd2z\u0dba\u0dbb\u0dca \u0dc0\u0d9a\u0dca\u200d\u0dbb\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.133=\u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0d9a\u0dca \u0d85\u0db3\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.136=\u0d91\u0d9a\u0dca \u0dbb\u0dd6\u0db4\u0dba\u0d9a\u0dca \u0dc4\u0ddd \u0d9a\u0dd3\u0db4\u0dba\u0d9a\u0dca \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1
    LaTeXDrawFrame.137=\u0dc3\u0dd4\u0dc5\u0dd4 \u0d85\u0dc0\u0dc0\u0dcf\u0daf\u0dba\u0d9a\u0dca : \u0d9a\u0dd3\u0db4\u0dba\u0d9a\u0dca \u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dd0\u0db1\u0dd3\u0db8 \u0dc3\u0db3\u0dc4\u0dcf LaTeXDrawFrame.138=\u0dbb\u0dd6\u0db4 , \u0d9a\u0dca\u0dbd\u0dd2\u0d9a\u0dca \u0d9a\u0dbb
    \u0db8\u0dd4\u0dc3\u0dd2\u0d9a\u0dba \u0d94\u0db6\u0da7 \u0d85\u0dc0\u0dc1\u0dca\u200d\u0dba \u0dbb\u0dd6\u0db4 \u0db8\u0dad\u0da7 \u0d87\u0daf\u0d9c\u0dd9\u0db1 \u0dba\u0db1\u0dca\u0db1 LaTeXDrawFrame.139=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4(\u0dba) \u0db8\u0d9a\u0dcf \u0daf\u0db8\u0db1\u0dca\u0db1 LaTeXDrawFrame.146=\u0db4\u0dd2\u0da7\u0db4\u0dad\u0dca \u0d9a\u0dbb\u0db1 \u0dbd\u0daf\u0dd3... LaTeXDrawFrame.147=\u0d85\u0dbd\u0dc0\u0db1 \u0dbd\u0daf\u0dd3... LaTeXDrawFrame.148=\u0d9a\u0db4\u0db1 \u0dbd\u0daf\u0dd3... LaTeXDrawFrame.149=\u0db8\u0d9a\u0dcf \u0daf\u0db8\u0db1 \u0dbd\u0daf\u0dd2... LaTeXDrawFrame.154=\u0dc3\u0db8\u0dd6\u0dc4\u0db1\u0dba \u0d9a\u0dbb\u0db1 \u0dbd\u0daf\u0dd2... LaTeXDrawFrame.155=\u0dc0\u0dd9\u0db1\u0dca \u0d9a\u0dbb\u0db1 \u0dbd\u0daf\u0dd2... LaTeXDrawFrame.169=\u0d85\u0da0\u0dca\u0da0\u0dd4\u0dc0 \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1 \u0dbd\u0daf\u0dd2! LaTeXDrawFrame.171=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0db1\u0dca\u0db1 LaTeXDrawFrame.173=\u0d94\u0db6\u0da7 \u0d9c\u0ddc\u0db1\u0dd4\u0dc0 \u0db4\u0dca\u200d\u0dbb\u0dad\u0dd2\u0dc3\u0dca\u0dae\u0dcf\u0db4\u0db1\u0dba \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0d85\u0dc0\u0dc1\u0dca\u200d\u0dba\u0daf ? LaTeXDrawFrame.175=PSTricks \u0d9a\u0dda\u0dad\u0dba \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dbb\u0db1 \u0dbd\u0daf\u0dd2! LaTeXDrawFrame.176=PSTricks \u0d9a\u0dda\u0dad\u0dba \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db1\u0ddc\u0dc4\u0dd0\u0d9a! LaTeXDrawFrame.184=\u0db4\u0dd2\u0db1\u0dca\u0dad\u0dd4\u0dbb\u0dba\u0d9a\u0dca \u0dbd\u0dd9\u0dc3 \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8 \u0dc3\u0dcf\u0dbb\u0dca\u0dae\u0d9a\u0dba\u0dd2! LaTeXDrawFrame.185=\u0db4\u0dd2\u0db1\u0dca\u0dad\u0dd4\u0dbb\u0dba\u0d9a\u0dca \u0dbd\u0dd9\u0dc3 \u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dd2\u0dbb\u0dd3\u0db8\u0da7 \u0db1\u0ddc\u0dc4\u0dd0\u0d9a! LaTeXDrawFrame.188=\u0da0\u0dd2\u0dad\u0dca\u200d\u0dbb\u0dba \u0dc3\u0dd4\u0dbb\u0d9a\u0dd2\u0db1\u0dca\u0db1 LaTeXDrawFrame.200=\u0da0\u0dd2\u0dad\u0dca\u200d\u0dbb\u0dba \u0dc0\u0dd2\u0dc0\u0dd8\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 LaTeXDrawFrame.219=\u0dc0\u0dd9\u0dbd\u0dd4\u0db8 LaTeXDrawFrame.220=, \u0d9c\u0ddc\u0da9 \u0db1\u0d82\u0dc0\u0db1\u0dca\u0db1 LaTeXDrawFrame.221=\ GNU \u0dc3\u0dcf\u0d9a\u0dbd\u0dca\u200d\u0dba \u0db4\u0ddc\u0daf\u0dd4 \u0db6\u0dbd\u0db4\u0dad\u0dca\u200d\u0dbb\u0dba\u0dd9\u0dc4\u0dd2 \u0dbb\u0dd9\u0d9c\u0dd4\u0dbd\u0dcf\u0dc3\u0dd2 \u0dc0\u0dbd\u0da7 \u0dba\u0da7\u0dad\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dd0\u0dbb \u0dad\u0dd2\u0db6\u0dda LFrame2.1=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0db4\u0dd9\u0dc5\u0d9c\u0dc3\u0dca\u0dc0\u0db1\u0dca\u0db1 LFrame2.10=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0d85\u0dad\u0dbb, \u0dc3\u0db8\u0dcf\u0db1 \u0db4\u0dbb\u0dad\u0dbb \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0db1 \u0d86\u0d9a\u0dcf\u0dbb\u0dba\u0dd9\u0db1\u0dca, \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1 LFrame2.11=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0dc0\u0dbd, \u0db8\u0daf\u0dca\u200d\u0dba\u0db1\u0dca \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0db4\u0dbb\u0dad\u0dbb \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0db1 \u0d86\u0d9a\u0dcf\u0dbb\u0dba\u0dd9\u0db1\u0dca \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1 LFrame2.12=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0dc0\u0dbd, \u0d89\u0dc4\u0dbd \u0d9a\u0dd9\u0dbd\u0dc0\u0dbb \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0db4\u0dbb\u0dad\u0dbb \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0db1 \u0d86\u0d9a\u0dcf\u0dbb\u0dba\u0dd9\u0db1\u0dca \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1 LFrame2.13=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd6\u0db4 \u0dc0\u0dbd, \u0dc0\u0db8\u0dca \u0d9a\u0dd9\u0dbd\u0dc0\u0dbb \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0db4\u0dbb\u0dad\u0dbb \u0db4\u0dd2\u0dc4\u0dd2\u0da7\u0db1 \u0d86\u0d9a\u0dcf\u0dbb\u0dba\u0dd9\u0db1\u0dca \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf\u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1 LFrame2.14=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0daf\u0dd4\u0dbb\u0dd2\u0db1\u0dca, \u0dad\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. LFrame2.15=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca\u0d9c\u0dda \u0db8\u0db0\u0dca\u200d\u0dba\u0dba\u0db1\u0dca \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0daf\u0dd4\u0dbb\u0dd2\u0db1\u0dca, \u0dad\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. LFrame2.16=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca\u0d9c\u0dda \u0daf\u0d9a\u0dd4\u0dab\u0dd4 \u0db4\u0dd0\u0dad\u0dd2 \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0daf\u0dd4\u0dbb\u0dd2\u0db1\u0dca, \u0dad\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. LFrame2.2=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0dc0\u0db8\u0dd9\u0db1\u0dca \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.3=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0daf\u0d9a\u0dd4\u0dab\u0dd2\u0db1\u0dca \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.4=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0d8b\u0da9\u0dd2\u0db1\u0dca \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.5=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0dba\u0da7\u0dd2\u0db1\u0dca \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.6=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0db8\u0dd0\u0daf\u0dd2\u0db1\u0dca \u0dad\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.7=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0db8\u0dd0\u0daf\u0dd2\u0db1\u0dca \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db4\u0dd9\u0dc5 \u0d9c\u0dc3\u0db1\u0dca\u0db1. LFrame2.8=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca \u0dc3\u0db8\u0dcf\u0db1 \u0daf\u0dd4\u0dbb\u0dd2\u0db1\u0dca \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. LFrame2.9=\u0dad\u0ddd\u0dbb\u0dcf\u0d9c\u0dad\u0dca \u0dbb\u0dd4\u0db4\u0dba\u0db1\u0dca\u0d9c\u0dda \u0dba\u0da7\u0dd2\u0db4\u0dd0\u0dad\u0dd2 \u0d85\u0dad\u0dbb \u0dc3\u0db8\u0dcf\u0db1 \u0daf\u0dd4\u0dbb\u0dd2\u0db1\u0dca, \u0dc3\u0dd2\u0dbb\u0dc3\u0dca\u0dc0 \u0db6\u0dd9\u0daf\u0dcf \u0dc4\u0dbb\u0dd2\u0db1\u0dca\u0db1. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/actions.properties000066400000000000000000000073371321075051700325020ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/dialogFrames.properties000066400000000000000000000114141321075051700334260ustar00rootroot00000000000000PreferencesFrame.Pref=\u0d85\u0db7\u0dd2\u0db4\u0dca\u200d\u0dbb\u0dda\u0dad... PreferencesFrame.grid=\u0da2\u0dcf\u0dbd\u0d9a\u0dba PreferencesFrame.codePanel=\u0d9a\u0dda\u0dad \u0db4\u0dd4\u0dc0\u0dbb\u0dd4\u0dc0 PreferencesFrame.antiAl=\u0dc3\u0dd4\u0db8\u0da7\u0d9a\u0dbb\u0dab\u0dba PreferencesFrame.rendQ=\u0dc0\u0dd2\u0daf\u0dd0\u0dc4\u0dd4\u0db8\u0dca \u0d9c\u0dd4\u0dab\u0dcf\u0dad\u0dca\u0db8\u0d9a \u0db6\u0dc0 PreferencesFrame.colRendQ=\u0dc0\u0dbb\u0dca\u0dab \u0dc0\u0dd2\u0daf\u0dd0\u0dc4\u0dd4\u0db8\u0dca \u0d9c\u0dd4\u0dab\u0dcf\u0dad\u0dca\u0db8\u0d9a \u0db6\u0dc0 PreferencesFrame.AlphaQ=\u0d87\u0dbd\u0dca\u0dc6\u0dcf \u0d85\u0db1\u0dca\u0dad\u0dbb\u0dca \u0db1\u0dd2\u0dc0\u0dda\u0dc1\u0dab \u0d9c\u0dd4\u0dab\u0dcf\u0dad\u0dca\u0db8\u0d9a \u0db6\u0dc0 PreferencesFrame.newVers=\u0db1\u0dc0 \u0d85\u0db1\u0dd4\u0dc0\u0dcf\u0daf\u0dba \u0d87\u0dbb\u0db9\u0dd4\u0db8\u0dda\u0daf\u0dd3 \u0db4\u0dbb\u0dd2\u0d9a\u0dca\u0dc2\u0dcf \u0d9a\u0dbb \u0db6\u0dbd\u0db1\u0dca\u0db1 PreferencesFrame.lge=\u0db7\u0dcf\u0dc2\u0dcf\u0dc0 (\u0dba\u0dc5\u0dd2 \u0d87\u0dbb\u0db9\u0dd4\u0db8\u0d9a\u0dca \u0d85\u0dc0\u0dc1\u0dca\u200d\u0dba\u0dba) PreferencesFrame.general=\u0db4\u0ddc\u0daf\u0dd4 PreferencesFrame.folders=\u0dc6\u0ddd\u0dbd\u0dca\u0da9\u0dbb PreferencesFrame.quality=\u0d9c\u0dd4\u0dab\u0dcf\u0dad\u0dca\u0db8\u0d9a\u0db6\u0dc0 PreferencesFrame.selectFolder=\u0dc6\u0ddd\u0dbd\u0dca\u0da9\u0dbb\u0dba\u0d9a\u0dca \u0dad\u0ddd\u0dbb\u0db1\u0dca\u0db1 PreferencesFrame.defOpenSave=\u0dc0\u0dd2\u0dc0\u0dd8\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1/\u0dc3\u0dd4\u0dbb\u0d9a\u0dd2\u0db1\u0dca\u0db1 \u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dba\u0dcf \u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dd9\u0dbb\u0db1\u0dd2\u0db8\u0dd2 \u0dc6\u0ddd\u0dbd\u0dca\u0da9\u0dbb\u0dba PreferencesFrame.defFold=\u0d86\u0dba\u0dcf\u0dad/\u0db1\u0dd2\u0dbb\u0dca\u0dba\u0dcf\u0dad \u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dba\u0dcf \u0dc3\u0db3\u0dc4\u0dcf \u0db4\u0dd9\u0dbb\u0db1\u0dd2\u0db8\u0dd2 \u0dc6\u0ddd\u0dbd\u0dca\u0da9\u0dbb\u0dba AbstractParametersFrame.0=\u0daf\u0dca\u0dc0\u0dd2 \u0db8\u0dcf\u0dba\u0dd2\u0db8\u0dca AbstractParametersFrame.2=\u0dc0\u0dd2\u0db7\u0dda\u0daf\u0d9a\u0dba: AbstractParametersFrame.4=\u0d85\u0db1\u0dd4\u0db8\u0dad \u0d9a\u0dbb\u0db1\u0dca\u0db1 AbstractParametersFrame.6=\u0d85\u0dc4\u0ddd\u0dc3\u0dd2 \u0d9a\u0dbb\u0db1\u0dca\u0db1 AbstractParametersFrame.7=\u0db7\u0dca\u200d\u0dbb\u0db8\u0dab \u0d9a\u0ddd\u0dab\u0dba: AbstractParametersFrame.11=\u0d9a\u0da9\u0dbb\u0dda\u0d9b\u0db1\u0dba\u0dda \u0db4\u0dc5\u0dbd: AbstractParametersFrame.20=\u0dad\u0dd2\u0dad\u0dda \u0dc0\u0dd2\u0dc2\u0dca\u0d9a\u0db8\u0dca\u0db7\u0dba = AbstractParametersFrame.21=\u0dad\u0dd3\u0dbb\u0dd4\u0dc0\u0dda \u0db4\u0dc5\u0dbd = AbstractParametersFrame.22=\u0dc0\u0dbb\u0dc4\u0db1\u0dda \u0daf\u0dd2\u0d9c = AbstractParametersFrame.23=\u0dc0\u0da7\u0d9a\u0dd4\u0dbb\u0dd4 \u0dc0\u0dbb\u0dc4\u0db1\u0dda \u0daf\u0dd2\u0d9c = AbstractParametersFrame.24=x \u0d9d\u0db1\u0dad\u0dca\u0dc0\u0dba + AbstractParametersFrame.26=\u0d8a\u0dad\u0dbd\u0dba\u0dda \u0daf\u0dd2\u0d9c AbstractParametersFrame.27=\u0d8a\u0dad\u0dbd\u0dba\u0dda \u0dad\u0dd4\u0dc5\u0dd4\u0db4\u0dad AbstractParametersFrame.28=\u0d8a\u0dad\u0dbd\u0dba\u0dda \u0db4\u0dc5\u0dbd ParametersArcFrame.0=\u0d87\u0dbb\u0db9\u0dd4\u0db8\u0dca \u0d9a\u0ddd\u0dab\u0dba: ParametersArcFrame.1=\u0d85\u0dc0\u0dc3\u0db1\u0dca \u0d9a\u0ddd\u0dab\u0dba: ParametersGridFrame.0=Y \u0db8\u0dd6\u0dbd\u0dcf\u0dbb\u0db8\u0dca\u0db7\u0dba: ParametersGridFrame.1=X \u0db8\u0dd6\u0dbd\u0dcf\u0dbb\u0db8\u0dca\u0db7\u0dba: ParametersGridFrame.4=\u0d85\u0db1\u0dd4 \u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dda \u0dad\u0dd2\u0dad\u0dca: ParametersGridFrame.5=\u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dda \u0dad\u0dd2\u0dad\u0dca: ParametersGridFrame.6=\u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dda \u0db4\u0dc5\u0dbd: ParametersGridFrame.7=\u0d85\u0db1\u0dd4 \u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dda \u0db4\u0dc5\u0dbd: ParametersGridFrame.8=\u0d85\u0db1\u0dd4 \u0da2\u0dcf\u0dbd\u0d9a\u0dba\u0dda \u0db6\u0dd9\u0daf\u0dd3\u0db8: ParametersGridFrame.9=\u0dbd\u0dda\u0db6\u0dbd\u0dba\u0dda \u0db4\u0dca\u200d\u0dbb\u0db8\u0dcf\u0dab\u0dba: ParametersGridFrame.11=\u0d8b\u0db4\u0dbb\u0dd2\u0db8 X \u0d85\u0d9c\u0dba: ParametersGridFrame.12=\u0d85\u0dc0\u0db8 X \u0d85\u0d9c\u0dba: ParametersGridFrame.13=\u0d8b\u0db4\u0dbb\u0dd2\u0db8 Y \u0d85\u0d9c\u0dba: ParametersGridFrame.14=\u0d85\u0dc0\u0db8 Y \u0d85\u0d9c\u0dba: ExportDialog.0=\u0dc4\u0dd0\u0d9a\u0dd2\u0dbd\u0dd3\u0db8 Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/si/others.properties000066400000000000000000000021361321075051700323360ustar00rootroot00000000000000XScale.cm=\u0dc3\u0dd9.\u0db8\u0dd2. XScale.inch=\u0d85\u0d9f\u0dbd\u0dca Arc.arc=\u0da0\u0dcf\u0db4\u0dba Arc.wedge=\u0dc0\u0dd8\u0dad\u0dca\u0dad\u0dcf\u0d9a\u0dcf\u0dbb \u0d9a\u0dd6\u0da4\u0dca\u0da4\u0dba Arc.chord=\u0dc0\u0dd8\u0dad\u0dca\u0dad \u0da1\u0dda\u0daf\u0d9a\u0dba DrawContainer.nameTemplate=\u0d85\u0da0\u0dca\u0da0\u0dd4\u0dc0\u0dda \u0db1\u0db8 \u0d87\u0dad\u0dd4\u0dbd\u0dad\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 DrawContainer.overwriteTemplate=\u0db8\u0dd9\u0db8 \u0d85\u0da0\u0dca\u0da0\u0dd4\u0dc0 \u0db8\u0dda \u0dc0\u0db1 \u0dc0\u0dd2\u0da7\u0dad\u0dca \u0db4\u0dc0\u0dad\u0dd3; \u0d91\u0dba \u0d8b\u0da9\u0dd2\u0db1\u0dca \u0db4\u0dca\u200d\u0dbb\u0dad\u0dd2\u0dc3\u0dca\u0dae\u0dcf\u0db4\u0db1\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 \u0daf? CloseButton.closePanel=\u0d9a\u0dc0\u0dd4\u0dc5\u0dd4\u0dc0 \u0dc0\u0dc3\u0db1\u0dca\u0db1 UndoRedoManager.create=\u0db1\u0dd2\u0dbb\u0dca\u0db8\u0dcf\u0dab\u0dba \u0d9a\u0dbb\u0db1\u0dca\u0db1 UndoRedoManager.join=\u0d91\u0d9a\u0dad\u0dd4 \u0d9a\u0dbb\u0db1\u0dca\u0db1 UndoRedoManager.seperate=\u0dc0\u0dd9\u0db1\u0dca \u0d9a\u0dbb\u0db1\u0dca\u0db1 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/000077500000000000000000000000001321075051700267235ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/1_6.properties000066400000000000000000000031541321075051700314310ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0423\u0431\u0430\u0446\u0438 \u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u043a\u043e\u0434 LaTeXDrawFrame.1=\u0423\u0431\u0430\u0446\u0438\u0442\u0435 \u0441\u043b\u0438\u043a\u0443 LaTeXDrawFrame.3=\u0437\u0430\u0443\u0441\u0442\u0430\u0432\u0438 LaTeXDrawFrame.6=\u0411\u041c\u041f \u0441\u043b\u0438\u043a\u0430 LaTeXDrawFrame.7=\u041f\u041d\u0413 \u0441\u043b\u0438\u043a\u0430 LaTeXDrawFrame.10=\u0423\u0431\u0430\u0446\u0438 LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=\u041d\u0438\u0441\u0430\u043c \u043f\u0440\u043e\u043d\u0430\u0448\u0430\u043e \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430 \u0443\u0432\u043e\u0437! LaTeXDrawFrame.34=\u041d\u0435 \u043c\u043e\u0433\u0443 \u0434\u0430 \u0443\u0432\u0435\u0437\u0435\u043c \u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u0434\u0430\u0442\u043e\u0442\u0435\u043a\u0443! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=\u0423\u0431\u0430\u0446\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u0438\u0437 \u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u043a\u043e\u0434\u0430 Picture.0=% \u0423\u043f\u043e\u0437\u043e\u0440\u0435\u045a\u0435: \u043f\u0443\u0442\u0430\u045a\u0430 \u0441\u043b\u0435\u0434\u0435\u045b\u0435 \u0441\u043b\u0438\u043a\u0435 \u0441\u0430\u0434\u0440\u0436\u0438 \u0440\u0430\u0437\u043c\u0430\u043a\u0435 \u0438 \u0422\u0435\u041a\u0441 \u0458\u0435 \u043d\u0435\u045b\u0435 \u0441\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0438! ParserMessagesFrame.0=\u041d\u0430\u0440\u0435\u0434\u0431\u0430 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/1_7.properties000066400000000000000000000015241321075051700314310ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0421\u0435\u043d\u043a\u0430 LaTeXDrawFrame.1=\u041f\u0440\u0435\u043b\u0438\u0432 1 LaTeXDrawFrame.2=\u041f\u0440\u0435\u043b\u0438\u0432 2 LaTeXDrawFrame.4=\u0414\u043e\u0434\u0430\u0458\u0442\u0435 \u0441\u0435\u043d\u043a\u0443 \u0441\u043b\u0438\u0446\u0438. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u0446\u0440\u0442\u0435\u0436 (\u0438\u0441\u043f\u0440\u0435\u0434, \u0438\u0437\u0430,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=\u0423\u0433\u0430\u043e \u043f\u0440\u0435\u043b\u0438\u0432\u0430 AbstractParametersFrame.4=\u0421\u0440\u0435\u0434\u045a\u0430 \u0442\u0430\u0447\u043a\u0430 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/1_8.properties000066400000000000000000000076351321075051700314430ustar00rootroot00000000000000AbstractParametersFrame.0=\u043f\u0435\u0440\u0438\u043e\u0434: ParametersAxeFrame.0=\u041e\u0431\u043b\u0438\u043a: ParametersAxeFrame.1=\u041f\u0440\u0438\u043a\u0430\u0436\u0438 \u043f\u043e\u0440\u0435\u043a\u043b\u043e ParametersAxeFrame.6=\u0420\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0435 X \u0435\u0442\u0438\u043a\u0435\u0442\u0435: ParametersAxeFrame.7=\u0420\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0435 Y \u0435\u0442\u0438\u043a\u0435\u0442\u0435: ParametersAxeFrame.8=\u041f\u0440\u0438\u0440\u0430\u0448\u0442\u0430\u0458 X \u0435\u0442\u0438\u043a\u0435\u0442\u0435: ParametersAxeFrame.9=\u041f\u0440\u0438\u0440\u0430\u0448\u0442\u0430\u0458 Y \u0435\u0442\u0438\u043a\u0435\u0442\u0435: ParametersAxeFrame.13=\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430: ParametersAxeFrame.17=\u0412\u0440\u0445\u043e\u0432\u0438 PreferencesFrame.3=\u041f\u0443\u0442\u0430\u045a\u0430 \u0432\u0430\u0448\u0435\u0433 \u041b\u0430\u0422\u0435\u041a\u0441 \u0443\u0440\u0435\u0452\u0438\u0432\u0430\u0447\u0430: PreferencesFrame.4=\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0434\u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0430 PreferencesFrame.5=\u041b\u0438\u0447\u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0430 PreferencesFrame.6=\u041c\u0430\u0433\u043d\u0435\u0442\u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0430 PreferencesFrame.7=\u041f\u0435\u0440\u0438\u043e\u0434: LaTeXDrawFrame.2=\u041e\u043a\u0440\u0435\u043d\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0443. LaTeXDrawFrame.3=\u041e\u043a\u0440\u0435\u043d\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430 90\u00b0. LaTeXDrawFrame.4=\u041e\u043a\u0440\u0435\u043d\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430 180\u00b0. LaTeXDrawFrame.5=\u041e\u043a\u0440\u0435\u043d\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430 270\u00b0. LaTeXDrawFrame.6=\u041e\u0431\u0440\u043d\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043f\u043e \u0441\u0438\u043c\u0435\u0442\u0440\u0438\u0458\u0438. LaTeXDrawFrame.7=\u041e\u0431\u0440\u043d\u0438\u0442\u0435 \u0432\u043e\u0434\u043e\u0440\u0430\u0432\u043d\u043e \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LaTeXDrawFrame.8=\u041e\u0431\u0440\u043d\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LaTeXDrawFrame.12=\u0421\u0430\u0434\u0440\u0436\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 (\u043c\u0430\u0433\u043d\u0435\u0442\u043d\u0435) \u0440\u0435\u0448\u0435\u0442\u043a\u0435 LaTeXDrawFrame.13=\u043c\u0430\u0433\u043d\u0435\u0442\u043d\u0430 LaTeXDrawFrame.14=\u0423\u043a\u043e\u043b\u0438\u043a\u043e \u0458\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e, \u0444\u0438\u0433\u0443\u0440\u0435 \u045b\u0435 \u0431\u0438\u0442\u0438 \u043c\u0430\u0433\u043d\u0435\u0442\u043d\u0435 \u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0438. LaTeXDrawFrame.15=\u041e\u0434\u0440\u0435\u0434\u0438\u0442\u0435 \u043e\u0434\u0441\u0442\u043e\u0458\u0430\u045a\u0435 \u0438\u0437\u043c\u0435\u0452\u0443 \u043b\u0438\u043d\u0438\u0458\u0430 \u0432\u0430\u0448\u0435 \u043b\u0438\u0447\u043d\u0435 \u0440\u0435\u0448\u0435\u0442\u043a\u0435 (\u0443 \u0442\u0430\u0447\u043a\u0430\u043c\u0430). LaTeXDrawFrame.17=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043e\u0441\u0435. LaTeXDrawFrame.23=\u0417\u0430\u0442\u0432\u043e\u0440\u0438 LaTeXDrawFrame.27=\u0411\u0435\u043b\u0435\u0448\u043a\u0435 \u043e \u0438\u0437\u0434\u0430\u045a\u0443 LaTeXDrawFrame.28=License Axe.1=\u041e\u0441\u0430 Axe.2=\u0420\u0430\u043c Axe.3=\u041f\u0443\u043d Axe.4=\u0413\u043e\u0440\u0435 Axe.5=\u0414\u043e\u043b\u0435 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/1_9.properties000066400000000000000000000153271321075051700314410ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0421\u043a\u043e\u0440\u0430\u0448\u045a\u0435 \u0434\u0430\u0442\u043e\u0442\u0435\u043a\u0435 LaTeXDrawFrame.3=\u041f\u0440\u0435\u0447\u0438\u0446\u0435 LaTeXDrawFrame.11=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0437\u0430\u0442\u0432\u043e\u0440\u0435\u043d\u0443 \u0411\u0435\u0437\u0458\u0435\u0440\u043e\u0432\u0443 \u043a\u0440\u0438\u0432\u0443 DrawPanel.0=\u041e\u0441\u0432\u0435\u0436\u0438 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0438 ParametersAkinPointsFrame.0=\u041e\u0434\u0441\u0442\u043e\u0458\u0430\u045a\u0435 \u0442\u0430\u0447\u0430\u043a\u0430: ParametersAkinPointsFrame.1=\u041e\u0442\u0432\u043e\u0440\u0438 ParametersAkinPointsFrame.2=\u0432\u0440\u0441\u0442\u0430: PreferencesFrame.0=\u0411\u0440\u043e\u0458 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438\u0445 \u0434\u0430\u0442\u043e\u0442\u0435\u043a\u0430: PreferencesFrame.1=\u0422\u0435\u043c\u0430 (\u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e \u0458\u0435 \u043f\u043e\u043d\u043e\u0432\u043d\u043e \u043f\u043e\u043a\u0440\u0435\u0442\u0430\u045a\u0435): ShortcutsFrame.1=\u041d\u0438\u0437 ShortcutsFrame.3=\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0458\u0430 ShortcutsFrame.4=\u041a\u0440\u0435\u0442\u0430\u045a\u0435 ShortcutsFrame.5=\u041f\u0440\u0435\u0442\u0432\u0430\u0440\u0430\u045a\u0435 ShortcutsFrame.6=\u0426\u0440\u0442\u0430\u045a\u0435 ShortcutsFrame.8=\u043b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a ShortcutsFrame.9=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0432\u043e\u0434\u043e\u0440\u0430\u0432\u043d\u0438 \u043a\u043b\u0438\u0437\u0430\u0447 \u043d\u0430 \u0434\u0435\u0441\u043d\u043e ShortcutsFrame.10=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0432\u043e\u0434\u043e\u0440\u0430\u0432\u043d\u0438 \u043a\u043b\u0438\u0437\u0430\u0447 \u043d\u0430 \u043b\u0435\u0432\u043e ShortcutsFrame.11=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u0438 \u043a\u043b\u0438\u0437\u0430\u0447 \u043d\u0430 \u0433\u043e\u0440\u0435 ShortcutsFrame.12=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u0438 \u043a\u043b\u0438\u0437\u0430\u0447 \u043d\u0430 \u0434\u043e\u043b\u0435 ShortcutsFrame.18=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u0434\u0435\u0441\u043d\u043e ShortcutsFrame.19=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u043b\u0435\u0432\u043e ShortcutsFrame.20=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u0433\u043e\u0440\u0435 ShortcutsFrame.21=\u041f\u043e\u043c\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u0434\u043e\u043b\u0435 ShortcutsFrame.23=\u041e\u0441\u0432\u0435\u0436\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u043f\u0440\u0438\u043a\u0430\u0437\u0430\u043d\u043e\u0458 \u0440\u0435\u0448\u0435\u0442\u043a\u0438 ShortcutsFrame.25=\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u0446\u0440\u0442\u0435\u0436\u0430 ShortcutsFrame.26=\u0414\u043e\u0434\u0430\u0458\u0442\u0435 \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u0443 \u0444\u0438\u0433\u0443\u0440\u0443 \u0443 \u0438\u0437\u0431\u043e\u0440 ShortcutsFrame.27=\u0423\u043a\u043b\u043e\u043d\u0438\u0442\u0435 \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u0443 \u0444\u0438\u0433\u0443\u0440\u0443 \u0438\u0437 \u0438\u0437\u0431\u043e\u0440\u0430 ShortcutsFrame.29=\u0422\u043e\u0447\u043a\u0438\u045b \u043c\u0438\u0448\u0430 ShortcutsFrame.30=\u0423\u0432\u0435\u045b\u0430\u0458\u0442\u0435/\u0443\u043c\u0430\u045a\u0438\u0442\u0435 MenusListener.0=\u041f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u043b\u0435\u0432\u0438 \u0442\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0440\u0435\u0432\u0443\u0446\u0438\u0442\u0435 \u043c\u0438\u0448\u0430 \u0434\u043e \u043c\u0435\u0441\u0442\u0430 \u0434\u0440\u0443\u0433\u0435 \u0442\u0430\u0447\u043a\u0435. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0430\u0441\u0442\u0435\u0440 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0441\u0442\u0432\u0430\u0440\u0430\u045a\u0435. MenusListener.1=\u041b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u0430 \u0434\u043e\u0434\u0430\u0442\u0435 \u0442\u0430\u0447\u043a\u0443, \u0434\u0435\u0441\u043d\u0438 \u043a\u043b\u0438\u043a \u0438\u043b\u0438 \u0434\u0432\u043e\u0441\u0442\u0440\u0443\u043a\u0438 \u043b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u045a\u0443 \u0442\u0430\u0447\u043a\u0443 \u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0441\u0442\u0432\u0430\u0440\u0430\u045a\u0435. MenusListener.4=\u041f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u043b\u0435\u0432\u0438 \u0442\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0440\u0435\u0432\u0443\u0446\u0438\u0442\u0435 \u043c\u0438\u0448\u0430 \u0434\u043e \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u045a\u0435 \u0442\u0430\u0447\u043a\u0435. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0430\u0441\u0442\u0435\u0440 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0441\u0442\u0432\u0430\u0440\u0430\u045a\u0435. MenusListener.5=\u041b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u043e\u0434\u0430\u0458\u0435 \u0442\u0435\u043a\u0441\u0442. MenusListener.6=\u041b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u043e\u0434\u0430\u0458\u0435 \u0440\u0435\u0448\u0435\u0442\u043a\u0443. MenusListener.7=\u041b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u043e\u0434\u0430\u0458\u0435 \u043e\u0441\u0435. MenusListener.8=\u041f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u043b\u0435\u0432\u0438 \u0442\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0440\u0435\u0432\u0443\u0446\u0438\u0442\u0435 \u043c\u0438\u0448\u0430 \u0434\u0430 \u043d\u0430\u0446\u0440\u0442\u0430\u0442\u0435 \u043e\u0431\u043b\u0438\u043a. \u041e\u0442\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0430\u0441\u0442\u0435\u0440 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0441\u0442\u0432\u0430\u0440\u0430\u045a\u0435. MenusListener.9=\u041b\u0435\u0432\u0438 \u043a\u043b\u0438\u043a \u0434\u043e\u0434\u0430\u0458\u0435 \u0442\u0430\u0447\u043a\u0443. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/LaTeXDrawFrame.properties000066400000000000000000000315221321075051700336120ustar00rootroot00000000000000LaTeXDrawFrame.0=\ \u043f\u043e\u043c\u043e\u045b LaTeXDrawFrame.7=\u0421\u043b\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0440\u0443\u043a\u043e\u043c LaTeXDrawFrame.16=\u0418\u0437\u0432\u0435\u0437\u0438 \u043a\u0430\u043e... LaTeXDrawFrame.17=\u041e\u0431\u0440\u0438\u0448\u0438 \u0444\u0438\u0433\u0443\u0440\u0443 LaTeXDrawFrame.18=\u0418\u0437\u0430\u0452\u0438 LaTeXDrawFrame.19=\u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u043a\u043e\u0434 LaTeXDrawFrame.20=\u0408\u041f\u0415\u0413 \u0441\u043b\u0438\u043a\u0443 LaTeXDrawFrame.22=\u0412\u0440\u0430\u0442\u0438 LaTeXDrawFrame.23=\u041f\u043e\u043d\u0438\u0448\u0442\u0438 LaTeXDrawFrame.38=X-\u0440\u0430\u0437\u043c\u0435\u0440\u0430 LaTeXDrawFrame.39=Y-\u0440\u0430\u0437\u043c\u0435\u0440\u0430 LaTeXDrawFrame.40=\u0423\u043c\u043d\u043e\u0436\u0438 LaTeXDrawFrame.41=\u0410\u0436\u0443\u0440\u0438\u0440\u0430\u0458 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 LaTeXDrawFrame.42=\u0418\u0437\u0432\u0435\u0437\u0438 \u043a\u0430\u043e \u0448\u0430\u0431\u043b\u043e\u043d LaTeXDrawFrame.43=\u0423\u0431\u0430\u0446\u0438 LaTeXDrawFrame.44=\u0418\u0441\u0435\u0446\u0438 LaTeXDrawFrame.48=\u0423\u043d\u0443\u0442\u0440\u0430\u0448\u045a\u043e\u0441\u0442 LaTeXDrawFrame.49=\u0428\u0440\u0430\u0444\u0438\u0440\u0430\u045a\u0430 LaTeXDrawFrame.56=\u041f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 LaTeXDrawFrame.57=\u0423\u0432\u0435\u045b\u0430\u0458 LaTeXDrawFrame.58=\u0423\u043c\u0430\u045a\u0438 LaTeXDrawFrame.60=\u0414\u043e\u0434\u0430\u0458 \u0442\u0435\u043a\u0441\u0442 LaTeXDrawFrame.65=\u041f\u0440\u043e\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0435\u0431\u0459\u0438\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0435 LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u0443 \u0443 \u043f\u0440\u0432\u0438 \u043f\u043b\u0430\u043d LaTeXDrawFrame.71=\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u0443 \u0443 \u043f\u043e\u0437\u0430\u0434\u0438\u043d\u0443 LaTeXDrawFrame.75=\u0413\u0440\u0443\u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0444\u0438\u0433\u0443\u0440\u0430 LaTeXDrawFrame.76=\u041e\u0434\u0432\u043e\u0458\u0442\u0435 \u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0444\u0438\u0433\u0443\u0440\u0430 LaTeXDrawFrame.77=\u041e\u0434\u0440\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u043b\u043e\u0436\u0430\u0458 \u0438\u0432\u0438\u0446\u0430 \u0444\u0438\u0433\u0443\u0440\u0435 LaTeXDrawFrame.78=\u0423\u043a\u043e\u043b\u0438\u043a\u043e \u0458\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e, \u0444\u0438\u0433\u0443\u0440\u0430 \u045b\u0435 \u0438\u043c\u0430\u0442\u0438 \u0434\u0432\u043e\u0441\u0442\u0440\u0443\u043a\u0435 \u0438\u0432\u0438\u0446\u0435 LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=\u0414\u0430\u0442\u043e\u0442\u0435\u043a\u0430 LaTeXDrawFrame.89=\u0423\u0440\u0435\u0452\u0438\u0432\u0430\u045a\u0435 LaTeXDrawFrame.90=\u041f\u0440\u0438\u043a\u0430\u0437 LaTeXDrawFrame.91=\u0426\u0440\u0442\u0430\u045a\u0435 LaTeXDrawFrame.93=\u041f\u043e\u043c\u043e\u045b LaTeXDrawFrame.103=\u0428\u0430\u0431\u043b\u043e\u043d\u0438 LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0442\u0430\u0447\u043a\u0443 LaTeXDrawFrame.119=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043f\u0440\u0430\u0432\u043e\u0443\u0433\u0430\u043e\u043d\u0438\u043a LaTeXDrawFrame.120=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 LaTeXDrawFrame.121=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043f\u043e\u043b\u0438\u0433\u043e\u043d LaTeXDrawFrame.123=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0440\u043e\u043c\u0431\u043e\u0438\u0434 LaTeXDrawFrame.124=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0442\u0440\u043e\u0443\u0433\u0430\u043e LaTeXDrawFrame.125=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0435\u043b\u0438\u043f\u0441\u0443 LaTeXDrawFrame.127=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043a\u0440\u0443\u0433 LaTeXDrawFrame.128=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043b\u0443\u043a LaTeXDrawFrame.130=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u043e\u0434\u0441\u0435\u0447\u0430\u043a LaTeXDrawFrame.131=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0442\u0435\u0442\u0438\u0432\u0443 LaTeXDrawFrame.132=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0411\u0435\u0437\u0458\u0435\u0440\u043e\u0432\u0443 \u043a\u0440\u0438\u0432\u0443 LaTeXDrawFrame.133=\u041d\u0430\u0446\u0440\u0442\u0430\u0458\u0442\u0435 \u0440\u0435\u0448\u0435\u0442\u043a\u0443 LaTeXDrawFrame.136=\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0458\u0435\u0434\u043d\u0443 \u0438\u043b\u0438 \u0432\u0438\u0448\u0435 \u0444\u0438\u0433\u0443\u0440\u0430
    LaTeXDrawFrame.137=\u0421\u0430\u0432\u0435\u0442 : \u0434\u0430 \u0438\u0437\u0430\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0438\u0448\u0435 LaTeXDrawFrame.138=\u0444\u0438\u0433\u0443\u0440\u0430, \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0438
    \u043f\u0440\u0435\u0432\u0443\u0446\u0438\u0442\u0435 \u043c\u0438\u0448\u0430 \u043f\u0440\u0435\u043a\u043e \u0444\u0438\u0433\u0443\u0440\u0430 \u043a\u043e\u0458\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 LaTeXDrawFrame.139=\u041e\u0431\u0440\u0438\u0448\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0443 \u0444\u0438\u0433\u0443\u0440\u0443(\u0435) LaTeXDrawFrame.146=\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u043e... LaTeXDrawFrame.147=\u0423\u0431\u0430\u0447\u0435\u043d\u043e... LaTeXDrawFrame.148=\u0418\u0441\u0435\u0447\u0435\u043d\u043e... LaTeXDrawFrame.149=\u041e\u0431\u0440\u0438\u0441\u0430\u043d\u043e... LaTeXDrawFrame.154=\u0413\u0440\u0443\u043f\u0438\u0441\u0430\u043d\u043e... LaTeXDrawFrame.155=\u041e\u0434\u0432\u043e\u0458\u0435\u043d\u043e... LaTeXDrawFrame.169=\u0428\u0430\u0431\u043b\u043e\u043d \u0458\u0435 \u0438\u0437\u0432\u0435\u0436\u0435\u043d! LaTeXDrawFrame.171=\u0418\u0437\u0430\u0431\u0435\u0440\u0438 LaTeXDrawFrame.173=\u0414\u0430 \u043b\u0438 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u0442\u043e\u0442\u0435\u043a\u0443? LaTeXDrawFrame.175=\u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u043a\u043e\u0434 \u0458\u0435 \u0438\u0437\u0432\u0435\u0436\u0435\u043d! LaTeXDrawFrame.176=\u041d\u0435 \u043c\u043e\u0433\u0443 \u0434\u0430 \u0438\u0437\u0432\u0435\u0437\u0435\u043c \u041f\u0421\u0422\u0440\u0438\u043a\u0441 \u043a\u043e\u0434! LaTeXDrawFrame.184=\u0418\u0437\u0432\u043e\u0436\u0435\u045a\u0435 \u043a\u0430\u043e \u0441\u043b\u0438\u043a\u0435 \u0458\u0435 \u0443\u0440\u0430\u0452\u0435\u043d\u043e! LaTeXDrawFrame.185=\u041d\u0435 \u043c\u043e\u0433\u0443 \u0434\u0430 \u0438\u0437\u0432\u0435\u0437\u0435\u043c \u043a\u0430\u043e \u0441\u043b\u0438\u043a\u0443! LaTeXDrawFrame.188=\u0421\u0430\u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0446\u0440\u0442\u0435\u0436 LaTeXDrawFrame.200=\u041e\u0442\u0432\u043e\u0440\u0438\u0442\u0435 \u0446\u0440\u0442\u0435\u0436 LaTeXDrawFrame.219=\u0418\u0437\u0434\u0430\u045a\u0435 LaTeXDrawFrame.220=, \u0438\u0437\u0433\u0440\u0430\u0452\u0435\u043d\u043e LaTeXDrawFrame.221=\ \u0458\u0435 \u043e\u0431\u0458\u0430\u0432\u0459\u0435\u043d \u043f\u043e\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u043c\u0430 \u0413\u041d\u0423-\u043e\u0432\u0435 \u041e\u043f\u0448\u0442\u0435 \u0458\u0430\u0432\u043d\u0435 \u043b\u0438\u0446\u0435\u043d\u0446\u0435 LFrame2.1=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.10=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e, \u043d\u0430 \u043f\u043e\u0434\u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u043c\u0435\u0452\u0443\u0441\u043e\u0431\u043d\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443, \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.11=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u0441\u0440\u0435\u0434\u0438\u0448\u0442\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. LFrame2.12=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u0433\u043e\u0440\u045a\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. LFrame2.13=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u043b\u0435\u0432\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. LFrame2.14=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e, \u043d\u0430 \u043f\u043e\u0434\u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u043c\u0435\u0452\u0443\u0441\u043e\u0431\u043d\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443, \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.15=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0432\u043e\u0434\u043e\u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u0441\u0440\u0435\u0434\u0438\u0448\u0442\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. LFrame2.16=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u0434\u0435\u0441\u043d\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. LFrame2.2=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u043d\u0430 \u043b\u0435\u0432\u043e \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.3=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u043d\u0430 \u0434\u0435\u0441\u043d\u043e \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.4=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u043d\u0430 \u0433\u043e\u0440\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.5=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u043d\u0430 \u0434\u043e\u043b\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435. LFrame2.6=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u0432\u043e\u0434\u043e\u0440\u0430\u0432\u043d\u043e \u0443 \u0441\u0440\u0435\u0434\u0438\u043d\u0438. LFrame2.7=\u041f\u043e\u0440\u0430\u0432\u043d\u0430\u0458\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e \u0443 \u0441\u0440\u0435\u0434\u0438\u043d\u0438. LFrame2.8=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u0435 \u043d\u0430 \u043f\u043e\u0434\u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443. LFrame2.9=\u0420\u0430\u0441\u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0441\u043f\u0440\u0430\u0432\u043d\u043e, \u043d\u0430 \u0458\u0435\u0434\u043d\u0430\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0458\u0430\u045a\u0443 \u0438\u0437\u043c\u0435\u0452\u0443 \u0434\u043e\u045a\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0430 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u0430. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/actions.properties000066400000000000000000000073371321075051700325130ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/dialogFrames.properties000066400000000000000000000116471321075051700334470ustar00rootroot00000000000000PreferencesFrame.Pref=\u041f\u043e\u0441\u0442\u0430\u0432\u043a\u0435... PreferencesFrame.grid=\u0420\u0435\u0448\u0435\u0442\u043a\u0430 PreferencesFrame.codePanel=\u041f\u043e\u0432\u0440\u0448 \u043a\u043e\u0434\u0430 PreferencesFrame.antiAl=\u041e\u043c\u0435\u043a\u0448\u0430\u0432\u0430\u045a\u0435 PreferencesFrame.rendQ=\u041a\u0432\u0430\u043b\u0438\u0442\u0435\u0442 \u0438\u0441\u0446\u0440\u0442\u0430\u0432\u0430\u045a\u0430 PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=\u041a\u0432\u0430\u043b\u0438\u0442\u0435\u0442 \u0430\u043b\u0444\u0430 \u0443\u043c\u0435\u0442\u0430\u045a\u0430 PreferencesFrame.newVers=\u041f\u0440\u043e\u0432\u0435\u0440\u0438 \u043d\u043e\u0432\u043e \u0438\u0437\u0434\u0430\u045a\u0435 \u043f\u0440\u0438\u043b\u0438\u043a\u043e\u043c \u043f\u043e\u043a\u0440\u0435\u0442\u0430\u045a\u0430 PreferencesFrame.lge=\u0408\u0435\u0437\u0438\u043a (\u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e \u0458\u0435 \u043f\u043e\u043d\u043e\u0432\u043d\u043e \u043f\u043e\u043a\u0440\u0435\u0442\u0430\u045a\u0435): PreferencesFrame.general=\u041e\u043f\u0448\u0442\u0435 PreferencesFrame.folders=\u0424\u0430\u0441\u0446\u0438\u043a\u043b\u0435 PreferencesFrame.quality=\u041a\u0432\u0430\u043b\u0438\u0442\u0435\u0442 PreferencesFrame.selectFolder=\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0441\u0446\u0438\u043a\u043b\u0443 PreferencesFrame.defOpenSave=\u041e\u0441\u043d\u043e\u0432\u043d\u0430 \u0444\u0430\u0441\u0446\u0438\u043a\u043b\u0430 \u0437\u0430 \u0440\u0430\u0434\u045a\u0435 \u043e\u0442\u0432\u0430\u0440\u0430\u045a\u0430/\u0447\u0443\u0432\u0430\u045a\u0430: PreferencesFrame.defFold=\u041e\u0441\u043d\u043e\u0432\u043d\u0430 \u0444\u0430\u0441\u0446\u0438\u043a\u043b\u0430 \u0437\u0430 \u0440\u0430\u0434\u045a\u0435 \u0443\u0432\u043e\u0437\u0430/\u0438\u0437\u0432\u043e\u0437\u0430: AbstractParametersFrame.0=\u0414\u0432\u043e\u0441\u0442\u0440\u0443\u043a\u0430 \u0438\u0432\u0438\u0446\u0430 AbstractParametersFrame.2=\u0420\u0430\u0437\u0434\u0432\u0430\u0458\u0430\u0447: AbstractParametersFrame.4=\u0423 \u0440\u0435\u0434\u0443 AbstractParametersFrame.6=\u041e\u0442\u043a\u0430\u0436\u0438 AbstractParametersFrame.7=\u0423\u0433\u0430\u043e \u043e\u043a\u0440\u0435\u0442\u0430\u045a\u0430: AbstractParametersFrame.11=\u0428\u0438\u0440\u0438\u043d\u0430 \u0448\u0440\u0430\u0444\u0438\u0440\u0430\u045a\u0430: AbstractParametersFrame.20=\u041f\u0440\u0435\u0447\u043d\u0438\u043a \u0442\u0430\u0447\u043a\u0435 = AbstractParametersFrame.21=\u0428\u0438\u0440\u0438\u043d\u0430 \u0442\u0440\u0430\u043a\u0435 = AbstractParametersFrame.22=\u0414\u0443\u0436\u0438\u043d\u0430 \u0437\u0430\u0433\u0440\u0430\u0434\u0435 = AbstractParametersFrame.23=\u0414\u0443\u0436\u0438\u043d\u0430 \u0437\u0430\u043e\u0431\u0459\u0435\u043d\u0435 \u0437\u0430\u0433\u0440\u0430\u0434\u0435 = AbstractParametersFrame.24=x \u0434\u0435\u0431\u0459\u0438\u043d\u0430 + AbstractParametersFrame.26=\u0414\u0443\u0436\u0438\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u0438\u0446\u0435 AbstractParametersFrame.27=\u0423\u043c\u0435\u0442\u0430\u043a \u0441\u0442\u0440\u0435\u043b\u0438\u0446\u0435 AbstractParametersFrame.28=\u0428\u0438\u0440\u0438\u043d\u0430 \u0441\u0442\u0440\u0435\u043b\u0438\u0446\u0435 ParametersArcFrame.0=\u043f\u043e\u0447\u0435\u0442\u043d\u0438 \u0443\u0433\u0430\u043e: ParametersArcFrame.1=\u043a\u0440\u0430\u0458\u045a\u0438 \u0443\u0433\u0430\u043e: ParametersGridFrame.0=Y \u043f\u043e\u0440\u0435\u043a\u043b\u043e: ParametersGridFrame.1=X \u043f\u043e\u0440\u0435\u043a\u043b\u043e: ParametersGridFrame.4=\u0422\u0430\u0447\u043a\u0435 \u043f\u043e\u0434\u0440\u0435\u0448\u0435\u0442\u043a\u0435: ParametersGridFrame.5=\u0422\u0430\u0447\u043a\u0435 \u0440\u0435\u0448\u0435\u0442\u043a\u0435: ParametersGridFrame.6=\u0428\u0438\u0440\u0438\u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0435: ParametersGridFrame.7=\u0428\u0438\u0440\u0438\u043d\u0430 \u043f\u043e\u0434\u0440\u0435\u0448\u0435\u0442\u043a\u0435: ParametersGridFrame.8=\u041f\u043e\u0434\u0435\u043b\u0430 \u043f\u043e\u0434\u0440\u0435\u0448\u0435\u0442\u043a\u0435: ParametersGridFrame.9=\u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0435\u0442\u0438\u043a\u0435\u0442\u0435: ParametersGridFrame.11=\u041d\u0430\u0458\u0432\u0435\u045b\u0435 X: ParametersGridFrame.12=\u041d\u0430\u0458\u043c\u0430\u045a\u0435 X: ParametersGridFrame.13=\u041d\u0430\u0458\u0432\u0435\u045b\u0435 Y: ParametersGridFrame.14=\u041d\u0430\u0458\u043c\u0430\u045a\u0435 Y: ExportDialog.0=\u0421\u0430\u0436\u0438\u043c\u0430\u045a\u0435 Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/sr/others.properties000066400000000000000000000014071321075051700323470ustar00rootroot00000000000000XScale.cm=cm XScale.inch=\u0438\u043d\u0447a Arc.arc=\u041b\u0443\u043a Arc.wedge=\u041e\u0434\u0441\u0435\u0447\u0430\u043a Arc.chord=\u0422\u0435\u0442\u0438\u0432\u0430 DrawContainer.nameTemplate=\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u043d\u0430\u0437\u0438\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 DrawContainer.overwriteTemplate=\u041e\u0432\u0430\u0458 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0435\u045b \u043f\u043e\u0441\u0442\u043e\u0458\u0438; \u0434\u0430 \u0433\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u043c? CloseButton.closePanel=Close the window UndoRedoManager.create=\u041d\u0430\u043f\u0440\u0430\u0432\u0438 UndoRedoManager.join=\u041f\u0440\u0438\u043f\u043e\u0458 UndoRedoManager.seperate=\u0420\u0430\u0437\u0434\u0432\u043e\u0458 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/000077500000000000000000000000001321075051700267245ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/1_6.properties000066400000000000000000000013031321075051700314240ustar00rootroot00000000000000LaTeXDrawFrame.0=PSTricks Komutu Ekle LaTeXDrawFrame.1=Resim Ekle LaTeXDrawFrame.3=Durdur LaTeXDrawFrame.6=BMP Resmi LaTeXDrawFrame.7=PNG Resmi LaTeXDrawFrame.10=Ekle LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Eklenebilecek bir nesne bulunamad\u0131! LaTeXDrawFrame.34=PSTricks dosyas\u0131 aktar\u0131lamad\u0131! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=PSTricks komutlar\u0131ndan nesne ekle Picture.0=% Uyar\u0131: \u015eu dosyan\u0131n konum tan\u0131m\u0131nda bo\u015fluk karakterleri var ve tex taraf\u0131ndan derlenemeyecek! ParserMessagesFrame.0=Komut latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/1_7.properties000066400000000000000000000010021321075051700314210ustar00rootroot00000000000000LaTeXDrawFrame.0=G\u00f6lge LaTeXDrawFrame.1=Renk Ge\u00e7i\u015fi 1 LaTeXDrawFrame.2=Renk Ge\u00e7i\u015fi 2 LaTeXDrawFrame.4=Resime g\u00f6lge ekle LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=Resimleri g\u00f6rece konumland\u0131r (\u00f6n\u00fcnde, arkas\u0131nda,...) LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=Renk Ge\u00e7i\u015f A\u00e7\u0131s\u0131 AbstractParametersFrame.4=Orta Nokta latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/1_8.properties000066400000000000000000000031031321075051700314260ustar00rootroot00000000000000AbstractParametersFrame.0=aral\u0131k: ParametersAxeFrame.0=\u015eekil: ParametersAxeFrame.1=Merkezi g\u00f6ster ParametersAxeFrame.6=X-belirte\u00e7leri aras\u0131 ParametersAxeFrame.7=Y-belirte\u00e7leri aras\u0131 ParametersAxeFrame.8=X-belirte\u00e7 art\u0131\u015f\u0131 ParametersAxeFrame.9=Y-belirte\u00e7 art\u0131\u015f\u0131 ParametersAxeFrame.13=Boy ParametersAxeFrame.17=\u00c7entikler PreferencesFrame.3=Latex Editor Konumu PreferencesFrame.4=Standart Izgara PreferencesFrame.5=De\u011fi\u015ftirilmi\u015f Izgara PreferencesFrame.6=Yap\u0131\u015fkan Izgara PreferencesFrame.7=Aral\u0131k: LaTeXDrawFrame.2=Se\u00e7ili nesneleri d\u00f6nd\u00fcr LaTeXDrawFrame.3=Se\u00e7ili nesneleri 90\u00b0 d\u00f6nd\u00fcr. LaTeXDrawFrame.4=Se\u00e7ili nesneleri 180\u00b0 d\u00f6nd\u00fcr. LaTeXDrawFrame.5=Se\u00e7ili nesneleri 270\u00b0 d\u00f6nd\u00fcr. LaTeXDrawFrame.6=Nesneleri simetrik olarak ters \u00e7evir LaTeXDrawFrame.7=Nesneleri yatay simetrik olarak ters \u00e7evir LaTeXDrawFrame.8=Nesneleri d\u00fc\u015fey simetrik olarak ters \u00e7evir LaTeXDrawFrame.12=(Yap\u0131\u015fkan) Izgara parametrelerini i\u00e7erir. LaTeXDrawFrame.13=yap\u0131\u015fkan LaTeXDrawFrame.14=Se\u00e7ilirse, nesneler \u0131zgara noktalar\u0131na yap\u0131\u015f\u0131r. LaTeXDrawFrame.15=De\u011fi\u015ftirilmi\u015f \u0131zgara i\u00e7in \u00e7izgi aral\u0131\u011f\u0131 (piksel olarak) LaTeXDrawFrame.17=Eksen Tak\u0131m\u0131 \u00c7iz LaTeXDrawFrame.23=Kapat LaTeXDrawFrame.27=S\u00fcr\u00fcm Bilgisi LaTeXDrawFrame.28=License Axe.1=Eksen Axe.2=\u00c7er\u00e7eve Axe.3=Tam Axe.4=\u00dcstte Axe.5=Altta latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/1_9.properties000066400000000000000000000046171321075051700314420ustar00rootroot00000000000000LaTeXDrawFrame.0=Son dosyalar LaTeXDrawFrame.3=K\u0131sayollar LaTeXDrawFrame.11=Kapal\u0131 B\u00e9zier e\u011frisi \u00e7iz DrawPanel.0=Nesneleri \u0131zgaraya g\u00f6re g\u00fcncelle ParametersAkinPointsFrame.0=Nokta aral\u0131\u011f\u0131: ParametersAkinPointsFrame.1=A\u00e7\u0131k U\u00e7 ParametersAkinPointsFrame.2=K\u00f6\u015fe tipi: PreferencesFrame.0=G\u00f6sterilecek Son dosyalar\u0131n say\u0131s\u0131: PreferencesFrame.1=Tema (Bir Sonraki A\u00e7\u0131l\u0131\u015fta) ShortcutsFrame.1=K\u0131sayol ShortcutsFrame.3=S\u0131n\u0131f ShortcutsFrame.4=Gezinme ShortcutsFrame.5=D\u00f6n\u00fc\u015f\u00fcm ShortcutsFrame.6=\u00c7izim ShortcutsFrame.8=sol t\u0131k ShortcutsFrame.9=Yatay kayd\u0131rma \u00e7ubu\u011funu sa\u011fa kayd\u0131r ShortcutsFrame.10=Yatay kayd\u0131rma \u00e7ubu\u011funu sola kayd\u0131r ShortcutsFrame.11=D\u00fc\u015fey kayd\u0131rma \u00e7ubu\u011funu yukar\u0131 kayd\u0131r ShortcutsFrame.12=D\u00fc\u015fey kayd\u0131rma \u00e7ubu\u011funu a\u015fa\u011f\u0131 kayd\u0131r ShortcutsFrame.18=Se\u00e7ili nesneleri sa\u011fa kayd\u0131r ShortcutsFrame.19=Se\u00e7ili nesneleri sola kayd\u0131r ShortcutsFrame.20=Se\u00e7ili nesneleri yukar\u0131 kayd\u0131r ShortcutsFrame.21=Se\u00e7ili nesneleri a\u015fa\u011f\u0131 kayd\u0131r ShortcutsFrame.23=Se\u00e7ili nesneleri g\u00f6sterilen \u0131zgaraya ayarla ShortcutsFrame.25=T\u00fcm nesneleri se\u00e7 ShortcutsFrame.26=T\u0131klanan nesneyi se\u00e7ime ekle ShortcutsFrame.27=T\u0131klanan nesneyi se\u00e7imden \u00e7\u0131kar ShortcutsFrame.29=Fare tekeri ShortcutsFrame.30=Yakla\u015f/Uzakla\u015f MenusListener.0=\u0130kinci noktay\u0131 belirlemek i\u00e7in, sol t\u0131klayarak fareyi s\u00fcr\u00fckleyin. Tamamlamak i\u00e7in sol d\u00fc\u011fmeyi b\u0131rak\u0131n. MenusListener.1=Nokta eklemek i\u00e7in sol, son noktay\u0131 koymak ve tamamlamak i\u00e7in sa\u011f veya \u00e7ift sol t\u0131klay\u0131n. MenusListener.4=Son noktay\u0131 belirlemek i\u00e7in, sol t\u0131klayarak fareyi s\u00fcr\u00fckleyin. Tamamlamak i\u00e7in sol d\u00fc\u011fmeyi b\u0131rak\u0131n. MenusListener.5=Sol t\u0131klama metin ekler. MenusListener.6=Sol t\u0131klama \u0131zgara ekler. MenusListener.7=Sol t\u0131klama eksen tak\u0131m\u0131 ekler. MenusListener.8=\u015eekli belirlemek i\u00e7in, sol t\u0131klayarak fareyi s\u00fcr\u00fckleyin. Tamamlamak i\u00e7in sol d\u00fc\u011fmeyi b\u0131rak\u0131n. MenusListener.9=Sol t\u0131klama nokta ekler. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/LaTeXDrawFrame.properties000066400000000000000000000114261321075051700336140ustar00rootroot00000000000000LaTeXDrawFrame.0=\ Yard\u0131m LaTeXDrawFrame.7=Serbest \u00c7izim LaTeXDrawFrame.16=D\u0131\u015fa aktar... LaTeXDrawFrame.17=Nesne sil LaTeXDrawFrame.18=\u00c7\u0131k\u0131\u015f LaTeXDrawFrame.19=PSTricks Kodu LaTeXDrawFrame.20=JPEG resim LaTeXDrawFrame.22=Tekrar Yap LaTeXDrawFrame.23=Geri al LaTeXDrawFrame.38=X-Esnetme LaTeXDrawFrame.39=Y-Esnetme LaTeXDrawFrame.40=Kopyala LaTeXDrawFrame.41=Kal\u0131p listesini g\u00fcncelle LaTeXDrawFrame.42=Kal\u0131p olarak belirle LaTeXDrawFrame.43=Yap\u0131\u015ft\u0131r LaTeXDrawFrame.44=Kes LaTeXDrawFrame.48=\u0130\u00e7 LaTeXDrawFrame.49=Taramalar LaTeXDrawFrame.56=Tercihler LaTeXDrawFrame.57=Yak\u0131nla\u015f LaTeXDrawFrame.58=Uzakla\u015f LaTeXDrawFrame.60=Metin ekle LaTeXDrawFrame.65=Nesnenin kal\u0131nl\u0131\u011f\u0131n\u0131 de\u011fi\u015ftir LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=Nesneyi \u00f6nalana getir LaTeXDrawFrame.71=Nesneyi arkaalana g\u00f6t\u00fcr LaTeXDrawFrame.75=Birka\u00e7 nesneyi grupla LaTeXDrawFrame.76=Nesneleri birbirinden ay\u0131r LaTeXDrawFrame.77=Nesnenin kenarl\u0131klar\u0131n\u0131n konumunu belirle LaTeXDrawFrame.78=Se\u00e7iliyse nesnenin \u00e7ift kenarl\u0131klar\u0131 olur LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=Dosya LaTeXDrawFrame.89=D\u00fczenle LaTeXDrawFrame.90=G\u00f6r\u00fcn\u00fcm LaTeXDrawFrame.91=\u00c7izim LaTeXDrawFrame.93=Yard\u0131m LaTeXDrawFrame.103=Kal\u0131plar LaTeXDrawFrame.113=%100 LaTeXDrawFrame.117=Nokta \u00e7iz LaTeXDrawFrame.119=Dikd\u00f6rtgen \u00e7iz LaTeXDrawFrame.120=Kare \u00c7iz LaTeXDrawFrame.121=Poligon \u00e7iz LaTeXDrawFrame.123=E\u015fkenar D\u00f6rtgen \u00c7iz LaTeXDrawFrame.124=\u00dc\u00e7gen \u00c7iz LaTeXDrawFrame.125=Elips \u00c7iz LaTeXDrawFrame.127=\u00c7ember \u00c7iz LaTeXDrawFrame.128=Yay \u00c7iz LaTeXDrawFrame.130=Dilim \u00c7iz LaTeXDrawFrame.131=Kiri\u015f \u00c7iz LaTeXDrawFrame.132=B\u00e9zier E\u011frisi \u00c7iz LaTeXDrawFrame.133=Izgara Yerle\u015ftir LaTeXDrawFrame.136=Bir veya daha fazla nesne se\u00e7
    LaTeXDrawFrame.137=Tavsiye : Birden \u00e7ok nesne se\u00e7mek i\u00e7in LaTeXDrawFrame.138=
    t\u0131klay\u0131p, fareyi se\u00e7ilmek istenen nesnelere do\u011fru s\u00fcr\u00fckle LaTeXDrawFrame.139=Se\u00e7ili nesneleri sil LaTeXDrawFrame.146=Kopyaland\u0131... LaTeXDrawFrame.147=Yap\u0131\u015ft\u0131r\u0131ld\u0131... LaTeXDrawFrame.148=Kesildi... LaTeXDrawFrame.149=Silindi... LaTeXDrawFrame.154=Birle\u015ftirildi... LaTeXDrawFrame.155=Ayr\u0131ld\u0131... LaTeXDrawFrame.169=Kal\u0131p d\u0131\u015fa aktar\u0131ld\u0131! LaTeXDrawFrame.171=Se\u00e7 LaTeXDrawFrame.173=Dosyan\u0131n \u00fczerine kaydetmek istiyor musun? LaTeXDrawFrame.175=PStricks komutlar\u0131 d\u0131\u015fa aktar\u0131ld\u0131! LaTeXDrawFrame.176=PStricks komutlar\u0131 d\u0131\u015fa aktar\u0131lamad\u0131! LaTeXDrawFrame.184=Resim olarak d\u0131\u015fa aktar\u0131ld\u0131! LaTeXDrawFrame.185=Resim olarak d\u0131\u015fa aktar\u0131lamad\u0131! LaTeXDrawFrame.188=\u00c7izimi kaydet LaTeXDrawFrame.200=Bir \u00e7izimi a\u00e7... LaTeXDrawFrame.219=S\u00fcr\u00fcm LaTeXDrawFrame.220=, alts\u00fcr\u00fcm LaTeXDrawFrame.221=\ GNU General Public License \u015fartnamesi y\u00fcr\u00fcrl\u00fc\u011f\u00fcnce kullan\u0131ma sunulmu\u015ftur. LFrame2.1=Se\u00e7ili nesneleri hizala. LFrame2.10=Se\u00e7ili nesneleri aralar\u0131 e\u015fit mesafede olacak \u015fekilde dikey olarak yay. LFrame2.11=Se\u00e7ili nesneleri orta noktalar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde dikey olarak yay. LFrame2.12=Se\u00e7ili nesneleri tepe noktalar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde dikey olarak yay. LFrame2.13=Se\u00e7ili nesneleri sol kenarlar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde yatay olarak yay. LFrame2.14=Se\u00e7ili nesneleri aralar\u0131ndaki mesafe e\u015fit olacak \u015fekilde yatay olarak yay. LFrame2.15=Se\u00e7ili nesneleri orta noktalar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde yatay olarak yay. LFrame2.16=Se\u00e7ili nesneleri sa\u011f kenarlar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde yatay olarak yay. LFrame2.2=Se\u00e7ilenleri sol tarafa hizala LFrame2.3=Se\u00e7ilenleri sa\u011fa hizala LFrame2.4=Se\u00e7ilenlerin tepe noktalar\u0131n\u0131 hizala LFrame2.5=Se\u00e7ilenlerin alt noktalar\u0131n\u0131 hizala LFrame2.6=Se\u00e7ilenlerin orta noktalar\u0131n\u0131 yatay olarak hizala LFrame2.7=Se\u00e7ilenlerin orta noktalar\u0131n\u0131 dikey olarak hizala LFrame2.8=Se\u00e7ilenleri e\u015fit aral\u0131klarla yay. LFrame2.9=Se\u00e7ilen nesneleri, alt noktalar\u0131 aras\u0131ndaki mesafe e\u015fit olacak \u015fekilde dikey olarak yay latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/actions.properties000066400000000000000000000073371321075051700325140ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/dialogFrames.properties000066400000000000000000000050101321075051700334330ustar00rootroot00000000000000PreferencesFrame.Pref=Tercihler PreferencesFrame.grid=Izgara PreferencesFrame.codePanel=Komut alan\u0131 PreferencesFrame.antiAl=Anti-aliasing PreferencesFrame.rendQ=Render kalitesi PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Alpha interpolation kalitesi PreferencesFrame.newVers=Ba\u015flang\u0131\u00e7ta yeni s\u00fcr\u00fcmleri sor PreferencesFrame.lge=Dil (Bir sonraki a\u00e7\u0131l\u0131\u015fta) PreferencesFrame.general=Genel PreferencesFrame.folders=Dizinler PreferencesFrame.quality=G\u00f6r\u00fcnt\u00fc Kalitesi PreferencesFrame.selectFolder=Bir dizin se\u00e7 PreferencesFrame.defOpenSave=A\u00e7/Kaydet i\u00e7in varsay\u0131lan dizin PreferencesFrame.defFold=\u0130\u00e7e/D\u0131\u015fa aktarmalar i\u00e7in varsay\u0131lan dizin AbstractParametersFrame.0=\u00c7ift S\u0131n\u0131r AbstractParametersFrame.2=Ayra\u00e7: AbstractParametersFrame.4=Tamam AbstractParametersFrame.6=\u0130ptal AbstractParametersFrame.7=D\u00f6nd\u00fcrme A\u00e7\u0131s\u0131 AbstractParametersFrame.11=Tarama Kal\u0131nl\u0131\u011f\u0131 AbstractParametersFrame.20=Nokta \u00e7ap\u0131 AbstractParametersFrame.21=\u00e7ubuk Geni\u015fli\u011fi AbstractParametersFrame.22=K\u00f6\u015feli Parantez uzunlu\u011fu AbstractParametersFrame.23=Parantez Uzunlu\u011fu AbstractParametersFrame.24=x kal\u0131nl\u0131\u011f\u0131 + AbstractParametersFrame.26=Ok uzunlu\u011fu AbstractParametersFrame.27=Okun kuyruk sivrili\u011fi AbstractParametersFrame.28=Ok geni\u015fli\u011fi ParametersArcFrame.0=ba\u015flang\u0131\u00e7 a\u00e7\u0131s\u0131: ParametersArcFrame.1=biti\u015f a\u00e7\u0131s\u0131: ParametersGridFrame.0=Y Merkez ParametersGridFrame.1=X Merkez ParametersGridFrame.4=Alt\u0131zgara noktalar\u0131: ParametersGridFrame.5=Izgara Noktalar\u0131: ParametersGridFrame.6=Izgara geni\u015fli\u011fi: ParametersGridFrame.7=Alt\u0131zgara geni\u015fli\u011fi: ParametersGridFrame.8=Birim aral\u0131ktaki nokta say\u0131s\u0131: ParametersGridFrame.9=Belirte\u00e7 Boyu: ParametersGridFrame.11=Azami X: ParametersGridFrame.12=Asgari X: ParametersGridFrame.13=Azami Y: ParametersGridFrame.14=Asgari Y: ExportDialog.0=S\u0131k\u0131\u015ft\u0131rma Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/tr/others.properties000066400000000000000000000005571321075051700323550ustar00rootroot00000000000000XScale.cm=cm XScale.inch=in\u00e7 Arc.arc=Yay Arc.wedge=Dilim Arc.chord=Kiri\u015f DrawContainer.nameTemplate=Kal\u0131p ad\u0131 gir DrawContainer.overwriteTemplate=Bu kal\u0131p zaten var; \u00fczerine kaydedilsin mi? CloseButton.closePanel=Close the window UndoRedoManager.create=Olu\u015ftur UndoRedoManager.join=Birle\u015ftir UndoRedoManager.seperate=Ay\u0131r latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/000077500000000000000000000000001321075051700267165ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/1_6.properties000066400000000000000000000016461321075051700314300ustar00rootroot00000000000000LaTeXDrawFrame.0=Insert PSTricks code LaTeXDrawFrame.1=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043c\u0430\u043b\u044e\u043d\u043e\u043a LaTeXDrawFrame.3=\u0437\u0443\u043f\u0438\u043d\u0438\u0442\u0438 LaTeXDrawFrame.6=BMP \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 LaTeXDrawFrame.7=PNG \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 LaTeXDrawFrame.10=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=No figure found to import! LaTeXDrawFrame.34=Not able to import the PSTricks file! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Insert figures from PSTricks code Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex! ParserMessagesFrame.0=\u041a\u043e\u043c\u0430\u043d\u0434\u0430 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/1_7.properties000066400000000000000000000011311321075051700314160ustar00rootroot00000000000000LaTeXDrawFrame.0=\u0422\u0456\u043d\u044c LaTeXDrawFrame.1=\u0413\u0440\u0430\u0434\u0456\u0454\u043d\u0442 1 LaTeXDrawFrame.2=\u0413\u0440\u0430\u0434\u0456\u0454\u043d\u0442 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. AbstractParametersFrame.3=\u041a\u0443\u0442 \u0433\u0440\u0430\u0434\u0456\u0454\u043d\u0442\u0443 AbstractParametersFrame.4=Middle Pt latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/1_8.properties000066400000000000000000000035351321075051700314310ustar00rootroot00000000000000AbstractParametersFrame.0=interval: ParametersAxeFrame.0=\u0424\u043e\u0440\u043c\u0430: ParametersAxeFrame.1=Show origin ParametersAxeFrame.6=X-labels distance: ParametersAxeFrame.7=Y-labels distance: ParametersAxeFrame.8=X-labels increment: ParametersAxeFrame.9=Y-labels increment: ParametersAxeFrame.13=\u0420\u043e\u0437\u043c\u0456\u0440 ParametersAxeFrame.17=Ticks PreferencesFrame.3=Path of your LaTeX editor: PreferencesFrame.4=Standard grid PreferencesFrame.5=Personal grid PreferencesFrame.6=Magnetic grid PreferencesFrame.7=\u0406\u043d\u0442\u0435\u0440\u0432\u0430\u043b: LaTeXDrawFrame.2=Rotate the selected figure(s). LaTeXDrawFrame.3=\u041e\u0431\u0435\u0440\u043d\u0443\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0443 \u0444\u0456\u0433\u0443\u0440\u0443(\u0438) \u043d\u0430 90\u00b0. LaTeXDrawFrame.4=\u041e\u0431\u0435\u0440\u043d\u0443\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0443 \u0444\u0456\u0433\u0443\u0440\u0443(\u0438) \u043d\u0430 180\u00b0. LaTeXDrawFrame.5=\u041e\u0431\u0435\u0440\u043d\u0443\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0443 \u0444\u0456\u0433\u0443\u0440\u0443(\u0438) \u043d\u0430 270\u00b0. LaTeXDrawFrame.6=Reverse figures by symmetry. LaTeXDrawFrame.7=Reverse horizontally the selected figures. LaTeXDrawFrame.8=Reverse vertically the selected figures. LaTeXDrawFrame.12=Contains the parameters of the (magnetic) grid LaTeXDrawFrame.13=\u043c\u0430\u0433\u043d\u0456\u0442\u043d\u0438\u0439 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.17=Draw axes. LaTeXDrawFrame.23=\u0417\u0430\u043a\u0440\u0438\u0442\u0438 LaTeXDrawFrame.27=Release note LaTeXDrawFrame.28=License Axe.1=Axe Axe.2=Frame Axe.3=Full Axe.4=\u0412\u0435\u0440\u0448\u0438\u043d\u0430 Axe.5=\u041d\u0438\u0437 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/1_9.properties000066400000000000000000000105601321075051700314260ustar00rootroot00000000000000LaTeXDrawFrame.0=\u041d\u0435\u0434\u0430\u0432\u043d\u0456 \u0444\u0430\u0439\u043b\u0438 LaTeXDrawFrame.3=\u041a\u043e\u043c\u0431\u0456\u043d\u0430\u0446\u0456\u0457 \u043a\u043b\u0430\u0432\u0456\u0448 LaTeXDrawFrame.11=\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437\u0430\u043c\u043a\u043d\u0435\u043d\u0443 \u043a\u0440\u0438\u0432\u0443 \u0411\u0435\u0437\u044c\u0454 DrawPanel.0=Update figures to the grid ParametersAkinPointsFrame.0=Points interval: ParametersAkinPointsFrame.1=\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 ParametersAkinPointsFrame.2=type: PreferencesFrame.0=\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u0456\u0445 \u0444\u0430\u0439\u043b\u0456\u0432: PreferencesFrame.1=\u0422\u0435\u043c\u0430 (\u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a): ShortcutsFrame.1=Sequence ShortcutsFrame.3=\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u044f ShortcutsFrame.4=\u041d\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u044f ShortcutsFrame.5=\u041f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f ShortcutsFrame.6=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f ShortcutsFrame.8=\u043b\u0456\u0432\u0438\u0439 \u043a\u043b\u0430\u0446 ShortcutsFrame.9=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0431\u0456\u0433\u0443\u043d\u043e\u043a \u0432\u043f\u0440\u0430\u0432\u043e ShortcutsFrame.10=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0431\u0456\u0433\u0443\u043d\u043e\u043a \u0432\u043b\u0456\u0432\u043e ShortcutsFrame.11=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0438\u0439 \u0431\u0456\u0433\u0443\u043d\u043e\u043a \u0432\u0432\u0435\u0440\u0445 ShortcutsFrame.12=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0438\u0439 \u0431\u0456\u0433\u0443\u043d\u043e\u043a \u0432\u043d\u0438\u0437 ShortcutsFrame.18=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 \u0432\u043f\u0440\u0430\u0432\u043e ShortcutsFrame.19=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 \u0432\u043b\u0456\u0432\u043e ShortcutsFrame.20=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 \u0432\u0432\u0435\u0440\u0445 ShortcutsFrame.21=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 \u0432\u043d\u0438\u0437 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.29=\u041a\u043e\u043b\u0456\u0449\u0430\u0442\u043a\u043e \u043c\u0438\u0448\u0456 ShortcutsFrame.30=\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438/\u0437\u043c\u0435\u043d\u0448\u0438\u0442\u0438 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=\u041b\u0456\u0432\u0438\u0439 \u043a\u043b\u0430\u0446 \u0434\u043e\u0434\u0430\u0454 \u0442\u0435\u043a\u0441\u0442. MenusListener.6=\u041b\u0456\u0432\u0438\u0439 \u043a\u043b\u0430\u0446 \u0434\u043e\u0434\u0430\u0454 \u0441\u0456\u0442\u043a\u0443. 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=\u041b\u0456\u0432\u0438\u0439 \u043a\u043b\u0456\u043a \u0434\u043e\u0434\u0430\u0454 \u043a\u0440\u0430\u043f\u043a\u0443. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/LaTeXDrawFrame.properties000066400000000000000000000217731321075051700336140ustar00rootroot00000000000000LaTeXDrawFrame.0=\ \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0430 LaTeXDrawFrame.7=\u0414\u043e\u0432\u0456\u043b\u044c\u043d\u0430 \u043b\u0456\u043d\u0456\u044f LaTeXDrawFrame.16=\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 ... LaTeXDrawFrame.17=\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0444\u0456\u0433\u0443\u0440\u0443 LaTeXDrawFrame.18=\u0412\u0438\u0439\u0442\u0438 LaTeXDrawFrame.19=\u041a\u043e\u0434 PSTricks LaTeXDrawFrame.20=\u041c\u0430\u043b\u044e\u043d\u043e\u043a JPEG LaTeXDrawFrame.22=\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0438 LaTeXDrawFrame.23=\u0412\u0435\u0440\u043d\u0443\u0442\u0438 LaTeXDrawFrame.38=\u0412\u0456\u0441\u044c X LaTeXDrawFrame.39=\u0412\u0456\u0441\u044c Y LaTeXDrawFrame.40=\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438 LaTeXDrawFrame.41=\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0438 LaTeXDrawFrame.42=\u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u044f\u043a \u0448\u0430\u0431\u043b\u043e\u043d LaTeXDrawFrame.43=\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 LaTeXDrawFrame.44=\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 LaTeXDrawFrame.48=\u0417\u0430\u043b\u0438\u0432\u043a\u0430 LaTeXDrawFrame.49=\u0428\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0430 LaTeXDrawFrame.56=\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f LaTeXDrawFrame.57=\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438 LaTeXDrawFrame.58=\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438 LaTeXDrawFrame.60=\u0422\u0435\u043a\u0441\u0442 LaTeXDrawFrame.65=\u0417\u043c\u0456\u043d\u0438\u0442\u0438 \u0442\u043e\u0432\u0449\u0438\u043d\u0443 \u0444\u0456\u0433\u0443\u0440\u0438 LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0444\u0456\u0433\u0443\u0440\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0456\u0439 \u043f\u043b\u0430\u043d LaTeXDrawFrame.71=\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0444\u0456\u0433\u0443\u0440\u0443 \u043d\u0430 \u0437\u0430\u0434\u043d\u0456\u0439 \u043f\u043b\u0430\u043d LaTeXDrawFrame.75=\u0413\u0440\u0443\u043f\u0443\u0432\u0430\u0442\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 \u0444\u0456\u0433\u0443\u0440 LaTeXDrawFrame.76=\u0420\u043e\u0437\u0433\u0440\u0443\u043f\u0443\u0432\u0430\u0442\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 \u0444\u0456\u0433\u0443\u0440 LaTeXDrawFrame.77=\u0412\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u043f\u043e\u0437\u0438\u0446\u0456\u044e \u043c\u0435\u0436 \u0444\u0456\u0433\u0443\u0440\u0438 LaTeXDrawFrame.78=\u042f\u043a\u0449\u043e \u0432\u0438\u0431\u0440\u0430\u0442\u0438, \u0444\u0456\u0433\u0443\u0440\u0430 \u043c\u0430\u0442\u0438\u043c\u0435 \u043f\u043e\u0434\u0432\u0456\u0439\u043d\u0443 \u043c\u0435\u0436\u0443 LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=\u0424\u0430\u0439\u043b LaTeXDrawFrame.89=\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f LaTeXDrawFrame.90=\u0412\u0438\u0433\u043b\u044f\u0434 LaTeXDrawFrame.91=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f LaTeXDrawFrame.93=\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430 LaTeXDrawFrame.103=\u0428\u0430\u0431\u043b\u043e\u043d\u0438 LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u043e\u0447\u043a\u0438 LaTeXDrawFrame.119=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u0440\u044f\u043c\u043e\u043a\u0443\u0442\u043d\u0438\u043a\u0430 LaTeXDrawFrame.120=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 LaTeXDrawFrame.121=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u043b\u0430\u043c\u0430\u043d\u043e\u0457 \u043b\u0456\u043d\u0456\u0457 LaTeXDrawFrame.123=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0440\u043e\u043c\u0431\u0430 LaTeXDrawFrame.124=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0440\u0438\u043a\u0443\u0442\u043d\u0438\u043a\u0430 LaTeXDrawFrame.125=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0435\u043b\u0456\u043f\u0441\u0430 LaTeXDrawFrame.127=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043b\u0430 LaTeXDrawFrame.128=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0434\u0443\u0433\u0438 LaTeXDrawFrame.130=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0441\u0435\u043a\u0442\u043e\u0440\u0430 LaTeXDrawFrame.131=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 LaTeXDrawFrame.132=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u043a\u0440\u0438\u0432\u043e\u0457 \u0411\u0435\u0437\u044c\u0454 LaTeXDrawFrame.133=\u041c\u0430\u043b\u044e\u0432\u0430\u043d\u043d\u044f \u0441\u0456\u0442\u043a\u0438 LaTeXDrawFrame.136=\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043e\u0434\u043d\u0443 \u0447\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 \u0444\u0456\u0433\u0443\u0440
    LaTeXDrawFrame.137=\u041f\u043e\u0440\u0430\u0434\u0430 : \u0449\u043e\u0431 \u0432\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 LaTeXDrawFrame.138=\u0444\u0456\u0433\u0443\u0440, \u043a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u043c\u0438\u0448\u043a\u043e\u044e \u0456, \u043d\u0435 \u0432\u0456\u0434\u043f\u0443\u0441\u043a\u0430\u044e\u0447\u0438,
    \u043e\u0445\u043e\u043f\u0456\u0442\u044c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 LaTeXDrawFrame.139=\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043d\u0456 \u0444\u0456\u0433\u0443\u0440\u0438 LaTeXDrawFrame.146=\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u043d\u043d\u044f... LaTeXDrawFrame.147=\u0412\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044f... LaTeXDrawFrame.148=\u0412\u0438\u0440\u0456\u0437\u0430\u043d\u043d\u044f... LaTeXDrawFrame.149=\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f... LaTeXDrawFrame.154=\u0413\u0440\u0443\u043f\u0443\u0432\u0430\u043d\u043d\u044f... LaTeXDrawFrame.155=\u0420\u043e\u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0443\u0432\u0430\u043d\u043d\u044f... LaTeXDrawFrame.169=\u041f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u0443 \u0448\u0430\u0431\u043b\u043e\u043d! LaTeXDrawFrame.171=\u0412\u0438\u0431\u0440\u0430\u0442\u0438 LaTeXDrawFrame.173=\u0425\u043e\u0447\u0435\u0442\u0435 \u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0444\u0430\u0439\u043b? LaTeXDrawFrame.175=\u041a\u043e\u0434 PSTricks \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043e LaTeXDrawFrame.176=\u041d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u043e \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043a\u043e\u0434 PSTricks! LaTeXDrawFrame.184=\u041f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e! LaTeXDrawFrame.185=\u041d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u043e \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443! LaTeXDrawFrame.188=\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u043c\u0430\u043b\u044e\u043d\u043e\u043a LaTeXDrawFrame.200=\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u043c\u0430\u043b\u044e\u043d\u043e\u043a LaTeXDrawFrame.219=\u0412\u0435\u0440\u0441\u0456\u044f LaTeXDrawFrame.220=, \u0437\u0431\u0456\u0440\u043a\u0430 LaTeXDrawFrame.221=\ \u0440\u043e\u0437\u043f\u043e\u0432\u0441\u044e\u0434\u0436\u0443\u0454\u0442\u044c\u0441\u044f \u0437\u0433\u0456\u0434\u043d\u043e GNU General Public License, 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.2=Align on the left the selected figures. 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. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/actions.properties000066400000000000000000000073371321075051700325060ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/dialogFrames.properties000066400000000000000000000052611321075051700334350ustar00rootroot00000000000000PreferencesFrame.Pref=Preferences... PreferencesFrame.grid=\u0421\u0456\u0442\u043a\u0430 PreferencesFrame.codePanel=Code panel PreferencesFrame.antiAl=\u0417\u0433\u043b\u0430\u0434\u0436\u0443\u0432\u0430\u043d\u043d\u044f PreferencesFrame.rendQ=Rendering quality PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Alpha interpolation quality PreferencesFrame.newVers=Check new version on start-up PreferencesFrame.lge=\u041c\u043e\u0432\u0430 (\u043f\u043e\u0442\u0440\u0456\u0431\u0435\u043d \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a) PreferencesFrame.general=\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435 PreferencesFrame.folders=\u0422\u0435\u043a\u0438 PreferencesFrame.quality=\u042f\u043a\u0456\u0441\u0442\u044c PreferencesFrame.selectFolder=\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u0442\u0435\u043a\u0443 PreferencesFrame.defOpenSave=Default folder for open/save actions: PreferencesFrame.defFold=Default folder for import/export actions: AbstractParametersFrame.0=Double boundary AbstractParametersFrame.2=Separator: AbstractParametersFrame.4=\u041e\u043a AbstractParametersFrame.6=\u0421\u043a\u0430\u0441\u0443\u0432\u0430\u0442\u0438 AbstractParametersFrame.7=\u041a\u0443\u0442 \u043e\u0431\u0435\u0440\u0442\u0430\u043d\u043d\u044f: AbstractParametersFrame.11=Hatchings Width: AbstractParametersFrame.20=Dot diameter = AbstractParametersFrame.21=Bar width = AbstractParametersFrame.22=Bracket length = AbstractParametersFrame.23=Rounded bracket lgth = AbstractParametersFrame.24=x thickness + AbstractParametersFrame.26=Arrow length AbstractParametersFrame.27=Arrow inset AbstractParametersFrame.28=Arrow width ParametersArcFrame.0=start angle: ParametersArcFrame.1=end angle: ParametersGridFrame.0=Y Origin: ParametersGridFrame.1=X Origin: ParametersGridFrame.4=Subgrid dots: ParametersGridFrame.5=Grid dots: ParametersGridFrame.6=\u0428\u0438\u0440\u0438\u043d\u0430 \u0441\u0456\u0442\u043a\u0438: ParametersGridFrame.7=Subgrid width: ParametersGridFrame.8=Subgrid division: ParametersGridFrame.9=Label size: ParametersGridFrame.11=\u041c\u0430\u043a\u0441. X: ParametersGridFrame.12=\u041c\u0456\u043d. X: ParametersGridFrame.13=\u041c\u0430\u043a\u0441. Y: ParametersGridFrame.14=\u041c\u0456\u043d. Y: ExportDialog.0=\u0421\u0442\u0438\u0441\u043d\u0435\u043d\u043d\u044f Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/uk/others.properties000066400000000000000000000015071321075051700323430ustar00rootroot00000000000000XScale.cm=\u0441\u043c XScale.inch=\u0434\u044e\u0439\u043c\u0438 Arc.arc=\u0414\u0443\u0433\u0430 \u043a\u043e\u043b\u0430 Arc.wedge=Wedge Arc.chord=\u0425\u043e\u0440\u0434\u0430 DrawContainer.nameTemplate=\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u0456\u043c'\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 DrawContainer.overwriteTemplate=\u0422\u0430\u043a\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0436\u0435 \u0456\u0441\u043d\u0443\u0454; \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u0438 \u0439\u043e\u0433\u043e? CloseButton.closePanel=Close the window UndoRedoManager.create=\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 UndoRedoManager.join=\u041e\u0431'\u0454\u0434\u043d\u0430\u0442\u0438 UndoRedoManager.seperate=\u0412\u0456\u0434\u043e\u043a\u0440\u0435\u043c\u0438\u0442\u0438 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/000077500000000000000000000000001321075051700267155ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/1_6.properties000066400000000000000000000014711321075051700314230ustar00rootroot00000000000000LaTeXDrawFrame.0=Ch\u00e8n m\u00e3 l\u1ec7nh PSTricks LaTeXDrawFrame.1=Ch\u00e8n h\u00ecnh LaTeXDrawFrame.3=d\u1eebng LaTeXDrawFrame.6=D\u1ea1ng h\u00ecnh BMP LaTeXDrawFrame.7=D\u1ea1ng h\u00ecnh PNG LaTeXDrawFrame.10=Ch\u00e8n LaTeXDrawFrame.16=The current PSTricks parser only parses few commands.
    You may import only commands managed by LaTeXDraw. LaTeXDrawFrame.33=Kh\u00f4ng t\u00ecm th\u1ea5y h\u00ecnh \u0111\u1ec3 nh\u1eadp v\u00e0o! LaTeXDrawFrame.34=Kh\u00f4ng th\u1ec3 nh\u1eadp file PSTricks! LaTeXDrawFrame.36=Code converted in figures! InsertPSTricksCodeFrame.0=Ch\u00e8n h\u00ecnh t\u1eeb m\u00e3 l\u1ec7nh PSTricks. Picture.0=% Luu y: duong dan cua hinh ve sau day bao gom cac dau trong va se khong the dich boi tex! (Ma lenh TeX khong the go bang tieng Viet!) ParserMessagesFrame.0=L\u1ec7nh latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/1_7.properties000066400000000000000000000010321321075051700314150ustar00rootroot00000000000000LaTeXDrawFrame.0=B\u00f3ng LaTeXDrawFrame.1=Gradient 1 LaTeXDrawFrame.2=Gradient 2 LaTeXDrawFrame.4=Th\u00eam b\u00f3ng v\u00e0o h\u00ecnh v\u1ebd. LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=\u0110\u1eb7t h\u00ecnh v\u00e0o b\u1ea3n v\u1ebd (ph\u00eda tr\u01b0\u1edbc, ph\u00eda sau,...). LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=G\u00f3c h\u01b0\u1edbng gradient AbstractParametersFrame.4=\u0110i\u1ec3m gi\u1eefa latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/1_8.properties000066400000000000000000000044611321075051700314270ustar00rootroot00000000000000AbstractParametersFrame.0=kho\u1ea3ng: ParametersAxeFrame.0=H\u00ecnh d\u1ea1ng: ParametersAxeFrame.1=Hi\u1ec7n \u0111i\u1ec3m g\u1ed1c ParametersAxeFrame.6=Kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c s\u1ed1 tr\u00ean tr\u1ee5c X: ParametersAxeFrame.7=Kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c s\u1ed1 tr\u00ean tr\u1ee5c Y: ParametersAxeFrame.8=B\u01b0\u1edbc t\u0103ng gi\u1eefa c\u00e1c s\u1ed1 tr\u00ean tr\u1ee5c X: ParametersAxeFrame.9=B\u01b0\u1edbc t\u0103ng gi\u1eefa c\u00e1c s\u1ed1 tr\u00ean tr\u1ee5c Y: ParametersAxeFrame.13=K\u00edch c\u1ee1 : ParametersAxeFrame.17=V\u1ea1ch PreferencesFrame.3=\u0110\u01b0\u1eddng d\u1eabn \u0111\u1ebfn tr\u00ecnh so\u1ea1n th\u1ea3o LaTeX c\u1ee7a b\u1ea1n: PreferencesFrame.4=L\u01b0\u1edbi \u00f4 ti\u00eau chu\u1ea9n PreferencesFrame.5=L\u01b0\u1edbi \u00f4 d\u00e0nh cho ng\u01b0\u1eddi d\u00f9ng PreferencesFrame.6=L\u01b0\u1edbi \u00f4 c\u00f3 b\u1eaft \u0111i\u1ec3m PreferencesFrame.7=Kho\u1ea3ng: LaTeXDrawFrame.2=Xoay (c\u00e1c) h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn. LaTeXDrawFrame.3=Xoay (c\u00e1c) h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn \u0111i 90\u00b0. LaTeXDrawFrame.4=Xoay (c\u00e1c) h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn \u0111i 180\u00b0. LaTeXDrawFrame.5=Xoay (c\u00e1c) h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn \u0111i 270\u00b0. LaTeXDrawFrame.6=\u0110\u1ea3o ng\u01b0\u1ee3c h\u00ecnh b\u1eb1ng ph\u00e9p \u0111\u1ed1i x\u1ee9ng. LaTeXDrawFrame.7=\u0110\u1ea3o ng\u01b0\u1ee3c h\u00ecnh theo h\u01b0\u1edbng n\u1eb1m ngang. LaTeXDrawFrame.8=\u0110\u1ea3o ng\u01b0\u1ee3c h\u00ecnh theo h\u01b0\u1edbng th\u1eb3ng \u0111\u1ee9ng. LaTeXDrawFrame.12=C\u00f3 ch\u1ee9a c\u00e1c tham s\u1ed1 c\u1ee7a l\u01b0\u1edbi (b\u1eaft \u0111i\u1ec3m) LaTeXDrawFrame.13=b\u1eaft \u0111i\u1ec3m LaTeXDrawFrame.14=N\u1ebfu \u0111\u01b0\u1ee3c ch\u1ecdn, h\u00ecnh s\u1ebd \u0111\u01b0\u1ee3c b\u1eaft v\u00e0o c\u00e1c \u0111i\u1ec3m n\u00fat l\u01b0\u1edbi. LaTeXDrawFrame.15=\u0110\u1eb7t kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c \u0111\u01b0\u1eddng trong l\u01b0\u1edbi ng\u01b0\u1eddi d\u00f9ng (theo pixel). LaTeXDrawFrame.17=V\u1ebd c\u00e1c tr\u1ee5c. LaTeXDrawFrame.23=\u0110\u00f3ng LaTeXDrawFrame.27=Phi\u00ean b\u1ea3n ph\u00e1t h\u00e0nh LaTeXDrawFrame.28=License Axe.1=R\u00ecu Axe.2=Khung Axe.3=\u0110\u1ea7y \u0111\u1ee7 Axe.4=Tr\u00ean c\u00f9ng Axe.5=D\u01b0\u1edbi c\u00f9ng latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/1_9.properties000066400000000000000000000065711321075051700314340ustar00rootroot00000000000000LaTeXDrawFrame.0=C\u00e1c file g\u1ea7n \u0111\u00e2y LaTeXDrawFrame.3=\u0110\u01b0\u1eddng t\u1eaft LaTeXDrawFrame.11=V\u1ebd m\u1ed9t \u0111\u01b0\u1eddng cong B\u00e9zier kh\u00e9p k\u00edn DrawPanel.0=C\u1eadp nh\u1eadt c\u00e1c h\u00ecnh tr\u00ean l\u01b0\u1edbi ParametersAkinPointsFrame.0=Kho\u1ea3ng c\u00e1ch gi\u1eefa c\u00e1c \u0111i\u1ec3m: ParametersAkinPointsFrame.1=M\u1edf ParametersAkinPointsFrame.2=ki\u1ec3u: PreferencesFrame.0=S\u1ed1 file \u0111\u01b0\u1ee3c m\u1edf g\u1ea7n \u0111\u00e2y: PreferencesFrame.1=Ch\u1ee7 \u0111\u1ec1 (c\u1ea7n kh\u1edfi \u0111\u1ed9ng l\u1ea1i): ShortcutsFrame.1=Chu\u1ed7i h\u00ecnh ShortcutsFrame.3=Th\u1ec3 lo\u1ea1i ShortcutsFrame.4=Di chuy\u1ec3n ShortcutsFrame.5=Bi\u1ebfn h\u00ecnh ShortcutsFrame.6=B\u1ea3n v\u1ebd ShortcutsFrame.8=nh\u00e1y chu\u1ed9t tr\u00e1i ShortcutsFrame.9=Di chuy\u1ec3n thanh tr\u01b0\u1ee3t ngang sang ph\u1ea3i ShortcutsFrame.10=Di chuy\u1ec3n thanh tr\u01b0\u1ee3t ngang sang tr\u00e1i ShortcutsFrame.11=Di chuy\u1ec3n thanh tr\u01b0\u1ee3t d\u1ecdc l\u00ean tr\u00ean ShortcutsFrame.12=Di chuy\u1ec3n thanh tr\u01b0\u1ee3t d\u1ecdc xu\u1ed1ng d\u01b0\u1edbi ShortcutsFrame.18=Di chuy\u1ec3n c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn sang ph\u1ea3i ShortcutsFrame.19=Di chuy\u1ec3n c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn sang tr\u00e1i ShortcutsFrame.20=Di chuy\u1ec3n c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn l\u00ean tr\u00ean ShortcutsFrame.21=Di chuy\u1ec3n c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn xu\u1ed1ng d\u01b0\u1edbi ShortcutsFrame.23=C\u1eadp nh\u1eadt c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn l\u00ean l\u01b0\u1edbi v\u1ebd ShortcutsFrame.25=Ch\u1ecdn t\u1ea5t c\u1ea3 c\u00e1c h\u00ecnh tr\u00ean b\u1ea3n v\u1ebd ShortcutsFrame.26=Th\u00eam h\u00ecnh \u0111\u01b0\u1ee3c nh\u00e0y chu\u1ed9t v\u00e0o nh\u00f3m \u0111\u01b0\u1ee3c ch\u1ecdn ShortcutsFrame.27=B\u1edbt h\u00ecnh \u0111\u01b0\u1ee3c nh\u00e0y chu\u1ed9t kh\u1ecfi nh\u00f3m \u0111\u01b0\u1ee3c ch\u1ecdn ShortcutsFrame.29=B\u00e1nh l\u0103n tr\u00ean chu\u1ed9t ShortcutsFrame.30=Ph\u00f3ng to/thu nh\u1ecf MenusListener.0=Nh\u1ea5n gi\u1eef ph\u00edm tr\u00e1i v\u00e0 k\u00e9o chu\u1ed9t \u0111\u1ec3 \u0111\u1ecbnh v\u1ecb \u0111i\u1ec3m th\u1ee9 hai. K\u1ebft th\u00fac b\u1eb1ng c\u00e1ch nh\u1ea3 ph\u00edm chu\u1ed9t. MenusListener.1=Nh\u00e1y ph\u00edm tr\u00e1i chu\u1ed9t \u0111\u1ec3 th\u00eam m\u1ed9t \u0111i\u1ec3m, nh\u00e1y ph\u00edm ph\u1ea3i ho\u1eb7c nh\u00e1y \u0111\u00fap ph\u00edm tr\u00e1i cho \u0111i\u1ec3m cu\u1ed1i \u0111\u1ed3ng th\u1eddi k\u1ebft th\u00fac vi\u1ec7c t\u1ea1o h\u00ecnh. MenusListener.4=Nh\u1ea5n gi\u1eef ph\u00edm tr\u00e1i v\u00e0 k\u00e9o chu\u1ed9t \u0111\u1ec3 \u0111\u1ecbnh v\u1ecb \u0111i\u1ec3m cu\u1ed1i c\u00f9ng. K\u1ebft th\u00fac b\u1eb1ng c\u00e1ch nh\u1ea3 ph\u00edm chu\u1ed9t. MenusListener.5=Nh\u00e1y ph\u00edm tr\u00e1i chu\u1ed9t \u0111\u1ec3 th\u00eam d\u00f2ng ch\u1eef. MenusListener.6=Nh\u00e1y ph\u00edm tr\u00e1i chu\u1ed9t \u0111\u1ec3 th\u00eam l\u01b0\u1edbi v\u1ebd. MenusListener.7=Nh\u00e1y ph\u00edm tr\u00e1i chu\u1ed9t \u0111\u1ec3 th\u00eam tr\u1ee5c. MenusListener.8=Nh\u1ea5n gi\u1eef ph\u00edm tr\u00e1i v\u00e0 k\u00e9o chu\u1ed9t \u0111\u1ec3 v\u1ebd h\u00ecnh. K\u1ebft th\u00fac b\u1eb1ng c\u00e1ch nh\u1ea3 ph\u00edm chu\u1ed9t. MenusListener.9=Nh\u00e1y ph\u00edm tr\u00e1i chu\u1ed9t \u0111\u1ec3 th\u00eam m\u1ed9t \u0111i\u1ec3m ch\u1ea5m. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/LaTeXDrawFrame.properties000066400000000000000000000132341321075051700336040ustar00rootroot00000000000000LaTeXDrawFrame.0=\ tr\u1ee3 gi\u00fap LaTeXDrawFrame.7=B\u1eb1ng tay LaTeXDrawFrame.16=Xu\u1ea5t d\u01b0\u1edbi d\u1ea1ng... LaTeXDrawFrame.17=Xo\u00e1 h\u00ecnh LaTeXDrawFrame.18=Tho\u00e1t LaTeXDrawFrame.19=M\u00e3 PSTricks LaTeXDrawFrame.20=H\u00ecnh JPEG LaTeXDrawFrame.22=L\u00e0m l\u1ea1i LaTeXDrawFrame.23=H\u1ee7y b\u01b0\u1edbc LaTeXDrawFrame.38=T\u1ec9 l\u1ec7 theo ph\u01b0\u01a1ng X LaTeXDrawFrame.39=T\u1ec9 l\u1ec7 theo ph\u01b0\u01a1ng Y LaTeXDrawFrame.40=Sao ch\u00e9p LaTeXDrawFrame.41=C\u1eadp nh\u1eadt c\u00e1c b\u1ea3n m\u1eabu LaTeXDrawFrame.42=Xu\u1ea5t d\u01b0\u1edbi d\u1ea1ng c\u00e1c b\u1ea3n m\u1eabu LaTeXDrawFrame.43=D\u00e1n LaTeXDrawFrame.44=C\u1eaft LaTeXDrawFrame.48=M\u1eb7t trong h\u00ecnh v\u1ebd LaTeXDrawFrame.49=H\u1ecda ti\u1ebft LaTeXDrawFrame.56=Tu\u1ef3 ch\u1ecdn LaTeXDrawFrame.57=Ph\u00f3ng to LaTeXDrawFrame.58=Thu nh\u1ecf LaTeXDrawFrame.60=Th\u00eam d\u00f2ng ch\u1eef LaTeXDrawFrame.65=Thay \u0111\u1ed5i \u0111\u1ed9 d\u00e0y c\u1ee7a h\u00ecnh LaTeXDrawFrame.66=Change the color of the borders of the figure LaTeXDrawFrame.68=Change the color of the interior of the figure LaTeXDrawFrame.69=Change the color of the hatchings LaTeXDrawFrame.70=\u0110\u01b0a h\u00ecnh l\u00ean tr\u00ean c\u00f9ng LaTeXDrawFrame.71=\u0110\u1eb7t h\u00ecnh xu\u1ed1ng n\u1ec1n LaTeXDrawFrame.75=Nh\u00f3m m\u1ed9t v\u00e0i h\u00ecnh l\u1ea1i LaTeXDrawFrame.76=Ph\u00e2n t\u00e1ch m\u1ed9t v\u00e0i h\u00ecnh LaTeXDrawFrame.77=X\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed \u0111\u01b0\u1eddng vi\u1ec1n c\u1ee7a h\u00ecnh LaTeXDrawFrame.78=N\u1ebfu \u0111\u01b0\u1ee3c ch\u1ecdn, h\u00ecnh s\u1ebd c\u00f3 \u0111\u01b0\u1eddng vi\u1ec1n k\u00e9p LaTeXDrawFrame.79=Change to color of the space between the double borders LaTeXDrawFrame.88=File LaTeXDrawFrame.89=Ch\u1ec9nh s\u1eeda LaTeXDrawFrame.90=Hi\u1ec3n th\u1ecb LaTeXDrawFrame.91=V\u1ebd LaTeXDrawFrame.93=Tr\u1ee3 gi\u00fap LaTeXDrawFrame.103=B\u1ea3n m\u1eabu LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=V\u1ebd m\u1ed9t \u0111i\u1ec3m ch\u1ea5m LaTeXDrawFrame.119=V\u1ebd m\u1ed9t h\u00ecnh ch\u1eef nh\u1eadt LaTeXDrawFrame.120=V\u1ebd m\u1ed9t h\u00ecnh vu\u00f4ng LaTeXDrawFrame.121=V\u1ebd m\u1ed9t h\u00ecnh \u0111a gi\u00e1c LaTeXDrawFrame.123=V\u1ebd m\u1ed9t h\u00ecnh thoi LaTeXDrawFrame.124=V\u1ebd m\u1ed9t h\u00ecnh tam gi\u00e1c LaTeXDrawFrame.125=V\u1ebd m\u1ed9t h\u00ecnh e-lip LaTeXDrawFrame.127=V\u1ebd m\u1ed9t v\u00f2ng tr\u00f2n LaTeXDrawFrame.128=V\u1ebd m\u1ed9t \u0111\u01b0\u1eddng cung tr\u00f2n LaTeXDrawFrame.130=V\u1ebd m\u1ed9t h\u00ecnh n\u00eam LaTeXDrawFrame.131=V\u1ebd m\u1ed9t d\u00e2y cung LaTeXDrawFrame.132=V\u1ebd m\u1ed9t \u0111\u01b0\u1eddng cong B\u00e9zier LaTeXDrawFrame.133=V\u1ebd m\u1ed9t l\u01b0\u1edbi LaTeXDrawFrame.136=Ch\u1ecdn m\u1ed9t ho\u1eb7c nhi\u1ec1u h\u00ecnh
    LaTeXDrawFrame.137=L\u1eddi khuy\u00ean : \u0111\u1ec3 ch\u1ecdn nhi\u1ec1u LaTeXDrawFrame.138=h\u00ecnh, \u1ea5n v\u00e0 gi\u1eef ph\u00edm
    chu\u1ed9t trong khi k\u00e9o chu\u1ed9t bao l\u1ea5y c\u00e1c h\u00ecnh LaTeXDrawFrame.139=Xo\u00e1 (c\u00e1c) h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LaTeXDrawFrame.146=\u0110\u00e3 sai ch\u00e9p... LaTeXDrawFrame.147=\u0110\u00e3 d\u00e1n... LaTeXDrawFrame.148=\u0110\u00e3 c\u1eaft... LaTeXDrawFrame.149=\u0110\u00e3 xo\u00e1... LaTeXDrawFrame.154=\u0110\u00e3 nh\u00f3m l\u1ea1i... LaTeXDrawFrame.155=\u0110\u00e3 ph\u00e2n t\u00e1ch... LaTeXDrawFrame.169=B\u1ea3n m\u1eabu \u0111\u00e3 \u0111\u01b0\u1ee3c xu\u1ea5t xong! LaTeXDrawFrame.171=Ch\u1ecdn LaTeXDrawFrame.173=B\u1ea1n c\u00f3 mu\u1ed1n thay th\u1ebf file? LaTeXDrawFrame.175=M\u00e3 PSTricks \u0111\u00e3 \u0111\u01b0\u1ee3c xu\u1ea5t! LaTeXDrawFrame.176=Kh\u00f4ng th\u1ec3 xu\u1ea5t m\u00e3 PSTricks! LaTeXDrawFrame.184=\u0110\u00e3 xu\u1ea5t d\u01b0\u1edbi d\u1ea1ng \u1ea3nh! LaTeXDrawFrame.185=Kh\u00f4ng th\u1ec3 xu\u1ea5t d\u01b0\u1edbi d\u1ea1ng \u1ea3nh! LaTeXDrawFrame.188=L\u01b0u l\u1ea1i b\u1ea3n v\u1ebd LaTeXDrawFrame.200=M\u1edf m\u1ed9t b\u1ea3n v\u1ebd LaTeXDrawFrame.219=Phi\u00ean b\u1ea3n LaTeXDrawFrame.220=, b\u1ea3n d\u1ef1ng LaTeXDrawFrame.221=\ \u0111\u01b0\u1ee3c ph\u00e2n ph\u1ed1i theo c\u00e1c \u0111i\u1ec1u kho\u1ea3n trong Gi\u1ea5y ph\u00e9p C\u00f4ng c\u1ed9ng GNU LFrame2.1=D\u00f3ng c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn theo h\u00e0ng. LFrame2.10=X\u1ebfp c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn c\u00e1ch \u0111\u1ec1u nhau theo chi\u1ec1u d\u1ecdc. 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=X\u1ebfp c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn c\u00e1ch \u0111\u1ec1u nhau theo chi\u1ec1u ngang. 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=Canh tr\u00e1i c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.3=Canh ph\u1ea3i c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.4=Canh tr\u00ean c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.5=Canh d\u01b0\u1edbi c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.6=Canh gi\u1eefa theo chi\u1ec1u ngang c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.7=Canh gi\u1eefa theo chi\u1ec1u d\u1ecdc c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn LFrame2.8=X\u1ebfp c\u00e1c h\u00ecnh \u0111\u01b0\u1ee3c ch\u1ecdn c\u00e1ch \u0111\u1ec1u nhau. LFrame2.9=Distribute vertically, at equal distance between the bottom sides of the selected figures. latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/actions.properties000066400000000000000000000073371321075051700325050ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=Drawinglatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/dialogFrames.properties000066400000000000000000000062661321075051700334420ustar00rootroot00000000000000PreferencesFrame.Pref=Tu\u1ef3 ch\u1ecdn... PreferencesFrame.grid=L\u01b0\u1edbi PreferencesFrame.codePanel=B\u1ea3ng \u0111i\u1ec1u khi\u1ec3n PreferencesFrame.antiAl=L\u00e0m m\u1ec1m \u0111\u01b0\u1eddng vi\u1ec1n h\u00ecnh v\u1ebd PreferencesFrame.rendQ=Rendering quality PreferencesFrame.colRendQ=Color rendering quality PreferencesFrame.AlphaQ=Ch\u1ea5t l\u01b0\u1ee3ng n\u1ed9i suy alpha PreferencesFrame.newVers=Ki\u1ec3m tra phi\u00ean b\u1ea3n m\u1edbi m\u1ed7i khi kh\u1edfi \u0111\u1ed9ng PreferencesFrame.lge=Ng\u00f4n ng\u1eef (c\u1ea7n kh\u1edfi \u0111\u1ed9ng l\u1ea1i) PreferencesFrame.general=Ch\u1ee9c n\u0103ng chung PreferencesFrame.folders=Th\u01b0 m\u1ee5c PreferencesFrame.quality=Ch\u1ea5t l\u01b0\u1ee3ng PreferencesFrame.selectFolder=Ch\u1ecdn m\u1ed9t th\u01b0 m\u1ee5c PreferencesFrame.defOpenSave=Th\u01b0 m\u1ee5c m\u1eb7c \u0111\u1ecbnh cho c\u00e1c thao t\u00e1c m\u1edf/l\u01b0u: PreferencesFrame.defFold=Th\u01b0 m\u1ee5c m\u1eb7c \u0111\u1ecbnh cho c\u00e1c thao t\u00e1c nh\u1eadp/xu\u1ea5t: AbstractParametersFrame.0=\u0110\u01b0\u1eddng bi\u00ean k\u00e9p AbstractParametersFrame.2=\u0110\u01b0\u1eddng ph\u00e2n c\u00e1ch: AbstractParametersFrame.4=Ok AbstractParametersFrame.6=H\u1ee7y b\u1ecf AbstractParametersFrame.7=G\u00f3c quay: AbstractParametersFrame.11=\u0110\u1ed9 d\u00e0y c\u1ee7a \u0111\u01b0\u1eddng hoa v\u0103n: AbstractParametersFrame.20=\u0110\u01b0\u1eddng k\u00ednh \u0111i\u1ec3m ch\u1ea5m = AbstractParametersFrame.21=B\u1ec1 r\u1ed9ng thanh = AbstractParametersFrame.22=\u0110\u1ed9 d\u00e0i ngo\u1eb7c vu\u00f4ng = AbstractParametersFrame.23=\u0110\u1ed9 d\u00e0i ngo\u1eb7c tr\u00f2n = AbstractParametersFrame.24=x \u0111\u1ed9 d\u00e0y + AbstractParametersFrame.26=Chi\u1ec1u d\u00e0i m\u0169i t\u00ean AbstractParametersFrame.27=Ph\u1ea7n trong c\u1ee7a m\u0169i t\u00ean AbstractParametersFrame.28=B\u1ec1 r\u1ed9ng m\u0169i t\u00ean ParametersArcFrame.0=g\u00f3c kh\u1edfi \u0111\u1ea7u: ParametersArcFrame.1=g\u00f3c k\u1ebft th\u00fac: ParametersGridFrame.0=T\u1ecda \u0111\u1ed9 Y c\u1ee7a \u0111i\u1ec3m g\u1ed1c: ParametersGridFrame.1=T\u1ecda \u0111\u1ed9 X c\u1ee7a \u0111i\u1ec3m g\u1ed1c: ParametersGridFrame.4=C\u00e1c \u0111i\u1ec3m ch\u1ea5m c\u1ee7a l\u01b0\u1edbi nh\u1ecf: ParametersGridFrame.5=C\u00e1c \u0111i\u1ec3m ch\u1ea5m c\u1ee7a l\u01b0\u1edbi: ParametersGridFrame.6=B\u1ec1 r\u1ed9ng l\u01b0\u1edbi: ParametersGridFrame.7=B\u1ec1 r\u1ed9ng c\u1ee7a l\u01b0\u1edbi nh\u1ecf: ParametersGridFrame.8=Subgrid division: ParametersGridFrame.9=K\u00edch c\u1ee1 c\u1ee7a nh\u00e3n: ParametersGridFrame.11=T\u1ecda \u0111\u1ed9 X l\u1edbn nh\u1ea5t: ParametersGridFrame.12=T\u1ecda \u0111\u1ed9 X nh\u1ecf nh\u1ea5t: ParametersGridFrame.13=T\u1ecda \u0111\u1ed9 Y l\u1edbn nh\u1ea5t: ParametersGridFrame.14=T\u1ecda \u0111\u1ed9 Y nh\u1ecf nh\u1ea5t: ExportDialog.0=N\u00e9n Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/vi/others.properties000066400000000000000000000007271321075051700323450ustar00rootroot00000000000000XScale.cm=cm XScale.inch=inch Arc.arc=V\u00f2ng cung Arc.wedge=H\u00ecnh n\u00eam Arc.chord=D\u00e2y cung DrawContainer.nameTemplate=Nh\u1eadp v\u00e0o t\u00ean c\u1ee7a b\u1ea3n m\u1eabu DrawContainer.overwriteTemplate=B\u1ea3n m\u1eabu n\u00e0y \u0111\u00e3 t\u1ed3n t\u1ea1i; ghi \u0111\u00e8 l\u00ean n\u00f3? CloseButton.closePanel=Close the window UndoRedoManager.create=T\u1ea1o m\u1edbi UndoRedoManager.join=N\u1ed1i UndoRedoManager.seperate=Ri\u00eang bi\u1ec7t latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/000077500000000000000000000000001321075051700273005ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/1_6.properties000066400000000000000000000015621321075051700320070ustar00rootroot00000000000000LaTeXDrawFrame.0=\u63d2\u5165 PSTricks \u4ee3\u7801 LaTeXDrawFrame.1=\u63d2\u5165\u56fe\u7247 LaTeXDrawFrame.3=\u505c\u6b62 LaTeXDrawFrame.6=BMP\u56fe\u7247 LaTeXDrawFrame.7=PNG\u56fe\u7247 LaTeXDrawFrame.10=\u63d2\u5165 LaTeXDrawFrame.16=\u76ee\u524d\u53ea\u80fd\u89e3\u6790\u90e8\u5206PSTricks\u547d\u4ee4
    \u8bf7\u53ea\u5bfc\u5165\u88abLaTeXDraw\u652f\u6301\u7684\u547d\u4ee4 LaTeXDrawFrame.33=\u672a\u627e\u5230\u53ef\u5bfc\u5165\u7684\u56fe\u7247! LaTeXDrawFrame.34=\u4e0d\u80fd\u5bfc\u5165 PSTricks \u6587\u4ef6\uff01 LaTeXDrawFrame.36=\u4ee3\u7801\u88ab\u8f6c\u6362\u6210\u56fe\u7247\uff01 InsertPSTricksCodeFrame.0=\u4ece PSTricks \u4ee3\u7801\u4e2d\u63d2\u5165\u56fe\u50cf Picture.0=% \u8b66\u544a\uff1a\u4ee5\u4e0b\u56fe\u7247\u7684\u8def\u5f84\u5305\u542b\u7a7a\u683c\uff0c\u4e0d\u4f1a\u901a\u8fc7 tex \u7f16\u8bd1\uff01 ParserMessagesFrame.0=\u547d\u4ee4 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/1_7.properties000066400000000000000000000010131321075051700317770ustar00rootroot00000000000000LaTeXDrawFrame.0=\u9634\u5f71 LaTeXDrawFrame.1=\u8fc7\u6e211 LaTeXDrawFrame.2=\u8fc7\u6e212 LaTeXDrawFrame.4=\u5411\u56fe\u50cf\u4e2d\u6dfb\u52a0\u9634\u5f71 LaTeXDrawFrame.5=Choose the color of the shadow. LaTeXDrawFrame.6=\u5411\u7ed8\u56fe\u4e2d\u6dfb\u52a0\u56fe\u7247\uff08\u5728...\u524d\uff0c\u540e\uff09 LaTeXDrawFrame.7=Choose the first color of the gradient. LaTeXDrawFrame.8=Choose the second color of the gradient. AbstractParametersFrame.3=\u6e10\u53d8\u89d2\u5ea6 AbstractParametersFrame.4=\u4e2d\u95f4\u70b9 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/1_8.properties000066400000000000000000000030731321075051700320100ustar00rootroot00000000000000AbstractParametersFrame.0=\u95f4\u8ddd\uff1a ParametersAxeFrame.0=\u5f62\u72b6\uff1a ParametersAxeFrame.1=\u663e\u793a\u539f\u70b9 ParametersAxeFrame.6=X\u6807\u7b7e\u8ddd\u79bb ParametersAxeFrame.7=Y\u6807\u7b7e\u8ddd\u79bb ParametersAxeFrame.8=X\u6807\u8bb0\u589e\u91cf ParametersAxeFrame.9=Y\u6807\u8bb0\u589e\u91cf ParametersAxeFrame.13=\u5927\u5c0f\uff1a ParametersAxeFrame.17=\u683c\u70b9 PreferencesFrame.3=\u60a8\u7684LaTeX\u7f16\u8f91\u5668\u7684\u8def\u5f84 PreferencesFrame.4=\u6807\u51c6\u7f51\u683c PreferencesFrame.5=\u81ea\u5b9a\u4e49\u7f51\u683c PreferencesFrame.6=\u78c1\u529b\u7f51\u683c PreferencesFrame.7=\u95f4\u9694\uff1a LaTeXDrawFrame.2=\u65cb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.3=90\u5ea6\u65cb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.4=180\u5ea6\u65cb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.5=270\u5ea6\u65cb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.6=\u5bf9\u79f0\u7ffb\u8f6c\u7ed8\u56fe LaTeXDrawFrame.7=\u6c34\u5e73\u7ffb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.8=\u5782\u76f4\u7ffb\u8f6c\u9009\u5b9a\u7ed8\u56fe LaTeXDrawFrame.12=\u5305\u542b\uff08\u78c1\u6027\uff09\u7f51\u683c\u53c2\u6570 LaTeXDrawFrame.13=\u78c1\u6027 LaTeXDrawFrame.14=\u82e5\u9009\u4e2d\uff0c\u7ed8\u56fe\u4f1a\u5438\u9644\u4e8e\u7f51\u683c LaTeXDrawFrame.15=\u81ea\u5b9a\u4e49\u7f51\u683c\u7ebf\u95f4\u8ddd(\u5355\u4f4d\u4e3a\u50cf\u7d20)\u3002 LaTeXDrawFrame.17=\u7ed8\u5236\u6570\u8f74 LaTeXDrawFrame.23=\u8fd1 LaTeXDrawFrame.27=\u7248\u672c\u6ce8\u91ca LaTeXDrawFrame.28=License Axe.1=Axe Axe.2=\u6846\u67b6 Axe.3=\u6ee1 Axe.4=\u9876\u90e8 Axe.5=\u5e95\u90e8 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/1_9.properties000066400000000000000000000047071321075051700320160ustar00rootroot00000000000000LaTeXDrawFrame.0=\u6700\u8fd1\u6253\u5f00\u7684\u6587\u4ef6 LaTeXDrawFrame.3=\u5feb\u6377\u65b9\u5f0f LaTeXDrawFrame.11=\u7ed8\u5236\u5c01\u95ed\u8d1d\u585e\u5c14\u66f2\u7ebf DrawPanel.0=\u66f4\u65b0\u5bf9\u8c61\u5bf9\u9f50\u7f51\u683c ParametersAkinPointsFrame.0=\u70b9\u95f4\u8ddd ParametersAkinPointsFrame.1=\u6253\u5f00 ParametersAkinPointsFrame.2=\u7c7b\u578b\uff1a PreferencesFrame.0=\u6700\u8fd1\u6253\u5f00\u6587\u4ef6\u4e2a\u6570\uff1a PreferencesFrame.1=\u4e3b\u9898\uff08\u91cd\u542f\u540e\u751f\u6548\uff09 ShortcutsFrame.1=\u5e8f\u5217 ShortcutsFrame.3=\u5206\u7c7b ShortcutsFrame.4=\u5bfc\u822a ShortcutsFrame.5=\u53d8\u6362 ShortcutsFrame.6=\u7ed8\u56fe ShortcutsFrame.8=\u5de6\u952e\u5355\u51fb ShortcutsFrame.9=\u79fb\u52a8\u6c34\u5e73\u6eda\u52a8\u6761\u81f3\u53f3\u8fb9 ShortcutsFrame.10=\u79fb\u52a8\u6c34\u5e73\u6eda\u52a8\u6761\u81f3\u5de6\u8fb9 ShortcutsFrame.11=\u79fb\u52a8\u5782\u76f4\u6eda\u52a8\u6761\u81f3\u9876\u90e8 ShortcutsFrame.12=\u79fb\u52a8\u5782\u76f4\u6eda\u52a8\u6761\u81f3\u5e95\u90e8 ShortcutsFrame.18=\u79fb\u52a8\u9009\u4e2d\u7684\u56fe\u7247\u81f3\u53f3\u8fb9 ShortcutsFrame.19=\u79fb\u52a8\u9009\u4e2d\u7684\u56fe\u7247\u81f3\u5de6\u8fb9 ShortcutsFrame.20=\u79fb\u52a8\u9009\u4e2d\u7684\u56fe\u7247\u81f3\u9876\u90e8 ShortcutsFrame.21=\u79fb\u52a8\u9009\u4e2d\u7684\u56fe\u5f62\u81f3\u5e95\u90e8 ShortcutsFrame.23=\u79fb\u52a8\u9009\u4e2d\u7684\u56fe\u5f62\u81f3\u663e\u793a\u7684\u7f51\u683c ShortcutsFrame.25=\u9009\u62e9\u6240\u6709\u56fe\u5f62 ShortcutsFrame.26=Add the clicked figure to the selection ShortcutsFrame.27=Remove the clicked figure from the selection ShortcutsFrame.29=\u9f20\u6807\u6eda\u8f6e ShortcutsFrame.30=\u653e\u5927/\u7f29\u5c0f 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=\u5de6\u952e\u5355\u51fb\u4ee5\u6dfb\u52a0\u6587\u672c\u3002 MenusListener.6=\u5de6\u952e\u5355\u51fb\u6dfb\u52a0\u7f51\u683c MenusListener.7=\u5de6\u952e\u5355\u51fb\u6dfb\u52a0\u6570\u8f74 MenusListener.8=Press the left button and drag the mouse to draw the shape. Release the button to finish the creation. MenusListener.9=\u5de6\u952e\u5355\u51fb\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u70b9\u3002 LaTeXDrawFrame.properties000066400000000000000000000114321321075051700341060ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CNLaTeXDrawFrame.0=\ \u5e2e\u52a9 LaTeXDrawFrame.7=\u624b\u753b LaTeXDrawFrame.16=\u5bfc\u51fa... LaTeXDrawFrame.17=\u5220\u9664\u56fe\u5f62 LaTeXDrawFrame.18=\u9000\u51fa LaTeXDrawFrame.19=PSTricks \u4ee3\u7801 LaTeXDrawFrame.20=JPEG \u56fe\u7247 LaTeXDrawFrame.22=\u91cd\u505a LaTeXDrawFrame.23=\u64a4\u6d88 LaTeXDrawFrame.38=\u6a2a\u8f74\u6bd4\u4f8b LaTeXDrawFrame.39=\u7eb5\u8f74\u6bd4\u4f8b LaTeXDrawFrame.40=\u590d\u5236 LaTeXDrawFrame.41=\u66f4\u65b0\u6a21\u677f LaTeXDrawFrame.42=\u5bfc\u51fa\u4e3a\u6a21\u677f LaTeXDrawFrame.43=\u7c98\u8d34 LaTeXDrawFrame.44=\u526a\u5207 LaTeXDrawFrame.48=\u5185\u90e8 LaTeXDrawFrame.49=\u5f71\u7ebf LaTeXDrawFrame.56=\u9996\u9009\u9879 LaTeXDrawFrame.57=\u653e\u5927 LaTeXDrawFrame.58=\u7f29\u5c0f LaTeXDrawFrame.60=\u6dfb\u52a0\u6587\u5b57 LaTeXDrawFrame.65=\u4fee\u6539\u56fe\u7247\u7ebf\u5bbd LaTeXDrawFrame.66=\u4fee\u6539\u56fe\u7247\u8fb9\u754c\u989c\u8272 LaTeXDrawFrame.68=\u4fee\u6539\u56fe\u7247\u5185\u90e8\u989c\u8272 LaTeXDrawFrame.69=\u4fee\u6539\u5f71\u7ebf\u989c\u8272 LaTeXDrawFrame.70=\u5c06\u56fe\u7247\u7f6e\u4e8e\u6700\u524d LaTeXDrawFrame.71=\u5c06\u56fe\u7247\u7f6e\u4e8e\u6700\u540e LaTeXDrawFrame.75=\u7ec4\u5408\u56fe\u7247 LaTeXDrawFrame.76=\u53d6\u6d88\u7ec4\u5408\u56fe\u7247 LaTeXDrawFrame.77=\u5b9a\u4e49\u56fe\u7247\u8fb9\u754c\u4f4d\u7f6e LaTeXDrawFrame.78=\u9009\u62e9\u540e\u56fe\u7247\u4f1a\u6709\u53cc\u8fb9\u6846 LaTeXDrawFrame.79=\u4fee\u6539\u53cc\u8fb9\u6846\u95f4\u7684\u989c\u8272 LaTeXDrawFrame.88=\u6587\u4ef6 LaTeXDrawFrame.89=\u7f16\u8f91 LaTeXDrawFrame.90=\u663e\u793a LaTeXDrawFrame.91=\u7ed8\u5236 LaTeXDrawFrame.93=\u5e2e\u52a9 LaTeXDrawFrame.103=\u6a21\u677f LaTeXDrawFrame.113=100% LaTeXDrawFrame.117=\u7ed8\u5236\u70b9 LaTeXDrawFrame.119=\u7ed8\u5236\u77e9\u5f62 LaTeXDrawFrame.120=\u7ed8\u5236\u6b63\u65b9\u5f62 LaTeXDrawFrame.121=\u7ed8\u5236\u591a\u8fb9\u5f62 LaTeXDrawFrame.123=\u7ed8\u5236\u83f1\u5f62 LaTeXDrawFrame.124=\u7ed8\u5236\u4e09\u89d2\u5f62 LaTeXDrawFrame.125=\u7ed8\u5236\u692d\u5706 LaTeXDrawFrame.127=\u7ed8\u5236\u5706\u5f62 LaTeXDrawFrame.128=\u7ed8\u5236\u5706\u5f27 LaTeXDrawFrame.130=\u7ed8\u5236\u6954\u5f62 LaTeXDrawFrame.131=\u7ed8\u5236\u5f26 LaTeXDrawFrame.132=\u7ed8\u5236\u8d1d\u585e\u5c14\u66f2\u7ebf LaTeXDrawFrame.133=\u7ed8\u5236\u7f51\u683c LaTeXDrawFrame.136=\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a\u56fe\u5f62
    LaTeXDrawFrame.137=\u5efa\u8bae : \u9009\u62e9\u591a\u4e2a LaTeXDrawFrame.138=\u56fe\u7247\uff0c\u5355\u51fb\u5e76
    \u62d6\u52a8\u9f20\u6807\u5230\u4f60\u60f3\u8981\u7684\u56fe\u7247\u4e0a LaTeXDrawFrame.139=\u5220\u9664\u9009\u4e2d\u7684\u56fe\u7247 LaTeXDrawFrame.146=\u590d\u5236... LaTeXDrawFrame.147=\u7c98\u8d34... LaTeXDrawFrame.148=\u526a\u5207... LaTeXDrawFrame.149=\u5220\u9664... LaTeXDrawFrame.154=\u7ec4\u5408... LaTeXDrawFrame.155=\u53d6\u6d88\u7ec4\u5408... LaTeXDrawFrame.169=\u6a21\u677f\u5df2\u8f93\u51fa\uff01 LaTeXDrawFrame.171=\u9009\u62e9 LaTeXDrawFrame.173=\u8981\u66ff\u6362\u6587\u4ef6\u5417\uff1f LaTeXDrawFrame.175=PSTricks\u4ee3\u7801\u5df2\u8f93\u51fa\uff01 LaTeXDrawFrame.176=\u65e0\u6cd5\u5bfc\u51faPStricks\u4ee3\u7801\uff01 LaTeXDrawFrame.184=\u5bfc\u51fa\u56fe\u50cf\u5b8c\u6210\uff01 LaTeXDrawFrame.185=\u65e0\u6cd5\u5bfc\u51fa\u56fe\u50cf LaTeXDrawFrame.188=\u4fdd\u5b58\u7ed8\u56fe LaTeXDrawFrame.200=\u6253\u5f00\u7ed8\u56fe LaTeXDrawFrame.219=\u7248\u672c LaTeXDrawFrame.220=, build LaTeXDrawFrame.221=\ \u5728GNU\u901a\u7528\u516c\u5171\u6388\u6743\u6761\u6b3e\u4e0b\u53d1\u5e03 LFrame2.1=\u5bf9\u9f50\u9009\u4e2d\u7684\u56fe\u7247 LFrame2.10=\u7ad6\u76f4\u65b9\u5411\u7b49\u8ddd\u5206\u5e03\u9009\u4e2d\u7684\u56fe\u7247 LFrame2.11=\u7ad6\u76f4\u65b9\u5411\u9009\u4e2d\u7684\u56fe\u7247\u4e2d\u5fc3\u7b49\u8ddd\u5206\u5e03 LFrame2.12=\u7ad6\u76f4\u65b9\u5411\u9009\u4e2d\u7684\u56fe\u7247\u4e0a\u6cbf\u7b49\u8ddd\u5206\u5e03 LFrame2.13=\u6c34\u5e73\u65b9\u5411\u9009\u4e2d\u7684\u56fe\u7247\u5de6\u8fb9\u6cbf\u7b49\u8ddd\u5206\u5e03 LFrame2.14=\u6c34\u5e73\u65b9\u5411\u7b49\u95f4\u9694\u5206\u5e03\u9009\u4e2d\u7684\u56fe\u7247 LFrame2.15=\u6c34\u5e73\u65b9\u5411\u9009\u4e2d\u7684\u56fe\u7247\u4e2d\u5fc3\u7b49\u8ddd\u5206\u5e03 LFrame2.16=\u6c34\u5e73\u65b9\u5411\u9009\u4e2d\u56fe\u7247\u7684\u53f3\u8fb9\u6cbf\u7b49\u8ddd\u5206\u5e03 LFrame2.2=\u9009\u4e2d\u7684\u56fe\u7247\u5de6\u8fb9\u5bf9\u9f50 LFrame2.3=\u9009\u4e2d\u7684\u56fe\u7247\u53f3\u8fb9\u5bf9\u9f50 LFrame2.4=\u9009\u4e2d\u7684\u56fe\u7247\u9876\u90e8\u5bf9\u9f50 LFrame2.5=\u9009\u4e2d\u7684\u56fe\u7247\u5e95\u90e8\u5bf9\u9f50 LFrame2.6=\u6c34\u5e73\u65b9\u5411\u5bf9\u9f50\u9009\u4e2d\u56fe\u7247\u7684\u4e2d\u5fc3 LFrame2.7=\u5782\u76f4\u65b9\u5411\u5bf9\u9f50\u9009\u4e2d\u56fe\u7247\u7684\u4e2d\u5fc3 LFrame2.8=\u7b49\u8ddd\u5206\u5e03\u9009\u4e2d\u7684\u56fe\u7247 LFrame2.9=\u7ad6\u76f4\u65b9\u5411\u9009\u4e2d\u7684\u56fe\u7247\u4e0b\u8fb9\u6cbf\u7b49\u8ddd\u5206\u5e03 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/actions.properties000066400000000000000000000073371321075051700330700ustar00rootroot00000000000000Actions.0=Modification of a drawing's property Actions.1=Modification of the magnetic grid Actions.2=Do you want to save the drawing? Actions.3=Change unit Actions.4=Inserting of PST code Actions.5=delete Actions.6=distribute Actions.7=mirror Actions.8=move back/foreground Actions.9=Move Control Point Actions.10=Move Point Actions.11=Resizing Actions.12=show points Actions.13=axe's parameters Actions.14=grid's parameters Actions.15=free hand's parameters Actions.16=arrow's parameters Actions.17=arc's parameters Actions.18=text's parameters Actions.19=hatching's parameters Actions.20=gradient's parameters Actions.21=corner roundness Actions.22=filling's parameters Actions.23=line color Actions.24=double border's parameters Actions.25=shadow's parameters Actions.26=line thickness Actions.27=border position Actions.28=line style Actions.29=dot's parameters Actions.30=align Actions.31=rotation Actions.32=translation Actions.33=update to grid Instruments.1=Centered Instruments.2=Position: Instruments.3=Scale Instruments.4=Draw a single or several joined lines. Instruments.5=Plot a function. FileLoaderSaver.1=Save drawing FileLoaderSaver.2=Save drawing as FileLoaderSaver.3=Open drawing FileLoaderSaver.4=Creation of a new drawing. Helper.1=Make a donation! Helper.2=Report bugs Helper.3=Go to forums Helper.4=Manual PreferencesSetter.1=Include in this list the latex packages you regularly use in your drawing, e.g.: AxesCust.1=Visibility: ShapeBord.1=Color ShapeBord.2=Show points ShapeBord.3=Show as dots the (control) points of the shape. ShapeCoord.1=Sets the X-coordinate of the top-left position ShapeCoord.2=Sets the Y-coordinate of the top-left position ShapeDot.1=Define the size of a dot. ShapeDot.2=Select the style of the dot. ShapeFill.1=Angle: ShapeGrid.1=Labels ShapeGrid.2=Sub-grid ShapeGrid.3=Changes the Y-coordinates of the labels. ShapeGrid.4=Changes the X-coordinates of the labels. ShapeShad.1=Size: ShapeStdGrid.1=Sets the minimal X-coordinate of the grid. ShapeStdGrid.2=Sets the minimal Y-coordinate of the grid. ShapeStdGrid.3=Sets the maximal X-coordinate of the grid. ShapeStdGrid.4=Sets the maximal Y-coordinate of the grid. ShapeStdGrid.5=Sets the size of the labels of the grid. ShapeStdGrid.6=Sets the X-coordinate of the origin of the grid. ShapeStdGrid.7=Sets the Y-coordinate of the origin of the grid. TextCust.1=Packages: TextCust.2=Contains the LaTeX packages that will be used to compile the text. TextCust.3=The position point is the bottom-left point. TextCust.4=The position point is the bottom-middle point. TextCust.5=The position point is the bottom-right point. TextCust.6=The position point is the top-left point. TextCust.7=The position point is the top-middle point. TextCust.8=The position point is the top-right point. TextCust.9=The position point is the center point. TextCust.10=The position point is the left point. TextCust.11=The position point is the right point. MenuBuilder.1=Unit PropBuilder.1=Modifies the properties of freehand drawings. PropBuilder.2=Modifies the properties of grids' labels. PropBuilder.3=Modifies the properties of axes. PropBuilder.4=Modifies the properties of grids. PropBuilder.5=Modifies the properties of grids and axes. PropBuilder.6=Modifies the dimensions and the position. PropBuilder.7=Modifies the properties of the text. PropBuilder.8=Modifies the position of the text. PropBuilder.9=Customizes the arcs. PropBuilder.10=Customizes the dots. PropBuilder.11=Customizes the arrows. PropBuilder.12=Modifies the filling properties. PropBuilder.13=Modifies the shadow properties. PropBuilder.14=Modifies the double border properties. PropBuilder.15=Modifies the border properties. ToolbarBuilder.1=Customising the drawing's properties. ToolbarBuilder.2=Caption: ToolbarBuilder.3=Label: UIBuilder.1=DrawingdialogFrames.properties000066400000000000000000000051271321075051700337410ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CNPreferencesFrame.Pref=\u9009\u9879... PreferencesFrame.grid=\u7f51\u683c PreferencesFrame.codePanel=\u4ee3\u7801\u9762\u677f PreferencesFrame.antiAl=\u6297\u952f\u9f7f PreferencesFrame.rendQ=\u6e32\u67d3\u8d28\u91cf PreferencesFrame.colRendQ=\u8272\u5f69\u6e32\u67d3\u8d28\u91cf PreferencesFrame.AlphaQ=Alpha\u5dee\u503c\u8d28\u91cf PreferencesFrame.newVers=\u542f\u52a8\u65f6\u68c0\u67e5\u66f4\u65b0 PreferencesFrame.lge=\u8bed\u8a00\uff08\u91cd\u542f\u540e\u751f\u6548\uff09 PreferencesFrame.general=\u5e38\u89c4 PreferencesFrame.folders=\u6587\u4ef6\u5939 PreferencesFrame.quality=\u8d28\u91cf PreferencesFrame.selectFolder=\u9009\u62e9\u4e00\u4e2a\u6587\u4ef6\u5939 PreferencesFrame.defOpenSave=\u9ed8\u8ba4\u6253\u5f00/\u4fdd\u5b58\u7684\u76ee\u5f55 PreferencesFrame.defFold=\u9ed8\u8ba4\u5bfc\u5165/\u5bfc\u51fa\u7684\u76ee\u5f55 AbstractParametersFrame.0=\u53cc\u8fb9\u754c AbstractParametersFrame.2=\u5206\u9694\u7b26\uff1a AbstractParametersFrame.4=\u786e\u5b9a AbstractParametersFrame.6=\u53d6\u6d88 AbstractParametersFrame.7=\u65cb\u8f6c\u89d2\u5ea6 AbstractParametersFrame.11=\u5f71\u7ebf\u5bbd\u5ea6: AbstractParametersFrame.20=\u70b9\u76f4\u5f84= AbstractParametersFrame.21=\u6761\u5f62\u5bbd\u5ea6= AbstractParametersFrame.22=\u4e2d\u62ec\u53f7\u957f\u5ea6= AbstractParametersFrame.23=\u5c0f\u62ec\u53f7\u957f\u5ea6 AbstractParametersFrame.24=x\u539a\u5ea6+ AbstractParametersFrame.26=\u7bad\u5934\u957f\u5ea6 AbstractParametersFrame.27=\u7bad\u5934\u5185\u5d4c AbstractParametersFrame.28=\u7bad\u5934\u5bbd\u5ea6 ParametersArcFrame.0=\u5f00\u59cb\u89d2\u5ea6 ParametersArcFrame.1=\u7ed3\u675f\u89d2\u5ea6: ParametersGridFrame.0=Y\u539f\u70b9: ParametersGridFrame.1=X\u539f\u70b9: ParametersGridFrame.4=\u5b50\u7f51\u683c\u70b9: ParametersGridFrame.5=\u7f51\u683c\u70b9: ParametersGridFrame.6=\u7f51\u683c\u5bbd\u5ea6: ParametersGridFrame.7=\u5b50\u7f51\u683c\u5bbd\u5ea6: ParametersGridFrame.8=\u5b50\u7f51\u683c\u5212\u5206: ParametersGridFrame.9=\u6807\u7b7e\u5927\u5c0f: ParametersGridFrame.11=X \u8f74\u6700\u5927\u503c\uff1a ParametersGridFrame.12=X \u8f74\u6700\u5c0f\u503c\uff1a ParametersGridFrame.13=Y \u8f74\u6700\u5927\u503c\uff1a ParametersGridFrame.14=Y \u8f74\u6700\u5c0f\u503c\uff1a ExportDialog.0=\u538b\u7f29\u65b9\u5f0f Filter.1=Picture SVG.1=Drawing saved. Exporter.1=Drawing export Exporter.2=eps (latex) picture Exporter.3=pdf (latex) picture Exporter.4=pdf (latex+pdfcrop) picture About.1=System About.2=Contributors Pref.1=Will be used for the next new drawings Pref.2=Packages included during latex compilations: Res.1=About LaTeXDraw Res.2=New drawing Res.3=Customized grid Version.1=New version available:latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/lang/zh_CN/others.properties000066400000000000000000000006601321075051700327240ustar00rootroot00000000000000XScale.cm=\u5398\u7c73 XScale.inch=\u82f1\u5bf8 Arc.arc=\u5706\u5f27 Arc.wedge=\u6954\u578b Arc.chord=\u534a\u6708\u5f62 DrawContainer.nameTemplate=\u8f93\u5165\u6a21\u677f\u540d\u79f0 DrawContainer.overwriteTemplate=\u8be5\u6a21\u677f\u5df2\u5b58\u5728\uff0c\u8986\u76d6\u5417\uff1f CloseButton.closePanel=Close the window UndoRedoManager.create=\u521b\u5efa UndoRedoManager.join=\u8fde\u63a5 UndoRedoManager.seperate=\u5206\u79bb latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/000077500000000000000000000000001321075051700261475ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Arc.png000077500000000000000000000006001321075051700273610ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà S“­ƒ IDAT8ËÝÔ½+ÅaðkÀO&±Yny¬"&“Yq„Ý`6(»Õ`°¯RŠÁ@ÙÈ€YQòÒµõëvï­ßË©§çôœç|ŸÓ÷<ßÃ_³®±,aÓÆ<žŠ<8+4b}¢ŽÁ" kx ÀCÌ¡¯(5ãxÇ jeò]JWÊlär€çÈÂPú ’òbßͼ‰ÕvÁs|#ÉÚg\¶ã÷·9ª]L}ËÉVTäµ­”¿Þ ÜÀ5Æ2R‘`$ü3Œ¶RóA<0“±âíÈÛ(ó»%¸ÉWËÈ^Üß/KÒìà èÏ;„z#6B:øcÖž4ÍÜ…€~ÏŽ:Ñ,ƒ¾Š\D/Nü+û¾ARÔù)òIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Copy.png000066400000000000000000000013251321075051700275700ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDˆŠ… ¥©Õ pHYs  šœtIMEÕ 3 –EZbIDAT8Ë••MOQ†ßsïL¿t×_Ðv¦þcˆ+W&.]³(Q0×&€•D‰!qíÆ­+C  ‘ $@k]ãXX"¦ÓÛÞãâ2Ó™ÚNÛÙ´é9óÜç¾÷£Tyµöµv1åCB4ž”>Žª[ªÓqž-,OËÅë7ëN\Ý‚­Ö33YQlWdfêt:rà7$I03O n6F ‡Gnnþä„ "3ÀËõ•a}Ž€‹ÅBðÝó<ùuçK~ñé13M¼¨D¨l¬ÎŽ4V]…[Sº¾nM•?iÜn·±WÝ™j§„cblŠJu"õz},ÔuKÃÁ…B†ÅƸ¶Ô\×µdæáÆÌŒf³€•R‘ÆF£1Úoa”Jwú`¿ÀÌÈçCÆž‡Úþ^ÐX*•FXš~"Š3633”êþgšOPÌ@2™Œ‚µÖ±ž×Æþ·jÐè8N`7hL$`YJ)h­ûà^¯™stë03ÎÎêA–á¾L&ƒl6 Èår+öa¾EÀŽSŒ†RJh­!„€?ûÛÅ3; N‘lÛX,Qض "aì,+X¼jmZkXv"ñãíÖ¦;êÜûƒ…m… ÐZãýö»a¯Yqÿ+k/–ó÷§ÏÌ&0fïÞ\^]àðû˜°e;ÿáümÛ‚”æcMÒ\×ç¿ÎqrzŒT&³Yž›ß VJ!•JEެ”}ë^Oãòê'§Ç€ Çå¹ùæÖŽy*«ŸºÝîƒÁ›«ˆ hªjð½åÅçýÚ?Æ” š}DWIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Cut.png000066400000000000000000000022311321075051700274060ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  Í›žtIMEÖ 21A|ç§&IDAT8Ë…“]H\GÇÿ3;wïݬ&ñccÌ®º…6±41¶%Õˆ†$ÚÒ–>„€´I_¥6­ôAK‹…@’´!¤!!?‚±†’S‰iе5%&i¤cÕm4«î÷Ý{gîô!+Ȳ®¸ ÜsøÍ9ÿ9‡ I_Ÿ³,«Ü4ͪ¶–ö;Ø@§ÏžjЩiŽùæ?õ$Çir2¥´ìÀ2äæä#4Mûêí·Þ¥Ô}úì©kiÁN§óÃ7^“x ŸƒÚ´o/žïHý¦»«Ç½ËͲ¶gãPÕaìÌÛ¹/-˜sîÎÍqª€öÅãñwËË* „€¦iˆD#iÁñx|jèú5Ën·Ca òòòmW¾»<²>'33sð`y8 ”âÖèÏ…B­iÁŽ-=]"ºƒ”%ûö#YWm¥¢Ôã.„”OŸ 7VÛZÚ»Ò‚ÛZÚ¸484 N'¤”xyÿ«èëïy?=RÎ9c½=‚X,Zšê’+F[K{½®ë‡Ý—„äæº w_¼t¡kû¶¬­šê€”wÿ€ªª½‰b6'ÔøÛøÙ²åä`y%233?)(,‚””ÌÍÏ'›šßÛhS‚ÛZÚ{-ËýåÎmËf³AQ¨ªÁ9!øiøG„B¡êtsNÓÄ>øgúo "!¥Dñ1=3 f³=H·•`Û(psx$P]sÔñßÔTeqI)LÓ„að?|€M;°‰ÒUŒâÏ:ŒøÌ &ÿœ@qq1‰…BXšz„A»½c30IþqðnÓ´JHmœsmïÞ—ˆßáÀ¿ã¿£ ì5äÄb˜œ¼/UÆtKÊþ€®Q̤ÚíŠÍöyQVV¾¦(P賆Ægge"W–0- ºiâñÊŠÏâËc†q>¥w²uË•¿‹ù'}¾4ŠÅp†gXíñ †gÃaø£QLú|+«±˜Ë•/¤lð¸kR{ÖWx½^$‚Åp¸Ï¢Û¡(Xaw÷ô7˜XáPBt/†Ã}þH^¯Ñh}j°i>¯1†ˆað%!†TÆœv;(!ó'€ë´:à{JȼÓn‡ÊXÃ’CÃàc†ñÂzkÙÚÄäž ®c«¦¡„±žìlL,,,ÍrÞÀ @À,ç½ðùê^ñxvÌ-/ßPãA]å @`4q µ3vy.@†¢0‡ªâžÏ‡e)ýˆó~Ù‰ÏÕÄùÕ§RŽÝóùàPUd( › `1Ö@Mì!ë…]Õ´*eµ%%ñIyó¤i$bVR‡¼“±Ú]”V3BDœ[ïëú9|­b’4z$á;M@”¤‘\ëÐJ@ĺ »,ø§ëÕŸ„î´¼IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Draw.png000077500000000000000000000006421321075051700275570ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEà ˜k^/IDAT8ËÍ•-OÄ@E‡#AaH…ClP£ ¡0dÃ? iªÖÀÀ°† ðˆu5€À@°¸jV­Üô^DݦiùèÎ&y™™¾öÌ×̘R›™ðûXµñ…/QðÈúÈ+TÝ®|ÁÇÐ$‘â¸>Ûz 8Ò4O( ÉŸ7VÚCÎ9}–BaXT4†J‰F£1Ü+Tw;RoíÏ KÞ•~ nºý–å¼×´<éÚ¬7…Î[´í­:C‘sî7J×-dðÅbò`©KÃ$‡ÿpû-à´®¶Qgi˜dð~\u¢ÚÀ%pRÈ 8¬*Áœõ™Y¿¥å3`¥däÛÀ²]×6¿¯s~íe¦5È¡®àXð,” W_]MÏÀ“_ðÜòßÚ‹µÑBðhIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/LaTeXDrawIcon.png000066400000000000000000000036261321075051700312700ustar00rootroot00000000000000‰PNG  IHDR;0®¢sBIT|dˆ pHYsaa¨?§itEXtSoftwarewww.inkscape.org›î<IDATH‰mW[ŒVW^ëÛçgŠ\f`˜r/C…cªVilDcŒ±‰!ÁÊ›>@씠Ѥ/úªOEmE“Ö–j1–jaZÚáÎp™†‹t¦Ó¹t˜2ÌÞ{}>ìsþÿÌÔ?ÙÙûœÿä|ë[ë[—£$eòogÇÞVRÚI.#¥Â¹BÑ ©ˆŠŠªPµºPSÕ›€v¸è owìÚÞ3CËÀ;Ÿz¦BããFþF©BQ %LE˜6ja€*¡JUE:  4xÎA÷uìÚî?¼³cï"3î1²ÕŒJ¦e–0H UJRU¦=sÆÉ¨jU#®:àW»ùÓkUàÏTÌìfl5#Œ¦9¸%7BDH-&g̉.ׂi™¹9§pÕ9lßóä>1Úãflf0£šQT{L&ïÑ©ºZJq†¦%—ÓT —˜ñÇ"òGw'6¶ÒØa$̘›&æ¬Rý -…Ì=#é? h¢FQ¦ûÕ•BõùCGNÍhl7Š+â: D“Û«/æb“I>/»(âÍÜí0ªÌ+ŽlÏ(²"½°æb3j,˜3gié~Jå’ÔW¯º¹XTƒÒJª™±-#¹¼æ*s0ÒjÌkb+Ø'´<æ…Âsp*¤&2áhJK¬Õ9®ÌH™—ÇBŒ"FÑ ëÚZV¯ZDçCt!D{1Ë äy*$åî]Ï>ysë–‹W,[0tæÜû£óæÌjذnEÓƒ'ú>‰¤ puϵޱ—þu|(w¹T*N¾³ù™_Ú°jæû×{ÇÞ;uuØ@…æ¨FjyI¥Hž¢§Îô _í¹õñæMís+Yæ¾ûíç|Ð;x÷µ7N ›1b4Š©!ÒŠóøÛ Çúú‡Ç¿ñ•û›Ë¬CˆÎûèPˆ2aRI þÇ?ÿóß)÷Ôg?Û¶ù¾9÷65ìñhŸ¦1šš™Æ˜nÔÍ…h.ƒcã]§{Fg6M­JV¸ÚûdŠ’]KÊ”*‘þâd÷@ËìÆúÎw/ ]éù`,W»ÆHD#DDÒuzaˆÑåÌ]_ÿPTUijœZç½ÕsY*ð2©ç¥ŸsÀŠÏÍŸ&"ÒÒ<ã3E:¥ÜÎS,1brñ>"Ïö,„ÌTÍÑ©Ð*[eµø&âúðCkš§O›Ryáå7o-œ?»aãú•ÓXªáÑŠÚm#5Ä"΢kjœš‰ˆÜ¸ùQL16—ÇÈûiÁºjssóôʃëÛš½u®ÿè[ç†ßíº<¼å‘öYSî©G­FS…T£h.6„Ó «V,l‰#£c(Cˆ.øèPž¤v–Ǿ¹aþÈÈÿêáwúEDþþÒ±~²uËM’”/VeL±\å1gýèÃ_œ²dñ½•_9>|-½7ø`È Ð<ÖTUY³zÉŒ…ógOÝ÷×Ã=1DªˆŽŽŽÅO |ï±ÍGÞ<;z¡ûF(ò¸¥yF¶~íòú¬minÌV¯ZTY¹|Aåí÷.8Ø9N `P’.y*ƒª©*ò BêðÕ/aþ…îëƒ/]¿­ªU9rìÌðúµË§ýèûÍìøÍŸ{cLaY»fiýÚ5KëÇÆÆÙ×?l}Ç=O?ûÄ;—¼¨ª5KíTt×S{ÿä½-ôU©G"(É?Å&DÔÎy<ƒ¹¢˜„h°Ò0QV8 tSsW2U½è‚Ò¸RÞŠ%µóÄNT-·E­/ š‹¢*‚Ǫ̂j”Óp±èŸµyIjC›ÖŒQM#–ŠN2*/{É€TP¬¤òUª\] P€jÎÚB^jäŒH¹±@­U¡j®çÃDb&:…¯¹×¿2ôú’«‹1a0¨5ÿÒ°P›§Œµ‘‰&`ÍͰ˜æ¸˜LSêï®ýË~ˆˆÀáY=j€N™Î Vï—FV-_ç!Òb©V‹‘‘Í4äÅì·""ÙóäÞAwÚ“€`Å—@Ô7é¾+Â’a%Cr¢ñ¼ñ}Wöß­‹ˆüz÷ŽkÎa›ƒ> htN­j€ƒ€Î%o8 úŒK_ –¼5ÁpèÓª²îã/œ¯¦ØÿûhûŮ߷ú7„Û|ˆ+½·E!Ä̇ŸÊŸóÅ(ã­tŽÎ‡¨>Äë!X—±+øxèÆ…çÎNÆøR–/èª|òÇIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/LaTeXDrawSmall.png000066400000000000000000000646461321075051700314610ustar00rootroot00000000000000‰PNG  IHDRÁúÙqü2sBIT|dˆ pHYs &•=ötEXtSoftwarewww.inkscape.org›î< IDATxœì½I%˶çõ·ÆÝw¿£Ï>Ožsî}÷¾ûŠ‚€Ä !1bŠ„@‚ ƒ*U4BŒQQ@©fˆ¯À‰ ƒ* `À¤¤¢^½ûnwºÌ“MDd´»óÆïÌÌ}7‘‘‘±LGÛÝÍ–­åËÿëwvcîâ¿ýÿóÿ†² ‚Û¨ÚA¢¹¯Ü&Pw¯·°ÆÔ}¬ãÞ8ËŽX2¦šdÍTw«mÇ<¿¹Î6ŽWžïwi›ì0ÝXÈ÷ÈŽÅ5hy-¬éªƒÎñ¦ŸÅt$Üm'6Ñ:&ïØ’7ÇKÑŒYÞœÌ÷z"稫“/×y7·ŒÛªˆ%y+grâõb[«òæ9ìk§¶³AÚqŽŠÖ1Ÿæ5èìÙL;~Þ,Ÿª9}MZÆ®·ü8y^Ö}„½ÑÌÓ2íµkǪyVlÖÔäÄêö!«NxcêU9ð4وͪÕ¢wgkÞ¾—>9µÛ=¾,áÅnÿ倵ykÌI«´SiC[G€ÖñÊ?ß Àr›X;Ŵޱ¹~[>Usúš´Œ]!oùq ›ÛÚO;¶Ï ÀæÐ"V·³õçÆdq”h¯<ñ“Æ,·€µS @ëx›ë·åS5§¯IËØò–gº¹­ý´cc¢Î=F„ˆ]ƒže_Äë )Ð6èoúYLw—èä-?æÆæúÍ„uæ€åœ @7·µŸvl @Ô¹óÇè±kгì‹x}!eÚãM?‹é>€Kóæxɬc»½l+¤Ÿ€Ë‹¯åS5§¯IËØò–gº¹­ý´cc«{^ts°FÄ®Aϲ/âõ…”htŽ7ý,¦cVv½1W(¤ ÀbÜŠâ 0o€~Þ*¿«= @¬ÓN¡×åÚY @Àúa °%i Àr›X;Å´í¢%o–OÕœ¾&-cWÈ[~œèæ¶öÓŽížp­vV¡ëÀ»=˾#ë )Ð6Hå±:¶FcZv½1W(¤ ÀbÜŠâ 0€ ß¿<€¾÷l/¤ @´åm]!eúètaæ/€°c¡Íòæ¾ÕÇ¡ @ß§– Ⱥ°[ )°Þú\*â:ÖÖ¼•c€ÅX`­+6kjrbuû0ýºx›Hô»=˾#ë )Ð6Hå±:¶FcZv½1ͼ-Ͱ·¢ø @`Ã÷ 5®7ëÏ­ ¨x'È„ur–pY¢€nÁjÍ[å“ç§ÝçÓаˬµcÅfMMN¬nàJíøš,Æ­Í›cøúý`»#¾ØŠ€N,ËDÌdº“¯ñÕ ©«­ûÀ6Mb•v0ÛóÖðý~w ïˆ/¶â_ K«ˆÛ]ÇÆ¬û0áå`“Bêj‹XûÉ´ÆÝ>~ʼnÚ(Ðêì÷1óW Àzz >€MíÔ}ê '·µŸ¶ ¼º·"nW;Öbù [ € @Û4°ö’h] @äó:±ÔNnk?m3÷€äþóÑU?Œaº±,Kô À¶ (ß`æ¯î‹óß¼= @`³î¹×—wþ]Wjgƒºx[H4ЉXo0óW Àzú{@jÄêöù4ôAVìc«{+ràóµSÕNgÏr»#Î f2mÓ ÀÚK uM0‘ÏëÄRoعe~<×iÇ>Kºm@ñ/Љ¥UÄ ÀÚ4°ö’h] @äó:±Ôvn?€¶žßŸ€N¬-uñ6d?OÐiÃgè—Àõ"fÖ¦o771œÜÅ?Ë @¬Ðdíçg ¹ @;Ö–ºx[”K$,ËíŽ8C€ @Û4°ö’¸^;ùñ þ½X`{Þ<ÓõuúèñµãÅvc$Ú¶Üîˆ3”È´M3k/¿P6µSÍ˼Stca–û´•ž»ÀVû>µ‰x©ØÖ‹˜X›fÖ^2×k'?~ÏØ¸Âë} Àíx±Ý8T?ŒÙ €þÔêˆs©0k?o¯$b'o•OžŸv`™×v?Ë_½Í|2Z>2á× ‹nwÄÊdÚ¦€µ—Ÿ€þù°ìÄ„_€ÍX¨üNжå e2mÓ Àb\K c6ÿäóÞb¶ä€X;õÅðË3ý> ÀÚ4°×RÀÍ?ù¼-ôµåOÉtº0¯¨ç,µh'ß]ï©Ë3ý> ÀÚ4°×RÃî[‹¯åS›vªy€· €ž&€@BÛyÑçSÐ+Hí"Î÷5.³•"&`ùâ^pu!ýt$×a`åS‹&±.o€ Àfl@"@2á÷aÖ¦€Å¸–ÆlþÉçe:¹eÞ^îw‚ ÀMè¯ýd–v½1ͼ­ÈÁ= ¹\»hžÜëë©5 Àz‹˜Ïu§Øë½Ùü¢Uo;— °ö“XÚõÆ4ó¶"Ÿ€þbêʦ5®¥†1›òy€µÝÊÅ«i§Þ^®Iàõ b 7›_´êmçRaÖ~Þzz…ô³Ѓ„ý‡Ø"b w¼î$–ŒñbmͰžàvpuÞª±´h'ßíÖ=ßO ýÙšEËr¥ˆá'º°Ù*ÒzÐ}QùÕˆ¥:Û ÀÚG e—+ÖÖ0ë î= °Ë3mƒ…w ÀºÏ'`•׿˜ÒÇO@_ÄM?Î ÀʧMb]Þ0€ÍØn€@ù(%|$½ ¡²Ù*ÒzÐ}QùÕˆ¥:Û7À–âË´DÜôÓé̬|jÑ$Öå ØŒíÆO‘h-7Êu"&¯° À–1–OnV€°òÚSúÉ´ì~@ñµ®§Ö0ë­ÏÀÖ¼Y6]·€V<ëHä>Yþ^°QkêØ€u`™×†ŸNg`åS‹&±.onÛ‹o½X{yg”뀥w ÀºÏ"^ž7 êy[´0­- ¯I¯¹±0›±¸uÏ׎{:uº)bçRabˆód ®,¾õ|Ž]¯Ô1ÝÉ€ Ÿ–æ€èÕ=àÝ `ß@Û:ºNÄäàú胬xÉÌ7€µ‘Í誇Øðii€^Ýc~œï½/ƒíBZ«Hëq @Û§jÏ}àªâ[çÕÝgÇÆ´ì2±®2ë €–Ý6•K$€htùú"næ¤ÚÃ¬Ž·æ­ô“hÙe¢:ÿÍX€^l+Ø^÷î#@(Å·e¢OÀ•¿Èt¶€ Ÿ–æ€èÕ=à—@Àþ8”XúÈlˆxƒ¼9¾3­? Àz‹èkÒ+Bn, À•š¼T=J‰ˆu"Γʹ}jͰþì·€¾&½"´™v\§½Ø€–ÝMHÈz£lItù‚ûÂoŒi1Ð?^Ÿÿæ˜|\S Î? @Ë' [÷€_6Aõbù†ˆ©QX\'Ú&bÚ>U{¾ Zv€¨çmÑŽc·öÓnŸ€mšd6êðË P;6 e—ˆêü7caZ}„wÕú±1±^;Ú15 ‹ëDÛD @Û§j°:Nþ>;6 e—ˆ%…t™vœO@kƆvÜ ÀºãÊøÚiÓäÍP¹ìBÈ ¸N´MÄ´}ªö0«ãäï³ccZv€XRH—iÇÙ`Ö @¬ÕN•7û;A`m}3úBéW#–e"v 0k# @¬ÍÛº0«Xà§2k/諭dÖÖ€–Ý{À+‹Ø ŠXo}~®Ì›k„>-Ë5cC;îN`Ýqe|íøš,ÆÞ4ü;A`mhÙe¢ž×Ï/âÚO»Ý.É[½“èIJJ;®ÓVŸû@²µEÞÐë HXØ0눸õB(ýjIJLÄn¢=“ @? ÀíÔÆšÚqvû0Ë} ÀÚË{ @ª;Æ\É»Ü9ëBÙLtáhS½¶H€¨|jSöa–ymøY½`:…¥E“øÀ¼Õ;€N,«´ã:mõa:×)üÚ]ÆöA•Ïdúf·^¥_X–‰ØM´gÒÎA{ñ­M^YÄäï³ccZv?9‹óïÕ@G[×–·z'Љe•v\§­> @ç:…_»×R‹vV€ À†YGÄ­BéW#–e"ví™dú9`^% @JÊjœ”£aWÙF¨áӲƣžj×N½3ÐJ ]åÄÚÌÁZí ûÕšƒk`jZú9C­ìAB akÇU@QÆ&‚@IÛO%¥¢Ò…ygÛOˆÜäRM !€BÔ±‰¢Ý÷;A`݉èIJ\Ä~Â>º2¯’`Ë£‡ãàáþ8 a¨ä/^ìEV¼WzØïG6$Z éo~ý¸+ÄÇ¿ìvµl©‹¢× 䃃qh´Ô»Ñ;@"¢½AÐí²2,…Ü÷ ùÁÞ(Ú÷‚í~¯îõº¡Ú÷Ãñ¨ö»¡.Çt:*ç:!"¥¤ºáÞN?²«Ì ÝNôûQ …°ê&A+){Ý0è÷¢jŒ„NÖ:Œ @Â@)û,ù×ÒòšçŽi«{ÎS$€µˆ›Å¨Ú`VÇÉßgÇÆ´ì2±$Ë´ãl¬ ¼~s–þß<é¼~w–„n7”¿ù³Ç)…üþ§ãøârž=<ƒ~$¥âõÛÓäübž=²u:$2øíßÌ·F=õêçüò›]CDR1-ÌËŸOâÊqv>Ë`ow ·Ç=eDÀ÷/ã0Pâñƒq˜f†.'‹ìälšýòÅAg§!Ä»£óär2ÏýŽzwx‘t»¡ÜÝD$./çY·Êá £¥8<¼HvwÁë·gq(¹½Õ Þ¾;¿z¶×Y$)ÍfqÇ)õû‘¦³8»¸œgqœÑåd‘…¡–³yl[ƒ®¾œÌSè÷#}q9O§³E¶¿7Œ”’"ÍLubûýH¿;:_€ öv‡Ñdg“Yœín¢Ù,É¢P©$I ‘e†ÎÎfñÖV/*“¤¤† &³8 ­´V2ŽÓ¬œ ÍŒI§1õzQXŽ‘RÊ45&I³,”–RÈ,#“eDRBSIéÊ´^8<“`n@bÖÇÉßgÇÆ´ì2±$Ë´ãl¬ H3CdZç‹J)Å_þõÏ‹ßýéíüÛû‘VJ<º¾?d§gÓ웯ö£( ÔhØQý‡×ó£ãË4êôòwN¢ÓÑâèø2ýÝßÌw¶ûZ­•xñ|¯óþt’–žh­DšüñûÃùd¶0{;=t”!ЛwçÉÑûËTÐëEêO?-~xy¼xüp+HKðôñvôóëÓäå«÷‹“³iz~1Ë..çéϯOc ÿ’„V‚t»zóötqr:MöGÑtºÈ.'‹lg»–9˜/ÓïE:Š¢HËÅ"5„üãÒ$M €H’Œ‚°~W Å;·fÞ@:P2I³j CÕ†RRe™!È2CJ Ùö SY—BH“‹LC$òFaŒ!!„ô¯¥å5¯q%5ë^q ÿ|wˆÛÄv躻BÄn¢=“ @?Ÿ€d÷`âóVïü¬,ÿüö4yü`€€$ɲÔ@) ¥… Ê;§©¡?ýp+)aòÌ-‡¼80- ˜Œ ¥›%& ”¨ê"‘H3CTÀD+)Þž'‡GéƒýQðÍóý¤Y c Iá¤BaŒ©N_q‰ ` A½j¥Dá2‹ÔPþZáÎáÑeõŽUHÀƒ4-`dˆÊïçóÄ:ÿŽOk)óÄØ™K³j³:O zc¨ü>¯ÊAyNIšYÌ%¥‰mÐú0£Úv–ƒòk:‚È ™Ü* CD¸f€\+â6±1WˆØ1À\WH? íë ÍT×iÃO»1oÂÑñeº»=Ј0Tò7ö¨ó›_=îüðò8žÏs|2I÷vzkÜÓÃAGM¦s')ýú—:Om‡Å»– –-çXdÆÐ›wgI¿ç|oˆñ¨«¿ùj/Ú߇ÇÉÞî0ØÚêi"Â|‘„”/žíF_?ßë¼;:Oª)âí»³äÙ“èуq8uõtga¤Åã‡[QšeÈ2¢G¶Âííüû¼ü4J}Ÿ\&ƒ~¤º@u»AõýYh5™ÆYšæÿS0™.²( @˜LæY·ªí­~˜$ÆCh%·ÆÝqy9O·Æ½p4ꆓÙ"ÍaQØ‹8Í´’’!Ðï…€Ýn*%…1DÆäßñ))dš(‹1"¤ ´R"ÿ )¥&@PþÖ“9Wíµˆÿò¿ùGÿx©ˆ€W±c€¸®Þ’—×b,ÐÍÝç`ùçùÓÝèåë“$ËŠÕ–æ ß?tT’dôüÉnxr6ÉÞ]¤~bšá/~õ¸{xt‘¾;ºH>‡ÆÎcÈó;U))~ñõ~çwx3#ˆZ××´ ¢*!е³ÕŽŽ/’8É*šìíôã÷—‰ï't:Ze!ŽSã*÷z‘ž/“ßöza0%)‘)qQ_O-uQB)¥’4ËVk§6@€€"BæXlÔ9ÚZ À¢}’;Áx§j#6µSkq¹ôrå`|?­Øî% õbù› ÁïìMß- `}¬ÞvÇ1ØVàÇÿyHµË×@áX*wm@k-~@Q£µ‘|Z@!,sÕ‰­ïã…`çà£(n9{`Û€ë ë°6½!©žµ!bï2ó/ϹÍDLþ¾Ò!Ñôë )ð*9ø$$Ú oõΠ7á’¼¹F¨á“£-¿þ壎3cC;žG¾&›9¸Ò;ÀÏ÷¢ PŒÂÏv£Ç·BávƒVJ<}´={²G= ýA¤övA À½ÝaÐíFŠŒ‡]ýèÁ8|°? •‚, !°³3öFáÖ¸«©¤ØÙ†eŸ^7PýA¨A[[½à`ou»au'˜ Pr4ê†ãQ7´jÜ m8èãQ/ ”*—3@k%»Ý èuB]Ü>MDåë•Úiäà“(× ¶ `®±càp™ˆ½òà_žs›‰˜ü}¥C ÀV»ã6xç~+hm}‘€Ùlav¶ûšìnôã‡[ÁŸ}û s°7Ò ¥øúù^ô‹¯¢Ýí¾ ¾þj/üöÅ~t°? @@¯ʃ½a@€ØßèA/’JIñà`|õt7ô: †ÃŽþêénøâÙNh%¢HK@ˆ8Î¨Û U' äw?- †ƒŽ²cÛÛí—óìÇ—ï{;-py9φý®‚„ƒ^¤&ÓE&l{úõÛ³x6[˜Ñ «íd÷º¡2™Á»Ã³8 ¥òÅü$ T~3Á°£//眞M“Él‘I)«{ˆ‡Qp~1OÎ/æÉ N8¿˜§I–ÈúÔw:ZOgq2Ó, ´&q’få-Ïn#A€dâŠ"v 0ë @¸Ø‚Dm³ÝOϧe"fYv«©m9çÿõÛÓäჱ£AGîl÷ƒßÿéÝb{«¯··ºêɃí`¶HÌïÿônqr:Íà§—'ÉË×'ñîö@ ‘šÎb3õÔ‹g»áîÎ@_Nææ«g{ádº0?½z?ºB<²þüæ$ùá§ãE’zêrºÈ@ãa¤&ÓØÀåd‘ ‡ey-ýNu|¾H©× %$ :Q »@.âÔ€ò;Ïä Û ÓYbzÕºÀüLô:¡Z,@Ìæ±évò»Å,âÔt:’‚¨¾¾«¿ÅÝ^RHAD |A¼ó¶ÕÊ«õî¢\Po2¡„€Ìd$¤íÚñ®ŠÏ@ €+Dì`Ö€hàÖ¼5ýô|Z&âÏ@jŽk©Øn€Àæ€E’‘RH)"qr6M!œœNÒÑ _щBù7þüIïÁþ0ÐZ‰_ÿÙÃÎÞN?0D »’ñæÝyúôÑVøóÏ'  ;jw{ Ÿ?݉.§ £)¾ÿépñôñNøËov¢ ¿#Â|‘šò–n–r¾(W)ä9X,2 ‚ü¸ÖRÌç)$2I)Ë;Ê’83JKA¡%ââî8å?qš‘RR¥¥H’âN-DÅMÈ„€q¯AªsçÜP•ƒbQ~ùŸ[»ˆ@ WA@!Ë@•O;N}û, ¤3àîPà6ˆèçàŽÐþ?d¯øVv?Úñ™èOܬØnË.‡ÇéÁÞ(0ìƒý½~òh¾;>O‡½Ž:9d‡GçÉhØSQ¤…a6OM' $¢âÅóðÿýgßMž=Û Ã@‹×oÏ)%ÞŸN³ù"¡4M©Ó‰äáñEšfa¤ÅÅÅÜôº¡$g³l4設¾ÞÞêé³óY xòh;$ÞŸMÒý½Q°³=Ðd¨ºÅZ(9™Åf:³(Ðâ$!!„ºzgÜ ..ç)ØÝBækùýŽö#Õ ò{…ù÷|óYš/t¯è€(P2ÐRê@ɰ˜c¾H²~/Òý^¨qš€0Ô:ÐR@ •”B ©¤TRä·wK‰t TjQÜ ­U;þµÔ‰ @Pÿú¿ñoÿÍ‹zY!m[%âÖ1ÕD7À+‹øFXeÖ±ÝIz}6ZÆ€ í¸Ž­É¦³„ž<ÚÓ$£ÓóI–¥ß¿|/)úP.’”~~sš,)]^.ŒÖJ¼zs’Lg±‘€xwt™ÆIF'g³L !NϦÙÅå‚zÝPÎç1-)I)Dâøýe:™,(ISÚÙèó‹¹1†püþ2UJ‰7ïÎã,ËD •Žºúì|–ÅqJ“É‘8<¾H Û ¤—“…!N Ó4¥458¿˜eRHœžO³8ÉHØÚê3“ƒËé"Bˆ“ói „„èF¾œä‹Ý ­•L“Œ¤"M ¥iFD€É -’Ìd†(Í2*n¸-º@ÇI~7O)…H²Ì"Ê?6EuoÐ,ËȘ|•¢ÖZ§Yq÷?oÞµÔ‰ ï¿þ‡ÿ„XkŠØ1À\—`3oM?=ŸZ´•Ù€ë´sŸëz;ØêE’ÒéÙ4ƒo·YH7ÐNí´[U|•$eÆV¯°_’ãw}L*)Luû7”¸•å“*wÊÄT7×öëžDþQ«!SRRŠ,ˈl½¶h§:.êQݺ¸$oBÈ‚“ŽSþµ„&'> ùw‚÷€´i!eæc€Öù¯·Ý0Øn%¥ªŸšþîè<Ý€JK¹»ÝWZ OóÕŸYFäP ü†ùRQþ@À ÈÒ€*ÿBÆ "ŠBíä©é|©›JˆüYïNl"‡¶òqY–‘´‚5©¯²õ|E·€€õdùk Ý&V/€Õqò÷•5H´A>ÉõÓîúÉØ±Û…håÎÃÊ¿ü×~ó<²ê¾£ÊO;ÿêožu¤ùuï]ÅÚ–ƒ Âì­óµƒOm‡;[}ý‹¯ºÃa¾Ô¢ôSk%ž?Ý~õ‹ƒ®’ùwqÆöF!DÞ§ß‹T§(ðèÁ8Ú÷õÖ¸§;aPþò_@(±µÕ ûƒHïï#)ó¥:½n¨ÊÇùÚ![ÏKêâ’¼UçøP¬ÉA«v´˜w1´Š´që˜Â‘–ßÛÕ'™X÷¹´¶>+}ãí…Ô Š˜oÝK‚€7‡§éãcýÓë“ôÙ£í`g»¯SCd2ƒßþáõbØíÈgOv‚ÔœœNŒƒA(·Æ]§ž>Þ’ÄÐÏoN“­^ µ‚?üx/’”þæ_<íN& Ó yx|‘‘ÔJ‰?ýx'qFÆA*ñæíY2_¤´5î©×oÏøñåûX{;C º‘<¿˜—ïT‘¦ýøòhñõó½ŽÜd¶È½Žº¸œe;Û½à§W'ùM²DoÖA IDATI`¾HÌ|žš$MÉÎ[œdôþdƒ€Ñ0Èîtgóyœõ:¡º˜,R;‰t7è{¹‘v$XŒù¢H ÀrëÞ ¼~{–ìç ãÃHËÙ"5ùW¯³ylìôÎÎ@¥™Á?'o/Ò7oÏÒé41¿ûÓ»X) )þú÷¯ç3zýî,¹œÌ’Fù]]º‘üãw‡ñ¯ŽâGÇÁ¿?ŒOÎ&ÙÞö@wº¡ÜÞó©YÌz°?¢P‹¬^±¥„üêén´»Ý×§³¬‘ï<€ù<¡bm Bˆ §§—i–Æãn0u{Lù"¤ ¥¦ó$ò‡k­¤¯ï7êâ’¼U¹»+•K$…´E¤•ˆ[‹oáð>œ>dÅâøiÿsc´'dzcê_4 3„4͆ùí½Ò4$Râû’·GÙWÏ÷Â_ÿâaäÆ \NcC€P øó_>ìL.çæälšu;€Å"!€'†fœٓ$£@+JP¼Ù<1GÇ—i–)ÊØD–úþ§ãÅ÷/ã‡û£ \ÕñÚç˜R ¤™©õVŸÎ’l:[dïO&i¯*k(@ù³‡ƒnp|2ËÏz…ÈLõ”¢†v Ol·¾(Ú3Ê´ÆÙc¬£· €nai½€ê¼6Çá:èM̬_Ü-:±n¢gãÖ°|ùòõiúôᎀýÝ¡ŠÂ0êFZüó¿zµxòx'èv´$ch>KêKÛD Éï@}p0ÖN ã¸þ¸ÑÉ5Upv>5;[= {Š\Næf2[¤”å¿ä”RŠg·Ã$5J¼;¾LàÙãíèíÑEºX$æñ£í0Š´|p0NN.ÓÉ,6½N¨N/ó»Û,’Äh­Dšf´¿7Ó4‡ûÙE¾vp4ìê$É(KSÚÝ„“é" ;Á|–dó85A dgY›vœÌ5rûÚÙ$oõ‹ ˆ¿û_ýÿG1Žh³ÇXG=Ÿ‘VÇ‹ØüЀäw|ª‹¨7Ôˆ¦v€n@¾v¾ùj?€ 1™ÆæÝáEjŒ©bÑRŠÌdä//ðµC”È2*®‰5Å·ðS !„ÈŠµsÃA¤£P‹£÷—) !DýRÂÃqX~gXÇ’–RˆýÝaðæð<å?ž;úèä2 ”Èm•ño»ÁÙù,1öõbig4ìççóÄ×NþÇ­‹KòVã»@ € YÚa¢žÓ;9Ö>`þ‚X¿`V±À‹ÅÉÁ5p¹vJOÆÃžLÓ “éÂеãŶ1.¹cK´SxÙ–ƒÚPC;elšçÖÅVZÛ÷€ @’5 Í ê9[®Àu$‚¸ $76à‡ˆØí´rçÇaeá³0ÌP>ùÙùÔ¬ ”ùRW;ÖK8vÕ?”J¢"-EZ´æ 0¤•”¥I-¥]ׂèvC BJh©„VÕŒm)PÞô¤(×–A…a¾|C %„R _¡áÆ&¡”vÞ­Ê ¿j@âÞ¥K(*g…æó¯€@¶Š´qS½µ#·€ä^&b'¨ E{!ý´œbZç¿Þnä ù±~Þš~ZÚqnä ¹o½ˆ€Nh½ü›ñ,’õ-’­XÚµ†Z~ûÕ~ØôÅ5±¼øöû9ˆ6yøìÑN E¾ªýÅ“ÝpowüæW£~/’u,„N'ß¾Øþ•¿xÚ)gÆÐÓÇ[A ÀÝí¾ŠB-À/¾Ú‹ö÷zoo¨ÃP;wº|°? v¶úêù“2ÿ„í.W×G-{ݨz4ÔhÜÓÛ[}ýèÁ(´cSJÊíížî÷"¹¿;tñˆ¦^7TåšF):Qþ4Œ( ä¨ßUãa7ðêù=R»a ¢(PJËü+Bå7;¨ÓsíPÿ0¦)â¦zkGšôA¶‰ˆÛÆ]}ãM;A1ë­ÛÀ+}Œs£¬Ðʇ•…öÿq©Mß8 „7ïÎÒGFúÕëÓôÉãí`g«¯²Ì 3„¿þÃëŰɧw‚,ÍèälFçÓ¬Û ÄŸÿòQ$„À/ß'“¹y¸? ýH !ðúÝYšÂãý±6¶·zêŸÿËŸãaO½z}šv¢@Oð‡ïã¿øÕãNuÚ ˜/ê÷"5™,Ìöv_ýþOïb0™.Ìd¶ 4­Af³ØÌf±å ö»PN§ 3™ÌÍhØU§ç“l{ÔSoÎÄéÙ,€ñ¨£æ‹$³µ“e†ŽßOS€ÐïEu™LÙd›^/”ó¬× Ôtž?j'&Ž1u¥@ _Ì?™ÄFˆ:J“,‹ÓÔDa æY’¡ €ºØ®UŠ%M7Õ[MÄdº3ë· €÷€ àÍÛ³ôÁþX ¢@‹ù<¡¿üí«Å|¶È× Ž*K ýðò}úöð,©„ø—¿{½øÃwïâo^ì‡ZIùìÉvp|:ÉNϧÙ×Ï÷Âéda~ÿý»Øƒw‡gY§Ôéä+>ºÌ‰y:ɶÇ=E#-Î/ææß¿‹{ÝPΊ¥DQ¨Å7/öÃѰ#Ï/™[uŽíS@ Lg1 z‘TRä-:§Æ<|°¥·Ç}ÕÈÝn¨´Vb:[0SEù¥•0Y]+ò»Ò”à…§­”èt9™åÏMLÓŒ•ª•išU¦2ƒÆUAuÞ ¨®§˜²þ¸×WK]l×Î:ÝqS½ÕD×Àÿ¿Øë ?Æ=9Nl¾i ð.ÐŽÍéqä·‹Ó a @HÒü M’ ´ßÿt”lmõõ‹g»øáÇ£¤|•eJ ¡µ,o›‰43øáÇ㘼x¶fY†_½Oˆj·´–Å‚x?ýü>Ͳ,×4©ž² •¨¾\Ä)ýá»wñpØ•†Áw?,bøÚ1NlB*‰$Ë(¦øŽ„³‹™ò;Ä<ØïO'™Äá°£ýŽüùõiR%Läï쀌­&B¿ß‘“iœÙ¹-ó†Z {‘z2IÉßãIÌäÚÉŒ€!¯?‚ª0šÚ!ªòfl}ª’ÜRó ŸÚµƒ HTÜ6­qS½ÕD @ ;ñ’ç8ZÇ~ÖEÔ1çÆÆ¬†1­ve–±üüú4}òh[€ý½¡îDZFa þÅo_-ž<Ú :% f³˜€”øõ/E–â§—ÇÉlžÐñÉeº»=P&3˜/R B->ëwGçÙ7Ï÷Ã^WK~øé}òäáV0RJ‰‹é ~„Ù<&Y|‡…xòh+H³ŒÂ@ËW¯Oâ_„ßýtœ!<}´­ÃP‰gO¶Ãã‹l6OL¯Ê×oÏS2@š¦¤$‘Omiø£ãË <Øéóó™RЇc}~>Ëö†úü|f¦‹Øô¢@N¦ ‚˜-b %â$%ô#õîè<-Ïq¿JC„8Nig{Ìf 3tôb‘Òb‘­¥\Äù£“â81Vr‘¤¤¥a¨¤N¨f‹8SB ¥¤ŒãÔÄqjÂ@K!Mr" ‘?ŠðæâïüÿÃÿ `Ù€ul Àb\ $ì)>€7¢«ÐêØÔ޳qçXvüú«½B`6‹éí;{`þ‘^–YëH!‘½O@@J!Rû#½†v€2?ZI‘Cdœ âÇ,†€“ÓIH™¿ó,c}úx;xùêÄZ+HÕuªµû»ýó›|-a'Ò²ßïÈ£÷™ …Djj÷wGúðø¼þNÏÒ¤€ÀÞÞ@^d@I‰Ñ¨£ON'i›v†ƒHM&‹Ì”uÓËÝ ßQ——ó¬¨ ¢× Õdg«‚òófÆ 3Æç%¥0íë7 Ÿ¨U;W Cðÿb¢žÓ¯ÞðE `kÞ¬ã ?ë"ê˜sccVÀVûh–ÿŽG]™&ÆZ'¸L;E¡ôâ­cmõÓ çgíåM®lÏ[C;Õ(+^ïì^Ÿv¼X/êºçæ-?æ^_¾¾® €@Ë ´Éq„Èt¶€õ `¾u«¨T½Ôììlf>€ÃAWŠüÓË•Bòü¬öt£°´ƒ PBJX†ªs,…„VRh%…È—ç‰n7(×ýUv•zý|9C¹Ï^ÏgkG%%”å£!¥D7 ¤§ø{@ |ž`SÄ @ø"Åf$Ç0Á¬ccbmÞ€kzø7ÿâyGJç! W~ØëRYF–½üå7BÏO˰/¾Ú Èäw®yô`K?y°¥ÿüW#xÚyñ|7|öd[?|¸¥Gý®€Pk±»;Rö…øõWû‘*Èh)¾z¶üùŸ=Œ´’åó«ó´»ÕWŽƒÝí: € CBZ<Øék׎{}Yƒo¶u‚ À²Û‡в½NÄ À[ @?oõ `¾uëHÞ¾;KŒõ«×'éÓÇÛÁÎvO¥©!c¿ýÛxÐäó| NΦٛÃóìù“ Û„Àþô.:òäljíŽõxÜ“&#|ÿÓqòøáX+!…¿ûãÛ¸ø}#:Q Œ5,’”^ý|’íïÔûÓ‰€Ó‹©9=Ÿ˜@Kñ«_>Ž”’"ͬïŘÌ:;›šù<¡|ÌÌüê`žgEäBàübžÿ%5ôýOGÉ·/Â6í„Å"¥ó‹y6_ÄåËÎ/f¦|{ï @ ;1°~ÁÌ·îÏjD*1›'ô—¿ý9žÎz¸?Ò»Ûýüy‚/“7‡çY¿ÉѰ+ÿú÷¯ã¿úÝë8I3t;ÐZ‹x‘Ñ_ÿáM<FÒd„ß÷6ùÝ߯¶Ÿ/ží³yL'g³»Ý×a¨ÅhØU“Ë…)cÛݨo¿>糘ü†¼;>Og³˜v·ê«§;ÕVŒ!h-…”Bìôlš/D·#.–8xΧ 3Å¦× ÔÓGÛ}v3c0tË»ËÜ+°Ö 2Ën Àz‹X¿`æ[w€ |ÍYš„aþe\šä«ÐÒ4%(ñýÇéöVO>¾Àoϳ4­~HY}3ë(p°;ÒDÀÃQàŶ6£aW)%…RRŒG]5v•’RÀÓNj±5îé^/”¢xÊ^¿I¥eµ°±iù­ú½¨XgXç-É !ЉÙír! ´-ËS§•Q¤«G= t»"j׎’R–Ï;T*÷× ö‹ P®,mÖ^}.Â9dkŠØ9 Àü•XšƒO @rbcV~ßA’›ïû­ x°?ÒÎ xþü>@9•„ÈïkIBŠí힀é,ÿõ¥B(Ÿ™g‡ªd¾P(¿©õÎvOg™¡n7Žƒ¯_ìwªˆŠqýn¨IbÂP«GÇ!Ì)ímtÙqg«$©!àñí@x°? ƒP ;oa¨dj±³Ý×eæ’4ÃxØ­~ø8uU’dU‰»z<ê*ǩ╀£QWŽFùÃ…Ó”ÐïuT~ö>€ö‡ÇͺH­ÚÁ ¨Ãü"èïsbûtô‹¯‹Ðw+è©ý¼õ$oÎÓƒý~õóiúøá8ØÚê鳋yÖï„òß½[ F]µ=ìêÉ|aæ‹Ä\\,ʯéðìñNø/~ûóìÛ¯v;†€Å"5A äw?-zÝPîît§…Z~ÿÓq<vôÅÅ"#³êÑC{{C’RŠ,­?¶|6IAñ"ˆýŽ"i’Qä„£@ÅiFdN ç‹„ò»ÝPÚïDúd1­~šº˜§f1OÑë…åkBf :¿©²zRD¯¨$NI+éh®ÔÎhØQç3³½ÕSå¹X,…œ-búXúêºH­Ú¹Iå:A¿^¯ˆsG«íúh»ØÜ š"vN0Ŭ§ÿPZY‘íj='ðNÎÎgÙhÐÕÁ8>¹Lüé8>z™îî4Œ r@œŸÏªe Š›g“0Þ¼;K^¾9I¤ÐJŠûÀˆ!D²×‹d·ÈEœVOm…GÇ—© Àò;À@+ñèÁ(xýö,.N’”t¨dj‘Äù“”’"+~¡“%$”²>À³4Yüâ³ú0I2Ò’"N [ZÉ Ðòrjæ@t;¡\$)eYFöWi–¡þ¨¶5w€ €ËŠo=ŽhûYѦ9/oN,Nl·€µŸÍk’XûygXÆ:›Ç¦Ó %(_ßäKZ,2z:É~ÿÇ·ó$1øæ«ýP,C(kdc Ê'Æ¿?É^¿9M~ÿÇ7óétaæ‹Ôhf(¥OŸìF§çóìì¼zW­…A„¡FáÏoÏ“¸€@PJŠ$É(ŽSR*ût¶0aHDÔÑ¢ü˜¶þx¶òÓùŒPB¤qFIš¿Ìwù­Û"-¥ƒ~¤õGÅ!ÐR %…N !¥H“lYn€Dtãªï€Íã À\U®G‰˜Èt{0ØV ¼=+Ë}[£žêu#9_$t|r™•ÚõõáË ¶Æ½àübž5Ÿ‘G-¥b¾HŒm·è(úÝHÆqFIš?ʯÛÕ2K Åqæ»)‚PÉù"1°>-;h¥„BÄIj­¥BЏ™›€(Ôrçpµš si%qb¼ÜyÖ“åo^Ä À«‰˜Èt{0Ø6 8=›fùRhEñð NΊ¬8±@ÅÇžÎ),“é¹èl–˜ö¼d Ó @ä í©´$†€Ì=V,Ë ,bÓ _ó¬—w€@ñ‰›1ðj"f2Ý @'¶+°ü“¤ÊÂÑ®¯O»Þà¦yó´Ó Àöº¸\;-'dí2ˆ/€€{íVGn€®8€ù\ @¿®qQ ìÆ\QH—k²‘ƒ/€XY|¬ „?hv¬Ø€öñ¥9ø<‹å€Vcæ/ÖìXœØ€Ö¸;@ªüü¬${Æ ´#‹ç®·çm=¥èuCi‡…ZDa~×gŒÛJ*-EhaÛ½Nv¢@¿ƒYR—kçPà–° Ètº0ó›ÐÞ[ÇÆ´ÆÝ–ÇX–i«¡k 7Åí@ìíöõNy·_“K‹/PæG))=e§A?’F¡õM˜ËríX±åv…€ ¤u¾k½îí ´Öª^›ZÄâÇ¿ò  q°?²žx+ˆå9ø¼ŠÆ0. ÀüÅMP,É[u¼Þ^.b€Øâg¹q¯H ¾¿Ì¾}~¿¿Là`„–Boßž'³';QœdFJˆŸ_ŸÅ‹8ÁƒýQ†ZÈÔ>†‘Vgs'ù¾gOv¢$MIB`6OÌûÓI¶½Õ×a pü~’v»¡ìwCe ˆðîø"‘Z‰P+9ÌhÔQa¨•pz:M{ÝH !Ät)ây‚Yœšñ°«fóÄ(%D¿×Q† ]\̳NG+)¥8»˜eY–Ñ|–Pu§˜Ö¼çiÙùÇ= Èå"&|˜ˆ€-…”XÎÙž·êx½½\Ä`~v’Ûg ˜ŒˆˆH+)¢N(··zúìbšÍç‰98BJh%~|yMÒÝ^Zôº‘üñÕûøì|V=I·× ÕpÐQå¢t ¿ôÉÉ$}õæ4kêEŸw‡iœ¤¤¤išáÍ»³d§4èGJB­¤ÐZŠn'T‡GɻË$N2šÍbsr:M/'óLI)Q<¿©XÝ „‚Èàøýe Ñ 9›'&É2ö£êæØ³ElÆ£®–Õ3{—k‡ØlËn ;â쳎0í? À:6 5îºHy¬·€ÖáÏÀòøÑñEº³Ý×–2Ëò¥€óyBGÇ)̱!’4VJh)DZôK3C‰8ÎÈdʺÏ6ƒ,ǤÈ(_ˆþÓË÷ ðøÑ8ìw#‚H‹Û£¥™!YÜ„ÅAJ!2cœ¼2yF "Ë ·lÈû'™ ¤"5ùÎ$N‹ûˆÖýÓ$#ã.eoh§€ä&ËÓÁ@ ýÚ¹#Î>ëÐþìccZãn€îFî5àôb–}ûâ |{t>ßwÕpÔU Âdº0³YbLþëÑʧé"_—ßñEˆò©ºI’ÒÅå<‹B-'³Ø€ò7÷w‡afqœš45t°7 2ce†’4£(ÐèõC%•ZIñîð" #%‰qJYFØÝî@çç“l:‹ÍxØ fóÄLf ³³Õ×Q¨¥VJ$Škò»ÖD‘–Q¨%°ˆSƒ$#B)!O¦q²J;Kh@oó^Äßú;ÿÿa6ütDÌdÖ~3a»ªvŠ—×À2–ƒýaptt™dÆ@ !Œ1ÔÈ›=HÆ¸Ë :Q ÷÷†ÁáÑy2›'æÅW{Ýï~8š !@¦<“%…(Ÿ>¿=îé8ËhrgDTFçjGä; à6#œóÙX! !ªZÐí²òýé$µÌ8Úa®núðƒD\ÇÚZ|Ë? ÀrÎö¼UÇëíFîýó_Çòihåà^ ¼{wž”= U¸€@€0[$æ§WÇ‹òÆÓÇï' €Õ7aÁd2DKÔµmYÞìsìl榰QÚžÏ33Æ­·B«üôµã]øÞæ½ P}ZŸT }Ü ªŽµµø–€åœíy«Ž×Ûl @¿H:~6µÌ¬cûâ¸QÞ>µ,„·|Ì(¿›ØùÅ,«çtµSš\,RûQL«´sm á‰2»—çSã„0[š.‹(ÐR|ó Àú°·NÄ @¬ÐN¾q;¸Z;žß÷€E[«ßî§à*í07o Àµ"®cõƸ}€åœíy«Ž×ÛËE |¹, p#í0Ûëârí0¯ÖŠÅòîÎÕ"þô/„º°ÞºôAVï[.bàú¸¤ø À26 u×iÇ·ËtÛ] àü0&o«EÌlŠãö°½º"vÍyã>PÄ @¬ÐNU î&ÛóVo/¤ À*×)àíiÚÞX-b`S À¢1óŽ× ÀUÚqŽ3Ñ’·†O @;· À¼Õ‹å"f6ÅÁ,Úµ°UÄnl¶ @«p/É[}×±¹~3íN @ǧÖ|q5ÃŽ˜ IDATÊï"f6ÅñeÐ)’(b Vh§Š¸‘v€ÎuÜôs3íøštM0½¦W‹øË w]|6¶R k×Íöávpeު؀i‡ØÌ›ÌFÚñ5éš`¶4Ítþ0‹qëDüùØš·|N`K!]­¿H}œÖæ— @?o…Omv€n»ëß Ö[öÉq9‰aæsÝÉ:ÿnŸ*6`9'°¥®ÖŽ_$‹>ÎNk“+ï¨FÝkÍ›ëØFÚñ5éš`®hÖw‚å®û À«‹˜h¯÷]QÄnl¶ @«p/É[K!]­¿H}œÖ&VÞ?P;º×š7×±´ãkÒ5Á\ÓtKñ>1ÉZ=lµˆ=—€žˆÝø?%½¼Y>Užø"vc³ —ç -…Ô5¬7€°òþÚiÔ½Ö¼¹Žm¤_“® àMÛÕÒ>9ùžò“`>Ð:nÅæùͬòÚðs•vœãŸ€ÂåR`‹ëðnµê)öÉÉ÷í–°UÄ–1ïº`æ[ À²°¶‹ ‹¯ÛźN€ë´Ó¨{­ysÛH;¾&] À+4íJÿ¼mR|ó `þŠXOÏÐÏ-°ŒµÕÏÍ´ãkÒ5Á¼bÓöÉìBºAñÍ7€ù«;À‹/Àdº]¬ëÔòÒ?¾T; ÀfÞ\Ç6ÒŽ¯I×ÄǰM“hæÀsëN(¥äŸ7`‹ˆ?€+DÌ´}òbóû0[ éhg“âëv±®Sà:í4ê^kÞ\Ç6ÒŽ¯I×ð›lœ7`‹ˆ€öñ"¶¿€U^~nœ Öi`:&€Ñêu‚ÀfÅ7ß`毮€V§•9`–€ul @ë<¶æ­ð©Í.Ðm«H¢éæÝmº>¿ß|ã  9ñz±1­ãEl®ß–OÕœ¾ˆ-c~‘ôbóûÜM¶ß|ƒXùDÍ1X§B¯+´ƒë Y6­Á À/§I`¢EÄ @ûx›ë·åS5§/b˘_$½Øü> ÀÖBúÚÙ¤ø6|g–õevu¯5o®ciÇפk‚xMM3Ñ"b }¼ˆÍõÛò©šÓ±eÌ/’^l~`k!ýílR|¾3Ëú²N;º×š7×±´ãkÒ5±€«´S9´6^l_$ú;ÁÛ @ò-W/€ù°ìƬíbÃâÛðXÖ—uÚiÔ½Ö¼¹Žm¤_“® à57½²øæ Àü°žþê\Ÿ·ü8°¥~ˆvÜ­ykø~ç(–Œ©|j³ËtÛ} `=Ji³BÊôÐG–±+ä-?Îl)¤¢wgkÞ¾oÀæÐ"ÖfU®cq aÅ´í~rúy«Ã)7¾x%7*¤ @¿1Ýqd»BÞòã À–Bú!Úqw¶æ­á;°¼N×i§Q÷Zóæ:ææ ‘·|^_“nà 6]Ÿ°U"^@²»äÇœa"bïâ©_0ó­›àòâkùTÍ鋨2v…¼åÇ€-…ôC´ãîlÍ[Ã÷ûÀeÚ)þ-®ÓuÚqcqbcÞáVü0f•ˆ€~»6®±?pm!u0 ~º…”X\§ë´ãÆâÄÆ¼ãM3?ËW Àzz ÖÐÏ[åwµ‡ˆuÚ)ôº\; @Xó2¯­Ù?Œa毀õô @0WR_“.$¬X>J; @Xó2¯µ•?Œa毀õô @0WR_“.$¬X€¶Ýë kk]d®hºYH?;—ŠØ¾\sv`Ñ€ @¿2‹ëtvÜXœØ¼:±, À»Ò¤ ¯`y€žÃkD|µBºRÄŽ`½Å´|òü´û0‹ëtvÜXœØ€_`³¾dúètaæ/î©q½Y€õô·€¾vÚòv[ñà +`1–XQ+6kjrbuû0WjÇפ kÐ:nÅJö˜j^àçmšˆFc:]n€mÅ-9ðDÌ„Ëm`áãg s–ŠëtvÚÆÙv€_n³¿d¢¥øz“¯ñÕ é;{‹qëD̬‹¨›559±º}€+µãkÒ…DÀ´3ïH+¿d¢¥øz“¯ñÕ é;{‹qëD̬‹¨›559±º}>€ÍOOê>õ†“ÛÚOÛ uîZóÖˆ·þÇ׎s–ŠëtsíÔãl»Ÿ €ë´ãÆJþ˜¢N4®/{‹¸¤i0‹> @Ç®eÌ›‚Xo1󹮤rÿaZ>1?}Óõɱm»z߇ˆØ»xò À{c€+‰˜,Ÿ,»hÉ›åS5§Û…˜¿¸ú +ö}rV±.˰%o®cn€_JÓþieº“û"®íT~2Ëyo ©«Û‡¸R;¾&]H”q÷ €«óæÅj]Vn€·³i/ÑÐö’h] @äó:±ÔÍBú!Úqw¶æ­áû— ÀuÚqÎÒ•µSkæÍuŒøe·j±<ÐÜqm'ñ?Ë @”xIñEK<ß'z°ýþ¤tbu!QÆ0m+ À;Þòç ZÅ®l·€›ˆ`27 ¹ @;VeжÂüšfº“û"®íä"^âgùâ°)b|úçß‹`6b¹µôŒøÚñbcZ>1oOË—HXØf7ñ?Ë @”¸½ø2.@7àæÚ©Ç5óæ:Ƽ_MÛ À6»¹ˆ—øY¾`¢,ÀíÅ÷ChùøYظÂ[ éÕ´ãAÂö›Ø¢ç,]Y;õ¸fÞ\Ç€÷¯Y?Œ¹šˆý1ÖuÁl±7Ƶ[ì» ô áöa.)¤WÓŽ Ûo`‹vœ³teíÔãšyscÞÏVü0æj"öÇX×°EÄÞ×.šç @0i€õ°Þb^CÓ÷€Â‹Í²›‹x‰Ÿå  ÊÜ^|?[rÀ¬bZv€Üüæ}'È,E¼ÄÏòŽ`k{ñe:]€WÔŽs–Z´“ïvö0¹}P³Ë3 7‹ãðg`kñµ|j1€åÆí Õ6­Qö´ ÀzƒXo1¯¹•‹åoWR 5= @/6 e÷FèŸr^àišXíü¢HËÄæøÔš·|^`K!m( êÜ5¯Á%9X¢'-ÚÉw;{€Ü>ºYß 2]Ÿ‡¯ b'(`½Å¤Ú¦5Êž–Xo0ë-à ¶‚W µ\U²?!ý»‰T6­q-5ŒØü“Ïû9Ø,¾V¬­9¸)z>5 uîš×à’¬Ô޳ñpYÞ€Ÿ»é6`æ Àʧv3. À|¢Uy«Æ6rТ|·³‡ÈíZ›ö à‹ /âf±q:3+ŸÚEÌtº0ó‰€h«Øš7n7Ó4œk • mŽA1вËĺBʬ'`Zv?€ÞUáä–ü1Õ1àÝo²øË¬÷1+ŸÚEÌtº0ó‰€h À[תG)1Ñ,¤+Eìu3ÜDÄ–1o `½õùØš7˦ëЊ‡Èí&[ãÚÖõÄ\*b'(`½uÛØ^|ë} ÀÚË[@'oµOþql¨?oîærR~ޝª0om“ @4 éJ;A1ë- Yó–£ZófÙtÝbZñ0¹}ŠV~'è%º û°EÄ @ïx݉x±0›±8{€Ü>YË?-·VpUñ-Ž/-¾×@¿øzù"núétfV>µ‹˜ètaæ17Ѐw¢I7Ñ H”€õ`½Å$kÞrTkÞ,›®[ @+ ·OÝòÛ¦1í @¬Ëàg µÄ `Ão ·ÕMƒh÷`b]Þ0€ÍØîëº×,}E¼ ÀûЊï›WÁšâ[_Z|€Î…ÿAÅw]€U,NlŽbÚ^~^¶i’Èí37ÍD=ou:A1ë- UD«Q›çÍòiY!eÚv€ÜnºUK$"eºvk?íÆdÚ³3ë  7®Q=¸ÝŠVþ0¦üìÿÜn¶‰˜XîcÖ^2­Ü1¹ùM[‰eÖ€õÐ*¢Õ¨ÍófùÔ’ƒÕÅ`–±Ý~ºæ€w¤•‹å€õ`½uͬ¢øÌ´f´rG-;€uÇ•9ðµÓ¦É›`{ÞêM ·•Mo&bò÷UmÐïRJÌæ Ç©±L×À~¿«´’¥/ðüb–šÌØ=V0ŒÑí„.'s“$©íYCÄRJ1ô$1™ÌLœd$%0”[Uçó͉¹O”R`{ÜW'§—YfÚ®\ml À~¯#¤„¸¸œ k„€•OVlîñü[ùà*“¿¯jD$þ“ÿèßùv4ìÿäŸþó·ÿû?þg‡7õð?þ÷ÿ­gít¯üýø¿|÷úíûx€a¿«þ³¿õï~Õé„òz=ýGÿÓÿúªô¹íàøïý›ÿ{gßÄyæñgF3º%ë°|ËÛøÂ`c$ÜgH II ¡i®¦i³ù´Ù6iÓÝ4Ûìö³Ýnûé‘¶Û+ÛݤݜlBºƒ4„ŽnƒÁøÂß—lIÖ­™wÿFšÉÆ&6<¿1Çû¾ó<óÎó|=š÷¥UÎÊ7 8\¡Ÿüò­€01tŠ?÷à´Ñl ‡9âõ¸Ž®ÀþCu#'Nµx¯Gæå¦±›ï^l(-ÊQ±,CùýAr®µ'¸{ßiïÁ# þ‰PÉ2Էݤ½uE¥ÆlÒ+!ÐÕí×5¶‡^ysψÏ$@ 51Sì+ÐKÒx0àp…ß~÷³¾û7-Ï(ÌÏÔ®ZVaÚµç¤3—/že¬œ•oà8ž¼ôê® ÈdžQPF£–)3æ2e%¹ºêšs#/¾¼³?ÌóIlšš,+ÉU>óäSišŽçI]c{ 7ÇÆÎ,ÉU•ÛU³ÁõÞ‡G< ª7Vò¥)~ð½{MÅ…ÙJ€¾~'çt{ùù™lv–•™QÅþèço;]I cÀø“üÚ“€¿úö¶dÁö³ýj±‚¦©-oïí:Z}Ö=¾ N@ÁÎÃÇÝeŹÚ9³óëÖÌK­kl÷uv Å̳§)7¬¿Ù°}ÇáÁ¶ ½Aù9xþ÷Û:›[º‚/zš¶ZŒŒÅb`—-*7fkª* ôþÍ+Èÿ¼ññÀµà(ýß8nªT,õÄ××[hš‚½j=[þºÄéòò4EÁÒ…35}e­éþMKÍç»B !‰£ôÛ¦»êŠ ³•ÃNÿëÞ®«o*3ìxòñ;ùÓ2Øo|ívÃOžßêÙ‰¼–$âØB¢&§èÄ‹xâí½Rw€ûkSjçç  7ÞÞÛ?4<bõ•/¯Jg:æ›Z­¤y`u&Ã(¨Úº6ÏÇ{O:AÒŽÌWÑaG<~¾µ½/T]sÎû«ßoëùìp½ `áüCqA¶¦8 Ì­,P Ú1äæþû•\N——Àó>ù´Ö×ÖÞ¨š¯’Ø9F¿-]8SðÆÛûܺ{†¸÷><î(/ÉU*´`'(÷ ˆJP’y‚— @¡Œ|}l¦ZÊŒt³*ÝfRREõöººþg袜@›Lz&ÏnSeeXU»Ð9l½Ð |4ÍÈ ÷ûƒä•-Ÿô>ñØ9ifÕÖ-°lÝþÙ Àƒ›W¤¥ZŒìÐðHøå-»ûd¾%ž£1é«oíqÌ(ÈÒØRSØuk癚;{…ˆ²g§²ƒVÑÚÞ$îéé ÉZ¢8ÛÒåß½¯Æ±zy¥eéÂYæã'Ïd¤›•åÓõóäSnîÉïÿWÏhBàäé–À‰Ó-Añq'ææØX€ú¦NQ™Ñ“¯ß /oùd$ºMvWJ`z^àryùŽ.(÷ ˆU¢y‚Ÿ€ò+a,*4õ­ÇïÊO1êØA‡+Øt®ËÝÚÖëS*Yº¤(G_Vœk\0¯Ø28äíÞW3t©pÿæUÆp˜#58ηõôzµ¢ª¢Ð0-7Móôßß“û³ßl½Ð×ï@(yÿîߎ8Š ³µ¹96õC_Z™®×k€÷wu4·tD¾I‚8‰y£&Ò3 üw­[ŒBA䥫ê›:üâºÖ/0gfX”ƒ®0Ë2T_ÿpÈíòñ*KýË?Þ—©×©]=ŽPm]›¯ù|w@«QÑóæÌЖ—æjn[Ueìêq„övÆÛ×ï wõ8BYvÖÌ<õ¾µ^Á׌t3cµ€éÓ2”,« C¡È „TUä«Nžnñ@©¯âýÒÓLе+æèfÏœ¦ñøùCGüãJ¾ñm*• ª¢|:ûõ‡n5|¼ï”?rÝ!“¸ŠLpçó0!¢¦¤˜ÏÀä_^ì+й•…Æ£Ž †Âü /}ÐætyÂÂE}èh½óï¹.ÌÏÒWÍ.HÙ½·f(²+€£p8ÄE‘A'FŽãÉïþôÞ…Ö ½ÂT ØðŒóáûVeTÎÊ7|ñ®E©|qG7$ÉÆq<üùµ]½Ï<¹ÑnKMQ4žíð~øqõ°È·Ä –Ú5V"¥†œNØd4jrß23,Ê7ÞÞ7øñÞš­FEX¶¸Ü ×©ŸÿÉ/ßêõø±»Ò½j½?|æËéyv›ráüÝþÏÎx 8UÛêËʰ°å¥¹ê½ŸÖz…ò3§©¢þ–QP%3r”§ëÚÂù¨(Ÿ®8z¢Ù?Qέ,P=°i™1#ÝÌ´w„ñÛmC½}ÃÜ¥ðOo2••ØY%ËPÞli‘]ŸiU%›Ð?à 7·tû„½g.x…gˆyQpxcðÒjT±d"£§w($€Çà€ñqûžq¿¾u¯C @¡ßŽž8ë¶I ¾?Ùì(™‘£(+ÉU<Úà˜Y’;³AaÏNe=^?_ßÐ;(-ÊQ¦ÙLŒàÕb o_]¥eYšJÖo kD@VEUΚ®TБÁJ4MÁÂ¥ªâYl¬æu@?¼ØÊ«@‚ŒÙ„¼þ$Ó•œQsú¼»æôyw였¦ÒÓ,*{¶M]˜Ÿ©`456%Ë‚˜@ºÍ¤èè ¤¤èDop‰”p:=a§ËN1ê˜Ì ‹²C6 BhwÁÜ"ýÌÒ\°áŽÛæ[ê.x»z†Â"ß’ü$$ sŠ!fÛ°ËËEëÄüíéI}‹ãCõÞ‡ê½âCÒEeg§²ÓrÓ”3ò3U,Ë ›j>ßtº¼\ŠQ«È³§±mí}!Ц ¨0K54<Âí=Pë]|s™®¤(ɪŠéjŠ¢àô™6?ÇÇÆãÈ}K @€wvñny{¿‡a° ªHuÿ½ËŒ·­®Òåd[™ýüÍa™o’Fä †à«OüvÀ=âã³³¬ÌC›—ëª* T?|æ¾”þtËpCS‡Ð/S€òF®AVˆºž$Ó¥ §…Ñ4³ò ¥Ev}ZjŠÊ–š¢bY††dº8c;…Q©XZ§S+6ß³$#i»"¥ÛLl2¦ÛLì½w/±ì;P;\9;_o4h™Gî_“þÓ_oíâ8žŒ ÀQ‚8¶•جFFØÝÛ?Ùùïp†’1ES°h~©¶¼,O“‘fb3ÓÍlz± ôÏ8u¦Õ¿ä–2Ýì™ÓÔ­í}¡Ó3•ZŠ>UÛêmné‚a’—›ÆªÕJÊïÊYj€cѻȉP.·—' s°çÓZoÿ0÷Ïÿ°ÙZ^š§š[Y <~âœè.}lDÞ¸ãr{ !@µw pÿþüVן{ÀT\˜Í>°i™þ?~m€@©;Ѻ@”TÒÉòpiŒjÜÔ¨•ôã®ÏËL7«…N—'ÔÖÔîniíõlXs\c?B2Zµ*Ôæ–.o(Ì%¾ÍEԶ˹aÔ£Þš®R±tOïP`ë;õMí¾Ç¾r{fv–UuÏ·˜ßÚö©#1ùÈÎ…t!a ÍfŠô!Ðß7ÌÉ} CDÄ£–~ö©éi6+”íp†›Ïwšš»ZŠÞ´a‘IvÚàÄ©s¾%·”éf–æªÞùà°»¼4òU虆 p˜'gÏuÊKsÕeÅ9ªSu­ÒâU(Ì‘§Z`¢ÿêÛC:úCyö4¶¬8WyìĹ È €¢m1ðÁ®j_qa6[4#›¥iŠŠþm"©w½Pn§È·« @qìH×€¨É+æ2p”:‘zòÀ¾÷î%™™éfµÏäÞûàpoCs§×éò„…2óçh}1Êìg¦a§‡ …9Â2 jÇÎcƒÍç»ýÒ²ÿ5ˆM[³2-ªP(L^zõ£>ŽãIMm«ï³#õÎE JS–/že:ÓØî;S׿µ4!ÜrS‰ ½c  …G;Åxü‘ÛRÓl&Öéòr¯oÝ;ÔÐÔpEçpÛª*=ES’W¡:ӆ¤pz†J¥déÒb»JØP×p!P^š«žYš«âyJ–¡NŸióû£S7.Ài¹iLv†•mkï·w „ã;ãÉwhØÃçÙ4% ²Fä4èÕÔŒ‚LV£VQ×Ä>ŽÈtFAƒRÉR>_PšÚ/3e‰ˆDMQÅî–.ù`¶Ø$ ESÔŒÂl=ÀŽGûW7¹Ä$@ ÝfRÄŸeM€@ñ„€cÈ(˜ž)ŸCG@ÓµaýÍ–µ+«LéánŠ˜[Q¨[´ 4`ûŽÃ݃A!ù¾õŸ:úú‡ƒEÁC›WØ z =´$‘ÊLKÀù%º‚éj€wW»’Æ‘Ö#¹›.мa^Þ²Ûqäx“O @€¬L3  R²’s q¤®á‚ŸeªrÖtU~^º²§o(ìáâ0,+¶«æÌŽL8Vù*tÙìX¹¬ÂlÐk„Á'±»¢ukæšV-«°¬_;?•¢€ÚMµ¦0_Ú¸4 àLÃÏ'ûO¹Ä£@ƒ¡ùóë»ú8Ž'Fƒ–y辕¶‰¢(Xº¨\¿ùž%V€ÈPa4g¢oR Z::8Ä/Ÿ›“ªœW9C ùõI³„À‰S-~€ ëo6²,C54u oÖö¾Ëíå³3­ì¼9…B­>ëïW §ëÚ‚ æ©­fƒBž|×®˜£IµÇÃéº6ñ Ÿ¤_6œí ù|BÓÜyÛMZ95%µaý|-À©ÚÖøä!ãõ¢¾LÆ…D]S1— €E…Ùz½NÃ$¹Ü"uàƒŽx<>®À°¥¦¨–/žmu¹¼áƳ^VIdk×Ý:/ÍNQâ7¨È˜äH’ä°ó“ÃóªfmÖå÷¾u}ûŽÃg;ýf³^1gV¾~Å’Ùf€êšfWW·#ù}ÀG\“®Q+i—Û~eËî¾dÓ ZÛú‚ïï<ê¸ëöÖòÒ<ÝÊ¥³ »÷ÖÄG¼FµzyeÊü¹Eœ`°V«¦­cµY•V?ÜÿIDAT£!æþgèù?lïåùxæMvÅÛzú†8a”çÖ-0úüA¾®¡=`6ée%võ½§hµ‘碬RtGí»ã'Ïù¾o%dgYY€ÈóÀX2!@Õ7vÌ+Ò Zº¹¥;ètF~ábøhÏIß²Eåš<»}ö;Íyc·«¾©=l1è•Kf©ï¼}¾à¯ïiïè ˜¦ixíOOÙÞx{¿gûŽÃ^Žã©?¿¾{äÞn¸ûŽ›µ<Ï“?9é÷z¤¬$‡}äË«ô³îtq/½¶Ë÷Ut½=w•˜;ñ}2;ÅV^)&³ˆ¼¡ÅÈ7\ r²Rµ9Y©Ú±¶gÿ)‡Çãã·nÿ´çk­µ[-å#¬±sOÑçݽCþWÿwO×£®ÉQ«•Šé¹éêÆ³¾ä”' 8Ž^ú ëþMËÓò§eh¾oU¦Ü¦Úú¶‘—·ì|Ýx×B‹=;UM—·ìîs¹}’h'­¿íªvÎ,ÉÕLÏÔlX³µñl‡¿£kPò ¶ÊYÓu0ФºÉ³}Çaç°0a^ÄI|ˆÝ¹ÿåõ]Žo~m}jNVªòé'îNž4Ÿïüæ…w¿ÿÔFË(({޽ÐÞÚu¹½|Kko°0?SIÚú6á—.(€Ì+ÒTלF…Ž @ÁÆPˆ#ÏÿnûðSß¼Ë4-7ý§ïn²B€ŠÞ°rO¶½Èûö»Ÿyä ˜‰Ú/Üå €|¼÷”ßf5Òwßy‹nÓ†EºMéÄmž;ßþÿ|×íõÄ7‘@ T@”LÔæ‡Ÿ;-¬\ W.­°¨TJ…¤‘‚¢:¢²Ÿì«‰Mê6¥è™e‹ÊÍi©)J–eèÞþá`GÇ€ÿHu£‹ã ÜrS‰1ÕbPžméòÖ7uxaÞ±v¾…¢(ºº¦ÙÝÑ5(q’¢¨ªŠÝ4{š:3âp ¹CGO4»ÏF^$MHdÆ­+ç¤PT߀3xàP½Gì‰#ÍÌ0 šêêq„ζtmôB`ÍŠJ)E§8yªÅßt®+hB*ʧ©Šgd«<?ÿÞÎc#⤕’¢£×®œ£ °kOw :ðäbŒo&@Ñ,_šzõ×G€²2@ÔeS ‚WêàXA<ž‰ðñ (Œ¸]9Aô pì –ÖKö¨¨5Š2›F bBIÖ¥E)ñЏŒ€òQ¸‰Û„Ó/í;Y½„¤•Ä·qÝŠ8J¿I! 6‰J%ykÒ>'RQY"í P^x+:?MXEF·!¯ «ÈN0Pò1É(+…DM11@i½Ë @iÀ^;&M¾‘ÿ€âý@Yߎ/vä×R° Q“RÑ1ד&Ò‹q²zI“o¢2›’ƒ @y %}‡D] 1£q<‰Æ·Å–€IlJ2 \Ç“Håí"“Ù)üCŠê!Q Ï#BJŠ\Êã(q xI$âu ¨%ˆ¹”AB\ôª0iK‹ €âb 0ZOæ›X@Ô”d²<PRˆV€Ñz2ßÄú<¤d×—Ì7 êò*A ¤(.&¬\fÆ !…cJ¯/™o@ÔåWìwì`01È¥W10¶(ñ%i¿E÷K®/qeà¥ÄÎxú-¾€DM:1rJ¯{àä-‘í•AŠ·]<ˆ€×€@™o@Ô•ÀX½$bj0Yò•ú†Œú:Fò…QûàjHö"%¾ QŸOñg‚±Ø0¾€Œù2_®[R£Ø‰O¿Å€¨I­È3ÁØGl_@Æ|™/’>¸ Lè7i»@™@YX= j¼¢€IíŒ1Pðd¾ €Rc€¨©(æ*pBA|Ř,ˆ¥vŠŒù2_&GO¾@ 5n /Ð@ŠŒù"öM¸øþØ:PZ(3/€D¶ˆºÊb$€CŠöON<ùJ}CF}M¸Â€£€¨Q4 Ň@Æ|û†”Ù·(é; jª)ñÚÒ`¼Îä 4A!£¾&\a@‰Q@Ô,é ´¥Àx1HdÐWCŠ„/“÷PdS;Q¨K-, €2ßä¶#+€’¾C¢¦²h€„DŠŒ×A"% c @Ôu!ˆ”ù&·(X9ùHIýG¢Ps]Pž|ã ÀÈ0îPì uƒˆF"€@‰/@Ô $€ñcÊ¿6•ú† ˆº¾Ä\[&$_ %‡˜“%ßD;€@ „y‚@ù6àÄ¿^€@ñþK ‘gêʈI6 xµ˜¤ß€(ÔÕPtž 0‰o@@"€¨ë[̨L–|£+@‰oâµÉ Àduâv"+€ã d’ý@Ô’ðLˆ”ïGN6Ê¡÷Mf7…¯˜ë €"_€@ …[ ˆ”–™ú”Ÿ¸F”Ç5Ù$›'xPš €€ü¼ŒZ‰Š!QS@¢y‚@ ¤Ñ©À¤ý€Œ×C¢P£‹‘0f7„vã¾%±8•H¤‹€¨Bÿ*½?í2‡rIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Magnify.png000077500000000000000000000010361321075051700302520ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  d_‘tIMEà % ö/~Å«IDAT8Ë퓱K#A‡¿5GrM–=®4SyáÀ"à9°Z¶Ö*Ý6× ÖÖ÷he¡Ød[Q¸éÏB[ÁbwE"‚Å¥d%ŽÅÎÊ&h\%éüÁã1oß<Þ›S’õL¬üê#ñSà8)þ4rn+ÀWÀ¹Sæ1´ßR} øh)¥VJé0 u†Z)¥¥”Ð&§U´ àà+¥¨Õj$‰J,—#â8Æó<€]`{\[JƯߥ”Âu]’D°¸ôûP­Â``ã8`YÝn÷¸:/gŒ¯^ ðÅØùyzN뺘þ× /m¦ÀL|a!Í)¢™iýã!pÇ@ZÙM.~cbùàz8Þ<ð`Û¶X^®1ØT«pÕ‡Û´\Ž‚€J¥B¯×ÛÎ&ýÝŽ€Ÿ¯Uü˜>·ÛmaYŽŽ¥Ò..N‚)%žç!DD1g¶t¯èöíd˜·f³©íûèýMôÖÆÓÝߢmëæÌ~«¢÷7Ñw—ï‚Óüu¸ï?Á™Ü÷ÑKK“«xnü7¦©G'lËVª<;IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/New.png000066400000000000000000000012641321075051700274110ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDüéO4×± pHYs × ×B(›xtIMEÕ%0ÊC& AIDAT8Ë­•Íka‡Ÿ™ÝTšâM›5ž<ˆxÄVððÒƒ'oâÕ³b/¢âÇ?áÁ‹xÜE5¥ z²¹Ô("1¦ÙdÇÃ~fSíj}!dwØ÷yg~¿™]aŸkÔY ø®W·8.ñÅý‡wo«U ¨P[ìᨱ3ÔÇ/4¯¹^½ïfž[½qýfa¨™þG‚þK|«`”ÙþúéŠá¼uVžºù ÍfÇq03D‘°¨ì5%iQÖ8¥YlæâÌshá5<»,öm]óàCÌ Ì03,0ÌÆ¨ôÙÁdtPà0.‡÷#@SAD9HÀ"2Úÿ †ƒb?6€íß‚U5üADÓÃDQq8Ê€e†v†k¸þs6?o!O€–»XUS¬Æ*3˜ç˜SÌΕhl|çÌÉÖàçTÆkëI³2Ù'?â*Lç0ç82sš^¿„ëÕû®W·)ð¹³KÔjµœ¦¤r¨D÷Qu¢aU“cÁ®R´Ûíp“i(CR>I‘§DL-÷O]abIvù^NA)N6™j ¢Ñ}’ ã¹qÏÞ½;•‘H(E Íj,± {——ÎS­VÓÖÈD42NÕl—h1»ÝîD»1ñžä€le…4NOÑŒyxÄIô/ N²ÑÔ¸ˆ[™N£I¦ fœ¸6“Æ…UP,cÏóø+ApçÁ£{·öû²Õº:õÍË«ðìäcú #û“£M˜¶àIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Paste.png000066400000000000000000000014051321075051700277310ustar00rootroot00000000000000‰PNG  IHDRÄ´l; pHYs  šœtIMEÕ 6?³âè¤IDAT8Ë¥•MHTQ†ŸsçΔå4ê8þ$B (¹ sá&,rDZdÖ&°»ÈmÓ"j6Ù"  ‚·µÑ]¹( Ò…BA fè̘νs›q<§Åü댃yár¾óó=¼÷ý÷Tx†‡‡?½û–g'''/–' '~?Úò,€dãõ ú‰3ï¥Tž®®„HUJ±°ðM‘T"6ä½›8×KÒïGöÙî(äs)©ø[Û£5¶÷ˆÖÖÆ’ŠVW#¬ÿ˜S'7ç¤4¥¤vïŇ½·zVéÖgùlèR›+´ÛÀW³“s·ÛC[[{NCZtzL$`}½CTµœ·uŸYÂEÈ5=÷sȃ—gq8ujìvùÍN|Ÿ`D ÆÇŸ²¸¸TR±ÓYÏ÷€ÚºZÆÝg¨i©D=(ràœ/J`%À]çF·Ù¤R©’`]×BàrÕOŠâbí¨¬Øíö²ûJ©‚IpáþÌÌÌ!Pèï÷–Ý?TñÀÀ@I•éW"¥<X•Wœ‡*@Ñ××w<Åy…é1 7Mƒ††¦Êà}þ3==¨¢Ï÷z½¹ØŒ™esõr>H)éï÷)”2íkv-ŽÝŠB@¡kk¿±¬mâñ8JÉã‚eF±be僃7sç #zTð^4gEF¥aD1MËŠýâ|‘¶-‹p8ŒÊÜ]Ó4 …Ö™x=Áµ¦…òàlÙN;$‘ÍÍ-¹C-û’ #Zu;¶++n•ß{ì#žÔ*5nµ|á”-YÞŠ7³$F¯²ií¤<Ït«Ov¿Kõ¡¨•Tø@¹{…BÓ^¢”§DÛåþEù@lɪÆÀnSï«`pjç@ÂÈÈí* ¨êЉ@Ø6€ðØÌŒ±`pJü^a‡‹9&PkIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Redo.png000066400000000000000000000014521321075051700275500ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÖ #K(‹O·IDAT8Ë­”MkQ†ßsç#­©­ý4ÖŠ"¢T V…‚X©(m•,Á•Èü—þê.ú fáG¡  Ŷ ±Ôkiš&˜‰ÍG373÷ºIÂd˜¤µxà0pÏá9ï¼sæÿ±¸.cqýàn} û‹íX\ïüïà+ç Ó ¾_Å»Âi?Ãxî‡n—Sh×úðéÝ"t™·öŽÅõIo&õþE÷òÀÙb[I­ÖÊeyžˆD"pj½ àýíñQZ]üÉZàrŒH%pÛS V²b@4­ÂæÁ‹àX\?`åú­Q”ei+Y“  ¦¤fÃÎIØyª|%\3 _\½tÚ&P(emBºõE—l¨ Á±EíÌí2 î@xJö†Ì¯BQº;`Ð(Yip±-– ‡ ‘Á@ƒÀШ ©èèi‡¶UÄÌìr]ýÚÔE¨-hm²Ç„¶ŽVl¥rfv9 àŒip2 N ÖÚ¬@ED’KŸ³.€»¦Á¿{ë¶[¨BAZaËœ[’ª t*Á¿ù·ÇÝØë/MVλ¹?¥4àé$+}TÀ ò¸ið„÷¬™b@RÊ/¿­… °¨9ã ÓàºO”ôe]±:™å7ñxzGét\.ÕR(;ùL»_«¾Ô*OÅÿF^5T)²ŸDñä –J¬ebÆ£"¹‘³Ve¼˜Uú½ÉÅ€–ߊ¯ƒcl.•´ôwXorïa?Ö>Š„V* ðÚ¡ø.£|eZ¬ŠÒK®:DŒr‘af‡{ÉÉþ’¶pj&ò™Ç–šï#”î¾sì1ôI[ ¯Üו¢G("ÒOj¨EŠu¹3?ç:Õ!°nAÙèŠõnCò:›cIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/Undo.png000066400000000000000000000017631321075051700275710ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÖ 8Ÿ?T€IDAT8Ë­”_h[UÇ¿çþÉM{›´©Í]ìŸté\u>Ì—"[…Õ¢¢ÈŠú2‘1Ê„>íQñEA¦>ŠŠ>8(¡/¡¢ Ä-[ctæaÓÉݬڤ’uÉBþÞäž{Žž[.Y¡xàǽ÷ÜŸó=ßßï Ã¸tnìd2Ž] i§K CG4óÏ3Øåv‚H™øä³ÏàoCgÆ{m×`e'¨ÅG *Ý~E2Þ°pôðSƒ‘ó×7ÔÄé÷šÕN`¹”ÓUÀó8¡Ø3ª#<F0l„úür¥˜/í}äAûÅð„úC"ÉJÁG^žœG݃ä=àPɤ(Úè=lxtßêÝ?Àï=žP¯%’l³-øÒÙ½Çuú×W“3ã¨Y#ˆYÑ\)6¬fz™ôUpx¡ûýÄ{«i{ô€z%‘dV+˜À— CG6˜4 ÀˆµÊò[¿Ü_|èi\ÿþÇŸëåBê¹yÌ··zœ»ÓD©´ŽñhCÓ¬£Zɬ@O×Ö~¬\[ºùÔI<¶cWÌÎe./- M_oÆŸ˜6P5O}óÝvr‰÷ d óÞ¾u‚F z<ÁQ`«sÏÎe.h`:uñ6"‘Èöüá ‡O€ÊÞcÅüÝ­zuÛÔ‡‹É=4wÔ ¹£FÇ2;—¹²V7žO]¼ (cî<éÕSwÏg äµõõ"´®^N­‰-Û"š"¨øfŽÇx嘇tuqi*äÖ-Æl›pØ/OYz? ®¤­ôß+¸ññYÜPu̵€ãñ}ýGÚxMZîçÉ]ÁÜ…€Õ½u1×AE,IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/000077500000000000000000000000001321075051700272415ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignBottom.png000066400000000000000000000012311321075051700322230ustar00rootroot00000000000000‰PNG  IHDR?˜—ÇsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<IDAT8•“ÁNSA†¿sfî\ T¤¶´/``/`â–nX¹êR6¾Ñá5İք¥âF"i)V(·ôÎŒ Ûz)%?™ÅLæ|ó™ŒÄyúìÅFVZˆó\CÞWßs®w²³ñáÝ·ˆè»;ÝÝ/÷€.p6wüÍ-î¾/O*X[[+µÛítl9ÛÜÜÌ,@k .˜ÔEQ? ÖjµÞ4›ÍDD¼ªæªšW«Õ `ÝD5EXÔš(æd,Ë2¿½½}ô€ è­¬¬ÜµÅX`~‹b%ŠvVWWëª:?cš! T °,„`Æa³#˜¢˜Ãäèèyÿà =·¶Ós®3½´t:(¬­®ÂtÜLCÕ©,ó•ýý‹cèv c¥`V„ý)˜é¥;‹hŽˆ”¼O«P³àpçyþëX·ØfR„!šGŒÎxïjP·8H~xÿ{»W|€ÂÏ¢™¹Ü¦ô¢¨N{ŸÖ ‘€sàšÞŸð½‚Ž`ƒLÌó(ªå\ ê $ $.c4`v`€r™BD4FšYpnP¸Á˜zƒ®À†I¢¨'w¡’@Rò~|¿S1FPn˜(§ÿÍ&æÆ0óÏäÚØ­F=­>zò¥üyý¬xH¥}øõ´Tê~Z^}xŸ÷÷‰k=~øÐ!sy¾³Õ¨§ò±¾ð x{Ãkòú/²ôÃSzÕIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignLeft.png000066400000000000000000000012241321075051700316530ustar00rootroot00000000000000‰PNG  IHDR’]òsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<IDAT8­T±NQ=÷¾y,6&J´¡³²BÝØcaeá/ +ÿÀÒ–Š„ÆBhè •=Xň0˲awgæ½{,vX‡aQ}ÉÉ;sîœóîÜ™ 6š³Ï7š³ ’øÈFs–oï?zöíêüCDm i aŒ2ÜKXP AƒÏ:3 dnmÏ?}`êë9 ]â°¶ôÛ^ÝѺ³¶ŽKô*ü¸®+cø]P6&d,Æœ¸|~ÓÑ%…ìÌ„ÌB3Ð(4£SF'VxyCc6‘À•twõÆÇן5C ÍFšÐ($Öi9­ ïhìÎÍ}ý´P¶žjÑw.ï«f}çò̹¢75•½Y[{Y¿7o6okëqµÐ:ûÀÞ>°÷ø¾ì¥@—‹‹Ó㚌{Àñ!v€ôpˆöQÉC’œùFàÌ[˼’v€´]¢H’ìÜŽ*›«KK8P}Õ©ÆÂ¹«Æè\Î…çð~çÜ íÆäå/"×OUH ªjT³ !DUšçqyyyAU£÷¾XYYy1 ê’wß­¯?sPÀA‰´ÂÛZ­ÖÍsgtz\È*”i"bT5WFšªÆ?Yýôq©j81$p‰ÜlµZ“• ªj‘ဇÜT"2£ªUõš÷¾;rü¯?äO<œH§¢À´IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignMiddleHoriz.png000066400000000000000000000014161321075051700331760ustar00rootroot00000000000000‰PNG  IHDRôÄDbsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<‹IDAT8•’»kT[ÆkïópŒÉ4Q!Z̵¼-+…4CD+,ìü®•D0ÂR¦ˆÞXy‹«¨…ˆ/TEñãÌGÏ9sö^·˜=>RäƒÕ¬Å÷­o=DU9|ìø…¤4 Æç-Q—[—DaÚ¸=qþÜK@Њú¾ÜÿãÔC  4ËŸÆ[ï÷þŽ066öw­V[fŒq"⬵y¹\nLNNž ¼!ÐD@ämª=ràÀ~ïýzµ6÷Æ8 Ã{Y–ù™™™@ $@Z­V·|s¦ÆÚÄL¨ØF©Ñ¨èìlV‡Ouh T«#ÞûXÝJ€Ô{o¿‹‰-:‹UQ1 ‘sÑ Xi  çZ⪮ttÅŒz¸-fP1ozò<„¡Âºso;ľâ˜ÞûæbÎ"ëcbçâU0d! \pn®à,-8KäêÐà®§›vŒÏ WúE}Ëø¼䉮y}ëEïçúêò‡¹µ™dHÒ~U³vàɛ׃rg|˺µ7ÎÏŸè@¬³aI¼³*bÅç@±ËÑ£b¨ù FÁäª%ArΈæ^Õ{ß½¿~þôøã'#G‡€ÐŒÒZ¶íîÙ™=7ÿÙ±óùó‘hÕ!ûïÏ¿fïx¿ýê£G2 Ý·kóéééëA祳Ԩ’"ÆtµúBKΈ°¢Ý}–1"_´M*J±÷ÖÓíë«Zï…ÅüR“ö‹âgg¦È‡þþk—wïžë¦¢è_œÛ¼t1àä•+‹ÅÜèèè¡J¥ò²˜‹¢È}‹“y6<»ô¢[4.µÖ¥ÙïLMM\¬ùÿ`gÑûÌŽIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignMiddleVert.png000066400000000000000000000013421321075051700330210ustar00rootroot00000000000000‰PNG  IHDR™gÏsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<_IDAT8TÏK”Q=÷¾o&!GÉ~2ACh`š Hk[8Š.t¡› ú úZÕ*hÙªAA+‘6i8P‹p j¢YäÀ8£æÌûfÞ»·…ßL“ÎHïÁ»ç¼óÎå=RUtË—.ŽÀÔ¯íÕN5tûÞÃ×a×Y9¾¥˜Xy9 U]Ÿ]'Oê]Oâê±úþé`÷Ìõ‘ WÛˆïlæÈxg¿ŒÞO(EØk¬ol<ãÎ,€_gñu•­`qõ  YÅ,žI¼k!ý#Dê]À>4±ÚîßP€ T- 5ã¬qÒU)©©©3,õ8ûÚ)ãm<è-gŸvÎÅÏV%ˆªBE’ùõY‚bèÓ“PRQRR/¤’ q©ÑÆÇÓÓw.”JéÖ»œ)nz‚ßJ^^ +ÆÔ «½½™gKKo ™A·µ£éµµ»­¹DÂV •þo߇ŠÀvضÀ¾ÌÏ_iÔ´ °ì…©lØ)E(;1cšumÛhjØ©l`Ëq/š…ÙsPìéY~15å<‘Z"_3Æ oe'¤¹‰ôWoŒ3÷s>ˆÅ6š]SUÌÍÍ=·ÖÒQ'³¹ÜôÝÀµ÷Ìì0Ƹx<[\\|@>Ÿ¿•ÉdRGø¿{€ªo³[ýŠvgff†O @Hà„lcÍQÞBÀ2à™à#¢m±DäOr`aÀµs`ŒqMT*õ*™LÆ#²‘0³Ìnޤ éÉŸÌì™9`æsDÔgŒ)Q:ÿù‘þÄ_D ÿ–œ IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignRight.png000066400000000000000000000012311321075051700320340ustar00rootroot00000000000000‰PNG  IHDR’]òsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<IDAT8¥”»nSA†ÿ™½`;8Žƒí¤ÑÑÒ ä·H[J‰"*:DË+ (y SÐDBH:K ׂ ÇŽ’pNŽw†ÛœØÇˆ•~ÍîjçÓì¿RUüO{ººR°I›[· ÜB¤ÄFÉXeó;Œæˆ @‚χà "çBðy7¹6"¼¼¼·÷Àfí7ôz‹v{;.¥*P«µe`¥ÔŠÀbzíãzý2A‰µQ8p€s€µ€5Ãh› SfgVdmtt-àl `Rc7qz™ _©|õ¥$„Á÷:]‘ýO!|pª&'b\6'b@±wа55›Í{q›‚UÕq;&n6¾îüûKéŠúýþR«Õz àÂPË©þh\>S¹÷¸R¯÷`ü‰HÄŠRŠ$YVœ1s˜H%OBÿ ÌQQ ó{T,¿55Ue1"r""‘ªvD„‡Æ1H™^íþxŽYOä_Úè‡ü¾¡ù*ˆíµªIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/align/alignTop.png000066400000000000000000000012501321075051700315220ustar00rootroot00000000000000‰PNG  IHDR¹ åisBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<%IDAT8¥’±‹AÆ¿73I¼€ ‚wZ 6‚ÍUÚ$AH!W‚„XY؈hc+h—Âæ,,DDðNP««A±ÄKÎÛìÅÛd³³óžÅNî6aã>vxïÍo¿ïÍÐëå¥ ·ñÿñÈx¹}­QVk+ùÊrïÇ›ÓQÿse’Ó6}÷³\ª†¥Òj¾w1¿¿úíë[ÓÚížÞy|ãûÊ­ë“b)9ÄÅ/ÏÂÆ§W>ޜ䟷ZÑŽÈù­­­<¬Ùlš{»Ý@Šm¹~¢öŸ$I ëêD‚ $±Ré¿z̼Ad²Ã¬Ö)œ›m¿ a ‰Œ Ìð„@A¬TždÄÆÊçó0eKb‘‘Rö7Ð;öC °DÎ÷õŒçÀ„}C "K`Ž´N Û÷Ê¬Ö©ÊæL@bÊ~’ÁHØå`C@,„e¨Ôxè…@p©RÎÃöó0¥ç`.õ°a¦Œ óHëdè € ©Ö…°)eÈ”…G3@$Ö:Inèau­ëþàþÌÌòʦm’0H˜GµÚÈ­­Õ¬1gŒY€1¿´Öi¬Ó™Üå^Q] ƒß–¥¾|aŸá…>q"8µ¶Îàv’G™ F1˜«†xG˜¹î¨°Ï«¶Éa·}°ñƒç©=\P†að½#ÌÜj\ç ë2t®ô#W¾°`¦UüNDømã±ã^W{nl``i™×ªø8i„›!ǙǓ@ÅYïe«ÆÀª ¨qÿ2¡–ÓÌzÜT%¤?–[x=ÕyC¹yÅ^ØÜ®ð—'o8wú°lÓ¡ÛA‡‰3žž0ÿîýÛlÖ>oùŸLyN)w‰—óquè<=Ú˃½ø–>þÃ)gt]†žNH‹.–JSccT•cOè£æaS#œhìßa /Æ´ßÇ¢!d¬¿êëxóPô…f3IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles/line.arc.left.png000077500000000000000000000021351321075051700336430ustar00rootroot00000000000000‰PNG  IHDR7+ÜϦbKGDÿÿÿ ½§“ pHYs  šœýIDATxÚÝšMhcUÇç½ä%MšLÛ´¡6Ug•Ö.2à8›¶³èPeÔÙŠK72 ¸Ô­ íJDê€Ýˆ(~ ˆ³ÆÍ¨`¡]A±vdèÇ4IcÚw]LÒiÓÜ—±ï½6ñÀ…äþsoîÿÞóÎù¿óJ)üh³¾jìËôA¤ aÇ’qv°L¯GºøÂÖ¨dœéƒ®!€_¶Mà©3•«/‚R{25@6—7òEÎ+EÜË%øGÌË7À¶÷cw÷Ãܯ.ßà‚mÓïÇÿûFÎ68¹ô·¯aoû¹¹†“v…Ã¦Ô ‡ â»Ú5EG‘‹E…r¥9Ö€Égå ‚yJP¬WÕ ¶K%À²¸X,ñ ‡dž]s£ k7o·l õÏ?Às¿,òÒÌešüòM<ƵãCÌxQ^å5³Áf…Å`,Õ®3maãÞA^öjMžL’éÛ¿i3&6°“œ[ øuì Æ¼Þœš¹Ÿ\ýäLL“?œˆ×§&Èz­’ÜŸZoswŸ62½éåµ§VÎ=Ê”Ðu@YÏ7ï_h w,Æ¥«sêk_Â¥ÛÝÑžÜ" –CÙôK¸+¥Üå¹C²O ï¶ûyQ)L}Âçó¶Mâ+ëz¬j0¼²NÎi|v€/Û–\©¬Ç,›…RYOÎ4øk~Q}â'9Wek«%žÕ’ °üðýò|C÷)ÍÏf- LžÖÏ9y> P Eâö»Ø-WóΘ rÄv`r…Mg̲õ.ÙöäZÙ¶Ðõ¿%°©t,¹XÔ°Žšœ;Õí`3†^vVs•çDÐÊ/KP"äuµHËâ§ãY¦ºÛ#Ï)¥õó~,ØÁ óº]5 –üÍ®…s$¬Ç¶ÀŽ„ùQMmN>"çÚ6Zö$ }?Òü TC„,®è7–H".ï·¥[dÒÍû«Â±L2i>u¿Qà…'Ge²-ݲ«_žÈ¯tO“MãV9=Ýé>poÛôû=—ÇOÉXÛœR «!ç½w+`Á ò3XqVJ‘iî–¹Èp(s²É4ù-gzh€ nªÐžúx*q›\½œ^·TR .òõ¡›gâžÞò¬®+º#5WÜõ”`í&T«¼Òñ·œçi*h´Â¦"jŽK°µÍ³á—;’À;'xº"{>Ö­\r…3€t$9€Mi8µ÷“Ý6œ‚áoÂzG‘3ÿ¡`~UqvâQöiÐ…5¸g”7ÏŽóX<Ê%‘æ/¸2¿Dë»Bá¨ß úÞÇ*¦†ZIEND®B`‚line.arc.r.left.png000077500000000000000000000021601321075051700340220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7+ÜϦbKGDÿÿÿ ½§“ pHYs  šœtIMEÖ95k»Ø5tEXtCommentCreated with The GIMP for the TeXDraw project|áv¼IDATxÚÝšÏoEÇ?³»þÇ^ÇVŠë¤µ©š¨B« ÕHÉ “ (‡g‡J ¸Tå‚üEå@= µ7D%z,7ĸµj¤ VAT’رkl+öpØÚuÒݱkï8KŸôë73û¾~;ï»ïÍ"¥äY5esûUÊÉ—WWÈ]µ¸¾^6± 0]IÙtm*û0ŠŸà:jÇ;Õã“a7k¯;ÊÇBPî—`LƒõA|2M'‘äg¡¸4ælé¦Å%Š!‹ßûÌføÜ ”pì¨>ù²H6Óå­œað@=“{nÀBÖhQÒÎ4Ÿ8Y8Å*PWFïŸîÙø†Cæ~ó\öÐÓQH&¸¤ìå¾Â)ÿI)RÊ‘ÒDT¸¦ö°@6¥çÞjI‰õø ´3šÚx®Ñtÿýt„‡ÞóxŽ„ÐldpsyWà?ªSÍýg›Bb2€$Þã š¯ þö²Õêr³zÁYÃL:1ïÔ'3G]¯3-n·š¸BØÝ%wó7öjzŠ ƒæ¿Î ,Æ ñ×€sé)Ø*õßjÁöŽ£;•¤‚~ðCµÆÛ[%h6!>Æ*OwäDo7ºZ{r²:ŽH-‘ ªg="ToüdU‘íjö$ß|¶È¹×jü8¸!+w¿ØõÚò¤'yæÍì{?Íø=ϬühÖà¥h ’}Ƴ}[ç¢<5·sÜOöq]ST$kpÑOŒ¾ÀÚƒ7‹RIC©ènæÕR‘±LšKJQÝ2ë®{¹Z¼3ân?bMÓxb.JHÒlÂÒSwûÏFí†OßpÇŽÀâcx¾Ïÿ…­-÷9ù>¿·À×^ž‰ð§‘↑æÑxžß}é7[¶ëÁ­4ï°ÆY¥¨<À7ˆ©cp"Bat›½æ¼˜åAa†‚U±ï9œˆP*¶j˜Å6{ì¦i<)ûoì§ÚVmߺ¬Z}zŠRÛœÝ '"dÒ;šjš¥fÒüÔ¾Ò‰xðØ”HxuTÓ" ›"D¬ÆÄ4„ÿ¥"¥ Ù [¨E<‚ñ1ÎØœˆ³iÕ/‡ò.é·—pc£P~Æ´Ó˜Ù8ëv¶ò³`þC…›_ju{¸ˆÆ_SUúììµz0ÿÑÉÃêKóf;¦Ï¶²¹ÙJï–pQþ.o™·Ÿ?y¸µ5ï?ô÷ý“^ê¬z ÒG¶ìÊ©ÀIÊ*¼cOÏá†,ÊÀ··r¯+ÜÞÊù”èÄ!¾ò1Ïs[Xä ,/c1~+o0áTçIX§‚mÕu汩q¥M»Øt=X|¡nË÷ÞU$üjgßj2Z1X³³'Áü‡ ·ð†²öp¿4ÐílCÙ`þ{~ž‹)XÝÎsF ã¶Ý¸u«“x<<†PàÞ?®¨®ì´sû¹â4¾ºÂ©Ùc|dîËíï@ {·_oû½¥—ç˜Î]7À]qã\˜ü(dÖ6ò"ÓGù¨»‰°˜5¸˜å\a†BWáÜÞ¬ZÉà pÁ œYý¾YíÚçþ$T–¡²ÌÙþ$׺á³koVWk;íÕŸ%âÜz#àê ˾!¼ãN¨pš‚#ƒîö3}lèÊÛ XÏá”#Ÿ„?*Îöù„ÖXÿ~’•¢öê¤Ù2È?ˆ~P¬˜ÛüÑ Çz—"úéIEND®B`‚line.arc.right.png000077500000000000000000000021161321075051700337460ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7+ÜϦbKGDÿÿÿ ½§“ pHYs  šœîIDATxÚÝ™OhUÇ?¿™ý¿Éd³i“¬iSZ"¤4-ÅèÁ¤=4Ôâ¿k뱂(‚zPìÉC©.ED<¬ƒÞÄ„êÁèAHEˆR‰Éº›d7Ùì¦Ùy’M7ëÌdÙI&þàÁÌ|Þ›÷¾ó{ï÷þ J)šI Pš‹Eù6ÕÕ¾mš@, ©þóžt€L³mØ-i¸`¦¢³¸Æ…ùÞ×4YNòÙèý5œâÌ/€¦ Cxî¬l Q¼27§”bä1Î%Gïæ€´NÖj¸¤ãOqJ):Ú¹á$®:÷¥…ûVâ"aü»BYÊ«Ë"íxygEÀ±áþžçÚãLÚGiôG¹œƒ5ÎÀ1ñ¯¸þ>¾sâ÷14*Ü¿â¦ï¨¯tìx±ÄHÈ´W,µVà‘‡åbåFwá?o‡õs•uú¬2ml<ØóÙð–MígºîtÎ=ƒÿ¢eÃAGÇtâÙ¼OÇ\#væœxaõ‹‹ÂC^½{ßÅU*›û¹ÿ¥¸NÀqLư8UÁqòËïªéwNp©‰r Ïs3óúú:[e!ïôu¥ÕM¹W»‚jÚÚy[ÎqÁ Ó‰ýT âÏ]ÀÊóÓzu‹0Õî߀rç/^vâ‡:™Ú…û·[аj×%EØkòàô«~¼ùv³š0ä†RÄìx8Ä-¥víÕñ–ÍqOŸ–sË^qÊ“êækÀö/OªÛ…†ì÷é—ÕÑž[§_®zn|Tƾÿ‘›¦I¯S¾îC|Z½.kÄ-¸;¶×'Ρ ¿ÕÖŸ~ª½ÝkS /ÍÜe8_àx~•‰J… +rujÚ>Ãð ‹]É«?«VÉê/Ïç:KÕëdÂݰg ç¶“¹%Þ¬2¹½ÅÉ.*WëÜq‘07WмèÀ)¬*×ëÝ qR*sÖv O^à‚{&N‡’¼çÀJBؤäY\w“P4â|11ÎðíïZpŒ8LŒÃtv³+êk´y!.àÊ#nuü:—QW’²ÃK‘t0—Ù9¶î êõ¥âþ.Èe¤‡|IEND®B`‚line.arrow.left.png000077500000000000000000000017561321075051700341610ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœŽIDATxÚí™Ýk›uÇ?çÉkÓ¦k­iÒlÃÉ ]¢i—¢±•v«c¾Ô*cú¨ˆôÆ z7ß.ôN(eâœ0Åá`ƒº²ÝÁ›1Ùæ¦¶v±J\FÒ45oÏÏ+±vi©ù%YÙÎÅ眇Ïs~¯ç¥U†®ÄÇr|ÃÂÕƒîÀ­G"X6,\=HœBj gÕÇVíÁëstÜLã×G‘¦jB…:å@,Nï|šˆÅÊîŒë«œ…D5 üír(‘b8Ÿg»©ð789éæÃÉoÕY}•Ó¤ÑÝüq–®™-.ò©ð*…]„Lƒ“¯2jÿ’¯>8ÁVÉt=rà·8áù4‘lž^ÀõÏ«„d‹›OIu°4Fœ+“;à“C‰$ÑlŽ.Ó$ Ô¿?šÙ¶>îëçðòXòa=AO>"‘Ë׸÷×ßÙ½°ÈˆiÒ 8øï¶¥ ƒÄævÞ‹Í©÷WÊU7sî¾²?6G(™f(_ ¤Î2îÊfaÚëáÈì-Àên›_^Šßd$Ÿ£+_d `_-Æ0¸¾µƒ·¯N«ñr~úæ·>[öeôÚ4c󢦉hTk<шr7qªP¤éž€,ç[µÊ…{䩨ádšh6GX)דG)š“)^L¦V÷Õ÷¹H7v²Ÿ¼–HÉåÙY(°]×;W’èj3µÊ¹—m,fs„Š&w±†¹Tii»8!ÿ\”¶ú9Üìæ¸ÝÆw†¢šgj¥”ûÔʉÒçÁ{>^mvsÔfåÒßZMßj¹lŸ:7¥&€ €GeàÒÏôÄÿ`8“e—R´)…µ$åt2Ùêæ»œi– º*wÌ©µøÐÞááõ&_Ù¬|/Bf UÉnjd|o”‡Ëå®9\©õyÜçáM—‹/ ƒ_³ `Æåäôƒ!öÕnâÿÄ„ñyyÃáà¼apC„ÜrX 6ïïf¬Úpg*•khCÞ6Þr:˜´Xø È•BZ f¶øxå¶„+µàžñ´òŽÓÁYâKÕ4 fïnáƒÛbX®fO ìíbÔÓÆ»6+€’›š9²ä£í„ò™UÎ<[P{µ$_AýA½:Ã`æO°Û¸Ò¹5¿òTJSÔIàäÓ{¤ÿâô$æÙ¼aà–ôÅ„š¦@gǹæýæ;ÿ Ö'MëT}ÀYФ?©hï²nàžW*_K¸¿W¯7fžä™IEND®B`‚line.arrow.right.png000077500000000000000000000017541321075051700343420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœŒIDATxÚí˜Kl”UÇç{Ì«ÓN‡vìÌ8PAhUFã#ê†D%`‚㛕!qcHÔ(º7l4®4!Ñ4npÄRŠ1­ Cˆ¶Ð(}`Z¥¦]HÑN­ÃL;ÇEmRH§VíýFÿÉY|ß½¹÷üî=÷uDUY®²*í@Æ/û—-œIýgR"ØËΤ*§ˆ©¦• Ù 3šJ0òé1ÍzÏfNN²ïΰóÌ0u±Ò}}ŒžSCú±gtÓ„µ­ªÜ7›BAZEÈÛç~:’1^SULÛ>Sm_ñ r@„  ô'èp¸Š}ë›xú‘MÜvMé*ÑÞáf–ìýæwÉÖGy3ÝÄSK çç€gp[·RSå-òWªÛæ\(È¡T|iÂöC‡VÏàf-çËâg t5$0 LZ£ÕU|м†næÞ÷™çpªJ*Ϋ®ÍeçÎèï>—¯cQöÜ~ O\pªÊÚFvZ?-7Ç.»6gCAÚ“¼Pi8YbׂGX—ÆiϱC•šÅ/"3›eq¡:Äñµ7Ðz²OÛæ«û‘+Ïõ!cGia"à'ÛPÇž;Ó<6wt3ÆÂÒ ¸9VtCA¦âìVU2>Ú÷CÚHXbözWNÛbÌïãÔ»E‚ÏMéF8©%䇳§ëkéÞÖL{à ZLuè œë0 Ò Ó·f_viçlYÆ•_Á­Lðr¹BËB |—r<˜Ïó,êíU¡ ÂÅŸ±zŽÜ¼šþÃY=6_eQÆFu¡¹e#U´—ùëqÒu8ñI*ÆëÛ7sÝb}ƦÝÔnY6,7Ü!;È®É<÷¾rccYŒôDªø&• ÷D¯26SóÂÝu«lïâ©)n‚+8*”9×e`E-ëRœÌöhÇ¿ðÁï\cR^½ÀKÓ%VÍù]´mF\‡ó‘0_­¿‘£Gºõèù0í \,*oód©DŠ™Yºè÷ÑW¢;£¯wHe‡ÂÕFdïxŽgUq\‡þÚ‡èJ&ø±ísí3胱¼¥sOZ¶ çñB‘æh5-ëÉv•¹ä’¹°Ë×q<ÝÄÞƒÚå!”q9ßëû•v”*Ÿq6–oþ/ÀTÅáÔàƒ«¢pö4Ëîyբ”©öÿ4ùÔR¿cÒIEND®B`‚line.barEnd.left.png000077500000000000000000000005011321075051700342050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ ½=mÎIDATxÚíÙ1 Â0ÆñKœÜëPqqÕAÐx€z‚.žÄÅØ“x‚.E]©“ƒ«ÏÁ¡K§ ­´ß’%á„ÇÌ(›ÕÜ!IóùtÂ2IYì^DÛ.{œìiUÇÌJWàçë>!`Eµ€Ç/û”-·ŠDñ­šìà½IEND®B`‚line.barEnd.right.png000077500000000000000000000005141321075051700343740ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ “so¾ÙIDATxÚí×= Â@à·!‘ˆö±ˆØxOOK/àR¨…mrŽ^A =€ha•Ja,ÂV–YÞÀÀÂ3 kDÚÑ형}gÒE›'`™ÛÚd ”ûó‰ˆzNjÌ[Æ;[5›ÏƒƒØ=>NpZAqÄGqÄ÷yá†&ùYÜñŒœkIqÄ÷×w.Ž0Ónªu~üÃI mœ1&çZGqÄGqÄ÷U¿MÃkûÎ*¤Ë¶w¸\Q„A]ô›õy§(«+¯/nÖIEND®B`‚line.barIn.left.png000077500000000000000000000010021321075051700340420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ -qF§5tEXtCommentCreated with The GIMP for the TeXDraw project|ávNIDATxÚ홽JÃP€¿“ÄZÑÆM‡:T\œÅɹ££øâã¸+—޾€oÐ%¸¸¸¬ƒÚTDkšãT´Ô†$—{à ‡Ãýùr¹ççFT•,ré 'Ñü˜Ã}¡üØç!SŸ—©½·ËC/`kj?õŒ¼EU3é…û÷˜VsvÞk¸4I[M޳®U¼>šÀ;Knp1„ÆÂ•Aòƒó¨Û“³p%ƒðLŽ–cá>•UcáêÂØÜ;ç04NcІË-¢‰â§ùÃG;ÛRM8ÀMsö´ûÚÕ¼sF&W(5[~Y¸²¥cáDX26Ï©ËQ²s¿A·ªy.UüÝ»{½²¥„-Ï¢±p5áËäg†Ø&ñ*Â9‘Á¸­--œ…³pÿÙòÌ̽RÀ tæÂ9NØâÆ<>ýJâ!Ët—W˜ÿ'žwÑ ð FäÌ8!eM“IEND®B`‚line.barIn.right.png000077500000000000000000000007611321075051700342400ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ ,Ë#¯5tEXtCommentCreated with The GIMP for the TeXDraw project|áv=IDATxÚ홿JAÆ¿¹]ÉiÁ.Å¥¸ÆÆ§ÐÒÂ"yŸEl¬ÍsX¦N#I  Ûˆ(šÛ±:<¯6f`a—;ö¾ûç›áˆ™!Ý”nÊþÉO³ôÊñõ —WVžã~Ú&fmy†þ«Ý:,ªzò¬9M "G |JÍî‹ð®N2¢Ã%;¶r·iÛRPC|+‚Z¸" ­®EX«…[;Å&NNjn?èÓHRüêµvÅซºrª­ (>s à-ý2¸ ƒc€ÔÂ9 %fy†±´Ï=¿à¼&CùJÀü|ÉI¸AŸPgÊÖ&άØç<¡Ð¼-ÙÎÜVŠ+q³ƒ38ƒûwìá—i‹•<^f¾äI7¥Ór\ý'>,°Ÿ¾áì óóþñQsßþ®•Ç«lËÖèIEND®B`‚line.bracket.left.png000077500000000000000000000010211321075051700344230ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7- –ó»bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ Oö¹5tEXtCommentCreated with The GIMP for the TeXDraw project|áv]IDATxÚíš½JÃ`†ŸüøGQI*-ÅÕÍ-x ^‚à x ŽN⬠tð\,8t×ÅÒ±j*ÕÅV*©ÇÅÔRPÛØXÏ ä„prrÈÉËCD˜„¼¢Ñ?ÞðÁëpqêrr¹ÌÍ8y 9gU©xEc3NŽBŽÆm“ÕIÔóU Åô€Ô$IEND®B`‚line.bracket.r.left.png000077500000000000000000000011771321075051700346770ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7- –ó»bKGDÿÿÿ ½§“ pHYs  šœIDATxœí™½JA…Ï$1þa$7‰‚¦HÄÚNŸBŸD,ÄBKõ ô+E,mÒÙÄB %°Šb H~Çj5»î&s×ܬöƒÝ™áÌœd2wnFH)A!—ÆsáNž¬.‹•¢Žk¿µì^&°e§±øŽé›qìÛµ¥5àêZ"—ßu…;Ú¿‘R’J<†#’RB€L•Q ÞR¯DM/@´cµêõ€½$0çWs~…¼[.-à´¨#ߩ߬޽‹¦Ú““ÀD¼óxi6?ncˆµdçͺ‡Ã(£MìËÎwol§Ò×Ë’Íœt±ä» ›¹pM.mUØÌU#hpi«Âf."!:÷â…Í\3¤~òç‚sCñ6sZ g\Úª·ëÖ ÙŠ)?¢jm™^7Úiu²¹Û{µ~2Šk]éÃô|L› Û²¬…PãÒV…Í\¥‰A.mUØÌÕ¸´Ua3íçãWsi«Âfn ‚2—¶*äP`MJµÖµÆ¹™$6©c“áÊĆú8÷<%ãoNülæÂûÄ€/åñ<Êqþ‡âù¢ ’U—¢7”ú?øòÈ'§;pÀ|z9×ñŽÏß§ƒ×·öY½qGîŠ^܉;%þr'Üø•Àœ_ ÌùrœKiȧ´Ÿ,:­áÉ.î­?cçb Ûv˯˜»ž°×Ok@Q§ÎÊž/‰Ä)J8Ú†5IEND®B`‚line.bracket.r.right.png000077500000000000000000000012211321075051700350500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7- –ó»bKGDÿÿÿ ½§“ pHYs  šœ1IDATxœíš¿nAÆ{>¡£@rÄ¢ q GHˆŠÂ%éè‰ò‘(è¨é‘xÄ? ÑPB M­‘ˆ 8‰ˆÛK':Yw¶w“ñà“?i$ßíú›ù¼ëÝÝ5ÖZ|±¸`Î>—"ØÜJ®wgÖ®ò8©li›ŸçxÒû¾QßÜâæéóú†}ã µÖËfŠnn;­YhÝg›)òÒ5ÆÐù×8 w¹Qù FåHq㊉¸q…÷hy÷vú¼ÇÎøõ;½üÑ4ë×yÚȳקQwÑ{žÖ*å7iö®À§x<•òÅÅ”énù?ˆÛ—"‰¸+ý ÛÜò«Þr6ÇÃ’ÔÅpY[ýÆxp$åW½å€–±¾¸fp%?„‹ &1C€*P¶r±;\6’úgÀQw¢?C<Ãc}Ã}×À9+¾H{[àÃÐŽÛ å8àXŠ[]\³Ã%)nuq-C^Š[]\¡MGŠ[_œàn˜º¸|(—„•2Ëßsšç¾ÿäuZ™m1uï4$þyÚ™øû¯b3S™¸…p¥-í.ÎÆ .Î4¥¸õŵñ?CuqÆdxùeÈ𙀂µ2:p(Åm|ÏÄïWËYAª“‡Óìþ˜guO)¢þµf¿99Ê3ñó˜Ï™¸z·”„þvº &-7®PßN—D¦[ÎûL|>:±Sô»ûUÝÁÔ®%ßýz°Íó/s<ë}ß{÷Ëÿ¥UwÛPp›wIEND®B`‚line.bracket.right.png000077500000000000000000000012041321075051700346110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7- –ó»bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ 3Ķ5tEXtCommentCreated with The GIMP for the TeXDraw project|ávÐIDATxÚíšA/Adz»$ÒV"¡)ê°"çÞ¸¸ú7¾€Ïá"NÂpð\\\¤\¤”¶¡Aõ94M«QtÒ±L柼dwvgöýwÞÎÞÌ*A3Ó*Û8Mr•/0ÞMý¹{Æ–J¬çbL&›å¹s}Ÿ>@D´lh-@º1džcPm”m\ïúŒ4ü Óú>µ[À/¢ÜAk™}«oÜšxžGĨ**¦ÚŽœœIDNÎb­ßœë9GýÑr~–ƒ|ãïî+• oŠlF®WšÒÉÂ4Ù¯´o' ØêO/uÎIP4jŠªë¹ÿHN ¾•ä*€Ø–žÐg-¹@Hk»5›î™¶ó£N3”È^ÜÙ{=jkÍ–Žœ#çÈ9rÆòI¨™ZC Â4+¦u®S&ž¨“{3¦s¹sÙ׬û£z3Ó*{SüüÚd=åyB, ËKÀâÖ®8[; TeÐ×s¦^<ÊV’‹5xuaéȵ‰¸nÅÅŒZøÉøW™x¾¾Ì0ðçÈœ²\~`Ã…eŒJ¬Ü||^=¬¡øX¼niµ(±ø?”GŸË?'©$Ç©d3‹×ù÷+Sb*Uf9L›!÷¦Zd[Ÿ!=sIEND®B`‚line.circle.end.left.png000077500000000000000000000014501321075051700350240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ D`´5tEXtCommentCreated with The GIMP for the TeXDraw project|ávtIDATxÚݘ?hQÇ?ï]ri{IcÚ´àŸ¶fˆEˆÐ"—  :X0*GGq,„®Ü:%5¢ Ý¤‹ˆR°‚‹ƒ³!B©!b1Ís0 !iî%&—“<ø —û¾wùÜûÝï÷{?¡”¢Ý±¸ Èå¡P„À0 ÃæëÃç?ñ‰—©}u 7‡RÊÖ¢À0Ÿ/%D#¤‚Ö ƒ MJvýÙh„TýÚþùÝXËñ ùì_LÆ;`»§IÜz!ùªyû—êõi“lÃsN¸´ÉÅÁAÙìú¦Ê·‘<­îXuˆ2# š÷ý®¾d.¯åòœÕH¶ši$—ù‡SÑ2ãá…ÛÑÒà·Ðæ9¿Å–&Ïeë󜒔֒ŒÞÅ XÖn}Çòœʽ¿¥š«Ê@×–µ¯m~V*˜ŸeYˆžç¯ýógXv¼‡2°ç97Nâ+ƒÜCÙp³û¥ 2ñ‰NƒŒée§zòN›.Á5õ-e}ˉ^JvýÃl|ãªB6L‚(ð²ˆçE’§êþx›ëÀ¢¥í²:î ö€+åŽÄM¾]³Ò¡k¤Tÿ´®"§9Üm½)Eì ä9^!óx]OÁ~žÓÓ79ced?wn ÇÉ-WµÙFäÊŸõMΫ ­oâ8¹µêæ¶æ]³R’ÎЫ2”Î8OîlUm’|iD®üñºù©2äu;OîF+äü>VU ü¾ÿ [.¼µ+[ÃÎe²ŒÔ‘3Šuìn)kJ\±„•!›å_ikgX¦4eA`ò÷²9?ð“3ªxæjWD´0_šVs9„'56‡PL¢Õ›Ø¿pšËI,(¶—óLlj‘Y°°$ŽT–KýX”.Ðaà$°kâÆŒEÙZQ&Çœ0æö9‹±Þ>v§@õGUõÙŒöin+“ þÜÉŠ2InÝDH^_›Í E/ÎáUë¨ØDÉ0t„åiÕhÔ"‹³ÂžeÆf~ø×ÀíLý0¦¹H ÈC—¦Üâ²CîšÈŠqÁ—ÖíÒœ[\vÈWýjLj§€­qiÎ-.;䮈ølRf#û\šs‹Ë¹\(öyùí±øê;""µNvDdp(S?Lísgqîbþâ”̶ÏM»îäcŽŸ'¥«hÉ*¹Qè@tår§ ·x*"a«b7 í#1cŽþ•®¢åÃ'mM 0±‰·BQ»—;ÿené¿LèyûFE™çWD¶TÒ˜ d„\,µˆ<{«…A.‰›/û¡ Í/ÞéƒT8c‰³Æ˜ºVû>¨ KC⫪Š[¬‘™S(™ž~ýÐs…A.Ì!D#¡ Ó`,·”D6?­|Ô†›©³}¼JÇ–íãMõ&öÿÔ³i9aê$ÞasÏ©}õKò¸šìXdYô縹n-Ç2õÁ˜æâ0êÔ?qÑÚænœÿG „IEND®B`‚line.circle.in.right.png000077500000000000000000000015171321075051700350530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœïIDATxÚ͘ÍKTQÀçÍÌSs$FÇÒ4j¡‚&„de i–H‹@¡ Å6ý -B\ -Z‘Ÿ‰PÑ"Äé‹2Š(¨@ó£¯1[Tê8:·…3"“o¾3î9çÎû½sî¹s¯(¥ˆUêkäð×yr/‘‘‘ί=»y3t_M‡ÛŸ"wݪÄm`i‘4~þÂéÅ%Nz½87Û&^ƒÕ*Óöm<ÌÏaìíÕO"D)‘V•S«Ûx¨p55…GUåÔn5_ŸNo¤ï®FäìtÐ ,GæWþîȤý?8 £I Tàjv›çìÕé3 N §t³3¥SDTìKËü—vfI»Lƒ´„­¹Ê2NE[ŠÁJÔ¿ûRLXYFÚ<ÂUÝÆS\oBʲ¤PšV< ‘üU`¸÷=CUÌŠ‡£¥EÒˆ1«*­%…Òddœœ¡%Dü,pV)õ<`ü¦ˆt@Žað7N ±bêV¥z€Šݵ:ØÙ^ÛÝ`KX·4á-2جƃ•èš—<†ç¢R3² ÜH<üÜ^RÌ*ÉXà¦âá·*Øn‰ä%ÜÞxøékx›•šK6¸ºxøé`¹.bK6¸3"RÌADªsFv‹ÆœÍÊ;ì2ÎZ\@³‘qr†–e75F±À€ˆœßªkúÀ‚ý¸=µD–€Å¸wU‘±¤PxÿÉοž‹È0ë]qÊ7V,c~ÉÏaL›¤a \fÀ%þ¿¥•;=›Mü`)m€;žT„Å#ûiЬ˜³×…„{òJ=p:¸G°µlWÇ_ªQ¥áöÆÖØbë–®Õª”’x€93éúþS]ÙXk(L’ˆ¾˜ÓAW´%*Âb¶ƒŽóêrÀxŠ‚¬„ùTke º‰HâtÏŽ ~sÆ6àÖOæH´¨¸€&{Cš† ƒãÌö nì+¤1Ø<ý:÷Ì:‰G})ëÛ{ ¶gïúýŒ)ò(9h¼¬ßIEND®B`‚line.dbleArrow.left.png000077500000000000000000000016421321075051700347420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœBIDATxÚí™KlTUÇß™¹÷Î{x ¥…`J™¢Å³ƶ&Šq( kÒ€ Ñ]`Œb Ñn ¬Ø°›Ò‰b•¸Ð`ˆ cb‚;ìF$<"ZphéܹDžd§ªwhÆ{’oqÎýŸsÏ/çñ?÷\´Ö¸98âVÛ3 E'΃û?Á9&©ú9?÷ëNl¢Þšóàf»2\JÚÁú¯Úêé–®óز<ÉÐ?鯧ӧS²×/ÜsíèsÒ$÷oÛhIòz8Èg†ËéoM¥]“aG<ÊG>ÅÕH˜~­5nžM½-ëÈ&æsØð3Œ*Å­æ¥ì©¦}ñžmLð¾ipN„{€ù¼ôÜ5¸“S3Õö¾@Cz o,¾á&àZ)†Ÿla×Ãúç6³5¦ß§ø(ІŸóå:÷àü|1æ©VúâQNø|\ÆKœ»¶i ½åúÖåìŽ9­þ†r*ôÂHk3»k×oòiµò­t'yÇ4øQ wË;X ¿Ÿ_:Ö²]kM6‹µ*Åž€ÅY`´šБà?gŠk»%Šby¶m•ìº~ƒžü(O’SØÐX8ÄÙ«¿Ñ>/&/çGé°mVƤáv0ÀÅd£¬(×Z»ÂvÒ”/W2øý﬿ó'Ù‚Íj­ Ô…Ïý‰¯.ña¡Àj@êꄲP¸µ© >˜ØªGj çÚ´Ìrê•‚î+å7´ËKW®Ñy'Ïó¶M³ÖD&;Ü„|ó³]$’ϳÑ.Òâ8,˜âucñ(9Ëd¸²%÷¬`RŸk˰3ã˜OqQ„ûï|"Ü^ÖÄÞ’¾c-Ûrh寂ǒРŸ¡l«V>7#ϬàµX„~¥¸"ƒ2À‰ù•7h½ÛȬXʾ€Å% ‹`—Ú b­•Ï ÜGÖ"^¹ON1V±pbаÿÎùppÍ¢+f"^³JtÄ£âðÆvÑ6Wt–€gtZk\‡´!y óã²$_–jiq¾6 †›ó‹cì~×é¬EWí׿!›Ÿ-/,“¾ú¾Û°†µÅ’šØ'%qS1P3cŸ}Lj–p½žÃi­1ý€ÎÅkCòÐuH¯û”õ…‰K³]J†sÚ¬< ¸’øo:?§v¦º-.”®¥‰.)ÉÔ@VJº6½- éÊײŒN)ù³@Ÿ1 †"aN-oaó[á?—Nkks¡Àl~Œ\m޳/•" µfõJ6)ÅÅôRðÜ2¹«çðúVÚ‹H[œó N4Ôq4‚Édp?e¯ÖÌ/1½RŠ{ŽÍ57ÄÝÑqž=§ ¾AŸ5$96¿Ç¢ürkP§§œµE÷¶q½Õ“!w—Ëב&Lň˥¶:nvÞã‹moà(Q‚^GÖ4¹}ÂäŠWe©ÊÝ5Áˆ©ü Â¥æ}Õ·ÙîÕµTm5ÇòwLf¨}ö‚¯J¼?HÉep×q¸® F_¾dùØ©\™UŠ¡ˆÃÕ…q~»Ñ¯{§õ˜b—§Êt¤RLÅÀÊ(c*j«ù~õJ6Mç4F9 O õB0fH#Uœ\šdK‰¥ <ëÜü*NSy§¤`8àò¢vvÌ××Ìã¸Læé'¥ä~•K:¹ˆ3ZÄË s ÈæLNX}±:Žt´ÑV,±*Ì™\gòJJ…l.6ÅÙÿ ¤-º=…û(Á)–’¿]‡žd‚=¥’‚~‚‘P€ËQnN±`¶<…[‘dKÈæb¼žCo§Zi8œŽ.àÛí´Î…ÏŸÜû /áüÏ >Ül dà!ÌŠ„ðÚ/K·óáædh0*NàÝ_ž./UEöîöIEND®B`‚line.disk.end.left.png000077500000000000000000000013011321075051700345100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ #:K¬5tEXtCommentCreated with The GIMP for the TeXDraw project|áv IDATxÚݘ±kÔPÇ?ïå.mÍ…ríµÐJ¯‹4Ò"D¡tÈ 7ìh‡CGÿ‚ŽG¡«ƒ›S[§®.”çèà~^Ђƒ”Q°}.^)g/¯ç% ɾCÈ/Éûä=~ïý¾B)Åecc]ÐéB=s5Ø?Pý9õN—¥{­ó<›«ñuÿ@µÉ"”R±r˜´Á0.~^Jpš“6¯ ƒ ú%%ß*¯]‡æùwï–ôßEoøŒÅÿߣ1>Æ»‹€É,Óö=™ÁÍNñ`³Sl A4 Ø9ý¬UÙÞ1áÅW73­›™æ¹üþO°3mšW8sCÌØÈ`=Õªl§ç{z0ߣ1ÂR¸DWï°–*œYÖWV³ÌaÂ`gE&58×у¹Í4ÀzºyƒÇIÕ‚#=\pÄý4÷ÛÏ_ؼåˆÕ¿—‡I¼S(¥(‚“ÓøDCœœr…ÜX׃=|@=o`²ÓÕ'uº,‘Ãa¤O #ª¹„³-}’mñ=—p‹ ú¤Å>æ®ÐÕ²P±à8ŒO¬X¼=y’Ö@¬k|ªÏó>É}®Ð'”BŸ-eoà+Ëú®`e™–üHxEþº{›VêJaû¹,:ñ­"{({Yº_º"ã{4†-2f™v¯óÞ13‚ûÇ·”—ð-%Á@ßr‚7ýå>mkO$í8÷b×/Eêi–'”?›“ÄÜYg,IEND®B`‚line.disk.end.right.png000077500000000000000000000012731321075051700347030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ 8©5‡5tEXtCommentCreated with The GIMP for the TeXDraw project|ávIDATxÚݘOkAÆïþkKJ[[(6æ’=¤«•R$ ôPPð¢‡@ü~B‚·âÝSµ…\{ò*ô 'é7h­ýC "!U!éxh#´¤™MÍlÜxnÃüvfÞÙ÷¥ýïËÝÝC&ïìðòó•LšêšÚ:ça÷j?!•€Lªk]¬W)eLóç}JÉ«–Å Î˶ÙNñ6ïS²¬öëµmNAÞׯ=¸byÏåS; ‹48ÀÇbùN38ÅáýY€e®ŒðøÕ XK"Ô'FYì(£„¿s/¼““ÿ/¡1>Æ+àøáÁî˜ê…Dh\f€ÍÝbá²G±ÓÕÝA‘³wÐ\·Å#¨<—u]õ÷\ƒp¹,e`-å}J:ÀÖ3áLûRîáÛ<·µÃ=“ÿö€ç䘞~‘È Ûâ[ó˜)‡FSa±Ñ<æê“‡\ÓxxúH¢°ù•<Ñ„«Õ à‰&\*Á÷žhÂeÒlðÄ»Z:¹,ÏzýÎÕ˜6—LðáGMë1Ó¬þO(±þ·4RPn_§üîåœ"ÍÎPÑu³3!d(±íçZZtbÚ‰+¥xïÄ8CYöøÛ™w[d<—u]çí¹}J¿Úå–¹,åäÕ sK‹mmniÏ-¥ß‰óÍ}ž™dÉDâüFÒtX$ÚIEND®B`‚line.disk.in.left.png000077500000000000000000000013451321075051700343600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœ…IDATxÚݘÏKTQÇ?çͼ739£3Vš†B&E`A¹pa.Zmj1`E‹þ„-B\-Ú ”Q£E„%XÐJZØ"B%KÂ8ÎÓ"GfæÍõ‰¼wï}çžï»ççUÅ%2Oê¥|Ö^¹(uß'81¿H¤<Äü¡(?†FtÔ­~<¢æF‰ONÓ¾°ÄùL†ºÍó>ŸÌî ñêH5ÏÇÆ5QÔ&ªj„¶ok¡#à- ù²c3ÚÖBG¡:˜çcxóXUÝ",l/G#ôî pƒßc•ôˆ.Ø:¢ƒeʧ,­=¨”îÙ9n©âs+WD4V!½Þú\Çk>æÂsšhë).xçsÁűy_b`ëAÆ3³$‹47J|%Å9âWRœijNoòœÅÊä4í&så· ®75Hnÿ4Q¡ô‰Øe×Ò´f²Ô¸—.öŒ˜åMÕTÊ"U`®¬Ë˜Ï%³𘌀{(R“ì= îªê”“!»'Áõ‰Øî«‘] . Õ¶ŸŸÅT Ä¥‹ýÐTžóiš²p/ÿÌsÃ¥¬œ:ŒÔ×Ò¿£à–a&©Ãy]p9©¾–þ/_õÑŽš¥aÿظ&›Fö°ù¸0càü ²*ûìIºDX*ñÉÓÍtyP|°¬I€7Ÿt8áž™RÉF¸ÿî³¾ð*  Ö‹ÖŸ¿õNUTü¥hXUUò]kää.«Î‰ü_~ýšÕÛ±=.L4p·Ð?a„~žæºý*´ulFóé¼w¬O8<Ûnþxñýå<ðYLnȲ˜ ‡xrì(Åê`Ìç²°¼ÝüêEkÌÝ8ÿ]äÿس¹IEND®B`‚line.disk.in.right.png000077500000000000000000000013741321075051700345450ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœœIDATxÚݘÍK”Q‡Ÿû~æHŒÎ”¥ÑFMÁŠr!X.\¶h3¤¸êO(hâBPhÑ6hQê¶)ZD˜‘AA!H~ô¥Ù¢rœÏÓ"Ä›™w®#8›{ßsîûÀïÜsïU"‚[ëhU§>/sèg˜ÒÒ~=»‘G2—IlÈ£#Ò³r l¨UÁŸ8¿æ\2‰ãÜÄ[°,5çÝÇÓª Æ&§%D!LD²ò–&Ú›W€dêEž·4ѶU¾a‡¡lÿ!SÏêc¿~`-°”+Åïeôþg2º+àrÚ”Ó·1çð.8#éÊT¿RJÜ—æò W–«ÞԘū¹æFÚs•âvMÕàp÷ &Ël7Lݱ_‡*ˆ,ëkTg4ÆIЉÆ8ÓP«‚$QºTiÕרÎt“³ótëlC _8‹ATW~µ.“\,îæ`,Þ±ÿåÒe‘X¾á ±–ÛÅI*c1`náòb‘$]¹ WØw•ªÜ“pN‚d—ÈâÞ„ó–Rönƒ‹»]Ü4X´-~yá°8«®š®t“³ót¯EhMëvqo O$L¹S ÜÔŒ ¦›¬¯Q¼ÿεUU0fÌr! K;.Ë©tl&´ÔšÍËÉi Xx Rs'è"ù\T)VO§@a¡ç|ù_¸oä±ßÇÍ<‚%>n<{-£b1ÿ^©v`iE®ŠˆÊ˜¿Œ¯ßåzjLš,«Và÷1«D•b5à£ïÛ²\Û4î¹(²¢….Û `s#íÙ^`›ñt¯_!‹û»âh£×UÓé-fÄ0XÚ È4XØ_Êíc5·Ërx¨ .çF¼ÞÁÝ‹sRÓfð Ϻ@ìIEND®B`‚line.none.left.png000077500000000000000000000004311321075051700337530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœ¹IDATxÚíØ± A…áî<°c3­À>lÈØ¬@3{8ØD0=wlÁÀeõ±&]ø˜Ë.îNŠÙÙ¤:ûÓ©H•ȘÌI†³ÈH‡q—ŹÑén.ÒÈâªÜ²¤µ„ž,Î^ôu7WóÈKV‡n9·E˜Èá šó…ÕõÆZ®–¿‚+¸‚+¸¯%å=÷œMÙµ“`ôC©å¿á á÷×ÅI×Ò…¿öˆ dq^rãÞ©­ÄÇoÈe¦IEND®B`‚line.none.right.png000077500000000000000000000004351321075051700341420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7ص bKGDÿÿÿ ½§“ pHYs  šœ½IDATxÚí˜= A Fß쎃ˆ,Ø,l¯…ÞIÁÖëXYkiã=¼Æ6ž`Øx CØ0¤ýÂ#ÉüÁ2Î3NZÞÖÊ4ZÖæp!3w G`p '—ßÊe&n᪑zÿÖ–ÝÂ…7ÉoåjžZÞq³ [+°®¥ß£wZ~ÛÞ& ÇKâæ÷ù¥¨Wà \û›âzÉÎ*y×Ò˃Zó5CâZî¹1Î\ÀñŽŒø…sÝ–âxµGfêNjZÞ¿p h2IEND®B`‚line.rarrow.left.png000077500000000000000000000022741321075051700343370ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœ\IDATxÚÝ™OLUÇ?ïÍÌÎîì.°…qw¶K‰…¤ÝÒ<Ô4 J¬IÛ4ñê±G/ü—Ô£^4ž<4Ñ4^`Å4µk5bŒ4&ÒÄCK© ´`!6^,X¶",°Ï‹¬›…Ý…™nð—ü’ÝäÍ÷ÍçÍoÞï÷~ƒR /¼ÏG¿WÚ庤ʖ2…gÚU‡óÒ<ƒí WÁ"ì@8…‡·]e8åúÀÊMot‘$¸tÙÅ™V5:âHˆ; ‡ß.]VC˜ =…ÑqŸ{—`· WǶ?¥Ò˜‰GùetœSãSÔۻĕÝ6?_SŸ,‚w¦”â‰v°«/·&ÁoBÜf[ ´×G*§Ýe¸  šdÂoòmÜæÍ¼qž%ñÿüY\ÛÅ4 ¡ h†ã]•ÝD¯É¹ísBpÈæ@§BAz4Ós¼‹VÏá”RDjŠoϦ H6—Ù§s¡ˆö‡BðgîU[ó¿Lƒ¡†ï%›yÁS¸£GW!Р𶉥à¾)¢]Óá}!X(TBÑ4&¬_&bëaë*ÜšÇc K$ )!„–½p¢›’pyÚ¯IÉ@¶2·ÅÌKÉpOZöòò‰nuN)E"FE”à3ÀŽ@Û~JÂå´_74&7Ì¢û ~²#¼Û¶Ÿç\ƒSJñHSé'˜oF.lS:ƒehŸ’’éÍàò|ÑиihŠóJ9pâáDébvæÒ ÊLB@ŸÆàéO•©}O)jÊÔV5A2B’˜L†ƒ\[Zæz®œ£Å³ü™òqq ›«îYm¹°B¨ÂK\/´=ƒóÃÒ.;N îmå²'þj‚èÎ&ä2˜MÃÂB`¹àª@;[¦tV2á ‹¦Át ÀÍ€Éïó LäéŠLßlš'7ÍO?µÁò B$lHi\,¡ýxm³Àb©]Oæ !‹/6oìæ¡m%ñÃm`•XR‚ecC{ëº^JÛ8‰nãËÏ×Àü&PY)™¶,>wlÞnoå˜+å×Á$ÆÆÅ³”`šàDáÈ¡â)­xùu0ÉIÃ`T– a„ #%wM“!'Êé#‡èvµpÞ㬞ã MÓV±Ñzèì(]¶ƒÛãðª&™*€Êh“~“ï£õ¼ÓÙA§[G=ÀŽfæ ›]J¦¹°»VYûA+Ðþ`fŽç³Y¹÷è®éc$lqű¹6¦ú]ß-×~ÔÕŠëGC‡ºZhŠBÜï¶´K¯äiŸ™Kó’Rè†ÎõºZ¾jŠ2wøµçF^œñ¦M¤w$c·!³‘0ìk‚áw&ëHŠcc·y6³DK$ÌÙ}M ¨ü1ŸêÞµ7õ™4ÄêWÛçÝ]Á™4±X=?&›9s~P ó€M¿5åQçPÀ­)õ1U´êåÙ‰ß ”—­äjÃi+ܯö"xù!d¹Ô˜„04ÛéBU9~ú… Ç£{ø£%ôùS•UIEND®B`‚line.rarrow.right.png000077500000000000000000000023031321075051700345130ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœcIDATxÚí™OluÇ?ï7;³³Óîv—²¶[Ûb*¶ÉÒÖ t- ˆB…"4„He©‘õ§zڪ̷lvÉ37oÑywŠGß_¤¹‘ëØ%ܼw§<„cñþC‰>961ÉPfŠaÃÇþ^Né‰F,—è&&!3†ú{Á³ÍùKkI»#Ê Ûφb\„Y'À7»“ŒÏû7ëtDÁöƒ¡ MÌ ÀîdamO27úœ Ž?Fü¥fy>›å鼦Mk,f6ßMÏè£Km³NmÆoÀµ Èf!¯AëXÀ†éíÍ37Ð'ÇnO²-3Åpnž!Àù‡AH‡ƒ|‘JëWJ¯‘Ew1 ô ·‹e—›_þ›„ƒJëÆ7”®˜œH¥Ù™›#žÏÓ¥õòlˆk óir;o—¹.Ó"¤[B|\OæÊù¡ŠC´µÐˆî•iKˆ·òØð£B|h[\ 5ñyr W WF› !°-5Ar‹—_¿ÊØÅKú pæÈ^Ù~ù © í ÔàÈ^áòHex°™«ð>wΫ¼ûâüÿõ] œÛ E¦Öœ±ŸˆÔüàªaÁ³'C{T§E8îe͹°¿À«µþE‹;IEND®B`‚line.rdbleArrow.left.png000077500000000000000000000020231321075051700351160ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/arrowStyles‰PNG  IHDR7%æÅqÖbKGDÿÿÿ ½§“ pHYs  šœ³IDATxÚí˜KlTeÇç»÷ΛŽÅ–Ì”¶dP™j¬Èjb¡&FâˆÆÒ€±Ñ¤ ÂB‡Ä„•¬êƸ6.‘D+)Š]@­¶Á´B‰t¡ŒiC1¢ ÒÚy´¥íÜÏEÁÔ±¯ÔÞ¶4óOîâæžsîù}s¾{EkÍ|«Aäñ ì{AëQʉ Š€bYŽÀÙ\–p@ʆÄr…[rÎÄ“›¹Ü‚SãÕÒ\–p6h2ËNÀ¸¥ FJ$>ûÊòLIXl«’-wܰGéíg£iÈ•{òäÃò¨ìœÊþt§n²,Ò-gø8à“†Jd÷¼$¢µž÷«6Õ»8öÚNÖû¼|h’.‹s¡>]É“ù­]Í^¥è†,“‹ù¼óØbsÍøz¨üÔ¤±.Nô•jµLÎúö•1×~>y²‚§²}ºŸ¥¸~ÛÖá†ÇÍ7‘"^¯ŽQ¸$àê NÕʼnÖʼnF×R«„þ €°•âZÀKct µý7=Ìv¥ø-Ë~Ä0¸\ÁåQªg“‡#{Î7`ܹ¯yŽ3>­Ù[Ó¶ §†x¾ëWÞóz¤u]©ìøþ‚þ²¢œ}¦I÷İ™ ‘${~êæÛ%gKÂr`멚rï;ñ=wT¤8¸KëgÿU½”ÜÔš•Ó¸Žš&=~/g>.¥†X= ¦<ÊÙ†âw¿—Ž.d?t¤Ñj°\ÿÉÄÖ÷ŠÈt£iQ6¤l 9»jŸ±)M¤)M¤Ùµ ­`†ê, õ®‡›aææUŽÿ4È$`CÓŽ´¢Ï4¸ä÷Ói¤Òiʇ‰1I¬ñx¤L“ËA?­Ê`tÁàDð¾½_¢?÷<ÖÌGS†Qˤ;?ȉûŠ9Ýñ£>°¦Hâ½}¼š &®´‡h¿Ø¥.èÌ™puÌ p£«¹GÇ(›`F Ïåâ‡P_mXOÓñ“úŸ²_¸RÞ½ùoh=^”DáÏ€ïB´tý¢,ê²¼£#Ä’ì_•ܲ,ίÊçø#Q:N¶éölû`žN$yY„ŒRôzÜ´‡ hí¹¢ßŸKõrâl©7i~0ÂKJ¸®ü|¶.ž©|b1òÝï·@Ïv÷»5¹>˜¸Ý—@󫉶Sáê/Oâ `¸‘´?rdÖRsuàHÒYÖX/)”ÝlUâ^R2p{’š³0\8YM)-gÚšnËŸ)šsôbÂ5$mêÇ#°TS…«…tî9e¸žA) lw%VR„»p™áÌ`; ¸!Ð ÝI,¸SÛý¬!ï¨Å‚;·}<;™å`‹†¶w²Æªx ÕaePƒiñhͧ"€`î0'??ú†RÛm"ªô–ÖJ|q/®€+à ¸ÿç€Ïðþ¬[°~úaî¨IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/axes.png000077500000000000000000000006251321075051700276230ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà ;aKÁ`"IDAT8ËÝÕ¿+…QðÏýEIÊ@®RVƒÅ .£®¢[ø”dµ*€Åæ°(Ì %b‘AXέÓ[n7ïaðÔÛû=o½Ï9ßçyÎ9üL£‡ Õk¨á Üâ)Å*Ð],æ%+Fõ=&pžW†,ñ,&±ˆ«)ˆ XõjxßüF*)¥¨a;ê ñeHFÄÄwx¾WSÇøÌk^L\G¶Rhü–Rj܇!t¢¶w%°¾Œñ%àl¦{„o€HTMV*k" €¼cÑâlƒ*p¨×ÑÑ º‡iÝ@,Z¬\+õ£kCæÖT‚Ðpákcè ¨FÖ*`RúY{z8Þg 0Æ;Ÿñ]À LjçŽt­Pö2õyBø~»‘ñ é:nÂtÖXÕTWÅEA4ùÂÄ`!ðp/·à|·±é&Å€6aÖcýGAPp\ÁMq\Õ˜öäÞn¹XZg,`ék©€jì,´ͥ¥SKÑcÐTWIû ž..Wp—ôƒ"3«‡†NQùÍØ+™jb+xI `oâÙ3&—§8<ónHʼn±‹â2`^/…×Y¶ŽV{ÒWæpz;3`\gìÃꃼ¡bA ÞoH‘T¥¡H­VKc¦qšT;Ÿ3S'í²Ö}æáÌÇüþçüç|À÷ö/œ×ʲÜd·Ûc…Ba!Äæt:ŸSJoçr¹ãù|þÖ× –ʲ|À³óò¥‹xEÙ".2;7¿ûýþ;n·Û3׌kc—'''çGªÊø†XðÚŠvožc(-K£¹Ì{_øI?ý±çêè/¿q¸\ÎB Ü™J¥ÎýØÃ¤îm[¢# ëÆ÷/ž÷xŒˆ```SÜæ8vÑ»÷ØÙW›MœŠFkC½½½id³RÇñ|>ÙÞòÓðžæ»Kå¡,µÀŠ·G–+ý„–ÚïÜ/§”6e2™ßMµpתªÚ¼zU9o\ŸÝ'Ú'¡À4ªYD Ç®¦w7k"%™¥±XìÀ,°ÇãÙ×z–xú^h\‡h¡L¨Æ!À€¢Âž­êePe÷,0çügYb¨ MÜ´–oúJ(„é˜ë•˜ñÊåSYY¢ÚØØX`XUÕÊ``ºÒƒšñ3f¦›GÁÑÏŒWXòƒ­02òš% ßLmœkš,ŽNùjÀ5S‹ÏD¯¢û(Y“~ñAöz½à,»Ýî¡¡—:®zý‡`m–fÉ\‡™>w%Õ§.ñj¯×‹ÆÆÍÉdòYX’¤êÄ$¥Qb¬6Xí0á!Õ§.ñ5>Ÿñx¼£««ëà, !'àü¥aÄ‹}´ tÿ£gêóùÐÒÒR-EQRÁ`pWÿÓa¿ -v¬ çÒ¦ ñyHÄ?ŽšÓ=:tf¦ÿ:y”lö·¾T®œP9_þðÆh–8©­ñûýˆÇãç´Öêêê~u9]íþëþ¾q]×Oãp|¹gl5ÞÖÖvà«—tkkkm8~k®GI¢Ë¸ mooOüï ‘HØêëëG£ÑáÊÊJ­¤ÄÅC¡es†’9Šˆ"L&ï~Ó;ï1À>!œdõIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/circle.png000077500000000000000000000016071321075051700301250ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà ¤ÎIDAT8ËÕ•_H[WÇ?÷ÞÜܘ››^ †„å¸*EkK£S°•‚…½mâ¶Ë`¬¥ _ö¶—=”Û§¶ÐöÒ‡¹ ö´°Š J¥k6تÎþ1¹Iª¼zö0…¤±.>8œó;>¿ßùý8ßü߆tÐ¥¢(¯™¦y8¾Q*¥$Y–ƒÁàŸªªÎlnnÞtçÛÃ:l2 ã;@B‘…D¢©IH»g€H&“óÑh4\WÄš¦½ |S.—©XŒ33'<ž[/¯¬üÌf73‘ÈÑ_\·ïúòò±»ù¼G×õ­¶¶¶·ggg¿80RŸ¦•EgŠ·‡†ÞðŠ€!cÎxKÀ;k ç'“ÉE, #Øy©*•†išÓ¥öñ“'ó—3™7_¼sgðZŪ>Íu•±'Oæ„B/Ü*›eY~ÃqœÏ÷XòÞÆï÷‹Å¡T,Æ9U½`®®îT€4ÀûŒ­Ú¥\nºK×Ë™L&1<< åí7_/—I@>Ÿo©¯¯­µÆC!º––îÕ«zM¤VUÝz°²Ò`ÛvsX’e ¼¸XzàÀ´!vQ±*pccã_ËŽÃ\KK×aSQý×õÆ Ü­ëº>/€ï%éÄ¿ìÙ´¤¡Yápø‘eYå*°×ëý àÆÃ‡§ÊÐP/x|ŸÊr@<Ÿ©)ÞÂÂÂõT*uÿ^¡à{?ý Þ~"I©¹ww÷Vÿ‡5à]§ÀöÇ;'Ž9ëþóÛö-à6ø>–¤¶Ï„h £££,˺ÿ\±üÈ0Œ@tøý¥«Š2…+® øÒ¯oÂí£²¼ˆ aˆÉÉÉëÒ̉‰‰¾ÎÎÎl¥l¶ªêÓVEyZ)›===îÔÔÔEÛ¶¥º…Þ¶m%N_ÊårcÙl6²¼´¤$’I"‘H!Ïõöö¾kYÖï‡î •N€v ˜·,«ðŸõ¼¿· ˜ÚºlIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/closeIn.png000077500000000000000000000010231321075051700302500ustar00rootroot00000000000000‰PNG  IHDR*º† pHYs  ÒÝ~üÅIDATxÚm’=hSa…Ÿ&7!¹‰ÅŸš’&&Š-¶ƒR0n"ű‹PëäâЭˆ¸µ:)þaWÁÑAqpsk;jAb&"Mm¿{ï÷—ëtz8ãÃy_§ïíÌôÆÂ¢n5u½ÁvŠ ec™ÇJÎÆÂâÅÇúÇC£1¥ÐzË ­DeùÍóŽi5ûÇP­²ZÁZ¬Å¬¥céX¬fÏÁÔØh:‹¨zB~®ðW0vœ0ÆZ›ö:Ñ$GÏákjË„D}°c(&?Ì©Ëḭ̀+ÃÙ«G91ïc-aèÖ|þD&O<Á™I€xé³ô‘0ÄZè¢2 õ‡úoϘš&éx‚ùûԪȀ‘!@à#›‚”ü¯'/`m? ÙD©H/Ui²\›!éâ <›âÆm† ƒçm¡J¡'/ô¸'wx8‹·‰›fâ Z£î¯~€T¼œgê:ï^ñýÚp÷&—&y4G,Š”„¡ã >¹aÚK<½‡íôºûºÂÜ-’qöÂÚ¾Ý{7—•/©E²çQºw®k)‘kE­®ig°\þðú½÷«æ­þØv.n±àæö –ËÿzÊìƒgµIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/closeOut.png000077500000000000000000000011001321075051700304450ustar00rootroot00000000000000‰PNG  IHDR*º† pHYs  ÒÝ~üòIDATxÚmRKkqüeM\³›Æ¤ IŒ ¦s$=zñ#T¤(¢U„ú@ôPð¬=èÁ‹‡b¿€‚G/U$9ˆ…h ‰4ÅÍ«ÙݤÝÇÿ7š‚‡ÎiÃ0ÌLèÝâ‚]­ùÓomÓaP³5™ÒË»Z«”K“© &`Ac"A€¹ßî}©Ö” cÆ Ù Ó º-f`f˜3±ÉxnJ«7%¯µMª,öúˆ¨ÆÍ'R./Èðä|!qg‰µÈp8 ˆì(D@ÆÕ‡á™‹Å™ö‹E¥,KZ4u=´õò) PˆˆX0Øúð6q¦$iÑ©ûËD$iQ1rzïWˆˆ˜‰H!"¶wÝF×ÿ¹¹×œÏ>#ë ÛÚ¸wmw³.‘ÈŒ]Eßñ‡®ï¸’ü_{Âw\‚®@HDÏg†zêlþÕŠ¬¶„mɺqúõê‘â9ÁõàÒ8+sr~a_÷ûöܯ[sm)º‘¹q± @¾Q¦KÓöÙÿô1\8ÙxöxT_÷:íÁ×ÏʱäÆÒ£Fì蟭Nhõ|ñò¥òÐ4mó¯7ÚÝ/ƒP'T#Õ£‘o-GÑrÇwº½X<®Å ° ÃÌ;°Ž'”ôììµµÑú÷Q£yè]´Â -—OW*ÿ–b2u1SÓIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/closedBezier.png000077500000000000000000000012341321075051700312720ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYsâ€æŒtIMEà  ‚7)IDAT8ËÝ•OHÓaÇ?ï¶ß~f›BŒˆF` ! *Ђ"0v ؃çt˜p¡æ<Àߘcn1Aâ±ÿtµ÷î`…2ƒÕAnº‡žI&ŸihIà²+x½5ûüanz€Ücouô§®`AÒ9rÍn0gm”ÑoF£ÓµóòVòä£Ûl‡Ü`ÎZ7ÝYãŽ8ëÅûaœñk‡õö Ú ƒ¶ }n`vÙžgþz=Ž#D¼*–+xncŸœaæÂQýÝ×[l…4´G‹%J÷‡ºU¦8ÎëH’ +Ô ·Yñ;tôÅ~ú+SL}ôjúkÖ:àÏ“·Zh9[ Ð¬îï÷®Py!󠉦½vÚw£êШI³‹®Sl$J”âõ ¥‹:úNœøŠ ¯y#È’ ïË”3½ô~ÈTÝ×W Œl}›)R)AVÓ¤¿Äˆm,'þføhxbbæ,¬Ÿ&fÁÂzø§NÝ~ï?ûß~à ­°—žñÅIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/comment.png000066400000000000000000000007121321075051700303170ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœjIDAT8O픿KBQÇ»!a´9H$Dý ©°°1‡h«ÜµúÚ"‚¶¶…ZüšÂ!A°A*h‰†!—À¡¡††"_Ÿó¸÷y‰7ê xáÃ9ç{N罾ܧrg g°Keg±çl[¡”‚u˜´o uÔïæ Á%ìùõm+Š |Á™YNÌPÏøý!÷ÿ ý"~ý€%Î2\eÙ*Ú"qœ8ŒV23haòÚ‹ÖZÑG ?èïfÖ~ã;6iÄ  IsfžüË» /¸p…¾íéòIëÏZ²Sp;p)Ý“OÀ2‹BˆaÐÆ¦hFú+Àœ 9—rîÝ/1 ÚÐ<˜Óà¶ÓÔÍœÿŠk}1Õ­`תå0ÈieûÅØ]7ÍÝÁ .Œ8Ûõ‚q# ¡ÈyÕéêKJÍ:ŽÞín} WVÄœ–UÃ%UU©ëÚRUYª‡R=”R½¡lÎãgãÞz½þeë6¡˜ðØí“3aìÁÛ8sGìaì_ÇÐïXØÔä?·XÝÀ3%R¾IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/displayGrid.png000077500000000000000000000007131321075051700311340ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà (»Èƒ²XIDAT8ËÕ•±ªÂ0@¥‹ˆN±vèîøþ‡‹ßèt• jèÔDn}ox4ôš·v0[Ï¥!÷ž{Xh­®×ëÏù|Ž0„@ß÷ÔuYß÷E™1†¢(PJEÖ4 —Ëe•ÔuÍétŠAï=mÛr<#{<‡È´ÖTU…Ö:9q¶T)Û8x¿ßxïE)B‚½^¯›»˜O,n< mÛŠ µVH±Ö0Žcœs‰ä`·Û QÞ{”R‚m6›DÈ›2øRyÃ0Ä>DYkcú]×%?[kɲLœj¼ì‰·Û­â½gÇDÔ§<çeY ySw}©¼çóIÓ4É€|Šú†ûýNA ’1FÖ¸ªª¤Éç,Ëþ’+ËR`¿ß‹OÝ“¬×ëäêsÎý;Qs¦”Bk°/–gŒáv»%OÓ5¿1t]—•‰IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/distrib/distHorizMiddle.png000066400000000000000000000016001321075051700334100ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYs!›ò3tEXtSoftwarewww.inkscape.org›î<ýIDAT8‘Ík\UÆï{ÎLnb£3?Š¥‰ÁV‘ÖUÁøí&¸ÌbÀKÅEAhAâ¢ë úd“…¸D¡ —u—& ±Š …6„’¹ó‘Ðùºç¼.fbglû®Î½Ï}÷yžƒ™apÊàpøxxø¸hpÎàð>ðÃH{¸ ¼epÁà”™áÎeàSàKà àà°¼×3 ü¼6€×Gç/€¯ÏIÓ48wà›¦iR*•æof•jµš‘[AäVµZM€ÊHÓÙÙÙJš¦‰AwàÜ4MÝÙÙùã»rùò@¤¸±±ñ×ÒÒÒgf–\Y]_ÞܼÓJ’ó­$9¿¼¹yçÊêê<€™ÅK]»z÷åKœ/þôöÅ÷Ÿ|é¶noosoww6šÉÖÖÖÉ<Ï‹£Ðe¡V«Ìt:Å™N§¸P«U4F9УŠ÷^üà9S'ÙÜ«'Ú¥ù 3ªjÇé‡î'æ@C¤nà 9d}­"ÒˆG3ÕFýxè7þPU»茞'Ä jM‘z€A€þ¾ÈÞ¸.#Ð7zìÊÐ&"9ªY„Aƒ†H6Þ«˜E°¦`æbÞÌ;çÆf"Æú°–sY„@lªÖó‰Ä!b4|È{b¡ïUµWs¨ªÿvT­é\fÃ*ü¨Ï‡‘:3=±ØóιÎtÇN”¿ï} ¬¥š…‰È1 ´Å ò®Xè{ç\· Ù4þ ̽B!Ûƒ»SMçêã?ÃbkÜŸ{¾Ý~¢Ô–zÞ9×ý~~¦Ç#‹H}æìÙÒõÅÅ›B³§¼êîC‡!bÖz÷›Ú·À‰Ó¿¯ôιÓÀ´ˆÖÖÖn×9bÄ, Öz@.žöÞûî0QÕÊQ€G!bÖ>jÌû¾\.?»²²òfŒÑÇsîÏÇF‹M` È%æ}¿¾¾þáãqÄBk jyÏÿßÒ±À˜‡…_¿ZŽ® Q Åé÷Oÿe¦pI”Ñâ¢IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/distrib/distHorizRight.png000066400000000000000000000015261321075051700332760ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYsëëqÍ•tEXtSoftwarewww.inkscape.org›î<ÓIDAT8“AhTGÆóŸÙg6›Y¥j㵈ê!=yðKA4½^šlÈE±=+ZhŽ¢´ôàz{j)ЇbÁRK÷"„µ²Ù·Ù6ivß¼yÓC6ËËf+ûgÞÿ÷¾o¾å½§-¥>ä€/€ÏAà›~ørŽüoŽÂe ¸\oáñŒvêf?'€~à4p˜}_'¨µ ^Ø1SSSCÛ´{Æ™8VÞûJ©»ÓÓÓår9¿¸¸øÓd>177{–½÷ç”Rû&''íüüüÜèèhíì£G34›˜¥¥¥ßËårð,Ÿ:³¾¾–¼÷áíóçï|R*} µšJGñÞ‡—oÌþvèÊ¥á·Àg¢ÜÕ_Š˜ååe_*•TµÆ‹´÷X«Ž/,|°ƒÖÒ¿GìÒÈØA€pÿ+¤ËwmY÷¾ýnz/°!âÖ L 騔ŠÛ¨”[…•*T¢­VwÊ'ðé%‘‹R;œÄZÇU¨Ta%„J'Oyk@¼½fRÀ¬ ýÇHÄUaÅõ[±ÿPù¤£µn°'k`_ºM'âV¡CìaWAÊ;» 4.îòFDšÀ&Ítœ“Ó:a%«º#)‡ÆÙ! o´Ö›©È©æ­ˆ ¡b!î|£*I;´›Û‘C »¦T}#l®5híª°jÁjHêAPßEaÇnñzvðŸzÿ@˜ö}–Ë={ñ¸5 µ^(LLÓÎeêÎÉõ xðí“'Åvä$Ž€:wá«?^Ç?­u¨YÑJ©vËß?|øxÚ%m+rÜŽ 8¼KŒ1¦Ô€MɈHï¯"±é{è”OS(†ÇÇÇOyï5ÓZÿÙ+°Ó¡òÉ€)‹½v;Œ:f»Ý†žµ§Y;zâ×[&x1qÍwÿTCBŠY ÜIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/distrib/distVertBottom.png000066400000000000000000000014471321075051700333140ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYsëëqÍ•tEXtSoftwarewww.inkscape.org›î<¤IDAT8­”MHTQÇ÷Þ7Îdf¦öAAšmƒ–‚¸‘$„4h„›J¤6á.ZEíDj´sQÑ¢/R ¬ )ÈüxãŒÎô|oæÞÓb>žã"ðÀŸóÞ;ÿûçž÷W‰ÃÃ鵇¿®¶acˆ(q¡)gC%6ÔÕëb¤]1T®nÏý:àÕ.Kï>¥~ï?×QGqÈV€l9g*8öqü´®³8y`-†\M®B»bÁC©n`ôÖæm×Lk®éAUI‰sÆYÏØâNãŠÆÛŒ+²Ûweo Ý{©œõ´´-¤´ ½B~›4þ…£Îɉ3KÂŒŠ·¨@ʳ,µœL]Ÿî¿W8Qâ"(qN‰} Ð <¶OÊC½¸‚JDPJÝíïï¿q<n&œóâ[Ž´¶ëZÛ‚R6ÒÚZcldÌ·‡?‹s=¥ÔYàðÔÔÔ‘KííWNÎÎî­%¬€ïâKiX\†¥eX\ïé9 lÔÀ ' Ã=ñâ¬f`% ™ ¬d “-g1&Šó¼ã0ö^µµ}Y¶VWŒ@‡l«!ä\É ¬'!È“¬'ˆÀyù¤S©?ƒcõ? ì» #£ð¹îëÇ2"O7+^¾Í[a ¤ô/žý7ª‡††Fçççßø¾ocQJEZëÈj­£ Œ1¡1&jiiÙ6999%ÞÎOLL|èììl›žžŽ_àé2JGWå>ÝÛÛÛ]!k`hêèèx½É.`½œëBk]¬=©q8smnîÊ£ÖÖ?k”4à% ©L²”wçÁ¿/j«cò€C#0ˆµ\]Xˆw—(£¹öa6™ô?ôõ½SJ¥´Öí‰Db¾Rû}ïæÕ'9{IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/distrib/distVertEqual.png000066400000000000000000000013601321075051700331110ustar00rootroot00000000000000‰PNG  IHDRŒ-µsBIT|dˆ pHYsëëqÍ•tEXtSoftwarewww.inkscape.org›î<mIDAT8­”MkSA†Ÿ93iÓÖk+&BÄ…Õ®"V)(èÚP\]KPÄ? ¸DÁ•+é½ ‚BÅ]Ihq!"­DkMÓ|Ùܹw\TCŒQ#ôÀóu‡™w^圠P(]ßs¬¸9’ é …sÊ%rq ’8P.ö•‹C•X_*g}I¢pG}eÜt&®åNdª»§º Õ´€oóNj‡JwÒ#¹;ý"‰ Jfn{^ö囲ÇÚ•Ä%±Žc#‰5±Ò‰ÍèØF룙ÓW$‰”$QJâ`HÇ— k»ÕM¸pŽDZ§Êž—í£cšéô—»ÓÓÿ´8èœc;` ú鬟 ^9‘º5&´Z÷"°ZÑþªç½¿<3s±WA“ƒá‡p*ššÚ7¾´ô$S­¶7ˆkP©B¥•TšP©4›k6r=;\…ñÓ<›šZñµÆB›¯Pù _?Âçøø>¼†åEX޵ŽzvxJOA–K¥ýé8æ§Ò›P·ðMAk¬N@Ÿœœ¼{{lìò?µšd"! Þ˜à­Í½H"!X›#"û­koïvc7€5àýÿãZà!©ê•ÝvÆœB”Ã5æî³Ri¯‚°N{ÓR)úñèÑ_Œ1*"…µ¶577÷G·†m·¼såëÕê—V«Ò«$Æ|—øv–Ù………E$‘dzzzèª>¾>}êÔë‹‹‹ŸýÇoöe×¢H’htü7vxEI2`ó%¤@jŒ ;5ì®Õj¾R©<êúÆ/"©ˆ¤ÖÚBDöXkǬµ£ÖÚqkí–s.­V«;¿ë9ЭïZIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/document-open.png000066400000000000000000000017511321075051700314360ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ /4°|´vIDAT8˵•_h[UÇ?çæ6½InÖ¦Ù²¶ëªsE§í:dÊd ‚ૠΉA|Vaø¦‚úª¾ù ƒéÔ²u ¸‡>ø îÁþYlk»?v¥%IÛ,¦iÒ6ɹççÃMÒÈ¶È ~á~ü~ç~¿{~Žâ>8÷ÍÙÓ(F=í!­ P‚Ÿ¼ùÆ[ï·<|áÒwò ( rîüÙFöÈÈÈqƒwY)ËwŽ"YºêàyÚW߯´® z»PÈùö;ïîo>¼²š¦·÷“““¤Òi,¥|~Ù¹Œ±X'CƒC '¶At±Xdb|€p$L_/'Ÿy–|>ÇÀÀGŽ<†e|"#ˆHCÁ¶mRé Zë&bϬ·;Äã{ˆ':9yâ9J¥‹‹‹ü>>Ž 5ÅHƒ =ä¡þ~‡X]Ëàºî±P‘Êv¡ê8NÛêZ†=±¡Pˆ……›TµæèðJü;V–BŒ ,PJam;Ž“LgRO‡C"®Ë Ï¿H6»Æ_ ·Ù(n€à—›1H=–¶„œ‰D‚?f®ÑÕûìå—NidàÕ×^yïØð±ûú†p±¾½’d6¿¯e9:¿j¶½À]¶GÝ•«6p;—û»zèðÃ<9üc?\fäõÓ(U+1¥üPþòÇŽýøü«‹Û@®\®T=Ï#ruÉáhÅ0›*±ôÆŠeÑ0“Í®V=­IeRæ?[¸ ¹;²­Ëօѱ´ã„$í ¸Qàø]òv„Û(m•M_éç3@a}½lDóý¿Ò“ˆ“ßò#‚1`ŒÔµi¶ÑЇÛ,¥³U`ƈ¸‘ñ[7õôÆÝ×O*_a[×Ú³ÖeR›aÔ%U·ùèrÛОœ½¹ôËèXÚö?f²X,žê~ä ¹¢&+7ÍDñÇ¢ªÉ¾®fEÅ&&’ÕÄæoØ@ûòr*Ý5'zÖ̪މ¶æµ¾«Íß[¢£ªg˜›M®ý4:öuxïôôt¤»§ÛºòçæÝÿhÚU#RߦµÀFÆcså"`Æ6²ÙìõkSSEÜÙv[fúÎõS—¾8¸@¡þw®)Ýš×`È[÷êK«å“Ѧù)ø_ð¨9Ñdò^жIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/document-properties.png000066400000000000000000000012601321075051700326640ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ  (`{=IDAT8˵•¿kÛP€¿÷”Lµ4#'xʦÄ'qŠíŒ“9C÷¬¥whë’º{O^ó7x $¸?0„@ìà%Ðv–D¡IéP”ס–*Gqì’öàÐÝ{â»»w'=øO"Bc¿QÔSJ½|ötïùØâ~£®*ûº ys·£^^^¢iJ)„ñ»¨¸ú±LÉf³cœ88??O@nËÚÚJ©Äú½àÕÕUææþ¼Á˜WöSÁBÎÎΦ6l}})ål`)%J)òù<óóó=! ðÇîÊÅ-„œžžŽí5›ÍÈÞÙÙ!NS.— ‚ NÔP|\bqq!cZ«Õ°,‹……:ÅbqâË»ŽÂq„ ƒ»»»s}}MµZÅ÷}|ߦæ®3–÷5϶mlÛÆ4MÚí6†aÐn·I§Ó‘J)gË8^ZØÈP›Í&š¦EþÁÁŽãÌ–ñ»÷Úï÷éõzT*<ÏÃu]\×e82¹ººâððÏó¦OE¹´…eYxž‡mÛ¬¬¬P©T¢JÇ¡Õj¡ë:†apttÄÒÒÒô9v]!ç´T*qrrB6›E×õéÇeyy9ñq„•R²¹¹I·Û%•JÍKî÷ûƒ LÓd{{{¶ŸP\r¹ÜØd„vü©”š œÉdþÉÕonn^½yûzï!°ÏŸ¾Ì¸EcœcÂÓÆÔmb6}pêÓ0%BŒèƒF§KÜ‹/³‰1âH&êD¶AŦ¤Œ ô ½>´TêÜÀ„orsÎ=çûûžïùÞs®À2|­ãƒ?ÂŽGƒ3IÓòqC¡±‡†Ë¥ß¼Ý/}þ«€°ÔéùÐ[îG×…õîM‰Êr«J‰úŠR½øg(ÉL,Áìåó¾h$®sÉ#½/Ÿùd%á‚%Ñó#ös·o} l|tD;6>^èÿ}LôO_§°Ä„¬×¢·Ôȳ±téµ ~÷žGÌ/|óëè­„E€®ê;o[§~}y‡eàéþ®â}•ƒ»Ss׿c—Ô©ù¡HÙjG²:u¿·}vø•=ÒŠÂJÔPS°ž»CࡇÞÿàä‘¿ò8ÇÊ"DægHÆ£XD‹”ôO']½+füÔÑç¾péR?Ï+écË'uog*Y¿¹!¯¨,6Ìô_“8Ò³ÿÖëè~«ç€ÀYú2z]Û{òÄ7¬ü ·ç†±¸ù.¾~>:烎éN墈Nj¯Êe¢ÑÌv#‘HîɉÅþéjóxþ€ŸH$‚Åb¡µ½¥>稶Ùì„#aŠ¥âÿtº5à±ãgXH&9{l², ÝÀ˜åî½s[±X !ç´Ö³‹ZÏ.Œ²€D"žic!jê寧Î@‘¡€{ïØ’‹xØá¨Èsõ^[£?}ÀDÀªÊâBŠx,BhNÀwiwìÌÕ8•/ˆ­í-õCZ­³Ùœ#Ù-•t5ogd°“ÅAZU³9¨”–™ «y;•7’$eã0ÓÚÞR/îr« EQ$ I’EWÅFº÷7æÄEA Øhbth€îý¸*6æøŠ’Ù…±Ôà-wlÚL*•R5šæææPƒÁ€$IÔ¹èó612ØOÙ:;ãÃéó6QçnÈ *ŠÂââápX­®ªhÔ$‰­6›×;_nu“<%IaGÉúÞ½rÓ ÷ì3ÍÄã‰N§Ûëvgrjo;Œ ª¨€ ‚ªºÔdK…,ªªªðù|BæŸ~ûMjkkÑëuÍ€`0˜=6ü~ÿj~·ÔÔÔ`2ÉÙÕYyIK\N6É&V Y–3ËX†ÑXŠÑhÌ›×,)ÔâñxX ä ·yþ¯âÖö–›Öh¦¦¦ÔCÞç…µp:11¡‚ðÄ“ï³ÛmgYCLLLîüØp'n°JIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/document-save.png000066400000000000000000000021761321075051700314350ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ 4Her IDAT8Ë­•]lUÇ3û9m»Óe—ÝÖeY>–"Ú’V‹X0B4F|ÐÓø5HURú F‹ilD4Š’È‹h 16ƈ4AT¬%´µ6ÅÖݶÓv¿ggw|hwl©PLü'7çæžsþ÷Ï=3W`ž{£ýý?•Ʀ´Š…ë’ÍHú\ñ¾•òom¯~ö·¡8éú ­öìá‹«#³¡•>1žUeNñϸÆT:ËôÕóC©dÆVúÛ»_;ýñrÄ–"éùþÀÙU[pôÛ‡‡m#¿Š#“ØJ+PœvœÞuÊtºPv=æÜ¹ëÏ¥‹ßü:p+bà‡kÎãw¬°'¾ºÚè½ðtOÇ>ñ¾PïÎÜÌõÙÑÁ+Ft6N<™@ñ}AÇ/±­Ÿ¾ôú.yYb5%­³ä3÷¯}èè‹ï}pìàG_6G$TUHÎN¡eRø‚ëE¯¬LháîeküÔ¡>;r?Ϫ…à IàÛ©«7Õ/Jr§û˜økœÊÂô|íow°Ëâ_¤&íÝÇŽ¾¹dçÛº–¬eÞZ•lh;!™ÛGÊ]J9C¦ì@†äü¡Ny}IòÀ·ØÑ‡gÞÂcY‰==ÁËÅ‹ÛM#2þ¥k㣋ðîóR/’ÿÍϲçór4G9³e6IJ׸ÁÔu®|h~ª©†ã= s"‚ (]çÒñBf“¤4?L½Rk"SóSµZÌŽ‹Pâ/ÕZZ‚~º R´rm2Ì¡Kxu»i,̱ÛJÅ0€¦æ§’K³a'ký.Ph›(±BÖihãËìt„öîI];H­®*ÿÚ?W¯~ÈOkãŒõââIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.bar.png000077500000000000000000000002671321075051700322100ustar00rootroot00000000000000‰PNG  IHDRÔôUbKGDÿÿÿ ½§“ pHYs  šœWIDATxÚcüÿÿ?)€Ÿ‡qÁ_ šl ×?~ùŸ@Š^Á_ š¿~3˜1˜èF-µlÔ²QËF-µlÔ²QËF-²–‘ÜHå`c¸ŽL“høG£ÀŸIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.cross.png000077500000000000000000000004371321075051700325740ustar00rootroot00000000000000‰PNG  IHDRrP6ÌbKGDÿÿÿ ½§“ pHYs  šœ¿IDATxÚµ”± ƒ0†¿è _Ã¥®Š €ƒC—Žvê3ô­Ü7_ÇÇ®“ÐÕ¤¤C–ÜåËñÿwÇóÁ)× ¶ÆŠ¾§k0™f¼u\È5 qÄâ ´56ŽXI&º³]øßAÛ»¯_ˆp˜à ú€¹âÎ?»Tî¤IYлHà$²R¬.æìÚ_ôH)Ö² ßËÿeÁ4 æf°> 6Áf3èÖÈ4c }6s¿rN&SÑþºiÓ„ÙT´/öÔ×v\x(æIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.diamond.png000077500000000000000000000012241321075051700330510ustar00rootroot00000000000000‰PNG  IHDR µBbKGDÿÿÿ ½§“ pHYs  šœ4IDATxÚ½—?hSQ‡¿ó^^^|I’’b#4ªÿ$´Ôªƒ#qA:Hq²qQÄ? SuR'A¨‹‚ŠB‡©Šƒ(‹˜Ídá¸d(òLs_^üà.ß…wçž‹ªbºrœR§ª÷0haˆSÿEhÛ<Ô¶ùÔqáÎA&€Ÿ@Xͦ¹ÑQ¡¯€;ªª–ÅŒõÒ8‡:"ìïãP£RIj¼-ÌuD(B¸ªF€ß»™ U˜NsXV,‹GŽÃ‡P…@˜öY¾¥{˜ EØ`XÒ&3"¬?ÌHÛBà pZ7A„…„ÇÓ¶„]W€÷ÚÀ@‡òœ ,jÀQmÛæžác a4Â,0¯Y`µÙòý8q\£…íWC€s"¬•°½e¡cóx¦aÑ‹ñ²e! ÀÉ B×å" ~1ñÆ=/‚ #‹1—çF‡ø”Me [–ðÃèª*½i®UÙ¶ ûD¨÷e¸(‡–E¸ÐªÐ‰ð6æ28øýL5FGS›Éºâ\¡>6L©­^êDx Üo&ëM’a¥7ÅͶ›÷Ø0%~…ÆÀáMÔ¡Ú}Ø,&I)Ö‹{)‡:bøÅ„¥wÝ"¬¤¶r7ô™Æ/&n”9ÛæsG†¨¿c’éá˜ë¦¸Ù›¢“¤ËÛâk"Îc“zcᆘ¨e±lZ«ªXRÜÍm€|Žk!È.Ûy®ýý¢Ë«¡IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.diamondF.png000077500000000000000000000011611321075051700331570ustar00rootroot00000000000000‰PNG  IHDR ãi;bKGDÿÿÿ ½§“ pHYs  šœIDATxÚµ—¿kQÇ?óÞíîÝåäLÈi<ñ‚‰E‚¨hsÁBÐÆÆÖ"D;kÿÁÂ4VJ*Ab‘B"¢…ŠpH8³â½{68ÂýØÙÛ,L·ÃgßÌ|ç}çڨ׸•&OP›â6àæf¸¢ÍçšÇZÙêt([˧(ruM®Ñ¼<5)÷:Êí6ÕjEVT_ªª9„€‹£-ð«qš3™÷¬¼G] 8ZÅ«™Ã€¿»a;'œ=ʵÌ`¥1žô9¶½o3]½ÄA ÝÃÉqŒ +¼ŠãŸÛÏr*5ìüIÎ0'B«Täij˜ï³žÔ3ÓÜPÃNÌrY ¡åy¼WìeS ‹ú KOб#\Oê–ŸK8œf _F€9Âbžç‰`£€çY>n·zŠV‡ yЩ¬a3ð,ñ€ˆð; ,°f„‰{朣2Î} R•/Ç;Âj…eµ¨á»¢|‘—c#ð2Õ©â¦H²ÞåÖDçi¤^ÄžÇÆ0µ|4†æ õçi ëïñÆ÷XÏäò$…¸|ÑÂq–2³½¤` MchNìça¦¤—|WÖòyOq·|Ÿ×"Dg¬óø±Œ°e _Kc<ÞS¯¿#cø¦ÍUÙo€…9–¦kÜÑæªO6Ê/ÓLm¸s™uœ˜IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.none.png000077500000000000000000000005661321075051700324050ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœIDATxÚµ•ANÃ0Eߨ]ÐÄ­*VÐÐâì¸ ¤ìz…r$$>;$n¶¨âÃ9JÚ4„Ôéoléy<žùUeŒ0]›—™³TüÄJ)"*":±RÎRñ«sYw’UuO79÷Öòh—¬¡¼^ñÐÆØ[˜;žþîÊMyé‚7®?T/KîSÓ>5o€ó%űР‹3ÖªúÛn_[îbõïö›ÛªÝ¬¡Œ•q(‡¨*"uüTU #…°†ÏXÀÀ2ÓÞcËœ.x^Ìyk˜Pì©ï*csl¶yÆc«mº”çÁ&”à;ms|Ú ®Œ¾Ç4þËèëÊ—.Á×±†Ò%ø`6‡$c}¦?¼¸º[§„!¨IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.o.png000077500000000000000000000010141321075051700316710ustar00rootroot00000000000000‰PNG  IHDR©¥–bKGDÿÿÿ ½§“ pHYs  šœ¬IDATxÚ­”ÍJBQ…¿ãWHŠ0¤+!jdÖÀ$ÈIQôßô ¾‚¯Ð3Õ¬âF#ߣ¿A‘£¢´Ø ÜÊÍ,ÉÛ‚=¸çÞ½î:ë쳌ˆÐKs&ý\Á x9¶¥Ô¶ADZÖÄÁGÆp ˆ£î}^NúÙø©÷ÛB.CÎïã ¨ûÀ†€„>ïëûË™)Ò¿’ް<6’_ ?°r_7 -IsrJx"€ª.'bLÖ¹Lý ~sU}çCD²üƘsÀ'"sƒa[=JJP+ªá ù†ÒPнU¨ŠÈÂs jWjÔÆfK\Xî‹",fIëü%]’&‰E‰{ž+XºƒWÜáàî ¯'àEC.I} qêéÍyº·‹ßàõPV]*ÝJå,D„¡8Ëÿ1§Àü—kj €Ý!é`¯OÓõ…tfŠ4ðÐéݬ–)Õ%¯Äv;+tËgJ8[,ù1OG‡Ôyštäé²#OmÀr¶$­W(DV›¯›“8òuÛ&s DbQ⪴o³²æú‡I<Ù•pIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.ocross.png000077500000000000000000000007021321075051700327460ustar00rootroot00000000000000‰PNG  IHDRrP6ÌbKGDÿÿÿ ½§“ pHYs  šœbIDATxÚ­”ËJÃP†¿ÐØ B ‚"Š¡…j bW½¸ Øe¶TßÁ7pèãDhAwU"ú(*](ôº7SIÓ´ÍYœÌÌwfÎäüˆa;>¢›I34 > ØØLñ°»M7*onã4pÖL^€)à= X@Q÷žúŸ›Uj‘0»Ä5ðø@EV,ûÀd+ÏÅÌià(è°åK+ö€Iq‡“˜¶æ¶¶ÐÝêV€à‹Ø%®Pöc@ý@ËÓõ -2i†€·$Á }w£Òvèø{¸¡ "Pß%0FÊ1-ù1­ÕÖŠË~Ô˜×1V–Le†Á{bwf¦¸KlšÖí$þ3àÁ0xúï èÔÉ!"4«Ô€Ï¿¾M 0§›´è/›nhz#º7äôìð€} êY9 g퀞ù@aZ€Í,›åL“ÞÂJ €V§N.œ÷ ¹Óø½caÆ\IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.oplus.png000077500000000000000000000010341321075051700325770ustar00rootroot00000000000000‰PNG  IHDR©¥–bKGDÿÿÿ ½§“ pHYs  šœ¼IDATxÚ­”ËJ#Q†¿c:;`˜€"‘ ‚‚3 ¢«xYÄ ˜¢Œ—8à+äò >ƒ‚¢îTZ\å=¼-³R4­” OK{¦»#ÑjÑU§~ªÿ:çW"B+,Í©ÂC;àñÀ‘zË Œñ?¬'ì+Å ¾¸±bõõ²Öû_¢4M)nq¸ÀP€ŠÎ»ÀÙÌ$…HÒÑaþw€Œdb|ésž.IKÓ”4á¡À$õåw€ÆPŽ Ky‹JÄÕ¹û«ˆƒ´WJ¶T¥Ô `‰ÈÜÇ¢F‡ÙÔHÂ&õIᦓ”?&M%ÕþsWDVÃnIÔ¤º¾«§]y×àýÚT$Q“êú*pS«’a±H¡UÃWH½3¹,y롉íÿÅ(DÕ=i®ï‰Yéf¡M}xò4½ü)M··ˆwÄ:¨ù6€zã6"Â@žåŸ¸§Àü§gª§€Ó&é1à¬MÑù‰tf’pÛîÛì@—êÎRÖÄŽ)EˆKkÂÙZ•L¨Ÿþ¤_óÓeŸŸ:€í' $õ"•¢¨›/Lçö€²§aKç7£V%“Ë’€Þí-âædf¼$-WX08ãIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.pentagon.png000077500000000000000000000010571321075051700332550ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆbKGDÿÿÿ ½§“ pHYs  šœÏIDATxÚ­”±kQÇ?¿—Kï.1©µÔ:X°(µˆ¥:„º´Cqppqü\\œ\G—:trÓ¡*„V¬›ààÒATpÑAP,4¹û:¤ Éi$¹Ü¼û½»ßçñý¾{H¢ßŒpÐX™ý~Ó×KµY.›À7à¡?ü<õL•Q®ï6^W‡ÌØÊ9ÞŸŸa)5 Ÿchè?~Ÿäæ@€Ó'X4c ø¨>4zåòW¡r ØkõÊ¥=Y:GÙŒ'ÀOà†Rè_¹ ‰#U.Ÿ·À´†ð´3–kÌÖ”‘œã …y„s|ng(ÜqŽ/’p…€5à©Ñdy_Ès 8v˜×À\V€fÄ™ê!^X+0³ï’Ƴ8g¿ãXEo¯¼0³1I‹Ã4÷}{ì´a{“j…M Eѧ¡üo0_9в§Ë¢]›¶%CÚűÚÎx‹žÇ+3û*éjšæ¡o«þ“]À·ñQÖÔì4¹X.²Ñpv†U`Z@31{ŠzW1yûy9Þ÷ý{}Ÿûù<ï’ý\r¥uàZŠÓs¥TLì>iÀÉ)6€ƒfÆ #Ž™˜:Úí?À|C+y—SIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.pentagonF.png000077500000000000000000000005661321075051700333670ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆbKGDÿÿÿ ½§“ pHYs  šœIDATxÚ½”±NA†¿ÙИ((ŒQ0 #É%D(Š31!±´³±°´³´õ9xÞÄPŸÆjáŽÜmn¹Iþâ.·ß\þgDUñ-Qcø[.µésÆø|t## X­h$Ÿ¥ªNñ hž†±ë¼î'ÕnòºSƒ^—©/ÜÊ~³X²²··ù–KfÈ©…Û]Kœ ùü”§]-ñÍ…Ç1ƒÐp«ÉQUBX“—‡áÀe.;<‡w[¼›kÚ&{]˱ Õà-ôâŒ÷õ\$'9”MÉi.Ï"€“:Eõ_¹ n#æEô{,R»©´mº~aøÙ^©ðÕ1¥aD̞˭Ål›÷š‡&ÄÞédÛIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.plus.png000077500000000000000000000002331321075051700324200ustar00rootroot00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  šœ;IDATxÚíÔ10BQèýïüÝ:»Ø¤fÍ P7¶ï0àÎÎÑpð°$¾n0¢|ÓÐ'õUIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.square.png000077500000000000000000000002461321075051700327410ustar00rootroot00000000000000‰PNG  IHDRVÎŽWbKGDÿÿÿ ½§“ pHYs  šœFIDATxÚíÔ± 1ÁµåB®*§:ñ/@ț߄·€KCÀÝ‘T"3û!Ie(Û45Ð@½N^AµÜ.šŽížÙ'µůIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.squareF.png000077500000000000000000000002001321075051700330350ustar00rootroot00000000000000‰PNG  IHDRVÎŽWbKGDÿÿÿ ½§“ pHYs  šœ IDATxÚcd``øÏ@ÀÄ@%0jШA£4X z³#ð¸omIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.triangle.png000077500000000000000000000007471321075051700332540ustar00rootroot00000000000000‰PNG  IHDRXþbKGDÿÿÿ ½§“ pHYs  šœ‡IDATxÚµÕ?hSAÀñÏ]ŒQbSŠ$b¢PA…¢ÖJ]ì tµƒƒ .Š(®ÒÙMíîâ âR7i¡Š‹è ¢À94JÑþy/I¿pãÏ{ÇÝ{RJò®ZÕµ¼3¹‘Ƨ‘ö4œ_S3HÅuÞ癋rTÞC­–ZuK¸•y8ë0‚o¸^íF ¾ö|ëBð /Ò¢Bð¡¿Ï£žA“ø‰í‹!L y|Èx×ÐøaÌãvZ¢BÁó %/»†Šñ6-ö¢¹³ærÇжª³hb$­PŒÆh®c³˜J«Ôjµfñep³û¹¡RȨ́ŒÅèj~œu$3´—“íSv.å(ï6•=É …à5¦S! ï3±*ÔWvßÿ½39¶ðéú¢™¡Ã޶‘+©‹Ð¬ou}Y(FÏð&uYŒîÄèó’Ð`¿‹í;s0õ |¨˜ú Áî¦ø5vÌØ_¨P0½ðÇèmøøç;hh·3Hk¹u—~s!ηÒÌIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/dotStyles/dot.triangleF.png000077500000000000000000000006701321075051700333550ustar00rootroot00000000000000‰PNG  IHDRXþbKGDÿÿÿ ½§“ pHYs  šœXIDATxÚµÔ±KaÇñïóÆy¢–Xe T 5Ø’‹ÙÔ ÍnQ[CkÍþ--ÍÑÚ?íÑÐÖD‹Hš'oÓÉjwÞõÂoüñáyÞ—­5~“Ípâ·ãI§hº˜§á§'Zkü¥¤§5¦aðlYºà¹ç‰ò¨5&€m³œ™—sÏe¯£¯f9´,Z¡ß‘7h%|&§¹ ŠÅ¸ý¸bWJì†6ÖØú£ %´¢&w!%¼Ž™ÆI%ËñÄÐl’Kˆ¡;¥x™ªW)[Ùì+=GÓ71xòŠ8ë¡[¯Rö -¤9ó‰8£ˆsíèN9Ù\gïO(jr¡1x —hAÜ÷•[ät$¤„ žR¼…qnBBœvR3\ü€v*lvÈP_«¶Em)Å[˜ˆ{…Î?H©ÀÁ?!ƒäs~Eê§S‡ÏÂIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/doubleBorder.png000066400000000000000000000005551321075051700312720ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<êIDAT8ÕÓ1JÄ@Æñÿ3Û$,ÄZ‚ r‚v^#Þ"I¼€éíR¥\o„T©Mºð,Ä ÑuMAL1æÇ÷†QU\Ö™Sí_€ܗ޼ ÔÑ:ìÞé4M‰¢hS¬q©ë€Ìóœ8ŽéºnI’`Œ™{  UUi–e«Ç4ÆhÛ¶ŸG^Ô=ðt"Üp»lïTµùN‘«¯À¿ÿ°ƒÇîp/"ç'Îî×€?Ž´¨ß¹,KŠ¢XxžÇ0 ó^xû)×aâûþ¦TÓ4Ñ÷=Àãx¬µkí&ðC=¿Ò:[O¸\ØÇIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/doubleBoundary/000077500000000000000000000000001321075051700311255ustar00rootroot00000000000000double.boundary.into.png000077500000000000000000000007201321075051700356220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/doubleBoundary‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  9X ×5tEXtCommentCreated with The GIMP for the TeXDraw project|ávIDATxÚ¥Ô½.Q‡ñŸX›%DbCc·!!ZÔ…R)q Qˆ{@«Ðê|”Û¸ŠÝ "D$d…V‚U˜böd'±Ç›Lñ>™÷Éœ9çh_8ÅPÀ÷±MNÚ vg_QÇ^À·°†þŒ¹L!l¢ ƒ)ÖÀ=–b„ \`7àg˜‰Â†‘O±jò;¢„ð†õTÿ‚•¬—{ÿ |B9Õ7Q«r)²Ê8Øì4G±K~N–®ú<…Xá'zBxý{V£„’n©q¾þ#¼ A­u£:æÛd:×Çc¬p©¾€¹ç±ÂÕ@ ncöHpë¼£Td"æ '“ç&ÅÆp›å$%ß)¶ŒRLä¦PiÃQìôƆml4‰âCÖБª3á;‰æQIEND®B`‚double.boundary.middle.png000077500000000000000000000007121321075051700361100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/doubleBoundary‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  œ¼¶Ý5tEXtCommentCreated with The GIMP for the TeXDraw project|ávIDATxÚ¥Ô¿+ÄqÇñG.?.Éù1\IN’”0Úüø Ùd³(“Á„²Ø•‰É„bÂÂ$çN?Îpwùöé÷¹w}†×óÓçùùÙ‡Ú•Ã6º“p5¬ú¥Zêð;äËŽŸšccèhTHy59tUÁýøÄ”ÈšÆf5”ØÇ<öbVg˜D:ÁQŒ f¹ˆÞf„GXLä ‰žã)`؈¾ /`÷x~à=`­•­G !ä<›‚üVï¦ÿ#Lã9`íèŒÔØò8b…Ë8 Øvb…·8 Ƥp#ª´‹ËÖ“ý%Ìb[øJðô4*La´ò¨/ƒ¾áÊ$ 3˜Ånð·•ພð£E1))€a¹IEND®B`‚double.boundary.out.png000077500000000000000000000007261321075051700354660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/doubleBoundary‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  T…é<5tEXtCommentCreated with The GIMP for the TeXDraw project|áv"IDATxÚÕ¿+ÄqÇñ‡©c8„ù$²\þ«2±Èh7*ƒYL’2HY,‹Q~e¸t®n8?†»«¯ON_Ÿ×öyöéÙ§÷çýyø=]8F¾8¨óMŒû#™&ü×Xø –ý¯P]6ˆ¾«à…a;X ø)æc„p„Þ v‚ËX!dîI¬Kè‰fxØ¢-¾0…¹(a ÷Un|ˆÅ(á»/ øW±5¬f)#ðÑX¡·ZÝ^ÓìM%ÌÕz2L)FØŠNŠ//(µ°³íTþ„‘Ù>ã1`ûÍš;M ËCÜ'Ö&/Ƨ11öS8SoQ·¼€µÖÚÈj¤Ï1ÂI´ãü—SoÄ—±°|ý[hÚäßV7³:ðV:IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/ellipse.png000077500000000000000000000015011321075051700303120ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà $2YRb¹ÎIDAT8ËíUMLA}³Ýv»¥Û–þЦ„¥¶‰CM<@´D8H4zPcÂE÷¢&âN&$4ñÖƒWñÀM‰=Hˆá&B$!Ø¥…¶°k ”v»^()¦B=xã%/™ù&ß›73ù¾Nñ¿AŽYS(•Ê›Ç]PŸN§„²lˆ¢¨é½½½QA^È–º™B­Vwi4šMrž*†‘F-Æ8ŽívûSôIŽU:nLÅó¥@C£OrmšÒ›+—Ôœ5,åHvWܨâk5Ksõ3SclN’`³Ù~F£Q€ýb”^¯áRMGné¸5œa]ƒ©¬"@qà*O¬";Ë-#o:B‹³J‡Ã1‡äp°X,’É䃪ê:¹íÆÃ—Û¤*˜ÍQ2Õ•c@hYU¾nw5M‹ÑùæÕð’­¹¹Ù‰DÞ•¦iú.\¼rg()™&0'P €­My[î €(ŠWŸ°D"qÎ`4ƒ6¸G$þ)T$Vfªs³‡MÝÝݺBaBQy'Cížè²(‰$Ë2Ìf³³P8k·ÛW·’›$µù½±—…s!¾büµ½©r¹\Žã¾¹c“Éô&?ÜÎì§4¥¹#e÷Ù¯#¯ÚÀápÌò½ðÇ#?ʽ^¯ä÷ûï-žç«ƒÁà\(R+h¥\u¦iÑêºðÅ\é>€N§Dvk}Ѹ¶ðɽ:?V#e3”Óé”»ºº®÷öö¾ýk=÷ôô¸ÛÛÛ§ †ò#åË–é2jn¿0¦×ëåÎÎÎXÿµ’›P___Óøøx ×' 6ÛX­°X,™ŠŠŠŸÏ÷L«Õð<Ÿû—îvˆ@  àP`çùÈéÇP2~ÿà›¥½ˆ0IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/emblem-important.png000066400000000000000000000021141321075051700321270ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ  ,'Œ F¿ÙIDAT8Ë…•]h\EÇs?ö3»›MÑn?BŒmÕÄ–T0¡Ñ*ˆ © F+D)>”>Ô‚"}¤¥ ”*Z¢ "¥-…>h•ZKÓZLbÓ´ùØ4Ùd³»7wïÞ{LJ½»M²·õÀp‡9óÿÝ3gÎÌîa?¿Êápà]™”¶­Bhš­õüÂ’yâ©“î»i…ßà¥^ÞÑ5õ“䶆ÖÇ•@Ý}¨0‰[,PÌÞ&;1$†Ü‚åîúFþ_ð¥7ÄéDªù¹T×KjÀ. çF¡d€t=…=‚Hn¢¤†™¼|ÞÍ¥oüuqÚÚ±ÿ,Òü[/ß6µ=ñòúÎEŽýÅ÷´@±a'Óƒdzè+'ì—Zé ¼Î[u©æƒÍÏîÕäðY(-ßYV0ŠÒÔ†ˆ5•c±òe‡S‚ì±-ÂÌÌ4¾¶yÑùâ*¿(Uµ"ޤº÷hîÈù²`e¾’-z>%ÐsõÑWGíÚÈÉ?Iut«a]ùðÈóe¦p¹—}õ[;B!+'ªÑ¬´b¶Ú•f¶Ö_ZFw Ô·¶«Û”£U°ûê[ÛU9Ý7•«`Ŭÿœì ÉÔ&k¯TÁºÂ#‘ä‚’á/*æªU!Í%ÿ´-‚‘ÂvšW5Å­”ÔZs]¤U@cÈô5Ü™A„ªƒFÄ7€¢EÓ¶£UÁ•Mð‰Š9daòiÆpþÛDÚfÙ—ŸEÔ5!"ëÀ)V•€ yÇÈÄ… %ØÒÈ 9°Ë“á3ˆÆm›®ý}>ÌÏ"# „¦Úàx`—¥¹©îX溊™Ǫ[§ ¢÷—óígzËbzåæ}•µ•ÆV_(@°ïáC7ÊKö1%¶ŽL:㚦}¬ îøš/sÿ fD‹M0æ+t†NáŒÿê_ÇZ3–’‹c#Ë»úùxÕÉSïMþ~ÁP¶÷€ª×VÓÅ£?¦v“…‚ò`3S#7méÊý5wÅñ+ ¾ýÐÒÆ‚é¶5t<­Ëùñ»¦åN¤:"ÕÂäŒã,LÜüáÉ“¼_øì*gÞLÍnÌf·†Ûv©¡®H3·&JZ%шٸEN ß¶fÇo}ßÕO`û]› "ß½ÀÞÍqÕ?üX<žZˆET¡É"8Ž˶œŸš³ÇFÍ¿çù¨ïý@Xr€»¢< DífOK‚ÝÉí…(,sÁäÖµ9N¼À€áA+m (­}A*àö¾! èÞª$P,Àô¢4¼–õÆ|ß<ÅE=¨î5Õ›/ˇ(zQ^¿jÿx: kµŸ$IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/emblem-unreadable.png000066400000000000000000000016331321075051700322210ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ  3KÅ!þ(IDAT8˔ˋ\EƧúÞéŽó ÑM„Y„AYe’M² â#]â`ƒ‹q¯‚1¸„ˆÉ$W&„¬D·® ™É?à˜ÍÀî…3÷ý¨:.ªº™ž¦ç@q«Î­úê;ß9u„`7oÝX>úÎ6Œ1ßñù—¿³ôÌ/¿þ¬ƒÁs=¬ ÏõÁÃô»;ß^ˆö§gWÎѶ–ÝÝ]ATðEïõsU…°zçíwyøãƒ€ßLî?þ:b$€€Ô5Zh‘ãÒÍRÈ24ÏТ€ºuˆ‚0úû`D iѦñ_×"Ö¡Öz¶ª ƇÐé Æ Q„Ff~~Bð `ŒxVMƒ«ÄY´µà,8Pu!*Ú1Љ(Bf›åhSCUÓ;vŒøµöþ؆ °¸¼L$”/^ø ☎È$ÇÉ•ñZ&š¦ÄÝK§Nqâý÷Ð$$áÄ¥K,-/3wäˆ÷¥^wsx‚±H–¡U uÅ?[›,½õ&o¬®N|ùä DÇÐ4þð,Æ"‚KCÖ3ÏzçÞÝ©—°sû6.IÐ$ES?ä?#h‘CU¢eåË©m§€5IÆl%Ž¡Û µ=Kcðušfc&'¯]›ÚròúuŸ‹4õ‘åÙA%Ha ./Æ2=~üïÙÚÇ<[[¯^¸€¦I¸ ŸÒxR U´, (м ØÞÆå9?z4~$^¹Â«W¯RíìàÒ éyÿAÆÀ*‚šçhž“>~LZ–h]£MëkÙþºév‘^Z ʨ£ÌJhUùÀµ(ТôFˆAææ¦A¬õMª3ª ó—/£e‰V®(pY†K\’`_îá?wYæ÷•‹«Lo ‡ƒ~ÅtOŸ¦·¾Žˆ`Œñ+ –âTQu¨óÍÉ©26ö¯o=ÝìŸ]97j}ÿÛ†Ã[O7±ÖÞ›Püæ­gTõ3ùð0ÀÖÚŸ¬µw¾þê›­éTzë„HzÀ+À"0Ö1à€H€=    ÿ˜Ñ,?h‹¾ý-àÀÉa߬û”Yp\1Ñ^è,~EB.òÿIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/foreground.png000077500000000000000000000012231321075051700310300ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà *8'¦) IDAT8ËÕ”½jTAÇçÌÌÞÝ›oR¨…¨K±ABjßÃJ°ðòÖ¾ø 66‚F!E‚F 6&H ˆ›ì|‹½»ÙÝd#IçÃ=Ãe~óçfüo!#õ,°r ÆWàpÚÏò°‹§n3Ó/ÁÏ-/ßÝÑ ªAT¼ˆD‚¨„R”œ+J)ʯƒ bïÀ-àÛ(Ø.êúÚïµÕ—[&yÎ$Í›¦¹¦nÇè‰=O¯ˆ1{­Í𩋈šä™TºK…Þ’ˆu:9{MÉ“'%OŠž=V†-zìS`D].G Ýã½Zê`Ur¤xMÑc6¿j|Ý0¸ Š]‘8¯Þ«k…"Úš MÑQ¬¿ý~{éܰt\±¨ˆµ¨ :š)XñŒÖî<’ÎóØ™Òv†ªú Ñtgy\Éø›˜ô‡šË%pV³ ”—Æc…ö¹`A´˜N·`¢¶!XÎWü§»¯Û›oHY)Ù‘“#g%gGi¾cë´3ØÚ–~¿Êä}®@v/ó¤pñ=³_®£8šT| ¶ ¬·õÈç'„O*´]þËø Ř:Ã? vÅIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/freehand/000077500000000000000000000000001321075051700277235ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/freehand/curve.png000077500000000000000000000011051321075051700315550ustar00rootroot00000000000000‰PNG  IHDR8±NsBIT|dˆ pHYsÂÂnÐu>tEXtSoftwarewww.inkscape.org›î<ÂIDATH‰ÝÖÏ‹MaÇñ×sM£¹SÆ Ä”¡t‡fÇÂ%;²±P66Vv6J!E²Qj"e¡,”K )Ýb1šA~d1®<ó]Ü&7sÇ9s2O};§žs¾ßÏûy>ßsž”s¶œG­jež² ¤”êÁ0¶Äu½x7/^ãeÎy¦°úeX4¥TÃ>œÀQô·MÀLccÄ@Ûü74ñ4¢™sn-ZLι°@—0‰ŒO¸‰1ì@½Ã{}ØŠC¸Œç˜‰-ÜÇa¬èZSA`;ñ0ÍâŽaå?ä¬c?®c*rOáF–C¸øˆ³ØP¤+¢NOìî½°öϸo”ˆA\‰~™[­.¬CíU8‡Ï±°w±½@s¿•ÓmÉDZi)Àþ eçñ%´ÜÁ¶Eb7^D/<î¦JÄ|þ¿…u Œ•º¾ŸÄ‘ª¡:è\­ÒÂ[ü+ ŽÇ—kWÑ_5È@G1_8Õ類„Ÿa´já]Bö†m7ÏŸèÃE|7wâ8)N;ÿk´ÃáUlí8ÖT-® Ý4„aÇ ì©ZT‘QÃ^ÀìÊ97-£‘rÎRJësÎï«SÆø ؾʥ˜‘(IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/freehand/line.png000077500000000000000000000010331321075051700313600ustar00rootroot00000000000000‰PNG  IHDR8z¥ß®sBIT|dˆ pHYsÂÂnÐu>tEXtSoftwarewww.inkscape.org›î<˜IDATH‰ÝÔ=H—QÇñÏC™†Dd„""¢Œ Ñ©Bil©À¡µ!"‡±’Z‚¡‚¦ÀÅBZ[*…¶&‹^ "*£ì8xŒˆ|ÁžOtàϽÏ9ç÷½÷œSD„zXQŽ¢5ÜÇ8îEÄ«º$ýEDé G0À\Çt~/î]Ašê¡á‡–’ÁãAB<Åq?ïÆiŒâ}þ÷ÉÂËžÃþJ00…“X·‚Ob1—þ/p=h­p'…=Ç)4¬1V Žáf2æwLbhü+€Ø‹Û)à5ΖÝK؃3¸‹ <‹±Ì×^: vfùÌá-Σ¹L°%ònÈþ¾ˆÇy±gÆ ÔÖ ˆÂ×ýØ\o°eôÔj8[#òÒá-¶ÊJZqŸsÚ]ÆÖªÀ–ÑÙže;–eø€®¥¶àRÖþ\öªAV Û˜iÛ=Ü„>¼Ã·œhmU‹þ#àÛˆ^¼ÉZ¾…]U‹+éEuãeN¦ì«ZT™k}ŽÚ ôEĤÿÌæmæ…œæï2IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/grid.png000077500000000000000000000006351321075051700276110ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà $&Cˆ¶Ä9iTXtCommentCreated with The GIMP for the TeXDraw projectüQÇåIDAT8ËÕ”½ Â@„?£½ˆ¢‚Š…µ(X§ÈÓ¤õl} kÁŸV ÁB_$6¸·Ë¡—Âm&YrÃd˜øëyÙÆâJê h¸Š'o6@þ×.ÄŠ’8s°Ü¯ÌUÅÖäÀóŸWÏ~á*N”_Û x°2MttÌóÔ®uf`a8ýªø¢Xó8^*<ľTŒÔ¼§j*ìËaåXJÅݳŸ‹©0„!Ÿ ¾ Ô+í™LÀ¥Á‘cGpWHŠ/åMqm©h ÑW¼{ÆþVô8”PªÜ$F÷VDE[%Ž]üÑæXÏ>n²S»`IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/gridGap.png000077500000000000000000000003711321075051700302360ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà .))ØC߆IDAT8ËíÓ= Q à=ƒ'ØÆÚÊX{‘½…½­­Z´²²°r/ "Ï& jõÀXyÌ@†!$ôû¨wæw|+e1þSã!fXcü Ï±xѲîx‚%ÎH¸b‹ šèSÔ5F9wÜâˆKð„SðÛ§>oŠªŒU<%./]ŒhÜ?Ü6"נȦ9IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/gridLabels.png000066400000000000000000000010211321075051700307170ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<ŽIDAT8­“½JQ„¿IÖC0ŠD4¢š4’Êl lݱP›ÔÚX[Xùl±±ñDÄR$&A$\ ïÂ&d7›àÀr÷pf‡™=÷œcz‰Ä|6›=nÅ3Æ!¢Ñ¨ÇûÃp#’†%Kz’ôæC?8ö¶íûOžÂ º‘ïqàµck€1¦T¤æFŒ1m;ü7¸Cé•t¤GRQÒTÇ‚@7°nO«VÜEèÈÐŒsMI³±X,W.—ÓnÝJ°ŒW«Õ2Õj5ÕŠç¢nõ€Lã:%“É¥|>ÖÖêIš”t ¼Jº“”ó¦÷ð¶$ÝHz“´ßèÎ{mà˜ >‰6E` \¾eàËŠ7ðæÓ«>ÍßüÒ²«ãÝcÌ3P #x HꆀG+Þ¼‚W¶~º€kO¯n(À‘-7$ø €àØ|LLîV¼Mñ7Õb`ŒHd"•JeK¥ÒeàÙ®c4¦Æ‚IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/000077500000000000000000000000001321075051700272365ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/gradient.png000077500000000000000000000005731321075051700315510ustar00rootroot00000000000000‰PNG  IHDR h+=ŠbKGDÿÿÿ ½§“ pHYs  šœIDATxÚ}”Á’à CŸzhçÿ·ÚàB73L‚H¶„#À/‰ÁA‹ –Õz¬]D´õÄÕˆvÑÆýŠFœpZãýù0¯€ß¾ÉËxÙgzÆXù8SÛ'ØNŽ…xP$˜mp'µ*[Y®DÆ¥"{%•x”óʤAv–à¥ÅI ä4ó]³i„äÞ¥Ÿ…,ÄJ ÒLÁô( <•Í„ïGlõ˜7køÕqQ³»1¦ì5ïÍLS:¸‹LÚvðä ¼H5Ž]ï|ø™4ò¢ŒSÛ~@N†,ÄÖ)}£ÍC⇷M’·Ï ÿI}ˆìu ªì.iúíÍ÷ZØ/©SãTi`ÔÎx¥Äæ¿@?¥ÞÇ$Á¾[·žc°ž4ß!#Äœ„³ Ä!ÿ;ö5$IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatch.cross.png000077500000000000000000000003001321075051700321570ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ )ïD¯¼@IDAT8Ëcøÿÿ?ÃÿÿÿB}}ÿÃØôcb 0`3†úúþ›GãxøÇ1 `s-Ř`‘œÐè!6`q j¤ýÏ›u¾šIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatch.horiz.png000077500000000000000000000002641321075051700321720ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ ) ‘F¢4IDAT8Ëcüÿÿ?###Œ ´cb 0`3†úúþ‹GãxØÇñ€‘—¸ùàB㿪ݵIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatch.none.png000077500000000000000000000002161321075051700317730ustar00rootroot00000000000000‰PNG  IHDR h+=ŠbKGDÿÿÿ ½§“ pHYs  šœ.IDATxÚcüÿÿ?###Œ ´cb 0``ãÑÄ5š¸¨"?\!š¦IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatch.solid.png000066400000000000000000000002701321075051700321430ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœKIDAT8Ëå”1À ïò©N¼ž©¯2C»7E–%KId“ 2çÉJÍ$¼­}‹yz·8D©ÛCUê‡$áÜªï ¾î¹<Õ\"Ø= ŽûIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatch.vert.png000077500000000000000000000003011321075051700320070ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ )‚™KWAIDAT8Ëí’1 ÿ×Ñÿ?§.ÊDn!°mf„ÓW°A“ú‚%! €ôldçû&'Ùƒÿs]®°ãaB9oëIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatchf.cross.png000066400000000000000000000003541321075051700323330ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ )‹/|lIDAT8Ëå”± €0 /ˆ2 d„”LÂLLÃG`’‚ol Ëÿ’QQsöîK°`OIb¼êS±nYBC%…1g«,VÙSrŽ‘é8^ïXU«˜1À6 E3î×54Zþ`j}®K¢ñÔ\_<ÌIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatchf.horiz.png000066400000000000000000000003241321075051700323320ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ ) Ô*tTIDAT8Ëcüÿÿ?###Œ ´cüÿÿ?ÃI[[T4æ‡321 ` õõý? ¸ yqÌ¢©¡Áèuü8]-ßfiÉ8`‰‹q J.÷¶GY•²‡„IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/hatch/hatchf.vert.png000066400000000000000000000003241321075051700321570ustar00rootroot00000000000000‰PNG  IHDR h+=ŠsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØ )(ÚñFTIDAT8Ëå”± À0¥' xšTÁe&v•©.ExüVóBÍÁ#$@€®1ø|FvHÒÝ;jí½«~ÊÎ9*RØN‡ÚVé`@u¯Þ¼]¹Tµ\§»ÅÛ€VjIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/help-browser.png000066400000000000000000000025171321075051700312730ustar00rootroot00000000000000‰PNG  IHDRÄ´l;sBIT|dˆtEXtSoftwarewww.inkscape.org›î<áIDAT8”klTE†Ÿ™3ç¶m‚m—;»l-—-wä* $² &CT"((&F¤^eIHЈÈøQ#!lÁr¤%”–Rèe[ ”6E(´Ý¶ÛsŽ?vÛ €8É›ù3óÌ—y¿÷žçñ¤ˆD Üjâ±¢'^"ÑÀ:`60èdZ—ÀÖx¬èæÿ§«Û ¬ ‡üs&Ž$òS˜ï ¼º‰²êFN_¨K–W7%€·â±¢ïÿˆDÇ1ÛT¹›^[±xV>Åçj(¯m¢¢¶)$…!?áPó§8ôûU¢»µ%º’'€ñXQÇCà@$j•ã‚y#¿ùðEq®¼­{£;é ”†¦I¤”!2mƒwWÎf|0‡w¢û»Êª÷ÆcEo< ¼Í¶ô5·¿îÛºç$'Î×1}üp^Z8ž !?9Ù${o·qèLûOV⸠¦XµdϯßÕžèJ.‹ÇŠŽõÓF¶n±O×5>ßuÓÐÙ¸êYV,*|¤¹?þz‰=±R×录3i¹ÛÎÇ_löpÅ3ó™Û`õÒI}à‹µ-Ø–‰eX¦A]ã] C~!¥˜×[ñD Q˜ï§²®¥4t]õÉ0Rß²vùd&?Àµ¦{ÄJê°-Û40Mú¦ûŒ•ƒçycÐH!R“(MCi=ý€¡+^˜bÚ˜T@ê›î³÷èUtCGH‰”èJ¥ZÑÙ[ñe@UÔ6æ!¥DÓRRš†RC¹}_P\z]×±-ËÔ1 ])FËæêµ„Tü}ä°ÁsItvÓÓãàº.žë±tVSê½ó•7*€Ã}àôè[ÿé·¿tÌ cJÁ`\×Åu<\×M½’^]Ý=$]tv%éNöP0¬?}ëpwEï¬þÇt .™Q8rÞ¶÷—ç¯Üâ§ã•MÃ2{R(¥!…@i‚ÅS‡ð÷cýæ}\jØX{`ÓŽ^Ö¿Çf¦b{V†ùò–dL7”óWnq­ù>7ZÚÑuQþŒÈË¢00ˆ3e Þ¦/t´wtð ô!0)Ã2ý³ÞŒØÙ#vÌ™ôÍŸ2ãóDþˆAT7üEyÍ-÷è™+ɳ¥5µ·«Žmh­>vhõ<¯í‘`!D60¤gä 阻ÐÈÌ ›YO 2rŽët¶6'Z«º[/·Ö? Þmàp¸éy^âq+À|@VZý€Ì´Ù Ri½ŸÞÛÓêô€ý Â"ç ÷>Œ@IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/image-x-generic.png000066400000000000000000000016041321075051700316170ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ «1Â)IDAT8ËÕ•OˆE‡¿êêšÞžÞÍÎf1D#ŠˆèAÁ‹ÍÑ£¢g!G ˜ ’\<+xY‚ƒäLˆ ëuuE#ncŒ&êšÌ„=d3;{»ªž‡éig2h”äbCQÝýÞûúÕïU½†ÿÛ¥–N,½ ,Þcî±X<øòA±ÖªòþÝÃÙsg„Î9õÁGgøvígtú¾‚xA "x¤¸xtï~ëUB¥+ßüÈž'ž'ŒvıãfCcÇ:sëëÖú›µžõËQJýµ¢:pÿ})¯˜¤Z©òÙÊU¾^K @œƒÜm`çi6u!M‚€©$â™}){^@)Ãþ§›\ÙØ¡ÛS8ß;'8ŸÃz œNòwB¯¦ ­ÃðRTÊÛ-Mjk=ÍV£Ií" ÁÀ¾q6£Ñ¨Ónl2ùà¬óã+`2.Qßœã‹ÕKT§wøe£Êd¹„÷Rdâ½à½ðÇOßá¬åfý ÉìCÌ-<Âo¡×XPI"PŠv'¡ÝJ!˜$¯ü,Âfíw®^\åáÇ÷÷e´MæfLŒf,"Ø,£»½9º7ó-åEHÓ €^š²¾ú9ÆDdÝ[„¦Äîùvš7°YJëQd¼Ýlqâä†7²÷žV§K«Õ-Š…Žr˜¿ÖÏã¼pþä9<ŠÙJiTŠ¢’¥pΑ9‡µBh&Ø531ºïèµoÑjw0Q‚¦Cezúq°ÁñºÁîyl–ÒëlóÔcûˆ&ÊL•5õµQ)´ÖÌVgÿS§ÙÚÚ¢TŠyéÅ瘙Š1ưváZ‡ ð³OîåûK—ïÜïUF Þ{ÖXdé×ß|?ˆã˜·½6= Q¾üj…k×6¨]¿þáâ‘£‡BïýñÓŸž~çnðòòò{§>9õ1àQy>ˆòšMäÏ! ‡F˜Ù¡ÙÐz@: ,VÁGȵg•ÏÂI>|þ?ðQŒ)[@oÿeÈXGm#ö?ÂŒžØ½`žIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/join.png000077500000000000000000000006551321075051700276250ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà +ÿ~ŠÃ:IDAT8Ëí•»JÄ@†¿ qM0•—¤°,•-ìµñ|_A°ZDB¬m]ÅÂÚErÃÜÄX8›d'¸É¶ûÃ!„9ùòÏÏÖÒÉ„;YÇJ"ˆÐÀ¸œ±Dƒ]ÇK˜(°È°É°IðÆ'ñ´ägOš¬ë¸ø±K€K€G€‹Ç-÷5·Ê›û»&(íÄúÔzE ÍÃÇÅßX_w88äÉo)žñÄSŠgƒôî°$œ\xÞÔ»›QÍŠWÌíãùˆFÁÉ€u ,;ñ¤ü¥µâÍ~åÓ·íÀ“ö»W±¼jº-ámµZÁ¤%´£·-¯>'øÇ2ÀT•;¤x”ø„|®ÚÅ“ xóÍJ°(¿Q«+5ª¾-8î¶IGx¸–ÂaàxÖ¾×Ôb@k½ÿ™|âå\âˆL½5IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/license.txt000066400000000000000000000351471321075051700303440ustar00rootroot00000000000000 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 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/lineStyles/000077500000000000000000000000001321075051700303025ustar00rootroot00000000000000lineStyle.dashed.png000077500000000000000000000005371321075051700341400ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/lineStyles‰PNG  IHDR-j„GbKGDÿÿÿ ½§“ pHYs  šœÿIDATxÚcüÿÿ?ÃPLCÎÅ£Žuô¨£GM6`Aæø¸0Úž»Ä`ýã'ƒ4. ìl ¯ôÔŽî<ú²¸ªcÒÛ÷ †ø,“•f8zñÚÿÈbvÆŒî·2ØüúÍ €KÃ3#†#k¶þ?‰áèçODß~`üõ›Á —¬, W?gx€.þú ƒÍǯ ‰xCˆ™á+Š£Ÿ¾fP|ó!æï_\ú¾ÿdØÿêì!-)Íðúù[†õ?~2œÂÒ²’ OÑÅEEŽ0A…HJ0\@“e¸ÿõÃB!-&ÁðÆg­ÆG=êèQG:zPWNO‹<@[VIEND®B`‚lineStyle.dotted.png000077500000000000000000000006221321075051700341660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/lineStyles‰PNG  IHDR-j„GbKGDÿÿÿ ½§“ pHYs  šœ2IDATxÚíÖ1KaÀñÿ«ž«B¨7˜PCXØ–5E--675´õQüÑØÒA-ECAåP%éçÁeTZoëÝAà*¾ïöð‡‡ß³½BJÉ ½ÐÀ‰Z¡Z¡‡ ñ+‹bþú†9 <›ãäàT^x{Æ›®Kb<ËyùRyÛĘXw:LI®*5¹ëmùi±Úx¡Q{x’ÛÞ¶Ë÷Ï¢NÔ¥~<>´ÙD·Š4Óæ6¸ m³Ôí1Õ²x ^oµ)||S ‡è>t«EÎ~g£÷ÃàC7-²m‡5-B(õãñ¡S–i³„S#¼yÛá±<ËbÆu©¤uƒh}”²ÖÁN&¨[:Í]ï—­xŒZ°:õÏ/v¢N°ýçêï¡Ð ­ÐÃþ>PxQ‹£Æ¸IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/lineStyles/lineStyle.none.png000077500000000000000000000003331321075051700337200ustar00rootroot00000000000000‰PNG  IHDR-j„GbKGDÿÿÿ ½§“ pHYs  šœ{IDATxÚcüÿÿ?ÃPLCÎÅ£Žuô¨£GM6`1Í]®Þapøó—Ð9’™á£¶ Ãý§þïAqôóW rï>1ÄýýË ;ØÍÌÌðøù+†{!-)ÆðèÝ'†Eƒ5¤%ÅÁøŒ£Õø¨£G=êèQGjá!¥åë—äIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/mirrorH.png000077500000000000000000000010351321075051700303010ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà ,5ï}ªIDAT8ËíÔ1hQàïኘͩ• l:Á* á4‡ÚY(A8I!*Jt±±±4¸E bc™JAH¡ÆB¢\@D¬\TlŒä¶‘³ÈÙìI²îÆ Xœî½÷ÿÿ óÏ<¶[ô¯?DA8P¯ÖšKv«ÛÀ0Þç8•zµv±^­½[ê´;½û9òA\‚p ·1€¡8MrbãXE—qoñ¤LxwÑÅ ªø„…îöâãuÆýU8  œÂÙ8M–q3 ¼,hËCŒÅieܸaŠ;qš¬õe“¸©L´ÃøP üûz‡8MÞ`W1¹¾âY|Ƶ(+x€ýx&s§±á(^á8®àRœ& ’3å(Î`#™9k˜ˆÓd$ô0—ù0„؉Ù8MËÌ{†[xŠ#qš|Ï÷ N“UœÌ’ôc Çð|ÓÁŽ‚ðpÖŽ¢9n”pê³L¥ÂEñ³²ÝÎoüjn%Ãíù n~C»*Ó]î—doâÂqó.w9ß*«"{k ±èûW¿ÛaE›7¸‰1ƒ€Ûfñ³X}kb*§lIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/mirrorV.png000077500000000000000000000010731321075051700303210ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà -G*LiÈIDAT8ËÍÕ?kTAðŸ»!è#ÛØ>K µ?€àŸbcõ@QC"X(XLa‘D±°H¢±±,EÄúŠ5*‰k³—¸»&§š¹÷ÌáÌsgøG–¤'šåÖ-N*ªSÍ@5µYCãËH  /Ä|dùžõÅÅŒÁË]ªý%: „%ìÆEôál–¤xŽW!æóPZåÑ÷a—0TWšaÆpj[ZeY'0…!æ·!Ä|ïðÃm‡˜ÿÂôdIº½:Š«õüŸ5^!ù\–¤Ÿp0KÒóx26q¥6VC7îb_Qi抽ptÕ/«8zCÌßÖ7²$-7ôqÙæÍä-ˆ?ø>¿ÂÓÀ[xàÀžuÖ¬Ù³öÞœú± }Zÿ—pJ©(z|a8¥´§ êUÑÕÆ–ð‡Úð˜ïEø®aÏÚðÆð&»Â7lÆz|ÇŽî$n¸žRéàÙY<ˆ•ˆøÇ8SÃëæîwÈøƳç <¬á~ÆnØXeW qËØ’aÛK;î0"B?1+5¿vsñ£ DÄ0ZáÄë|@nãRJi …ðiÌ´À_àh;€¹UመÇ{œ¯ D§j„gq¤.ãÜŸq<¯xv oj¼ß‰E¤l0–±5"Ö¯++º7ÃîâF›nùˆÑ2Þ‡ͳ"+ÈÜÄTiÃ6œÃ½6ýý'Êø0^Êó 6à.–½Ó¡¿Ob¶Œgpaõ¬y?Þ–Ó5ÔAx_Ë–\ĦZá^7.cS9žþÅ—RŒˆ_k°~]¦ñ¤Á(fIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/polygon.png000077500000000000000000000016251321075051700303530ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà ' ³,Ñ"IDAT8˽•]hSI†ß3ç䜓INM“þЈLH[KÅ"BÓ¦±-¬ÖE,hÕ"ÕØÊ‚½*(ÙÜèÒ½hÏ^íÝâ…E­Þ¸,, …®¸Z ­ÿh@ÔjýÛÕÆ¬IÚ´=Ú“Ù«HHZvë ó]¼óÌû ó}|¡Á/Q'à°å<Üj±X”RÍét^°ÛíÕÿ™(ËòzJi\4ˆ¬jUÕœÀ +-)}ãv»óíåòÚ´Z&≟-f i«Úý›+Tq*ê˜\{‹ÛŽ>¬xÿ‹H¢¤—ÙËBŽMLL\Y ÌÛl¶3Ñh´£bUåüŽ’ý…·‹oˆ$f`ôQYxË}í®/}°B›×`-´ÆlE¶³‡ãðððp*l³X,×b±ØšÕ±of·áÇ ‘Lhvœ,˜^yÇxóëPüºóïQÒ××W ï“4‘RºRú|&9³f—§=¼õåö.~Üð>–sšæ„ï]óÅ2ÎþÎl2Àdú@‰¦i£…J!i[¿ëW×HåÉîr:NÇ3l†*вlÒuÔ9¼£®‘Ê,WK§’’ÙdÒ‚Á é« ÀéܧÅRÏ7“©iR:L`zåS<Ë·qXòœWÎùuÌË9Áz’—e9–YªŸÁ$Eê r­úºáj[D›\)`N™ý¶cªë‚!­Â”Yg:'Ër$'8ñx»ãº*]îx=÷ª´X)FkKë‘H$ …ZM{ö&».‰yR 0æ x‚ÇößCûŸÍ>u ÐÒØòÀãñø{{{ï@mmíé±Ñ±ýƒÆmûf\‘ ÄÓàÙÕ¶ûªÀ'Ie#kjjz6ç*wÇs‚p„¹$·ö~i#íÏ0¿ß([»ÕÕÕ½ïééÙ·Xƒª¯¯ÿ‰ÂV‹ÎOÍü¦(6-p\SS“ìîî>ªªêR{4¼^o?OxF@˜,ÊLUU÷‘ªªôß´Ö†††ï^`E¶"¦ªª²¬ßÏçû®¼¼\û"\gg§ÿÇø#ùU½ê¼IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/preferences-desktop-theme.png000066400000000000000000000006451321075051700337320ustar00rootroot00000000000000‰PNG  IHDRójœ cPLTE.¿PPs%221––1P>>>JJIÜPPIIIÜI%sbb1–nnnHsÿ=¹¯’IÜÿkŪ½ª%øHÑÉk±ÇÿßÔŽÿÔãøâ±ÿðÔéýtRNS@æØfbKGDˆH pHYs  šœtIMEà '0Í©»IDATÓ}Ñë‚ ༠¥IV[º'Zyÿ§l™‘4Ç<ÿü8ƒÀû 1›¸^ÐO’Qd¸,B(%ª÷žËÙC©ÖêçT&®Ú S×=§z\½ŸmóºÕ§©®Üª0ª4Õc[“³Ñdܪ"'VÏH¸™7O–qÁ¡‡Œ¶s˜ÛѯØÇ½s<4Ë‹h¹sΧ_&g뜳ž~ÞK÷Q·^Òu¾Nz¡õ««÷Lÿf±9¹ýÉ~¬ x˜ÁƒÆIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/preferences-system.png000066400000000000000000000021771321075051700325070ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  d_‘tIMEÕ  %yÙQI IDAT8Ë¥•L”uÇ_Ïq)à¡–r„ˆÍiV £ î…¸ Îei²¦ËjýáX îÛ“ÄQÿÐäÈÖšc-Ì-sÚ&±i-Ø”g;©C%v»8‘.@¸;ž§?ä¹çAm}·g{>ϾÏkïïçó~?DÄBàý¹ò= W–åvþïBh£·G´™™iÍåúMBhÅ€ô/¯J€A/ Q6˜›>=¦ª¤šÍìÛ·—„„„ó€¶<§¼%åƒçÔœò–S‘`I‘ Ëò0`¶×}ÄÌô=222"UEB³ï±Ã;1/gMNyK»–ª««eÀ!„8®Ã­V+’ôÀÔ(‚]Ÿí§§§‡ƒùË -éñ…F`ILḺ7—cˆ‰}¨Þ²e ›6mDÓT$IÂ?3yE‘%Ëòµ(jÀãñðá÷“æÐÑš››¥%;Ÿ\ºô!~?š¦¡iZdJ¦¶Ö`žk•ut6½DÞÛ§õ­–î“e×B`!DJ||ü¯Ïo/4=þÄSH’š•oüî}ørµö:óï†Õ€ãjó+ÁÜ7¾2EÝ'ËÚ£C‘•žžþ¹ÛíÎÖŸåææ¶m+\ò÷_ãhšÆ²Ä$Z[[iêŒå熱¾sfžÊp®´ˆŸSÐZUu”±; ×oþÁÇgÝ|{¼˜‚#g„šô“8ÖZŠ9qáßTåSõE7%›¸\ý–°êý‹îËpÓ+C¯^¯JMãrý.Ôµ±ËÏË%EÔÔÔèf5|8tÏödn^¢ŒñIËV¥¦Q±#³ÉÈúŒu¤>š†,Ë–H+ƒ¾ZjEPH4™(´$¡ ypõþ„Íf#>.–;Þæþ7 ‡žÜ¨`úúîLí~†¶‹?ðcO?ŒÌƒ!¯Ê²ÌʇW#IÒ‚pC$ôèkVöçqú»vºúɳÙp¹nðOàóù¿ßŸ-Ë2+V=‚ÇÅÅ…à=EÊÇ+¿õ,{¶gsêÌE=^ŠŠKp¹náuߤ£_ÅÝP__×n·ß±êÊgü~<@ee%€#V†<Ž#eOSZIë¹Ë z¼Øž+œ ŒöZ¦w°Xét:N§³X–eÌ©i466âóùB0êwéëÒ˜U5F‡€NüÞV ¸.æ„$†ÎÎÎ 0<11±·¡¡áë±±1TU½ì¡ä­{Á®íÈ7cɶðXЉ_únqµ«‹Ž~•)÷¥üѾ6%b&j˜Ug`˜‚À¬`Åš”­ç;¼½zƒîMMÐѯg˜,P“SÇ%Ì÷:Pÿ£¨sð é­‡¾´Œ ÷êuBbìÚë­#á1 ƒJQb¬Î] ýŒöÞñb ê*IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/rectangle.png000077500000000000000000000006151321075051700306260ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà ( ªâ¥½IDAT8Ëí”ÍJÃ@…¿›v¦-ˆ`QpQ\ù¾I×îâkô-]dá²´ÄŠ6ÍI4Sš¥B/æÎß7‡;ÃÀ9þ}ŒBišÞ Ûô‹É„Ûé¦j]Ó"ª¼g<Ë7lŠÀÈ"ðìæšÇ©›×Ë…àLò(x“È#œI£*—3ðHð 7˜?»Ë†QÀ½½nÇùj[XKI­²Ö_’PI»c€…àߣŽyY' Sh6; ’í½†Ø±DUÏcî‚ûs¼‡T\Šøòª§äëËù‘ë}ÇÃŽR”¿pÝ Î–+ƒä ù``†Cßy­d¦*7d/E9êç[r˜âhÀïiš>÷'`fç¯÷oâb~‡?•]ê‹IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/release_note.txt000066400000000000000000000002261321075051700313550ustar00rootroot00000000000000************************************************************ Version 3.3.8 fixed: crash while saving an SVG document and running the app with Java 9 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/rhombus.png000077500000000000000000000014741321075051700303450ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà '9å­èòÉIDAT8ËÝÕ]HSQðÿνóÞ5E2·«¹©5uºÍÆÊÑô!¬TÊ¢·ž|³@*$B¸õôšÒJVˆ$Ô›A¨sŠ©¸/ui:S7æ>Üé%cdSÃAÐÃ9‡ÃùÁ9üÏÿðß¶œœœ‡J¥òuJQ™Lv€ƒ3 Ó‘T*•^Gaej­(OáCኊŠûûEÏ‘$—çÊCw/´]¹cl³äË_! ëõú¦ÎÉ6$I•Ïçëo^T76Q!žŸà\yVá€30}zjfò¬N§›t»ÝŽ=Ã"‘Hé÷û?defqêµ×n¥‡2g€Š‹ÒˆãÙòÏS+U.Ë¢×ë?º\®™]a@ ƒÃ<Š—V_Ùxïà†à˺5RˆÙ¡ü‰ñÅѲyßÜeN÷Öétú”¸àóùÂH$2‚8ˆ¶T6<Ê‹F‚‰*›®×©®Úâ1Œì#öÁêêêÜd0Ÿ¢(G$Ͱèê:ÅQé`"”0þš‹xâå:uc_0LsŒ á6¸´´4@D:`ŒÃØR”þý$æn mnÉdòmðÐÐÐB‘¢ˆ¡h*öf¨§y6ì*Þ§—ƒß²^Ù­ç¹4‰L¦3—¬VëÀ߸¿¿¬¤¤ä†8î~Ù¼Y”$C×ë¶Ñ§µ1ˆqM&Ó®®®ž£Âãñx-cw{Ý 3+Se…B…# Qˆ†¢!þó‘'–Õï´Ù\s»»»»}Oqìõz'†™›ž™®õ\'‹…ªq‚C@G7£<›½³öëÚ<ßl®yÜÛÛÛò×_Z«Õ¶ „°\\h5²­ÆÏN)ð#Âf³Ù¶¯|¡ÑhÚ«¥šUåQõ`£Ñø.%N¥R½ Ø`0|bY–“²œ¬P(Þ———O°,K¦¼Š°,KüóRö±»ÿ½ô. _IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/rotation.png000077500000000000000000000015531321075051700305230ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆtEXtSoftwarewww.inkscape.org›î<ýIDAT8¥”Mh\UÇçÞûúÞŒ3I“LššÚ`ú%­ -n-+Q£ " .lÝUèF×nŒ )ˆ*‚vQ‘¢f£#f!E¬8H?¦mÒ¦›šf𦙼ãâÍK3i¢üyç^Þýqïùß{DUY"â{øXU縓PÕmê2ðоô¿•´æ€ó qïÚÁ3Æxa\Þî¾SàK€ö¬Ùyáùg,=1òý¦{.:—ÏÀ à}`óJ@Éj("œxt÷¿t•îUI‚0œ ÎTuTO}–Ÿ›ûË p VÕŸZoC¦²FäÓÎÒˆv÷\Qç * oT+O=‰»ñÀ2Q¡øú¯Þz…Uå^äj¶ö!tf¶Bñd…â…§p hX& óÿþø7ÊÃ?lÅLÅñÏìgÕ5 ’šÛú–&DÔBÔ\3`$•dù<8 æ2‰©§Ëw,wäw¹Õ`ÿ³FÜm;ü¿ñ7 ­£HVIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/rotation180.png000077500000000000000000000014601321075051700307510ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà -Ê"Aœ½IDAT8˽•ÉkA‡¿W]³eÔ¨ã60‘¸aÔ¨ ô¢‚ j .x‰ˆˆ ‚ xñ*Š€Bð"ÜEQ Aq!BP/ǘŒ†ž¥§ËÃt´t"®]U]ïW¯¾~U ÿÈ$`¬ä(˜‹ÀͲwõ@ò¹º{Àó‘‰jôJê¬Rº¸!b=¶ú |ÒÀ°xÔµƒÀ,m8ñ²¹éL÷ÔªÀˆXÝÀNÀg÷Àá‘NÙD9&j–-oÏÄ'ÍŒ¥jÖÉ´ ÊÎöUém±ö€^n™ðIW9Š$˜ÖÚºíYWEÉW¹’OLš2?¶¤ñ”jl>ÏÔDs èÑï€meÂÊ¿˜_øÖnrÎÚÉFå§LÈå"’ÍFÈÚQBá…ÔÎ;«ê_&ž5[З€_¼åÖÞs¢ˆ:0§n³¶Â•’Ëkœ‚Æ)X8Ž×v,œ‚¦XLâä?ƒcs7Aï©H¦Z$kGF‰•ú¥v_ºeãŽ.UåU‹…Ôc¤ûņúÉÙ²nÛè0kPŸªÂ `lÚÁ=öáý­þ'[xýò$™Á^rv”ãçÁ8î€ì"œ V•òÍb€ £mo2ÓgÞ73f¥MUu¿ÑªÖ]Ehðñ·Þ‰[ï‹íö”31 ¹«Ð±+÷›ÒÃ×ã¡ÐF#ªY·Göû,HÅ(ŠcéRÚ¢ëyHôêÂO+ wrù\;u„³+Ñ ¨ø $|ŠNœÅbY “»e&àHÅDñ{œùáýiLSú‡˜@ëxß%U^rÝ®Îy·Ûnà°e\ãØà W ³½±h±x¬´â|ië¶÷gú64âj7bNe`8\&Af7çvŒr[%Ì+Q^%Ìß-ÿR¸úÇWÌÏM ˜yˆ>ލê=’®½Iõi ñ؜ܲõ½Ù‘ÑP‰òH˜#c³„Î2{çw¦¯×zíR›ømU=*Iwo'#4¥ªÏŠ˜Ë…ÂðXq÷§ÖxžQ,¡óh“¹$vÎR«–˜¾6Iké EOU+"rØœ‘íÀsë7ì‹L&kœ³¸–—u†ÎbÍ®UK ;L"ó»Ä ¼n½\42º×MŸ ™e)ð –-ûflwËß ,׫}RN;Ø×Û·Ñ,-åPõqî~vé8t–V ês'õIì á*’ㄪ6€WUµòÃü\‰óg^ަÿúšÅ…p9›NËR«žÆ…e9€­´3lKFU«±öE×ú÷·›×Sº¸Gÿ¹õ‹‹a§ô¦O£þ=÷™æCgù¿ Ð>Ì, ÖôG}ý“:´öo]3\ÑžÞÓ è+dÊ?±úFÒ•w;n›GaöçÍøÿ‹Û§kŒ˜úǚɾ)®õ+уø …‡$wCü 2•S~üˆÜÙ§µ14†ß2޽7Œñ‰¯»Ž.wÅEÂï°8ä!¾þó˜Æ(hÍ?p˜`п’ö¸’Ôæ±&ñÈ˃O@"bcÕ+B¨ª­ÿ£ þhWIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/rotation90.png000077500000000000000000000015051321075051700306710ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà -]ð˜ÒIDAT8ËÝ•KHa€¿wî\ÍG¾(£ÄŠˆ ²wô" "ŠdI ¡AP!µiS´‹ jQà*£¢¢¢$"j#I¥ôÐ0=4•›Þgþù[ܹr3ÓѦ??ÿÌ9ß9ÿ™sÎÀ?‘Î\`Ç(Ïû€vààŒ|©ýEPeÀ¡¾)S£…Àš uW_€©ã)Î@O€uÀÏuã)!gL¯~oš¡ƒf j ›Àƒ± y JJ–}ݾíIËæ-ZgÏÙÛcš¼¤Ñ ¬a“Ì^†ç¢ÑªâpzÕês…ÅóQBÚˆÀöä€Ýþö^ä]ëÀó∧ NSáÇ›¼ é`DGNnyáÚªú~%”­„Œ*°¤oàû:®ãÒÙq—ÎŽ«ôãˆPÇB)©.¥ƒ··*uK§UZšž„¥ ¾¯#=_¸ŽCׇz¾~¾Œ€vÝÀ ”ñ´:‡-+O––UZJY¸N×Iíár“géç¨($_\ !€xzƒT€ZY6c«îy1\7 J‡¦9I Júº¯«Dªã®‡ÕÓ˜ Ó÷=–=!'^Ý@†)N‰§ãKÞî[È .f¢%zPѰ½/×FΊ5 Ý† ?'wšu­V…²Ó]Žø~¿0äØaŽBYÀÐNB`Ųª‚¢ƒÂŠ®ú)òÁ&ú{k¨ÃêúH}//ÃaÆQ´@YÖ¢  è†*žôEM,ú¦ £RÙhþ3²ßTcÆÃÜf$ Qèo&ûÔNŒÇ1ô  }‘²¬3 P»0»_“Ó¹ÓùX}H ‘‹0Žc·6mÜGä•-Ÿ¹n¨% iãO}ƒ5•m˜:ÂÔÁT‘¨ì„VІ‘¤ÑFéƒj@†WwpŸÿB~˜23Åe(±‰IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/roundness.png000066400000000000000000000004441321075051700306770ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEà -&’J ±IDAT8Ëc`j€‘Dõl j ZP¬ÂÀÀÀ‚E]±º300œd``øÃÀÀðŸL˜200ì#Ò0¢ fa``XJ† žB¡8 Î¥ÐP¬{Ax FOnO¤IH~¿Þa—@æhéš5 ~ÐôÌBŒíY |ÅÀÀ`NN.\CÀ`kr³÷s<†Þ$Õ0&$6'u§)1øC+ƒF |Ó ^AÝâõζIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/select.png000077500000000000000000000004721321075051700301420ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœÚIDAT8Ocüÿÿ?-- ™9j0"dA‘@P,þoÎgPÑØØ¸ä`êafhFXªh)`T_»Á>Ø“á ˆ†Y’©©¿p‹a¦Cúù›ÿgõ"»ä"d[Iaƒô Nƒ›‡l0²)†B} F˜>Ú'7 m°p%—Fޏ‹k'2Ü€E9c8ŒæaŒa#ÎÆd˜ƒW }”_³-!>H-²zät ÏÒ ª3¦hä¬ ã›ÍaYÅ`¼F¢$ís‰"¨œf.xà+'M±åÍIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/separate.png000077500000000000000000000007131321075051700304650ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà + ª?’XIDAT8˵Õ1K\A†áÇÍ‚Aˆ‚˜Zl ÅJKË`cc µQ×BE!"!ˆh°lÓ¤)òì-ü‚¤KB¢‹+6^‹™àªëÝ»»îáp™Ã;ß=óÍ MŠ–˜s˜Â›:9W8Âíã‰$ Žr`>æ.˜CwF‰E|F)|à¤ô¡'ô’RhåæãÔNq™«µ™ÿ°Dr ;eÐmcö‰âjñË$çú+Ñû±“Ðñß ™âï¡[š‹n˜ãíƒúLàßú3@7±ÿöK°i?¦UÚ¼[˜©îù5|@+¾b<¸l:.ÿ¼‹Þ”’àцïeïñªì¬=ÿ» ]iÇ 3‚Ég»™¯Ñm…ÃDja­>î i<åÚ©\¾×/ª8ÃEÙ8i–⤪â|}àË ðbCàë6ÒjJõ€×qƒ×)OÔ'ÍŒ;8}Nï¶ò°%IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/shadow.png000066400000000000000000000004721321075051700301450ustar00rootroot00000000000000‰PNG  IHDR‰ sBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<·IDAT8푽 ‚…¿JˆŽ½€«øŽnn­=à#ô4N=MKÐ8·‰ ršjˆ¢Üá ÷ãÜsMKjµ(í7ÄÀf&ç"éú0G@3g/ Ip Ãp[–¥Õ÷=Y–Çñ)I’3€išŽ¾³m[<Ï‹€¾áËà|9u][Q£—‡ax ¼5MÓUUµž’È÷}\×}z“Džç`7øªÏthf½¤n àQãE8çÆIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/square.png000077500000000000000000000006351321075051700301640ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà (%v4¨r*IDAT8ËÕÕÍM1†á÷óFʉ IJàBÔ@€ö…¤hÚ¡ò#Îë";œ Ɇì XZÉKFãþóðc|eY^ ¶åápÈh<ùhÖ’ð¯má»1I›Íå|VÄXœíÁç£ñûõÍíeÁÀVÔ¨­¦°€[Mm"˜¯ÜD0áæ¤¹ãöü8½±7Vh×#n°•~–Dê’ Ã)ðs0WGÆd¡ôd,Iy¨]ä &Bì‡Ê\=‡—…¦ýîÃËC1)„Îÿ8 kõÇ^)”ƒ¦XOóPïntsõ£8';è7 ²s»-ç³âéaz—J-!¥²§‰I"°K„uLo‹×ÓƒpŒ•b¬&Çx56pY–WÍ%ýËñò§ïÜ'-¹PBIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/stop.png000077500000000000000000000006461321075051700276530ustar00rootroot00000000000000‰PNG  IHDRLÑ¥ÜbKGDÿÿÿ ½§“[IDATxœ¥‘±/qÇ?ïîÄÑk«Kcaì``©´ƒ„ÍjâObb´i¢A$ÒÑbè¤,:‘j¥¤r—.îYüÎ!®ƒoò’÷û½÷yïýÞOT àQ²M17ò@¦Y£ÛUå^äà.‡'ªÊ¥d^úŒT"ÆHNsÔæ;¼Ì©n:Ý®K¦`2,™Ûê5P@T•‘‰I6ⵞÛT¶U÷EU¹HÉÕ|êÇîF}wÍ×e ÀÒ êÆÍÒ Q‹$%&8'Srö3°þ¤e`©Íál™ÀÁçn«àÙ¤"«‚•-1^Pœ¼!KØ…ˆ<§W§ß2vN¯Mk¾!®Uí¦Ÿ2pIrŒs6)µE‹½AÀuÈn¹­+ß`ÛÇ­x+¤6þkø•ÙQÜ_;!:ý\„üMìlg†¬7hd€¡à+/êNC‚zîÿ_Ûþ;“wb9pIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/subgrid.png000077500000000000000000000011221321075051700303130ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœtIMEÝ$'r0”{5tEXtCommentCreated with The GIMP for the TeXDraw project|ávžIDAT8Ë­•AKQ…¿Üq@pS±àB nŠ] "‘ê?ÈBkt™m~C¶³KéŸࢋºŒ-m]Šhj¡-]Œ$Yµµi‹¼I_ãÄĘ ÃîÜ{8óÎ}ï™$ŒfDf¢ÿHµÞÌŠÀ½Èþ:²A„IrœV”T¨›åïJÒ€0pAÆÇ8 >Ö _ÖálÕSGÝ,_…Óvc0Á‡ö|~ݹ]y¦x1%½J‡ÒQL J9œÂïÛðhkÿn Wv8é¤pô/L¿È&+ìÇå«mxÓ YaZ «pê#Àá&—PNKaŒ>+€­¡Ž 0 ×ðÊíùq˜m@XÛ‚•!§0‚BO.¿ÝPÞà3À´ô:îù™‚ʳ¦\˜e’ðüIv`ö%*fËqÏPÚË6 ÷ÛãΠ[æð=ÀqŽóv…ß Ÿkp.ÿZƒ¼½ìïéø‰€½æ†¿Qתw=‘«K\Cߤ¥®çÕÿG_ª[ýÇ.ß%~7ÉÓ‰„7›O{¼F^ÃÎÏ9rözIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/system-software-update.png000066400000000000000000000026701321075051700333160ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ ~>èÇEIDAT8Ëu•Yl׆¿;3¤¸H")‘²(‘梱§²o©k$°k#J‹"5Z Ð×¢@ÀÍc ÷IFûØô¥ j5 §í¢R4V­8‰X‰K¢eÙ%‹ZHÎŒ†Ãm&‘Õˆ/pûr¾óã¿ÿÏ~cx—§œÎÁ¾ Û¶{@BLï¹tá\úÛjÄöãI¸»Áûe,ÕÑw`ß^ºâ!Bê ›f‰Çk÷®19»HµfýþÒ…s¯?¼lo}tâ{ÏFOIQ©Y8k½=\ýWû~òz·lá©“ùßí9¾º·`Û`’0×0žYFrù¡¢s|¨E‘‰ø%ºâ{xÜ–øL]ÞV|<ÙSèˆ1 w®¿O¢ÿ6`Ù[`j–¢8ùñK/ðü@Œ`S€[SB X&á½ÞŸ^ÝãtÕ5ý^F§uä–›¥fÅÆ¶Á*5 CÍs°¿€–P3ÇŸëgg˜é¹&§Óø=<Œí ì€%Å)9œ µ,eÛ‰n”ÈŠlèet£Œj”0Ô5lÛþ¿ymøX\Ù µ¹‡"s¯û€øé¶Ç¸<®ª^¬(šQ¢Q^§8X\OSÛ76Ôj”T›ZÍB–wô`š&]Ñÿû„ïj¡cæ¶ ¸·Áo«k¹3ÙuÕ÷¸ÚÌáXñÝùÿºµ€ì Q­Y”Ê.~÷öG+/ìa 'Ža8d‰ôªM\5Øûpzhßi­ç Ë÷ר¯ƒÎx€€ßÇk'pé äTƒ¼VD“›PmwÒÑ4 ]×ùàæç´Gã,gó„3éünÿV2ÌÓ÷–‰7»xïÆgX–õ÷’ Z.’S‹ä´"ͤ°i²¸Q¦P( i†ar¨?ÆýGYÂËó½ÀG2@&=>N=è©÷Z‹„äm¦ª­àu×Q©T˜"[r±iVØ,–Ñ‹%\–JgKùB‚f~qøûW®&ç'»?+»>øÓû_NÝQÊA·ÛÙàwúð­®1zã6Sùf, ª5‹r¥F©\%Wõ«eªQCù÷•åÇþ:¼ÍÚ ¡Lz|6ØÞ?øè«ÇÓöò-;„ÛÇÌÒ&+º¶YÆ0+˜¦‰b—I„<„ÚbL/lP}÷rá•ë à•çáŸâ‰mÚö3?»p1‰w%÷¶Ðò³2÷1Gcbâcš’XYͳ°¸Êë¿yu§ø&üâ—ð ö$X¢@+Ðë9|(éù‰D$ÑTvœ&UFFFvâb늭Fb÷ꚟŸ'N“ÍfÉårär9¦¦¦¸víšØTøF@ÿ_?ÿXf &IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/texEditor.png000077500000000000000000000007001321075051700306240ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœ`IDAT8í’Á+DQ‡ß5’h(C!²Q6ìfi55Di°KÖò—HIìÈ‚ÙXÎvlX±!$É‚Íóý^÷žæea3³˜šS_¿sÎ=ïÞóν.Žã¨ÖÖˆMµgkc›ló¢=ôîœ[Çï‚Èø|zÀ“üðq"Ô.àäAoõ r0_ÔðŽVAÐ' COa,Ô%§ƒàÜÛY«1'Š&}Q²±÷G(î…>X‚bM}–øf`†ÃšÔ.à†Å”‘{"ñ Çp ãŒa Õ_~"kp·ÄϨ™ml™¿N‘”f?0 Á^p^¡A5ÇÿLxGG»µ…tÞI¼¨ÏRsf5vò±M¸ yü~¸‡QPç+ ?݇äbÑExƒ|ø.5 N`±*øs¨}G4u· êjA3Ï C°eb]tä|—òëj©Žë¹skc›fóâe œESl4…IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/text-x-generic.png000066400000000000000000000010131321075051700315130ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÕ +ál|¶˜IDAT8˵•ÝjA†ŸoVšœ*â (*þQ’µ½›^D ¤=Hb0öÂúGAQ<Ú,(!e÷ëAÜ͸Ü ¦ ;³»<óÎ;ï0ðŸJâÎh<¼>SÕ˳÷çw^ŽÆC=´Fã¡Æ¼BzÖÕj…çy¨*"‚Èâì~<¶”R­Vw8° ˜ÍfHº:ªšy¿Ül6) Ãpgü”ú\°ˆ0Ns7¬ÛíbŒqcPUÚí6Åbñ٠ɀ¿ÿø†2@D˜L&¹ß÷ Ã0|òú”J¥Bôz½§Õl}¶ãdEˆËå2Wq«Õr÷8nµZm¯bÏó’ç‚ÓKŒ7Óž0½t'+¾|ýÌ›Á[D„ù|î7§Tø§J¥›Í&±Â“¨¶-ˆûQ¹y¼^¯‹ÅË»êõzæp¤}wVloÆ>ûýþórlW£ÑHÔÅ ÓOUu‹[¹\~‘«)GQtuóéúüدŸ¿ßeî¼ÔdGÀñ¶¯x€{àp ÜmÇáö;ÿÕ°3ôÓqIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/text.png000077500000000000000000000005151321075051700276450ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà 64×îÚIDAT8ËíÕ1JAÅñߎ-LP°ô¹€è Òå9O ×ð‚EÚØIê´JRBØM‘)–eÖ,˜€B^3Ãcøóø¾of8ëÔ*2Þ%ƈ¸Hk}_÷">1kBb|…[¼`…oÜ&%_˜¦s}<žÊ $¶$žã­æ]#bÉ&y<—ÜåJ2ÞËLÉz© M½ê˜xÝÒ‹˜àM-º&nkr[b¿û!±?™¸¨Ííÿ«ö¥8Yâ£7/¢WíoåQÁ÷ >HoÄAŸFÇ‚uÁGÅ0ùïçÏ¡“vr„J ®ò–IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosB.png000066400000000000000000000013271321075051700304300ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<TIDATH‰µÖÏ‹–UðÏyë-4:i®Â! *-’@q“  éЖî•Â]‰‹6n‚rSC‚®‚ iÈqƸÅqÌ)™œãâ¹/<¼ÒøŽø¸Üû<÷{¾ß{Ï9÷>ÌÔQc0ÉäVÇ>™ºl=óÀþ†¸óJ"âk `43·…¨{±~¾ä dæ<|òŽŠ=è¶€~š"~q¼+ky»qè¥"¢7"¶EÄ‚¹²Âþ/&"Þˆ#bqå §0ƒqÜÀáúiÄØÇŒ&y‡§¸‡m˜&~À?¸YøöÀü‡ƒeG'0‹uÁêšÈ§ÜÆv<ÆW5Ì&°º<ÿŒK Ulx=3gqÃm±ÃlƒG™yçq4"VFÄ&|Š3™Ù:é0ÝR߇EµÕŒãZ}ø¥-$KJŽátR›ïCoOÉÃ÷%AØ€'egsÙhé·2¸ÞšÌÌû”»("ÞǹÛ,+1îDà=,Wåm¬Ôˆˆ­.¤ë2s®½€\!„iü­Êãâçð9–ªJs¤â–­-ýuüUÆýu@Dìn`'þÅÕÚÜšv¶X"âˆáòjCéÅåvˆèÇE‹n’[ؘ,ÄfUEÜ®WÑN·>™ªøS5~MšI|—4“æR¾y‹/§Lòj¿ãRù«ê˜V;YUÚGµE쇙v\®LÐ7Éò+ôâ ü„Ïð6¦î2¾‚©`à!9ÉÔ..df+\2sh0âÉ0³Š»o2E½kÖõ¿Šg9rP¾"?CIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosBL.png000066400000000000000000000013221321075051700305370ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<OIDATH‰µÖOˆVUÇñÏ3Ž‘”©NáBuœ¤¡¢ÈH…‚).’pÕ&—¥kAPpÓBD,‚ "§M!RC‚ Aiü76‚já[“Æ<-îyárý3¯ï‡sï}žóûžûœçžs#™Àu™+tÁzº!Z·ÈÌ®z§AÄ~,Ã¥ÌÜõ¸€NRÔ‹·1ø¸â2óCÜž‰xG€bÎqDÄ™ L` Þì&DļˆX³5 "æ<*&"ž‹ˆW"b.H&®óîá .cGfj7Œá ãfi{1spÿà÷¢÷–)nÿFbky£½˜Âk @b?žÁKha_-ænàùr#ZŒ®¿WýEìhp=µgq‹±ªŒÙSó/Û7›ðTÍyç€)ÙZD?.°ÄÆšæõBf~ShVâ_<ù°…,v©ôkŠ\l;3óe/Šˆ!|Rr;ŠgKŽ;,Å|Õº5ƒz"b-NÑY ç¦WáoÜQÈÜûxO«Js´á¶-/ýE\(×õ€ˆØÐs?W³9]ó½ðÁæ¾µ²ô?áÇ& "ð…;Ü#?esV«Uqµ]¯ríeZß²)¾ÊëýÕ¬Çñ„*5 9ž 'Ãïòù6ŽºK+É$Ïó‹ê‹)ÏÐßbªÓn0‰õµ²|ç þkÆõÎæÐYÇYršYøßa;á¯S|?Äø8‹Fìcrˆ™y²’Ì<¶3¢ï+v÷1ù"¿.f¢ëgr×ÿ*þ†B§”¡¹IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosBR.png000066400000000000000000000013101321075051700305420ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<EIDATH‰µÖÏ‹VUÇñ×wz-¨ZöŒ¢E…+k!‚ÐBr¡øÔ¦E´VQ7µQY´‰JW“ÛÐÁQGGÇEÚ„šc5™~]ÜóÀåúcž/ÎåžÏù¼ïýžï9÷FfêIDüŠ¡¾Þ¸×8=|ƒÅhÍ ˆˆÃØ€‰ÌüüE9ݤ¨…|Qó®™ùîÎǼ+@‰Ûó´æ;qΈøëz`—ú>ˆˆ¥ñnD¼ôü‹ÏÓDÄ«ñþC*M)Ó#x€I\Á¾ÌÔi¸ŠßpÓ¥hhàþÁµ³Ä¿8[{ý)†ÍskSéGq¦ ¸ñãu~°•Ñ6y”íI{ˆ÷T1Õ©ˆ%\ÛÈÌ ¶%í1ÞÞ•à:úU©¹ƒo“UÉú)n&)Ézû´*Ñï dkör«©Kr€jeù üÂùº¦…áqÖÞ``–…««cãìQm¿ú9y×~gÅëû™d|ŠŸ:)ÉÌ‘ˆ˜å`?¹´Œ™Þ}“Kôü¯â1‚U«ì/8SIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosCentre.png000066400000000000000000000013531321075051700314660ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<hIDATH‰½ÕOˆWUðÏù9ÕÒhS³E8“ ΢¨’ƒµ(PR.‚ÃU‹VA¸ -‚¨6…»(Aˆ0È¢HDtQ&!’A4¦NöAg°?N9þN‹wñ|éøòÀå¾ûÞ÷|¿çžsî}‘™Z[Ä0Gf·K§=û¥Rm×+ÐÚ¯ïj€ˆxC8QKfë\U `Öá3¼€[p±­@´)rTÅý23kKܳ¶¹œ¼Vâk¸n»q1/"îˆ9³9DDÿl˜ˆX+#b.(E~ ðNâéÌÔÃÑýßËß71—˜~ìÆyœ*|kýÅ'ÓãH—OßbºXUx–¼ÀL’ÚÃÌ7œL† æ}œÁ™i§0!Éú˜do×vp¶‰MòsÇŠâ³¥ç3Ét’}X½•9¼„éyüЇð`=·/sì)q;Fžcä ^ü™á‚‡Ã=üW<2@G#CXQŒ5j°?/‘÷ãõ{Ø[žë|™Y]qÞ,Qb>þ¸R§;Qæ»Ë®º%K¬÷b_!]–™ËðíHW`¡ÌéBâwUËÏý6ã6UkŽÎsæ™ãeuO™ãûò‡»ÊúV|‡q³*5Sø æó ¶Â“…ð6á(>*ïÞÁ¢"ð ¾Æ¼‹ßðppƒêô¾Ž-ªvŸßû¸Ûñ!Ö¨~2›ð|‰î,XÎw°«SuÜp³%±ºˆ¿¥™Ùî‡ó¯EŒcA‰lªËÿ~]ÿ÷Ý0´T $IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosLeft.png000066400000000000000000000013201321075051700311320ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<MIDATH‰½ÕOˆWUðÏù9†Â`ÚF0kŽÒl"]ˆ‰†™‹Bˆ­$A0„V³)üƒ D*¸"‚JD$f"DVú3³À±Ò‰©9-ÞýÁãiÎüÂéÀåÞ÷î÷|¿çžsî{‘Ü”9ÍY 1QäÖD ôã± sq13_íV …wÆÄ*<Þ-9DfŽ Š¸Ï2ó¹nÆ›ÿ¡n‰»øÏöÿ DÄôˆx*"&ÝË!"¦Ü GÄâˆèÉÛØ\Æ%¼œ™:mœÇ~ –±½™‚p?¾$e´Í¹QŽíá8Fñt]`yžöŸœ¸Î™ãüõ—’þ‚9‚똙NòË9%YCªæÝºÀ!~mb“<ÍjC 'Ùƒ‘m¼¾Ž³0<Ÿ±‹ê¹ÝÁ·/±¹ó¼…ŸòÆUú Îvö¿à™iI†k‘ÎÅ‹¸€v£Ÿ4r¾°D}'ʺ¯ŽÉL=¥òOª>‹ ù üñoRìb™ÃC¥ní&¨µ— 8YHçgæ||=¹B·ð»ªå{ïØXušª5/Œƒ¸cóÊü=¾+ë¾: "žma)†ñymoÎ]›·~A™ÏàTS "úð©º"ñc£È7ñhyžŠop¨RsÔ|vb+¬-„§°^uc?.ï`Vø _b â7,¯®QÝÞ71 j÷ÍU؇±Rõ“Y×Jt¯`&žÇûªŽëo¶$–ñ·0'3ErMæÌ»äü¾X$#2'O”À?µ™'!@µIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosRight.png000066400000000000000000000013041321075051700313170ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<AIDATH‰½ÕMˆ–Uðß™D$ÊPÒBfÌ g‘ø‚_µp!á"Ü(­\Ö¢ºD$Ý(B QIA°¤`ÑEX«HAFüxGÅ¤ÔÆJK3ç¸xî 2Éëý÷¹ÿóÿßçžsïÌÔ1‹èê{eˆ‘¶("v`:®dæ'cc5£ùƒqX‰wÆD™_(™ñǘɋ6ƒøßöò"ⵈ˜¯ †ÃDÄ›± "&‰8¬”éxŒ\źÌÔv´p_âNñí Ì|p ð«G|{‚¡? ñÝú0„…u ä9Z8y›³}üwž«IoÁÅmLÍL§øí_žH²îƒDb_]à ¿7±I~χ˜Ub6·cy˜¤dñ66]gy²8«S;€ u™üÌoû§l™ONe+ví˜><á–Æ>NÇ*\D«‘ƒÓ ìÜBz'K¿§ŽIÆ•ÌÏÆnÌ+ä¯ãÁpÕ„+¥†É%o­fvWD¼‡S…tFfÎÀ…ÈBø÷U%?éDæÝ.|ŒWU¥yqÄm{»´—q©ô{ꀈXÖ…ExˆksÝÏ!lžúwK{gšуC4„Þ2¾ÑHòŸx«Œ'¢×1^µ5÷p¬ó9¶ÁG…ð ÖªNì7åÛ~¼Qnâg¬Æü…¥5ÂÕªÛ`'6ã—t·'Wb/ŽãÕ#³Ÿ•խǼêŠë}¦$+ž%E|º“þŸÌ²ˆþŽ_×Ow…<ÿÁirìIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosT.png000066400000000000000000000014031321075051700304450ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<€IDATH‰½ÕMˆ–Uðß™^l¬Ô k ⛂8. £úP-„Úä¦E´k%®DDÝA‹ÈE(Qb®‚$¤¤ZäB4'­\ôAÃô¥9ãqqïkO¯Ã;8ÜçÞçþçÜ{ι72Ó픡ÛÊŽH†óY™WoFE3ŒY\Ō̙9°E’lè¡ÌÔTìmazº»Mîoã:8ÞðwºÏ.;Ç1Êt—»qŸã|ìß->nŠ¢bj'kT±éi§Oýä× þÂGøj@›²ýAg¹,óÙùó?”é ±("‹ˆ;æ2ˆˆá¹0ñ`D¬ˆ…ÐKâ>¥¶¿Uªck+É“8…·ðsÕ]-Ì0>Tru¡òm‚»0ƒ—êŽvá64Œ¯òþ—lÀ:ü= Ì{ø ÕùÇ8÷UÂñúc‰·›žf²Y¦8 ÔýXSm¶7lŽàp'3ŒˆªG™y)".Ô(oÈLµŽû$^ÃÖ$ÿ.ám˜íTÒ£5AcµÒ­#æ–oêøî­ßçz?3ójDÄ£x£F=ÅÊâ`9–(Ç<Ù EÄZ|RIWeæ*ý虜\«ãŸø])…mP/+—Øs™9q+¶O É‹ø¾.­¬ã9܃1tñEÏ&"žÂ¸¬$­'+Ú¦I™‡ež¨K«ëø™nÐnƒ¼‹w)Õ“èÖò«óïZ6eu>‚3¸ˆõh¦ðAÃfvR,kãJÇ«kï(}1‰ð5¶à ~ÃS Â-J÷îÇv\ÂâÞÏÍxG±QÉÍ8^¯Ñ½‚¥x‡”Šëón€\%¤¼“J‚,ž&°ž#›Šs{fž›qÏ^©ýyüX¿‡š€ˆxsà4ë/sÃý/éª>„íª_SûS8Ùˆˆ!|NÉ×ÄPþÚ:þµ•EWñb/Ä~ÁãÊÕtq¤±f7>â^ºÄˆR±£uîRã¸ŒÓØŠÏðÞhnUª÷cìÄoXÚs¾ƒOq o+Ù5‚êîÞÃr¼…/ð Ööùolªâû°*3E²“2÷÷¹÷ÿm‘åî~WÒó‘Û]@_’ r¹U IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/textPosTR.png000066400000000000000000000013601321075051700305710ustar00rootroot00000000000000‰PNG  IHDRàw=øsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î<mIDATH‰½ÖOˆ–Uðßùœ‘ÆÊ‚ÄŒ¥5 M4"³ ]j-„‘V¸³•»B¤ÜB S7‚ ZbŠHh%k¬ÈEÊYi&ž÷~Í;ï7Øçb:p¹ï½ç¹ç9÷ÜsÏ}#3Í¥tæÔ:" I˜îïȼ;ÌïYy«×b bÞ4†lµ™©Û°{çgÁe2ÔÄf¦äý&fg[>LµÆŸ3ö)SÏóYKwW¯|1†…z<˜¥áWœèÛØÉ™îú‘_úÄ5e/ŽõKpÿ’yˆÿ!Mÿ%ˆˆ‡"bUDׂ̻ˆº&"–FÄꈆî!¾ƒ¿qßaKë'qïázm;[˜!|€›ø¾Ú{â^«;Ú©¤ßšAb7Ä8þÀ®æ®áñÌ4Â'«ø­'*ð±jl‹à ts{pKðl]³£«ÿŠ©$;™ù3^®ÈÌ«u‹ã­ð^Ë™%ä,±¯×¹ó]åS%ÔªÑãõ€žÆ ü…ílÉ·µÔïË]å` {!ˆˆ•ÊÅÇ%,RbÜÁ“xX ódÔ‰ˆ1œªFG2s_þ‡q¦ëПø]Iá%~(©y©Ã]y¦ö—ñMý^ÞÐoÞÎx·Ì¬ªË”¡ÜØëÜå^Lâ'\À&Ä ¬kÜTwý.và*u•/aŽcƒ’]x³z·‹±‡•ŒåÝX[É÷`YfŠ9û«ˆxKæ’à ÆÿPn™Eu‡IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/thickness.png000077500000000000000000000002441321075051700306530ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœDIDATxÚc`쀉ý‡ÜX º£o8R¹ô0›ÍòaY–g ÃÈJiííŒðâ¯iw“ ʺz9ºÕøÞp꺾<,‰NÔ«±—;<¥ÁDaþä;9@hq³8ŸN§§„ !wLÓT§.Í|ûÙyÿ/€Àð,ïY<ý©mµ™jµúº×âzö':´óÜð±äæ™Ç–HÛ»€£gu쯱“²É|±µ[‰D¢V©T6€é™vÍ0ŒóœÈÛ Ïvú.ˆA_ï^ØÌïšM»L×ì°§ …Ž ‹UU£Š¢$ý~ÿ Œú z½Þ{n~4â_f­ÿ,ORIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/view-refresh.png000066400000000000000000000025241321075051700312660ustar00rootroot00000000000000‰PNG  IHDRÄ´l;sBIT|dˆtEXtSoftwarewww.inkscape.org›î<æIDAT8µ•iLgÇÿï;3;»³K9–[äk‘ E¨hš&­1iÚ‚š˜¦ÖO¶M“&ýÒ415iÒZ$5¶€¤4iµ±Gbý¦5ØÖ3LNUÂÐxO&Öç§3Eæ°,ÙžÃkÓÌã]žzC×M/ >€›5Þöúж+5åå†nmüýJ_û‰;‚ñŽÌ$ —nB‘8,!Xd¡1 ¨šCÊÌH®Õì `¼Ï"›wáÄ´ÕUté†yh* K1Cã!v…òˆ)B0ÛcKˆ`¢ËñeŒÃþ³®«)ÂNÅ,MžZ.ªj\¥ÈÒÙê·ŠÔ¤x i‰Nl.H†ªH01›µìHKÏ9‹ËâÌÞ7 rÅ¢ù.ªjHcij,ÒŽ¶´GHˆÂô^²éV@s>⪦1¸ÑÁǸØþÄæîqùFO«… ¶ŸÚ;J’çkød‡l“9Æ€°nâãºÖÈý‘É÷¯ßÝ­‹LÛ×)@¼VZPvÇèñÝÿ>,}\G„Äy­³Ûd\¸5Bi^šÎ߉ Œú޶ßÕ°ÐNÎIÇT‡ï§É°Hšðû«l²lÍœŸ3nÓ–†)‘èÐÝ?Fœ±UÅï4/]ôÜž³,±aÒÜ}ûÞà‡¾@8›qܽñ¬0ˆ1krâ08Ä—ãÈ-ö¦ó=ÛÎ]éï)©núJXÔb\±d"éˆCUâzîm¶)¹c5Ã;ª_ž–f†tä/‰EÄ´ÐyÏ‹W 3¥âüt­ãÎðžÇ¾°gÌÇÆ'‚NÉÆâÖ—“ŒÄ8'kü¥+¬™zã"0gŒÝ4…C5—&8ß±i¹m˺,»7`Â" 0/M.°R]ŒM÷ÏÓ˜ðGÐøë ¿e/žÜž•$"0Ƥõ• F¬ÓèﺸÃÓqæQî–Êî%¹Õ«ŸOËÈÏMQ2Sc™ÓaCÄ0L “]½qõæC=81r¸ûôÁaa"ÒgÀöuû¼~Ïí²ÞsŸýÀ=}íÎ5)+·•+ZüZp¦:UÅFL‰ߟ£}­Ç®6uE$¢à ˜­Þ}ìÍ› û/°PçD‰F’œn%!£ !èöFû¼ôè\G¢P€Ñ¢¥‰1&ÍÍD aú7oEcD£0‰ÈšËù)i\šrÜß`IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/wedge.png000077500000000000000000000016071321075051700277570ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEà )®N„˜IDAT8ËÕÕoHqðïïnwçî6­Íi[ÑFÿ&«–„VëTd”/" "‚‚¸0‚ *zQôjq/‚Þô: £ý%4*ËìEVâT,ËYNçR·Ë»§y¢MJ%ˆ~ð»çŽÏ=÷üþÿÛÅþð|½¢(6›­,“N3Ƙâp´2Æž&“É뺮ߟî]Š¢Ô ”#Š´4 eþÙE‰¬¸×ë}À5¥Œcå‚ Ô꺞[ZN{Ã¥u«f»_u82úðW»´¤¡7±âjcÚ‡o›%ÙnÏÌñzw·µµÝúì’$©Cäy瑊ñC…sÏ.êèG"@"ˆD$pœøcŽK=Ÿ\xô Èà8cI0èollì² ~¼êt:o -=¶sW繜ÜÙÉP€DÞ$¾\v6óy¹ÎÛ-ïçɲ\Ñ××wÙ²8«#†T*µµ,´Ü2B“ez¥=VÙžìwy<ëý±EF8NX3m v¹ÝŸÛãqÒÆ»ó¾™¬ßgL˜=kª««·èµɸfø¬ªêÀX–å×ÃzƧ¿ÕGnï5%"6šÝ UU¿üiéŽ žÝn¿ Úë—Û² AÄ8ŽÃhf˜2ÜÔÔt- ~¬k‹yÎw´n€2Hp£Ó‚ ¨¨h£Óá0/6<Ût¡¥9l¡~–b&@MMMËÚuëNCØÉçO¶GßÛ_÷¥»À_csÆ›tUUÕæP(”´F\CäyÓçó‘¦iòT ÛdÁh4zWÓ´Âúúú«ÝÝÝ[âñ¸ûSWJKK“ô¿q‚4MËPཪª]ÿôÌûA?O“áÝ_ÌIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/xGridLabel.png000066400000000000000000000011731321075051700306740ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEà . bÜ—˜IDAT8ËÕ•O¨Q‡?}>$&‡WÐ3ôa/ÿ¬Z·0jQ†¹‰2áÑBpe¶˜K‹½«ˆZ-ŒZD[ÛmB0fÙ#˜hé3±Í(·ËÛ=]4›ÃùÎ=¿ÎoÖôx Ãh‹Å·J- ´¥|HŸ%fAàÛRÐãÙ1Móþ"¯©oBÜQrí–B\8¨Ï»®Qx×:cMÓž—ËåGµZíÆh4Š'‰F6›M¯¤³ £°SÀ1à£4ã¬išO|@ ¤lÛ€g6›ýü@JÙ¶vÒ5p ±ãò—/Ì;Ì›«6ï’/öû}m•æ™n¼ÛëõŽFØçÆ-à,pyQpçªË¨V«þt:½+³F£±£ëú0^°f³¹+ ëŠ)ضýQ“ÉdSeŽãlÇã£À/¥o)lÏdá\.G«ÕZ²J¥¢S™ …pBñAéû_7O×õ—¥Réi½^¿bYÖõh4ú:ŸÏwÒY?p^awA>Iìœâ`:î‡C§Ýnßóz½£N§³7 ëºn+Â?™iîBÉl¨n^Ò=ô˜g2™‡«Ú¼/À>p ˜Çãñï«2ïp˽5n†ñûÐæï7r!GºÝî×åŠú|‘Hä´eYËë* …4M Ú¶Ý]°X,–´,ko]èh¾µ^éIEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/main/res/yGridLabel.png000066400000000000000000000012711321075051700306740ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEà .xCåFIDAT8Ë啱kaÆ ¥¹¤é%—ZI«IlKhuÐt ¢;4ƒn"8ŠH!Sòá_áà í189X×.mqK©\AL®%xíy˜xM—æø¼J[‡L~pÃû¼Ïû|ïó¾ôéø4M+/..~ðä¦j/X__Ÿ´,ëF6›}+q4 |s}¾T©TzÞ‹_zoB<‘ãáááÛ³³³¯<œ!Döouþ~µÂÿ¯m;ïP%´´´4ãÉ !\¬R©$#2LdÌçóºÂ@ œ–±X,–r'êá]:6Ð’°QYäLóÂápö?0nʉµµµ)sçÚÁÁÁE+—Ë)UUG€–§ÎV½æ†ñ‡yN'Ùl6#2Öh4ÆZ­Vøé©s…uàµ,œÏçÙØØp±`0x'Ôëu+ 3@\ñÉS׿÷m*TU‹ÅÜÊÊJN×õ‡ÉdòÐBäzÄÕÕÕÌÑÑÑe!Dnyyùþþþþ•ÍÍÍÏ™Læ‡B‘4Óî‹Û¶Õjõi»Ýooo/X–õ 0zŸmÛf§ÓiÆÖÖÖ³½½½ù ð]æ¶wó¦.ðèÎÍͽ CCCw¥Í»t‰Dñ<›÷p€y ›N§ë§˜wÀ4Í[»»»¡³ÌkŽÿ5MkžâM À¶í†a¨§ÐG "'ÆÇǵZí«û¿*‰\5Mó}‹F£QEQB†aÔzØÄÄÄ´®ë ýš6~.íÞŠ˜”§IEND®B`‚latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/000077500000000000000000000000001321075051700254115ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/000077500000000000000000000000001321075051700262025ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/test.svg000077500000000000000000000041641321075051700277120ustar00rootroot00000000000000 false true 50 1.0 cm false 20 0 true true true 2.0.0 1008 836 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/000077500000000000000000000000001321075051700277615ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/3state.svg000066400000000000000000000236531321075051700317160ustar00rootroot00000000000000 State 2 State 1 State 0 Dragging Out of Range Tracking Stylus On Tip Switch Close Tip Switch Open Stylus Lift false true 50 1.0 cm false 20 0 true false true 2.0.3 1122 766 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/AUI-CUI-FUI.svg000066400000000000000000000230561321075051700321650ustar00rootroot00000000000000 Interface Finale données et tâches Modèles de Interface Abstraite Interface Concrète Indépendante plate-forme IHM Dépendante plate-forme IHM Malai false true 50 1.25 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1159 719 21 34 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/AUI-CUI-FUI2.svg000066400000000000000000000254021321075051700322440ustar00rootroot00000000000000 \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Interaction \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Instrument \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Action \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}UI \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Présentation concrète \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Données \definecolor{color654}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\color{color654}Présentation abstraite Interface Concrète Interface Finale Interface Abstraite \definecolor{color872}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\definecolor{color874}{rgb}{0.6196078431372549,0.6196078431372549,0.6196078431372549}\color{color872}\psovalbox[linewidth=0.04,linecolor=color874,fillstyle=solid]{Kermeta} \definecolor{color872}{rgb}{0.4823529411764706,0.4823529411764706,0.4823529411764706}\definecolor{color874}{rgb}{0.6196078431372549,0.6196078431372549,0.6196078431372549}\color{color872}\psovalbox[linewidth=0.04,linecolor=color874,fillstyle=solid]{Java} false true 50 1.25 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.7 1159 719 21 34 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/AUI-CUI.svg000066400000000000000000000141371321075051700315440ustar00rootroot00000000000000 \definecolor{color3}{rgb}{0.9098039215686274,0.9098039215686274,0.9098039215686274}\color{color3}Modèles Objets et tâches métier abstraites Spécifications Spécifications concrètes Application \ding{172} \ding{173} \ding{174} \ding{175} false true 50 1.0 cm false 20 0 true false \usepackage{pifont} \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1195 776 59 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/DPI.svg000066400000000000000000000410061321075051700311170ustar00rootroot00000000000000 Action (système moteur) Niveau utilisateur Perception (système sensitif) intention Edition ou navigation Edition ou navigation Niveau de l'instrument Navigation Perception Interprétation Instrument indirect Instrument direct Instrument de perception Représentation alternative Niveau du document Persistance de l'action Document Présentation naturelle \ding{172} \ding{173} false true 50 1.0 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.3 1280 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/Diracs.svg000066400000000000000000000250321321075051700317110ustar00rootroot00000000000000 $t$ $x(t)$ $0$ $t_7$ $\cdots\cdots$ $\cdots\cdots$ $t_1$ $t_2$ $t_3$ $t_4$ $t_5$ $t_6$ $x_1$ $x_2$ $x_3$ $x_4$ $x_5$ $x_6$ $x_7$ false true 50 2.25 cm false 5 0 true true true 2.0.8 1608 878 0 0 0.724502487562189 true true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/DnD.svg000066400000000000000000000140661321075051700311560ustar00rootroot00000000000000 repos glissé déposé presser relâcher glisser false true 50 1.0 cm false 15 0 true true true 2.0.1 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/DnDClass.svg000066400000000000000000000075111321075051700321410ustar00rootroot00000000000000 GlisserDéposer sélection source cible presser() glisser() déposer() false true 50 1.0 cm false 20 0 true true true 2.0.1 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/DnDDeplacerDiag.svg000066400000000000000000000153421321075051700334010ustar00rootroot00000000000000 <<Picker>> Canvas Action déplacer canvas GlisserDéposer VueForme <<Pickable>> * false true 50 1.25 cm false 20 0 true true true 2.0.2 1280 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/IIS-comparison.svg000066400000000000000000000376531321075051700333140ustar00rootroot00000000000000 Model Data Presentation Action Interaction SwingStates Java Swing SwingStates ICON Java Swing HID Java ICON View MVC (e.g. Swing) Controller frameworks RIA Implementation language UIDL Data binding DPI Document Presentation Instrument Instrument Instrument false true 50 1.5 cm false 15 0 true true true 2.0.2 1240 802 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/MDE2UI.svg000066400000000000000000000410131321075051700314260ustar00rootroot00000000000000 Abstract Presentation Interaction \textcircled{b} \textcircled{a} Graphical Platform Models User Interface Concrete Presentation ActionEvent mouseEvent Object Object Object Buttons Window Graphical Object false true 50 1.75 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} true 2.0.8 1548 963 220 83 0.8 false true true 50 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/MDEinter-MDI.svg000066400000000000000000000365301321075051700325670ustar00rootroot00000000000000 Concepts and Task Model Interface (AUI) Abstract User Interface (CUI) Concrete User Interface (FUI) Final User Context of use 1 Model-Driven Interface Engineering Concepts and Task Model Interface (AUI) Abstract User Interface (CUI) Concrete User Interface (FUI) Final User Context of use 2 false true 50 1.0 cm false 15 0 true true true 2.0.1 1107 821 0 24 0.8 false true true 130 MalaiInteractionDiag.svg000066400000000000000000001035631321075051700344430ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad :Interaction :Instrument :Action :Interface compiled event correspondingInstrument() [config interaction ok] corresponding- startAction() interimFeedback() [action canDo()] event [while not terminated [compiling event] onInteractionChange() [config interaction ok] updateAction() interimFeedback() [action canDo()] [canDo()] interimFeedback() [execute] do() [else] [else (aborting event)] [else] abortAction() :Action recycle() [recyclable] abortInteraction() abortAction() nor aborted] [terminated] terminated() interimFeedback() [execute] [else] endAction() finalFeedback() do() finalFeedback() Action() [canDo()] false true 50 1.0 cm false 15 0 true true true 2.0.2 1188 861 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/PIMtoPSM.svg000066400000000000000000000127251321075051700320610ustar00rootroot00000000000000 PIM PDM PSM de modèles transformation false true 50 1.0 cm false 15 0 true true true 2.0.2 1188 861 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/TS.svg000066400000000000000000000517531321075051700310430ustar00rootroot00000000000000 Grammaire Base de données Document Modèle Langage de description de grammaires (EBNF) (SQL) description de Langage de schémas Langage de description de documents (XML) Langage de description de métamodèles (MOF) Espaces techniques La grammaire de Java Un schéma relationnel Un schéma XML Un métamodèle Un programme Java Une base de données relationnelle Un document XML Un modèle UML M3 M2 M1 Système M0 UML false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1217 776 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/action-depOr.svg000077500000000000000000000173361321075051700330430ustar00rootroot00000000000000 ActionPasteNode needs ActionSelectNode ActionCopyNode ActionCutNode needs needs needs or false true 50 1.0 cm false 20 0 true false true 2.0.2 1132 778 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/action-ex.svg000066400000000000000000000430251321075051700323750ustar00rootroot00000000000000 ActionPasteNode needs ActionSelectNode ActionCopyNode copy ActionCutNode formerParent formerPosition needs needs or ActionDeleteNode formerParent formerPosition ActionDuplicateNode targetPosition targetParent duplicate selection needs needs targetParent targetPosition ActionMoveNode sourceParent sourcePosition targetPosition targetParent needs needs false true 50 1.0 cm false 20 0 true false true 2.0.2 1132 776 128 24 0.8 false true true 130 action-life-cycle.svg000066400000000000000000000462631321075051700337250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad redone Action undone Action saved Action in progress Action removed Action Action ended aborted Action end undo undoable and undo redo execution has effects remove remove remove recycling abort update creation false true 50 1.25 cm false 20 0 true false true 2.0.2 1057 747 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/action2pres.svg000066400000000000000000000120021321075051700327260ustar00rootroot00000000000000 Canvas - views: View + getViewAt(Point p): View + update() Action sélectionner canvas selection: View false true 50 1.0 cm false 20 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/actionDeplacer.svg000066400000000000000000000067101321075051700334230ustar00rootroot00000000000000 ActionDéplacer debPt finPt courantPt sélection false true 50 1.0 cm false 20 0 true true dffdsf dsfdsf \begin{center} H true 2.0.2 1290 780 -5 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/aramiis.svg000066400000000000000000000302231321075051700321270ustar00rootroot00000000000000 Data Malan Presentation Action Interaction Malai Interface model Data model Instrument Action model Interaction model Instrument model HID false true 50 1.25 cm false 15 0 true true true 2.0.2 1120 719 140 157 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/archMalai.svg000066400000000000000000000404301321075051700323640ustar00rootroot00000000000000 Action Présentation abstraite Données Instrument Présentation concrète Interaction Evènement Adaptateur de noyau fonctionnel Noyau fonctionnel Interaction physique Interaction logique Contrôleur de dialogue Malan Malan false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.6 1515 869 34 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/archMalai2.svg000066400000000000000000000271241321075051700324530ustar00rootroot00000000000000 Contrôleur de dialogue Adaptateur de noyau fonctionnel Noyau fonctionnel Interaction Présentation Interaction Données, Présentation abstraite Malan Présentation concrète Instrument Action false true 50 1.75 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.6 1280 743 34 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/aspect.svg000066400000000000000000000403501321075051700317630ustar00rootroot00000000000000 A B C D Aspect 2 Aspect 1 A B C C A B D Woven Model 1 Woven Model 2 Base Model false true 50 2.0 cm false 15 0 true false true 2.0.8 1713 1056 110 94 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/bimanual-resize.svg000066400000000000000000000241431321075051700335750ustar00rootroot00000000000000 ActionResizeShape needs ActionHoldHandler ActionMoveHandler ActionReleaseHandler needs cancels DnD Press Release false true 50 1.0 cm false 20 0 true false true 2.0.2 1151 827 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/bonhomme.svg000066400000000000000000000134451321075051700323150ustar00rootroot00000000000000 false true 50 1.0 cm false 10 0 true false true 2.0.5 1189 700 104 31 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/cameleon.svg000066400000000000000000000131761321075051700322750ustar00rootroot00000000000000 Interface Concrète Interface Finale données et tâches Modèles de Interface Abstraite false true 50 1.75 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1159 719 21 34 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/cameleon2.svg000066400000000000000000000406551321075051700323610ustar00rootroot00000000000000 Concepts and Task Model Interface (AUI) Abstract User Interface (CUI) Concrete User Interface (FUI) Final User Context of use 1 Model-Driven Interface Engineering Concepts and Task Model Interface (AUI) Abstract User Interface (CUI) Concrete User Interface (FUI) Final User Context of use 2 Plasticity of interfaces false true 50 1.0 cm false 15 0 true true true 2.0.3 1159 719 21 34 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/classif.svg000066400000000000000000000062771321075051700321420ustar00rootroot00000000000000 Approches de manipulation de données pour les SI Basées sur les instances Basées sur les schémas Dirigées par les modèles (IDM) false true 50 1.0 cm false 15 0 true false true 2.0.2 1154 840 0 24 0.8 false true true 130 classifTransfoMDE.svg000066400000000000000000000415761321075051700337470ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad MMs MMc Ms Mt Mc MM Ms Mt Mc PSM PSM PIM PIM PIM PSM changement d'espace technique restructuration intégration de modèles génération de PSM transformation horizontale transformation verticale à partir d'un PIM false true 50 1.0 cm false 15 0 true true \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1188 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/classification.svg000066400000000000000000000062771321075051700335110ustar00rootroot00000000000000 Approches de manipulation de données pour les SI Basées sur les instances Basées sur les schémas Dirigées par les modèles (IDM) false true 50 1.0 cm false 15 0 true false true 2.0.2 1154 840 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/cycleVieAction.svg000066400000000000000000000550401321075051700334070ustar00rootroot00000000000000 Action initialisée Action exécutée Action enregistrée Action annulée Action refaite ensemble d'évènements est exécutable terminer défaire et exécuter défaisable et défaire refaire et exécuter est exécutable Action terminée pas éphémère et a eu de l'effet Action supprimée supprimer supprimer supprimer avortée Action avorter est reprenable et copier paramètres Nouvelle action recopiée avorter est exécutable et exécuter false true 50 0.75 cm false 20 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/cycleVieInter.svg000066400000000000000000000364241321075051700332600ustar00rootroot00000000000000 Interaction initialisée Interaction en cours conforme évènement terminer évènement Interaction avortée Interaction non valide non valide est reprenable et copier paramètres Nouvelle interaction recopiée conforme évènement non conforme démarrant interaction valide valide non valide Interaction terminée false true 50 1.0 cm false 15 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/depExplicite.svg000066400000000000000000000263021321075051700331240ustar00rootroot00000000000000 <<mapping>> I2Fga <<mapping>> P2Fdr 0..n gauche 0..n Image image Album images Cube Face image 0..n droite <<mapping>> A2C false true 50 1.0 cm false 20 0 true false \begin{center} true 2.0.3 1280 776 0 24 0.8 false true true 57 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/depImplicite.svg000066400000000000000000000125301321075051700331130ustar00rootroot00000000000000 0..1 droite <<mapping>> I2F Image image Face image false true 50 1.0 cm false 20 0 true false \begin{center} true 2.0.3 1290 780 -5 24 0.8 false true true 57 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/dessinPresUML.svg000066400000000000000000000147371321075051700332130ustar00rootroot00000000000000 <<Picker>> Canvas VueForme <<Pickable>> * VueEllipse cx cy a b vues false true 50 1.25 cm false 20 0 true false true 2.0.1 1240 773 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/dessinUML.svg000066400000000000000000000145671321075051700323620ustar00rootroot00000000000000 Dessin formes Forme Ellipse * x y largeur hauteur false true 50 1.0 cm false 20 0 true true false 2.0.1 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/diag.svg000066400000000000000000000355101321075051700314120ustar00rootroot00000000000000 Source Schema Target Schema Schema Mapping Source Data Target Data Mapping to Transformation Transformation Program Based on schemas Based on instances \definecolor{color172b}{rgb}{0.9333333333333333,0.19215686274509805,0.19215686274509805} \psovalbox[linewidth=0.04,fillstyle=solid,fillcolor=color172b]{Processor} Instance of Instance of (XSLT, XQuery) (Malan, Clio) false true 50 1.75 cm false 20 0 true false false 2.0.0 1178 850 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/domain.svg000066400000000000000000000150601321075051700317530ustar00rootroot00000000000000 Manipulation de données pour les SI Translation de schémas Transformation de schémas Translation de données Intégration de données Création de présentations Document XML Base de données false true 50 1.0 cm false 20 0 true true \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1114 707 102 65 0.8 false true true 130 exAnnulableAction.svg000066400000000000000000000104561321075051700340250ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad ActionSélectionner ActionDésélectionner annule annule false true 50 1.0 cm false 20 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/exContrainte1.svg000066400000000000000000000312301321075051700332250ustar00rootroot00000000000000 $0..n$ billets \definecolor{color1922}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color1922}Billet $0..n$ elements \definecolor{color1937}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color1937}SVG \definecolor{color1937}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color1937}G $\mathcal{CC}(Blog,SVG,\Omega)$ $\Omega$ $\mathcal{CR}(Billet,G)$ \ldots $\mathcal{CC}(Billet,G,\Omega')$ \definecolor{color1966}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color1966}Blog $0..n$ elements \definecolor{color1979}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color1979}Element false true 50 1.5 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \begin{center} true 2.0.3 1233 813 0 24 0.8 false true true 149 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/exContrainte2.svg000066400000000000000000000202111321075051700332230ustar00rootroot00000000000000 $1..n$ pages \definecolor{color135}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color135}Livre \definecolor{color135}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\color{color135}Page $\mathcal{CC}(s_1,\ldots,s_n,Livre,\Omega)$ $\mathcal{R}(Livre,Page)$ $\Omega$ $\mathcal{CR}(s'_1,\ldots,s'_n,Page)$ \ldots $\mathcal{CC}(s'_1,\ldots,s'_n,Page,\Omega')$ false true 50 1.5 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \begin{center} true 2.0.3 1233 813 0 24 0.8 false true true 149 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/exDepAction.svg000066400000000000000000000066211321075051700327120ustar00rootroot00000000000000 ActionSupprimer nécessite ActionSélectionner false true 50 1.0 cm false 20 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/exDepOrAction.svg000066400000000000000000000173441321075051700332170ustar00rootroot00000000000000 ActionColler nécessite ActionSélectionner ActionCopier ActionCouper nécessite nécessite nécessite ou false true 50 1.0 cm false 20 0 true true true 2.0.0 1107 821 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/explanations.svg000066400000000000000000000270731321075051700332200ustar00rootroot00000000000000 t\_barbre racine t\_secteur 0 1 2 t\_bloc art t\_article adr false true 50 1.0 cm false 20 0 true true false 2.0.8 1323 930 437 186 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/explanations2.svg000066400000000000000000000263711321075051700333020ustar00rootroot00000000000000 racine t\_bloc art t\_bloc art t\_bloc art false true 50 1.0 cm false 20 0 true false false 2.0.8 1323 930 437 186 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/feedback.svg000066400000000000000000000105021321075051700322240ustar00rootroot00000000000000 false true 50 2.25 cm false 10 0 true false true 2.0.6 1280 743 29 26 0.8 false true true 58 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/foley.svg000066400000000000000000000470621321075051700316310ustar00rootroot00000000000000 Selection Location Orient Direct pick Indirect locator Time scan Button push Recognition Voice input Direct locator Indirect locator Direction keys Direct pick Indirect locator Light pen Touch panel Tablet Mouse Joystick (absolute) Joystick (velocity) Cursor control keys Trackball Alphanumeric keyboard Programmed function keyboard Programmed function keyboard Soft keys Light pen Tablet and stylus Voice recognizer Touch panel Joystick (absolute) Joystick (velocity) Up-down-left-right keys Tracking light pen Searching light pen Tablet Mouse Joystick (absolute) Joystick (velocity) Cursor control keys Trackball false true 50 1.0 cm false 20 0 true false true 2.0.3 1178 796 0 47 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/graph.svg000066400000000000000000000257301321075051700316120ustar00rootroot00000000000000 "Blouin" "Arnaud" "arnaud.blouin@eseo.fr" 0241866745 nomFamille prénom téléphone email nom personne personne Olivier olivier.beaudoux@eseo.fr nom email \pscirclebox[linewidth=0.04,fillstyle=solid,framesep=0.28]{e1} \pscirclebox[linewidth=0.04,fillstyle=solid,framesep=0.28]{e2} collègue false true 50 1.0 cm false 30 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1122 766 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/instrument-ex.svg000066400000000000000000000321721321075051700333310ustar00rootroot00000000000000 DnD KeyTyped HIDPress Instrument ActionDuplicateNode ActionMoveNode ActionDeleteNode ActionSelectNode hand key='ctrl' no key no key, target=Delete key='del' false true 50 1.0 cm false 20 0 true false true 2.0.2 1160 783 0 24 0.8 false true true 130 instrument-liaison-MaE.svg000066400000000000000000000406611321075051700347360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad fin création avortement mise à jour exécution évènement évènement terminal évènement terminal création 2 évènement avortant évènement non terminal mise à jour 2 évènement avortant évènement évènement terminal non terminal non terminal et non avortant false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1122 766 0 24 0.8 false true true 130 instrument-liaison-ex-MaE.svg000066400000000000000000000255051321075051700353500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad fin pression relâchement ou relâchementTouche pressionTouche | touche!='Echap.' ou déplacement | pressé pressionTouche | touche=='Echap.' pressionTouche | touche=='Echap.' ou relâchementTouche création avortement mise à jour exécution false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 24 0.8 false true true 130 instrument-liaison-ex.svg000066400000000000000000000535311321075051700347100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad déposé avorté pressé glissé pression relâchement déplacement | pressé ou ou relâchementTouche pressionTouche | touche!='Echap.' pressionTouche | touche=='Echap.' ou relâchement pressionTouche | touche=='Echap.' pressionTouche | touche!='Echap.' ou relâchementTouche action en cours avorté terminé création mise à jour exécuter | peutExécuter terminer avorter déplacement | pressé false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 24 0.8 false true true 130 instrument-liaison.svg000066400000000000000000000465611321075051700343030ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad interaction terminée interaction en cours évènement évènement terminal évènement avortant action en cours avorté terminé création mise à jour exécuter | peutExécuter terminer avorter interaction avortée évènement terminal non terminal et évènement non avortant non terminal false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1122 766 0 32 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/instrument.svg000066400000000000000000000223001321075051700327070ustar00rootroot00000000000000 Interaction A Instrument Interaction B Action C Action D Action E etc. Which interaction? Which targeted element? logical part physical part false true 50 1.0 cm false 20 0 true false true 2.0.2 1180 785 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/instrumentAOM.svg000066400000000000000000000664411321075051700332620ustar00rootroot00000000000000 \color{darkgray}\textsf{handlers} \color{darkgray}\textsf{0..*} \color{darkgray}\textsf{SetTimeslotEvent} \color{darkgray}\textsf{DnD} \color{darkgray}\textsf{TimeslotSetter} \color{darkgray}\textsf{Handler} Aspect Link Class Model \color{darkgray}\textsf{BimanualInteraction} Aspect Link Class Model \color{darkgray}\textsf{SetTimeslotEvent} \color{darkgray}\textsf{TimeslotSetter} \color{darkgray}\textsf{SetTimeslotEvent} \color{darkgray}\textsf{TimeslotSetter} Link Class Model Base Model false true 50 1.5 cm false 10 0 true true true 2.0.8 1920 1176 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/instrumentDnD.svg000066400000000000000000000351451321075051700333100ustar00rootroot00000000000000 \color{darkgray}\textsf{handlers} \color{darkgray}\textsf{0..*} \color{darkgray}\textsf{SetTimeslotEvent} \color{darkgray}\textsf{DnD} \color{darkgray}\textsf{TimeslotSetter} \color{darkgray}\textsf{Handler} Aspect Link Class Model false true 50 2.5 cm false 10 0 true false true 2.0.8 1439 1025 263 111 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/integration.svg000066400000000000000000000144441321075051700330340ustar00rootroot00000000000000 base de données 1 base de données 2 base de données 3 false true 50 1.0 cm false 20 0 true true false 2.0.3 1188 776 -1 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/interDM.svg000066400000000000000000000464011321075051700320510ustar00rootroot00000000000000 Modèle d'interaction Modèle UI concret Modèle d'action Modèle UML Modèle d'action UIC & classes Package Java UIC Document XML Package Java actions & classes & classes Package Java interactions UIC abstrait UIC concret UIC UIF Document XML Fichiers jar Librairie Malan Librairie SwingStates false true 50 1.0 cm false 20 0 true true true 2.0.2 1215 704 33 78 0.8 false true true 129 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/interDoubleClic.svg000066400000000000000000000262041321075051700335550ustar00rootroot00000000000000 relâché2 avorté pressé1 pression relâchement relâché1 pression pressé2 relâchement délai > 2 pressionTouche | déplacement ou touche=='Echap.' pressionTouche | déplacement ou touche=='Echap.' false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 24 0.8 false true true 130 interaction-DnDKey.svg000066400000000000000000000335111321075051700340610ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad pressed dragged dropped HIDPress HIDRelease HIDDrag, keyRelease HIDDrag aborted keyPress='escape' HIDRelease, keyPress='escape' keyPress!='escape', keyRelease key pressed keyPress HIDPress keyRelease keyPress!='escape', false true 50 1.25 cm false 15 0 true false true 2.0.2 1122 766 0 24 0.8 false true true 130 interaction-DnDKey2.svg000066400000000000000000000265621321075051700341530ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad déposé avorté pressé glissé pression relâchement déplacement | pressé ou ou relâchementTouche pressionTouche | touche!='Echap.' déplacement | pressé ou relâchement pressionTouche | pressionTouche | touche!='Echap.' ou relâchementTouche touche=='Echap.' pressionTouche | touche=='Echap.' false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1122 699 0 24 0.8 false true true 130 interaction-Press.svg000066400000000000000000000070131321075051700340350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad pressé pression false true 50 1.75 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1132 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/interaction-SM.svg000066400000000000000000000210121321075051700333320ustar00rootroot00000000000000 pressed dragged dropped press release drag drag aborted key='escape' release or key='escape' false true 50 1.0 cm false 15 0 true false true 2.0.2 1099 737 0 24 0.8 false true true 130 interaction-biman.svg000066400000000000000000000241701321075051700340320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad pression pressé1 pressé2 avorté bougé terminé pression relâchement relâchement déplacement | pressé relâchement déplacement | pressé false true 50 1.5 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1122 766 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/interaction-clic.svg000066400000000000000000000174431321075051700337420ustar00rootroot00000000000000 avorté terminé pression pressé relâchement pressionTouche | touche=='Echap.' déplacement false true 50 1.5 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1122 766 0 24 0.8 false true true 130 interaction-gyroscope.svg000066400000000000000000000210141321075051700347500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad avorté terminé bougé mouvementYZ ou voix | mot inconnu voix | mot=="annuler" voix | mot=="stop" mouvementXY ou mouvementXZ mouvementYZ ou mouvementXY ou mouvementXZ false true 50 1.5 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 24 0.8 false true true 130 interaction-life-cycle.svg000066400000000000000000000254501321075051700347620ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad en cours Interaction Interaction avortée terminée Interaction évènement terminal non terminal et évènement avortant évènement évènement terminal non avortant non terminal et évènement non avortant false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1024 699 140 56 0.8 false true true 130 interaction-polygone.svg000066400000000000000000000245071321075051700346040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad pressé déplacement pression | bouton==1 relâché terminé avorté pression | bouton==1 relâchement | bouton==1 pression | bouton==2 pressionTouche | touche=='Echap.' pressionTouche | touche=='Echap.' false true 50 1.5 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 24 0.8 false true true 130 interaction-pressionTouches.svg000066400000000000000000000204121321075051700361340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad pressée touche pressionTouche avorté pression terminé relâchementTouche | |touches|!=0 relâchementTouche | |touches|==0 pressionTouche false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{amssymb} true 2.0.5 1122 766 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/interaction-voix.svg000066400000000000000000000116621321075051700340120ustar00rootroot00000000000000 terminé avorté voix | mot reconnu voix | mot non reconnu false true 50 1.5 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1122 766 0 24 0.8 false true true 130 interactionCollabo.svg000066400000000000000000000207151321075051700342430ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad press (x) release (x) press (x) release (y) press (x) release (y | x!=y) a/ c/ b/ false true 50 1.0 cm false 15 0 true false true 2.0.3 1097 705 87 42 0.8 false true true 130 interfaceMiniData.svg000066400000000000000000000111051321075051700337700ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad SVG OpenOffice false true 50 1.0 cm false 10 0 true false true 2.0.6 1280 743 148 33 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/keySequence.svg000066400000000000000000000111011321075051700327550ustar00rootroot00000000000000 KeyTyped (x) KeyTyped (x) KeyTyped (x) false true 50 1.0 cm false 15 0 true false true 2.0.3 1097 705 87 42 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/ki.svg000066400000000000000000000326001321075051700311060ustar00rootroot00000000000000 MVC View presentation Concrete presentation Abstract MVC Model Action Interaction Event \ding{173} \ding{174} Instrument \ding{172} \ding{175} MVC Controller Graphical Platform Models User Interface Model Transformation Interactive System false true 50 2.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.8 1641 1004 240 148 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malan2.svg000066400000000000000000000326111321075051700316570ustar00rootroot00000000000000 Données Présentation Présentation abstraite Présentation concrète \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Action \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Interaction \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Instrument \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Interface \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Feedback \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}intérimaire \definecolor{color80}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color80}Evènement Abstrait Concret \ding{172} \ding{174} \ding{173} false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 96 32 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanBinding.svg000066400000000000000000000346031321075051700330730ustar00rootroot00000000000000 Correspondance de schémas \psovalbox[linewidth=0.04,fillstyle=solid,framesep=0.08]{Processeur} \psframebox[linewidth=0.04]{$s_1$} \psframebox[linewidth=0.04]{$s_n$} $\ddots$ $\mathcal{CC}(s_1,\ldots,s_n,t,\Omega)$ \psframebox[linewidth=0.04]{$t$} \psframebox[linewidth=0.04]{$i_{s_n}$} \psframebox[linewidth=0.04]{$i_{s_1}$} \psframebox[linewidth=0.04]{$i'_{s_1}$} \psframebox[linewidth=0.04]{$i'_{s_n}$} $\ddots$ $\ddots$ \psframebox[linewidth=0.04]{$i_t$} \psframebox[linewidth=0.04]{$i'_t$} $\mathcal{LA}(i_{s_1},\ldots,i_{s_n},i_t)$ $\mathcal{LA}(i'_{s_1},\ldots,i'_{s_n},i'_t)$ Liaisons dynamiques $\ddots$ $\mathcal{I}(i_{s_1},i_s)$ $\mathcal{I}(i'_{s_1},i_s)$ $\mathcal{I}(i_{s_n},i_s)$ $\mathcal{I}(i'_{s_n},i_s)$ $\mathcal{I}(i'_t,t)$ $\mathcal{I}(i_t,t)$ \ding{172} true false 50 2.5 cm false 10 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.3 1280 776 0 24 0.8 false true true 77 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanExp.svg000066400000000000000000000730201321075051700322510ustar00rootroot00000000000000 Expression ExpressionBooléenne ExpressionArithmétique ExpressionSélection CalculableBool CalculableArithm ConstanteBool CalculBool CalculArithm ConstanteArithm Non Et Ou Add Sous Mult Div Mod gauche 1..1 droite 1..1 gauche 1..1 droite 1..1 false true 50 1.0 cm false 20 0 true false false 2.0.3 1202 760 69 30 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanTransfo.svg000066400000000000000000000306611321075051700331350ustar00rootroot00000000000000 source Schéma Schéma cible Correspondance de schémas sources Données cibles Données Instance de Instance de \psovalbox[linewidth=0.04,fillstyle=solid,framesep=0.18]{Processeur} transformation \ding{172} \ding{173} Malan Autre langage false true 50 2.25 cm false 10 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.6 1280 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanmalai.svg000066400000000000000000000300271321075051700326000ustar00rootroot00000000000000 Données Présentation Présentation abstraite Présentation concrète Action Interaction Instrument Interface Feedback intérimaire Evènement Abstrait Concret false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanmalai2.svg000066400000000000000000000240601321075051700326620ustar00rootroot00000000000000 Données Présentation Présentation abstraite Présentation concrète Interaction Instrument Interface Evènement Abstrait Concret true false 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.5 1366 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanmalai3.svg000066400000000000000000000205741321075051700326710ustar00rootroot00000000000000 Données Présentation Présentation abstraite Présentation concrète Instrument Interface Abstrait Concret true false 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.5 1366 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanmalai4.svg000066400000000000000000000176471321075051700327010ustar00rootroot00000000000000 Données Présentation Présentation abstraite Présentation concrète Interface Abstrait Concret true false 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.5 1366 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/malanmalai5.svg000066400000000000000000000055131321075051700326670ustar00rootroot00000000000000 Données Interface true false 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.3 1366 743 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/map.svg000066400000000000000000000076551321075051700312740ustar00rootroot00000000000000 A a B b <<mapping>> A2B false true 50 1.0 cm false 20 0 true false false 2.0.0 1141 984 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/mde.svg000066400000000000000000000115671321075051700312610ustar00rootroot00000000000000 métamodèle modèle système représenté par conforme à false true 50 1.0 cm false 15 0 true false true 2.0.2 1188 861 0 24 0.8 false true true 130 modeleInteraction.svg000066400000000000000000000417741321075051700341050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad tâches Modèle de d'interaction Modèle 1 d'interaction Modèle 2 Modèle de présentation 1 Modèle de présentation 2 domaine Modèle de tâches UI UI tâches UI UI * UI concrète indépendante de la plateforme * * false true 50 1.0 cm false 20 0 true true true 2.0.2 1162 685 33 78 0.8 false true true 129 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/modifData.svg000066400000000000000000000154271321075051700324030ustar00rootroot00000000000000 Données \begin{tabular}{c}Présentation\\Abstraite\end{tabular} \begin{tabular}{c}Présentation\\Concrète\end{tabular} \ding{172} \ding{173} \ding{178} \ding{177} Présentation false true 50 1.75 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/modifDataEx.svg000066400000000000000000000156771321075051700327070ustar00rootroot00000000000000 Arbre \begin{tabular}{c}Document\\XML\end{tabular} ArbreUI \ding{172} \ding{173} \ding{178} Présentation \ding{177} false true 50 1.75 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 776 0 24 0.8 false true true 130 myers-interactor-SM.svg000066400000000000000000000356461321075051700342650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad Outside Start Running Start-action Outside-action Running-action Start-event over start-where not-over running-where Stop-action Abort-action Stop-event Abort-event Back-inside-action Back over running-where Abort-action Abort-event Abort-action stop-event if outside-control = Abort Abort-action stop-event if outside-control = Last false true 50 1.0 cm false 15 0 true false true 2.0.2 1054 676 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/norman.svg000066400000000000000000000257401321075051700320040ustar00rootroot00000000000000 Evaluation formulation du but formulation de l'intention Spécification des actions Exécution des actions Evaluation Interprétation Perception \definecolor{color2126}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}\definecolor{color2128}{rgb}{0.6941176470588235,0.6941176470588235,0.6941176470588235}\color{color2126}\psovalbox[linewidth=0.04,linecolor=color2128,fillstyle=solid,framesep=0.2]{Système} Exécution false true 50 1.0 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1280 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/objectCommand.svg000066400000000000000000000541321321075051700332540ustar00rootroot00000000000000 OK Choose Font Font Properties: Apply Cancel Bold Italic Underline Green Red Black Font Size: 24 \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Bold\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Italics\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Underline\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Font Size\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Change Color\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.24]{Change Font Command} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Cancel\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Apply\\Command\end{tabular}} \psframebox[linewidth=0.04,framearc=0.5,framesep=0.16]{\begin{tabular}{c}Ok\\Command\end{tabular}} Implementation Parent Deferred Execution Parent Key: true false 50 1.0 cm false 20 0 true false false 2.0.3 1268 776 45 40 0.8 false true true 130 objectCommandDiag.svg000066400000000000000000000245651321075051700337710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Bold\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Italics\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Underline\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Font Size\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Change Color\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.24]{Change Font Command} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Cancel\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Apply\\Command\end{tabular}} \psframebox[linewidth=0.04,framesep=0.16]{\begin{tabular}{c}Ok\\Command\end{tabular}} Implementation Parent Deferred Execution Parent Key: true false 50 1.0 cm false 20 0 true false false 2.0.3 1097 776 20 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/objectCommandUI.svg000066400000000000000000000326331321075051700335140ustar00rootroot00000000000000 OK Choose Font Font Properties: Apply Cancel Bold Italic Underline Green Red Black Font Size: 24 false true 50 1.0 cm false 20 0 true false false 2.0.3 1268 776 1 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/orga.svg000066400000000000000000000167201321075051700314400ustar00rootroot00000000000000 SVG ModèleCanvas \ding{172} \ding{178} Présentation abstraite \ding{177} CanvasUI Présentation concrète Présentation Données sources \ding{173} false true 50 1.75 cm false 15 0 true false \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/organisationMDA.svg000066400000000000000000000217131321075051700335250ustar00rootroot00000000000000 meta-metamodel metamodel model system M3 M2 M1 M0 conforms to conforms to represented by Models Real World conforms to false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.8 1188 776 176 58 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/organisationMDE.svg000066400000000000000000000115671321075051700335370ustar00rootroot00000000000000 métamodèle modèle système représenté par conforme à false true 50 1.0 cm false 15 0 true false true 2.0.2 1188 861 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/overview-action.svg000066400000000000000000000264131321075051700336310ustar00rootroot00000000000000 Action \definecolor{color37}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color37}Interaction \definecolor{color37}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color37}Evènement \definecolor{color37}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color37}Présentation Présentation abstraite \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}Présentation \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}concrète \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}Instrument \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}Interface \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}Feed-back \definecolor{color62}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color62}intérimaire false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 211 25 0.8 false true true 130 overview-instrument.svg000066400000000000000000000255701321075051700345100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad Action Interaction \definecolor{color43}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color43}Evènement \definecolor{color43}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color43}Présentation \definecolor{color43}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color43}Présentation \definecolor{color43}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color43}abstraite Présentation concrète Instrument \definecolor{color71}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color71}Interface Feed-back intérimaire false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 503 151 0.8 false true true 130 overview-interaction.svg000066400000000000000000000266401321075051700346160ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad \definecolor{color48}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color48}Action Interaction Evènement \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Présentation \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Présentation \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}abstraite \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Présentation \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}concrète \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Instrument \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Interface \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}Feed-back \definecolor{color105}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color105}intérimaire false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 503 151 0.8 false true true 130 overview-interface.svg000066400000000000000000000255011321075051700342320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad \definecolor{color59}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color59}Action \definecolor{color59}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color59}Interaction \definecolor{color59}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color59}Evènement \definecolor{color59}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color59}Présentation \definecolor{color88}{rgb}{0.7843137254901961,0.7843137254901961,0.7843137254901961}\color{color88}Présentation \definecolor{color88}{rgb}{0.7843137254901961,0.7843137254901961,0.7843137254901961}\color{color88}abstraite \definecolor{color95}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color95}Présentation \definecolor{color95}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color95}concrète \definecolor{color95}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color95}Instrument Interface \definecolor{color106}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color106}Feed-back \definecolor{color106}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color106}intérimaire false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 98 23 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/overview-pres.svg000066400000000000000000000261551321075051700333300ustar00rootroot00000000000000 \definecolor{color1928}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color1928}Action \definecolor{color1928}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color1928}Interaction \definecolor{color1928}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color1928}Evènement Présentation Présentation abstraite Présentation concrète \definecolor{color121}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color121}Instrument \definecolor{color121}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color121}Interface \definecolor{color121}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color121}Feed-back \definecolor{color121}{rgb}{0.7058823529411765,0.7058823529411765,0.7058823529411765}\color{color121}intérimaire false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.5 1280 743 98 29 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/overview.svg000066400000000000000000000247141321075051700323600ustar00rootroot00000000000000 Action Interaction Evènement Présentation Présentation abstraite Présentation concrète Instrument Interface Feed-back intérimaire true false 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.6 1154 648 136 54 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/overviewForma.svg000066400000000000000000000230251321075051700333370ustar00rootroot00000000000000 Evènement Présentation Instrument Interface Feed-back intérimaire true false 50 1.75 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.6 1189 700 104 31 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/overviewForma2.svg000066400000000000000000000420141321075051700334200ustar00rootroot00000000000000 Evènement Présentation Instrument Interface Feed-back intérimaire exécuter() \{ ... \} peutExécuter() \{ ... \} touches[1]=='a' main.curseur,cur) \#modifierCurseur( true false 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.6 1189 700 104 31 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/picker.svg000066400000000000000000000072271321075051700317670ustar00rootroot00000000000000 Picker getPickageAt(Point p) getPickerAt(Point p) Pickable getParentPicker() false true 50 1.0 cm false 20 0 true true true 2.0.2 1280 776 0 24 0.8 false true true 130 plasticIHMvsinterDM.svg000066400000000000000000000274431321075051700342660ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad Modèle d'interaction Modèle du domaine Modèle de tâche Modèle UI abstrait Modèle UI concret Modèle UI final plasticité des interfaces interaction dirigée par les modèles Modèle d'action Modèle des données false true 50 1.0 cm false 20 0 true true true 2.0.2 1162 685 33 78 0.8 false true true 129 presentation-interface.svg000066400000000000000000000154141321075051700351010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad Presentation Interface Presentation Instrument Data Instrument Instrument false true 50 1.0 cm false 20 0 true false true 2.0.2 1104 785 72 49 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/presentation1.svg000066400000000000000000000343721321075051700333070ustar00rootroot00000000000000 \color{darkgray}\textsf{ModelCalendar} \color{darkgray}\textsf{Calendar2D} Aspect Presentation 1 \color{darkgray}\textsf{ModelCalendar} \color{darkgray}\textsf{CalendarList} Aspect Presentation 2 false true 50 2.0 cm false 10 0 true false true 2.0.8 1439 1025 261 111 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/principeCS.svg000066400000000000000000000200751321075051700325450ustar00rootroot00000000000000 source Schéma Schéma cible Correspondance de schémas sources Données cibles Données Instance de Instance de false true 50 1.75 cm false 10 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} \usepackage{pifont} false 2.0.5 1280 776 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/recap.svg000066400000000000000000000331631321075051700316020ustar00rootroot00000000000000 Data User Interface Presentation Instrument abstract abstract abstract concrete concrete concrete concrete dyn. static Action Interaction class diagram class diagram class diagram class diagram class diagram class diagram class diagram Malan language Malai language State machine + Malai lang. false true 50 1.25 cm false 10 0 true false false 2.0.6 1686 1027 -3 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/related1.svg000066400000000000000000000070271321075051700322110ustar00rootroot00000000000000 Different targetted metamodels UML class diagram State-based model Kagdi05, Bae08, Lano10, Lallchandani10, Shaikh10 Korel03, Androutsopoulos11 false true 50 1.0 cm false 15 0 true false false 2.0.8 1083 742 115 178 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/related2.svg000066400000000000000000000104631321075051700322100ustar00rootroot00000000000000 Different slicing behaviour output conforms to input output may not conform Sen09, Lano10, Kelsen11 to input Post-processing operations Androutsopoulos11 Jeanneret11 false true 50 1.0 cm false 15 0 true false false 2.0.8 1083 742 113 178 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/reuse-tree.svg000066400000000000000000000167011321075051700325670ustar00rootroot00000000000000 key='control' keys DnD + no key ActionDeleteNode no key and ActionDuplicateNode ActionMoveNode target=button Delete instrument false true 50 1.25 cm false 20 0 true false true 2.0.2 975 716 174 82 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/schemaVSIDM.svg000066400000000000000000000245241321075051700325540ustar00rootroot00000000000000 MOF metamodèle UML modèle UML Espace technique MDA Conforme à Conforme à Conforme à Conforme à Schéma XML Schema Document XML Schema Document XML Espace technique XML Sintaks false true 50 1.0 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1280 776 0 25 0.8 false true true 167 slicingSemZoom Ex.svg000066400000000000000000000453241321075051700337320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad \color{darkgray}D \color{darkgray}E \color{darkgray}e \color{darkgray}0..1 \color{darkgray}A \color{darkgray}B \color{darkgray}C false true 50 2.5 cm false 10 0 true false false 2.0.8 1506 1063 166 71 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/slicingSemZoom.svg000066400000000000000000000446051321075051700334550ustar00rootroot00000000000000 \color{darkgray}eOperations \color{darkgray}EAttribute \color{darkgray}EClassifier \color{darkgray}EOperation \color{darkgray}EReference \color{darkgray}eReferences \color{darkgray}0..* \color{darkgray}eAttributes \color{darkgray}0..* \color{darkgray}EClass \color{darkgray}eSuperTypes \color{darkgray}0..* false true 50 2.0 cm false 10 0 true false false 2.0.8 1506 1063 166 71 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/swingstates.svg000066400000000000000000000254231321075051700330630ustar00rootroot00000000000000 StateMachine \{ Shape dragged; \definecolor{color5763}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5763}State start \{ PressOnShape -> drag \{ action()\{dragged=getShape();\} \} \definecolor{color5778}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5778}State drag \{ enter()\{dragged.hilite();\} \} Drag -> drag \{ action()\{dragged.move();\} Release -> start \{\} leave()\{dragged.unhilite();\} \definecolor{color5807b}{rgb}{0.39215686274509803,0.4588235294117647,0.9803921568627451}\psovalbox[linewidth=0.02,fillstyle=solid,fillcolor=color5807b,framesep=0.18]{start} \definecolor{color5807b}{rgb}{0.39215686274509803,0.4588235294117647,0.9803921568627451}\psovalbox[linewidth=0.02,fillstyle=solid,fillcolor=color5807b,framesep=0.18]{drag} pressOnShape() / dragged = getShape() release() Drag() / dragged.move() \definecolor{color5834}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5834}dragged.hilite() \definecolor{color5834}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5834}dragged.unhilite() \} \definecolor{color5843}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5843}\} \definecolor{color5843}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color5843}\} false true 50 1.0 cm false 20 0 true false true 2.0.3 1122 767 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/swingstatesCode.svg000066400000000000000000000147621321075051700336620ustar00rootroot00000000000000 StateMachine \{ Shape dragged; \definecolor{color77}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color77}State start \{ PressOnShape -> drag \{ action()\{dragged=getShape();\} \} \definecolor{color87}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color87}State drag \{ enter()\{dragged.hilite();\} \} Drag -> drag \{ action()\{dragged.move();\} Release -> start \{\} leave()\{dragged.unhilite();\} \} \definecolor{color107}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color107}\} \definecolor{color107}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color107}\} false true 50 1.0 cm false 20 0 true false true 2.0.3 1122 767 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/swingstatesSM.svg000066400000000000000000000135231321075051700333210ustar00rootroot00000000000000 \definecolor{color5807b}{rgb}{0.39215686274509803,0.4588235294117647,0.9803921568627451}\psovalbox[linewidth=0.02,fillstyle=solid,fillcolor=color5807b,framesep=0.18]{start} \definecolor{color5807b}{rgb}{0.39215686274509803,0.4588235294117647,0.9803921568627451}\psovalbox[linewidth=0.02,fillstyle=solid,fillcolor=color5807b,framesep=0.18]{drag} pressOnShape() / dragged = getShape() release() Drag() / dragged.move() \definecolor{color57}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color57}dragged.hilite() \definecolor{color57}{rgb}{0.3254901960784314,0.4627450980392157,0.8549019607843137}\color{color57}dragged.unhilite() false true 50 1.0 cm false 20 0 true false true 2.0.3 1122 767 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/tableRel.svg000066400000000000000000000137061321075051700322430ustar00rootroot00000000000000 personne : nomFamille prénom email téléphone Olivier Arnaud Blouin arnaud.blouin@eseo.fr olivier.beaudoux@eseo.fr 0241866745 identifiant e1 e2 false true 50 1.5 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.3 1122 766 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/testArrow.svg000066400000000000000000000052071321075051700325000ustar00rootroot00000000000000 false false 50 1.0 cm false 20 0 true true \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} false 2.0.8 1543 876 57 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/testLine.svg000066400000000000000000000065521321075051700323010ustar00rootroot00000000000000 false true 50 1.0 cm false 20 0 true true true 2.0.8 1207 690 288 139 0.7796188898094449 true true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/testMultiLines.svg000066400000000000000000000101441321075051700334670ustar00rootroot00000000000000 false true 50 1.0 cm false 20 0 true true true 2.0.8 1545 905 56 -4 0.856957928802589 true true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/todo.svg000066400000000000000000000064611321075051700314560ustar00rootroot00000000000000 Modeling HCI variability Reasoning to select adaptations Adapting Interactive Systems UI composition UI evaluation false true 50 1.25 cm false 15 0 true true true 2.0.8 1510 750 236 210 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/transfoModeles.svg000066400000000000000000000247331321075051700335000ustar00rootroot00000000000000 métamodèle source métamodèle cible modèle source \og source vers cible \fg{} transformation modèle cible conforme à conforme à exécution de la transformation false true 50 1.0 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} true 2.0.5 1207 688 101 40 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/transfoModeles2.svg000066400000000000000000000325671321075051700335660ustar00rootroot00000000000000 méta-métamodèle métamodèle source M3 M2 M1 de transformation métamodèle métamodèle cible modèle source source vers cible transformation modèle cible conforme à transformation false true 50 1.0 cm false 15 0 true false true 2.0.2 1188 861 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/translation.svg000066400000000000000000000133241321075051700330430ustar00rootroot00000000000000 \sc{OpenOffice.org} \sc{Microsoft} \sc{Office} OOXML ODF false true 50 1.25 cm false 20 0 true false \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage[utf8]{inputenc} false 2.0.3 1188 776 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/tree.svg000066400000000000000000000164371321075051700314540ustar00rootroot00000000000000 "Blouin" "Arnaud" "arnaud.blouin@eseo.fr" 0241866745 nomFamille prénom téléphone email nom personne personne Olivier olivier.beaudoux@eseo.fr nom email false true 50 1.0 cm false 30 0 true false true 2.0.3 1122 766 0 25 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/turing.svg000066400000000000000000000451541321075051700320230ustar00rootroot00000000000000 State name StartState EndState Action Move RightMove LeftMove Alphabet Symbol value WhiteSymbol move 1..1 symbol 0..* outSymbol 1..1 inSymbol 1..1 inState 1..1 outState 1..1 false true 50 1.0 cm false 15 0 true false false 2.0.3 1188 881 0 24 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/resources/test/res/testLoad/visualizer.svg000066400000000000000000001242231321075051700327030ustar00rootroot00000000000000 Kermeta Metamodel Click ModelingUnit User Interface JPanel JButton JFrame MetamodelView ClassView Rectangle2D LinkView Line2D mouseEvent Package ClassDefinition Operation Property Flat Flattener Click Prune Hierarchy HierarchyMaker Click Prune Pruner MultiClick InheritanceView RelationView Instruments \ding{172} \ding{173} \ding{174} \ding{174} \ding{174} \ding{175} false true 50 1.25 cm false 15 0 true false \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pifont} true 2.0.8 1657 971 165 75 0.8 false true true 130 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/000077500000000000000000000000001321075051700233775ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/000077500000000000000000000000001321075051700243565ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/HelperTest.java000066400000000000000000000011331321075051700272760ustar00rootroot00000000000000package test; import java.awt.GraphicsEnvironment; import java.lang.reflect.Field; import static org.junit.Assert.*; public abstract class HelperTest { public static Field getField(final Class clazz, final String name) throws SecurityException, NoSuchFieldException { final Field field = clazz.getDeclaredField(name); field.setAccessible(true); return field; } public static boolean isX11Set() { return !GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance(); } public static void assertEqualsDouble(double v1, double v2) { assertEquals(v1, v2, 0.0000001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/action/000077500000000000000000000000001321075051700256335ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/action/TestAbstractAction.java000066400000000000000000000012311321075051700322340ustar00rootroot00000000000000package test.action; import org.junit.Before; import org.junit.Test; import org.malai.action.Action; public abstract class TestAbstractAction { protected T action; @Before public void setUp() { action = createAction(); } protected abstract T createAction(); @Test public abstract void testConstructor() throws Exception; @Test public abstract void testFlush() throws Exception; @Test public abstract void testDo() throws Exception; @Test public abstract void testCanDo() throws Exception; @Test public abstract void testIsRegisterable() throws Exception; @Test public abstract void testHadEffect() throws Exception; } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/action/TestModifyShapeProperty.java000066400000000000000000001417471321075051700333310ustar00rootroot00000000000000package test.action; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.awt.Color; import java.lang.reflect.Field; import net.sf.latexdraw.actions.shape.ModifyShapeProperty; import net.sf.latexdraw.actions.shape.ShapeProperties; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArrowableShape; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import org.junit.Before; import org.junit.Test; import test.HelperTest; public class TestModifyShapeProperty extends TestAbstractAction { protected IGroup g; @Override @Before public void setUp() { super.setUp(); g = ShapeFactory.createGroup(); } @Test public void testDoArrowDotSizeNum() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setDotSizeNum(0.12); line2.setDotSizeNum(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_DOT_SIZE_NUM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getDotSizeNum(), 0.0001); assertEquals(0.33, line2.getDotSizeNum(), 0.0001); } @Test public void testUndoArrowDotSizeNum() { testDoArrowDotSizeNum(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getDotSizeNum(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getDotSizeNum(), 0.0001); } @Test public void testRedoArrowDotSizeNum() { testUndoArrowDotSizeNum(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getDotSizeNum(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getDotSizeNum(), 0.0001); } @Test public void testDoArrowDotSizeDim() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setDotSizeDim(0.12); line2.setDotSizeDim(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_DOT_SIZE_DIM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getDotSizeDim(), 0.0001); assertEquals(0.33, line2.getDotSizeDim(), 0.0001); } @Test public void testUndoArrowDotSizeDim() { testDoArrowDotSizeDim(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getDotSizeDim(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getDotSizeDim(), 0.0001); } @Test public void testRedoArrowDotSizeDim() { testUndoArrowDotSizeDim(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getDotSizeDim(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getDotSizeDim(), 0.0001); } @Test public void testDoArrowTBarSizeNum() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setTBarSizeNum(0.12); line2.setTBarSizeNum(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_T_BAR_SIZE_NUM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getTBarSizeNum(), 0.0001); assertEquals(0.33, line2.getTBarSizeNum(), 0.0001); } @Test public void testUndoArrowTBarSizeNum() { testDoArrowTBarSizeNum(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getTBarSizeNum(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getTBarSizeNum(), 0.0001); } @Test public void testRedoArrowTBarSizeNum() { testUndoArrowTBarSizeNum(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getTBarSizeNum(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getTBarSizeNum(), 0.0001); } @Test public void testDoArrowTBarSizeDim() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setTBarSizeDim(0.12); line2.setTBarSizeDim(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_T_BAR_SIZE_DIM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getTBarSizeDim(), 0.0001); assertEquals(0.33, line2.getTBarSizeDim(), 0.0001); } @Test public void testUndoArrowTBarSizeDim() { testDoArrowTBarSizeDim(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getTBarSizeDim(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getTBarSizeDim(), 0.0001); } @Test public void testRedoArrowTBarSizeDim() { testUndoArrowTBarSizeDim(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getTBarSizeDim(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getTBarSizeDim(), 0.0001); } @Test public void testDoArrowBracketNum() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setBracketNum(0.12); line2.setBracketNum(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_BRACKET_NUM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getBracketNum(), 0.0001); assertEquals(0.33, line2.getBracketNum(), 0.0001); } @Test public void testUndoArrowBracketNum() { testDoArrowBracketNum(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getBracketNum(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getBracketNum(), 0.0001); } @Test public void testRedoArrowBracketNum() { testUndoArrowBracketNum(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getBracketNum(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getBracketNum(), 0.0001); } @Test public void testDoArrowRBracketNum() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setRBracketNum(0.12); line2.setRBracketNum(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_R_BRACKET_NUM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getRBracketNum(), 0.0001); assertEquals(0.33, line2.getRBracketNum(), 0.0001); } @Test public void testUndoArrowRBracketNum() { testDoArrowRBracketNum(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getRBracketNum(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getRBracketNum(), 0.0001); } @Test public void testRedoArrowRBracketNum() { testUndoArrowRBracketNum(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getRBracketNum(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getRBracketNum(), 0.0001); } @Test public void testDoArrowSizeNum() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setArrowSizeNum(0.12); line2.setArrowSizeNum(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_SIZE_NUM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getArrowSizeNum(), 0.0001); assertEquals(0.33, line2.getArrowSizeNum(), 0.0001); } @Test public void testUndoArrowSizeNum() { testDoArrowSizeNum(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getArrowSizeNum(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getArrowSizeNum(), 0.0001); } @Test public void testRedoArrowSizeNum() { testUndoArrowSizeNum(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getArrowSizeNum(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getArrowSizeNum(), 0.0001); } @Test public void testDoArrowSizeDim() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setArrowSizeDim(0.12); line2.setArrowSizeDim(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_SIZE_DIM); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getArrowSizeDim(), 0.0001); assertEquals(0.33, line2.getArrowSizeDim(), 0.0001); } @Test public void testUndoArrowSizeDim() { testDoArrowSizeDim(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getArrowSizeDim(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getArrowSizeDim(), 0.0001); } @Test public void testRedoArrowsSizeDim() { testUndoArrowSizeDim(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getArrowSizeDim(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getArrowSizeDim(), 0.0001); } @Test public void testDoArrowLength() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setArrowLength(0.12); line2.setArrowLength(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_LENGTH); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getArrowLength(), 0.0001); assertEquals(0.33, line2.getArrowLength(), 0.0001); } @Test public void testUndoArrowLength() { testDoArrowLength(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getArrowLength(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getArrowLength(), 0.0001); } @Test public void testRedoArrowLength() { testUndoArrowLength(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getArrowLength(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getArrowLength(), 0.0001); } @Test public void testDoArrowInset() { IPolyline line1 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); IRectangle rec = ShapeFactory.createRectangle(); IPolyline line2 = ShapeFactory.createPolyline(ShapeFactory.createPoint(), ShapeFactory.createPoint(10, 10)); g.addShape(line1); g.addShape(rec); g.addShape(line2); line1.setArrowInset(0.12); line2.setArrowInset(0.23); action.setGroup(g); action.setProperty(ShapeProperties.ARROW_INSET); action.setValue(0.33); assertTrue(action.doIt()); assertEquals(0.33, line1.getArrowInset(), 0.0001); assertEquals(0.33, line2.getArrowInset(), 0.0001); } @Test public void testUndoArrowInset() { testDoArrowInset(); action.undo(); assertEquals(0.12, ((IPolyline)g.getShapeAt(0)).getArrowInset(), 0.0001); assertEquals(0.23, ((IPolyline)g.getShapeAt(2)).getArrowInset(), 0.0001); } @Test public void testRedoArrowInset() { testUndoArrowInset(); action.redo(); assertEquals(0.33, ((IPolyline)g.getShapeAt(0)).getArrowInset(), 0.0001); assertEquals(0.33, ((IPolyline)g.getShapeAt(2)).getArrowInset(), 0.0001); } @Test public void testDoGridStart() { IGrid grid = ShapeFactory.createGrid(ShapeFactory.createPoint()); IRectangle rec = ShapeFactory.createRectangle(); IAxes axe = ShapeFactory.createAxes(ShapeFactory.createPoint()); g.addShape(grid); g.addShape(rec); g.addShape(axe); grid.setGridStart(-3, -2); axe.setGridStart(-1, -4); action.setGroup(g); action.setProperty(ShapeProperties.GRID_START); action.setValue(ShapeFactory.createPoint(-5, -6)); assertTrue(action.doIt()); assertEquals(-5., grid.getGridStartX(), 0.0001); assertEquals(-6., grid.getGridStartY(), 0.0001); assertEquals(-5., axe.getGridStartX(), 0.0001); assertEquals(-6., axe.getGridStartY(), 0.0001); } @Test public void testUndoGridStart() { testDoGridStart(); action.undo(); assertEquals(-3., ((IGrid)g.getShapeAt(0)).getGridStartX(), 0.0001); assertEquals(-2., ((IGrid)g.getShapeAt(0)).getGridStartY(), 0.0001); assertEquals(-1., ((IAxes)g.getShapeAt(2)).getGridStartX(), 0.0001); assertEquals(-4., ((IAxes)g.getShapeAt(2)).getGridStartY(), 0.0001); } @Test public void testRedoGridStart() { testUndoGridStart(); action.redo(); assertEquals(-5., ((IGrid)g.getShapeAt(0)).getGridStartX(), 0.0001); assertEquals(-6., ((IGrid)g.getShapeAt(0)).getGridStartY(), 0.0001); assertEquals(-5., ((IAxes)g.getShapeAt(2)).getGridStartX(), 0.0001); assertEquals(-6., ((IAxes)g.getShapeAt(2)).getGridStartY(), 0.0001); } @Test public void testDoDotSize() { IDot d1 = ShapeFactory.createDot(ShapeFactory.createPoint()); IRectangle rec = ShapeFactory.createRectangle(); IDot d2 = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(d1); g.addShape(rec); g.addShape(d2); d1.setDiametre(11.); d2.setDiametre(22.2); action.setGroup(g); action.setProperty(ShapeProperties.DOT_SIZE); action.setValue(33.3); assertTrue(action.doIt()); assertEquals(33.3, d1.getDiametre(), 0.0001); assertEquals(33.3, d2.getDiametre(), 0.0001); } @Test public void testUndoDotSize() { testDoDotSize(); action.undo(); assertEquals(11., ((IDot)g.getShapeAt(0)).getDiametre(), 0.0001); assertEquals(22.2, ((IDot)g.getShapeAt(2)).getDiametre(), 0.0001); } @Test public void testRedoDotSize() { testUndoDotSize(); action.redo(); assertEquals(33.3, ((IDot)g.getShapeAt(0)).getDiametre(), 0.0001); assertEquals(33.3, ((IDot)g.getShapeAt(2)).getDiametre(), 0.0001); } @Test public void testDoDotStyle() { IDot d1 = ShapeFactory.createDot(ShapeFactory.createPoint()); IRectangle rec = ShapeFactory.createRectangle(); IDot d2 = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(d1); g.addShape(rec); g.addShape(d2); d1.setDotStyle(DotStyle.BAR); d2.setDotStyle(DotStyle.PLUS); action.setGroup(g); action.setProperty(ShapeProperties.DOT_STYLE); action.setValue(DotStyle.FDIAMOND); assertTrue(action.doIt()); assertEquals(DotStyle.FDIAMOND, d1.getDotStyle()); assertEquals(DotStyle.FDIAMOND, d2.getDotStyle()); } @Test public void testUndoDotStyle() { testDoDotStyle(); action.undo(); assertEquals(DotStyle.BAR, ((IDot)g.getShapeAt(0)).getDotStyle()); assertEquals(DotStyle.PLUS, ((IDot)g.getShapeAt(2)).getDotStyle()); } @Test public void testRedoDotStyle() { testUndoDotStyle(); action.redo(); assertEquals(DotStyle.FDIAMOND, ((IDot)g.getShapeAt(0)).getDotStyle()); assertEquals(DotStyle.FDIAMOND, ((IDot)g.getShapeAt(2)).getDotStyle()); } @Test public void testDoLineStyle() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setLineStyle(LineStyle.DASHED); rec2.setLineStyle(LineStyle.DOTTED); action.setGroup(g); action.setProperty(ShapeProperties.LINE_STYLE); action.setValue(LineStyle.SOLID); assertTrue(action.doIt()); assertEquals(LineStyle.SOLID, rec1.getLineStyle()); assertEquals(LineStyle.SOLID, rec2.getLineStyle()); } @Test public void testUndoLineStyle() { testDoLineStyle(); action.undo(); assertEquals(LineStyle.DASHED, g.getShapeAt(0).getLineStyle()); assertEquals(LineStyle.DOTTED, g.getShapeAt(2).getLineStyle()); } @Test public void testRedoLineStyle() { testUndoLineStyle(); action.redo(); assertEquals(LineStyle.SOLID, g.getShapeAt(0).getLineStyle()); assertEquals(LineStyle.SOLID, g.getShapeAt(2).getLineStyle()); } @Test public void testDoFillingStyle() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setFillingStyle(FillingStyle.CLINES_PLAIN); rec2.setFillingStyle(FillingStyle.GRAD); action.setGroup(g); action.setProperty(ShapeProperties.FILLING_STYLE); action.setValue(FillingStyle.VLINES); assertTrue(action.doIt()); assertEquals(FillingStyle.VLINES, rec1.getFillingStyle()); assertEquals(FillingStyle.VLINES, rec2.getFillingStyle()); } @Test public void testUndoFillingStyle() { testDoFillingStyle(); action.undo(); assertEquals(FillingStyle.CLINES_PLAIN, g.getShapeAt(0).getFillingStyle()); assertEquals(FillingStyle.GRAD, g.getShapeAt(2).getFillingStyle()); } @Test public void testRedoFillingStyle() { testUndoFillingStyle(); action.redo(); assertEquals(FillingStyle.VLINES, g.getShapeAt(0).getFillingStyle()); assertEquals(FillingStyle.VLINES, g.getShapeAt(2).getFillingStyle()); } @Test public void testDoThickness() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setThickness(12.5); rec2.setThickness(33.); action.setGroup(g); action.setProperty(ShapeProperties.LINE_THICKNESS); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getThickness(), 0.0001); assertEquals(101., rec2.getThickness(), 0.0001); } @Test public void testUndoThickness() { testDoThickness(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getThickness(), 0.0001); assertEquals(33., g.getShapeAt(2).getThickness(), 0.0001); } @Test public void testRedoThickness() { testUndoThickness(); action.redo(); assertEquals(101., g.getShapeAt(0).getThickness(), 0.0001); assertEquals(101., g.getShapeAt(2).getThickness(), 0.0001); } @Test public void testDoShadowAngle() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setShadowAngle(12.5); rec2.setShadowAngle(33.); action.setGroup(g); action.setProperty(ShapeProperties.SHADOW_ANGLE); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getShadowAngle(), 0.0001); assertEquals(101., rec2.getShadowAngle(), 0.0001); } @Test public void testUndoShadowAngle() { testDoShadowAngle(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getShadowAngle(), 0.0001); assertEquals(33., g.getShapeAt(2).getShadowAngle(), 0.0001); } @Test public void testRedoShadowAngle() { testUndoShadowAngle(); action.redo(); assertEquals(101., g.getShapeAt(0).getShadowAngle(), 0.0001); assertEquals(101., g.getShapeAt(2).getShadowAngle(), 0.0001); } @Test public void testDoShadowSize() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setShadowSize(12.5); rec2.setShadowSize(33.); action.setGroup(g); action.setProperty(ShapeProperties.SHADOW_SIZE); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getShadowSize(), 0.0001); assertEquals(101., rec2.getShadowSize(), 0.0001); } @Test public void testUndoShadowSize() { testDoShadowSize(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getShadowSize(), 0.0001); assertEquals(33., g.getShapeAt(2).getShadowSize(), 0.0001); } @Test public void testRedoShadowSize() { testUndoShadowSize(); action.redo(); assertEquals(101., g.getShapeAt(0).getShadowSize(), 0.0001); assertEquals(101., g.getShapeAt(2).getShadowSize(), 0.0001); } @Test public void testDoHasShadow() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setHasShadow(true); rec2.setHasShadow(false); action.setGroup(g); action.setProperty(ShapeProperties.SHADOW); action.setValue(true); assertTrue(action.doIt()); assertTrue(rec1.hasShadow()); assertTrue(rec2.hasShadow()); } @Test public void testUndoHasShadow() { testDoHasShadow(); action.undo(); assertTrue(g.getShapeAt(0).hasShadow()); assertFalse(g.getShapeAt(2).hasShadow()); } @Test public void testRedoHasShadow() { testUndoHasShadow(); action.redo(); assertTrue(g.getShapeAt(0).hasShadow()); assertTrue(g.getShapeAt(2).hasShadow()); } @Test public void testDoDbleBordSep() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setDbleBordSep(12.5); rec2.setDbleBordSep(33.); action.setGroup(g); action.setProperty(ShapeProperties.DBLE_BORDERS_SIZE); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getDbleBordSep(), 0.0001); assertEquals(101., rec2.getDbleBordSep(), 0.0001); } @Test public void testUndoDbleBordSep() { testDoDbleBordSep(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getDbleBordSep(), 0.0001); assertEquals(33., g.getShapeAt(2).getDbleBordSep(), 0.0001); } @Test public void testRedoDbleBordSep() { testUndoDbleBordSep(); action.redo(); assertEquals(101., g.getShapeAt(0).getDbleBordSep(), 0.0001); assertEquals(101., g.getShapeAt(2).getDbleBordSep(), 0.0001); } @Test public void testDoHasDbleBord() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setHasDbleBord(true); rec2.setHasDbleBord(false); action.setGroup(g); action.setProperty(ShapeProperties.DBLE_BORDERS); action.setValue(true); assertTrue(action.doIt()); assertTrue(rec1.hasDbleBord()); assertTrue(rec2.hasDbleBord()); } @Test public void testUndoHasDbleBord() { testDoHasDbleBord(); action.undo(); assertTrue(g.getShapeAt(0).hasDbleBord()); assertFalse(g.getShapeAt(2).hasDbleBord()); } @Test public void testRedoHasDbleBord() { testUndoHasDbleBord(); action.redo(); assertTrue(g.getShapeAt(0).hasDbleBord()); assertTrue(g.getShapeAt(2).hasDbleBord()); } @Test public void testDoFillingDotCol() { IDot d1 = ShapeFactory.createDot(ShapeFactory.createPoint()); IRectangle rec = ShapeFactory.createRectangle(); IDot d2 = ShapeFactory.createDot(ShapeFactory.createPoint()); d1.setDotStyle(DotStyle.DIAMOND); d2.setDotStyle(DotStyle.DIAMOND); g.addShape(d1); g.addShape(rec); g.addShape(d2); d1.setDotFillingCol(Color.RED); d2.setDotFillingCol(Color.GREEN); rec.setFillingCol(Color.CYAN); action.setGroup(g); action.setProperty(ShapeProperties.DOT_FILLING_COL); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, d1.getDotFillingCol()); assertEquals(Color.GRAY, d2.getDotFillingCol()); assertEquals(Color.CYAN, rec.getFillingCol()); } @Test public void testUndoFillingDotCol() { testDoFillingDotCol(); action.undo(); assertEquals(Color.RED, ((IDot)g.getShapeAt(0)).getDotFillingCol()); assertEquals(Color.CYAN, g.getShapeAt(1).getFillingCol()); assertEquals(Color.GREEN, ((IDot)g.getShapeAt(2)).getDotFillingCol()); } @Test public void testRedoFillingDotCol() { testUndoFillingDotCol(); action.redo(); assertEquals(Color.GRAY, ((IDot)g.getShapeAt(0)).getDotFillingCol()); assertEquals(Color.CYAN, g.getShapeAt(1).getFillingCol()); assertEquals(Color.GRAY, ((IDot)g.getShapeAt(2)).getDotFillingCol()); } @Test public void testDoStartGradCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setGradColStart(Color.RED); rec2.setGradColStart(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_GRADIENT_START); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getGradColStart()); assertEquals(Color.GRAY, rec2.getGradColStart()); } @Test public void testUndoStartGradCol() { testDoStartGradCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getGradColStart()); assertEquals(Color.GREEN, g.getShapeAt(2).getGradColStart()); } @Test public void testRedoStartGradCol() { testUndoStartGradCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getGradColStart()); assertEquals(Color.GRAY, g.getShapeAt(2).getGradColStart()); } @Test public void testDoEndGradCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setGradColEnd(Color.RED); rec2.setGradColEnd(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_GRADIENT_END); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getGradColEnd()); assertEquals(Color.GRAY, rec2.getGradColEnd()); } @Test public void testUndoEndGradCol() { testDoEndGradCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getGradColEnd()); assertEquals(Color.GREEN, g.getShapeAt(2).getGradColEnd()); } @Test public void testRedoEndGradCol() { testUndoEndGradCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getGradColEnd()); assertEquals(Color.GRAY, g.getShapeAt(2).getGradColEnd()); } @Test public void testDoShadowCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setShadowCol(Color.RED); rec2.setShadowCol(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_SHADOW); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getShadowCol()); assertEquals(Color.GRAY, rec2.getShadowCol()); } @Test public void testUndoShadowCol() { testDoShadowCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getShadowCol()); assertEquals(Color.GREEN, g.getShapeAt(2).getShadowCol()); } @Test public void testRedoShadowCol() { testUndoShadowCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getShadowCol()); assertEquals(Color.GRAY, g.getShapeAt(2).getShadowCol()); } @Test public void testDoDbleBordCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setDbleBordCol(Color.RED); rec2.setDbleBordCol(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_DBLE_BORD); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getDbleBordCol()); assertEquals(Color.GRAY, rec2.getDbleBordCol()); } @Test public void testUndoDbleBordCol() { testDoDbleBordCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getDbleBordCol()); assertEquals(Color.GREEN, g.getShapeAt(2).getDbleBordCol()); } @Test public void testRedoDbleBordCol() { testUndoDbleBordCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getDbleBordCol()); assertEquals(Color.GRAY, g.getShapeAt(2).getDbleBordCol()); } @Test public void testDoHatchingsCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setHatchingsCol(Color.RED); rec2.setHatchingsCol(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_HATCHINGS); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getHatchingsCol()); assertEquals(Color.GRAY, rec2.getHatchingsCol()); } @Test public void testUndoHatchingsCol() { testDoHatchingsCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getHatchingsCol()); assertEquals(Color.GREEN, g.getShapeAt(2).getHatchingsCol()); } @Test public void testRedoHatchingsCol() { testUndoHatchingsCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getHatchingsCol()); assertEquals(Color.GRAY, g.getShapeAt(2).getHatchingsCol()); } @Test public void testDoFillingCol() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setFillingCol(Color.RED); rec2.setFillingCol(Color.GREEN); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_FILLING); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getFillingCol()); assertEquals(Color.GRAY, rec2.getFillingCol()); } @Test public void testUndoFillingCol() { testDoFillingCol(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getFillingCol()); assertEquals(Color.GREEN, g.getShapeAt(2).getFillingCol()); } @Test public void testRedoFillingCol() { testUndoFillingCol(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getFillingCol()); assertEquals(Color.GRAY, g.getShapeAt(2).getFillingCol()); } @Test public void testDoLineArc() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setLineArc(0.1); rec2.setLineArc(0.2); action.setGroup(g); action.setProperty(ShapeProperties.ROUND_CORNER_VALUE); action.setValue(0.3); assertTrue(action.doIt()); assertEquals(0.3, rec1.getLineArc(), 0.0001); assertEquals(0.3, rec2.getLineArc(), 0.0001); } @Test public void testUndoLineArc() { testDoLineArc(); action.undo(); assertEquals(0.1, ((ILineArcProp)g.getShapeAt(0)).getLineArc(), 0.0001); assertEquals(0.2, ((ILineArcProp)g.getShapeAt(2)).getLineArc(), 0.0001); } @Test public void testRedoLineArc() { testUndoLineArc(); action.redo(); assertEquals(0.3, ((ILineArcProp)g.getShapeAt(0)).getLineArc(), 0.0001); assertEquals(0.3, ((ILineArcProp)g.getShapeAt(2)).getLineArc(), 0.0001); } @Test public void testDoGradMidPt() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setGradMidPt(0.1); rec2.setGradMidPt(0.2); action.setGroup(g); action.setProperty(ShapeProperties.GRAD_MID_POINT); action.setValue(0.3); assertTrue(action.doIt()); assertEquals(0.3, rec1.getGradMidPt(), 0.0001); assertEquals(0.3, rec2.getGradMidPt(), 0.0001); } @Test public void testUndoGradMidPt() { testDoGradMidPt(); action.undo(); assertEquals(0.1, g.getShapeAt(0).getGradMidPt(), 0.0001); assertEquals(0.2, g.getShapeAt(2).getGradMidPt(), 0.0001); } @Test public void testRedoGradMidPt() { testUndoGradMidPt(); action.redo(); assertEquals(0.3, g.getShapeAt(0).getGradMidPt(), 0.0001); assertEquals(0.3, g.getShapeAt(2).getGradMidPt(), 0.0001); } @Test public void testDoGradAngle() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setGradAngle(12.5); rec2.setGradAngle(33.); action.setGroup(g); action.setProperty(ShapeProperties.GRAD_ANGLE); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getGradAngle(), 0.0001); assertEquals(101., rec2.getGradAngle(), 0.0001); } @Test public void testUndoGradAngle() { testDoGradAngle(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getGradAngle(), 0.0001); assertEquals(33., g.getShapeAt(2).getGradAngle(), 0.0001); } @Test public void testRedoGradAngle() { testUndoGradAngle(); action.redo(); assertEquals(101., g.getShapeAt(0).getGradAngle(), 0.0001); assertEquals(101., g.getShapeAt(2).getGradAngle(), 0.0001); } @Test public void testDoHatchingsSep() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setHatchingsSep(12.5); rec2.setHatchingsSep(33.); action.setGroup(g); action.setProperty(ShapeProperties.HATCHINGS_SEP); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getHatchingsSep(), 0.0001); assertEquals(101., rec2.getHatchingsSep(), 0.0001); } @Test public void testUndoHatchingsSep() { testDoHatchingsSep(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getHatchingsSep(), 0.0001); assertEquals(33., g.getShapeAt(2).getHatchingsSep(), 0.0001); } @Test public void testRedoHatchingsSep() { testUndoHatchingsSep(); action.redo(); assertEquals(101., g.getShapeAt(0).getHatchingsSep(), 0.0001); assertEquals(101., g.getShapeAt(2).getHatchingsSep(), 0.0001); } @Test public void testDoHatchingsWidth() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setHatchingsWidth(12.5); rec2.setHatchingsWidth(33.); action.setGroup(g); action.setProperty(ShapeProperties.HATCHINGS_WIDTH); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getHatchingsWidth(), 0.0001); assertEquals(101., rec2.getHatchingsWidth(), 0.0001); } @Test public void testUndoHatchingsWidth() { testDoHatchingsWidth(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getHatchingsWidth(), 0.0001); assertEquals(33., g.getShapeAt(2).getHatchingsWidth(), 0.0001); } @Test public void testRedoHatchingsWidth() { testUndoHatchingsWidth(); action.redo(); assertEquals(101., g.getShapeAt(0).getHatchingsWidth(), 0.0001); assertEquals(101., g.getShapeAt(2).getHatchingsWidth(), 0.0001); } @Test public void testDoHatchingsAngle() { IRectangle rec1 = ShapeFactory.createRectangle(); IText p = ShapeFactory.createText(); IRectangle rec2 = ShapeFactory.createRectangle(); g.addShape(rec1); g.addShape(p); g.addShape(rec2); rec1.setHatchingsAngle(12.5); rec2.setHatchingsAngle(-33.); action.setGroup(g); action.setProperty(ShapeProperties.HATCHINGS_ANGLE); action.setValue(101.); assertTrue(action.doIt()); assertEquals(101., rec1.getHatchingsAngle(), 0.0001); assertEquals(101., rec2.getHatchingsAngle(), 0.0001); } @Test public void testUndoHatchingsAngle() { testDoHatchingsAngle(); action.undo(); assertEquals(12.5, g.getShapeAt(0).getHatchingsAngle(), 0.0001); assertEquals(-33., g.getShapeAt(2).getHatchingsAngle(), 0.0001); } @Test public void testRedoHatchingsAngle() { testUndoHatchingsAngle(); action.redo(); assertEquals(101., g.getShapeAt(0).getHatchingsAngle(), 0.0001); assertEquals(101., g.getShapeAt(2).getHatchingsAngle(), 0.0001); } @Test public void testDoText() { IText p1 = ShapeFactory.createText(); IRectangle rec = ShapeFactory.createRectangle(); IText p2 = ShapeFactory.createText(); g.addShape(p1); g.addShape(rec); g.addShape(p2); p1.setText("foo1"); //$NON-NLS-1$ p2.setText("foo2"); //$NON-NLS-1$ action.setGroup(g); action.setProperty(ShapeProperties.TEXT); action.setValue("foo3"); //$NON-NLS-1$ assertTrue(action.doIt()); assertEquals("foo3", p1.getText()); //$NON-NLS-1$ assertEquals("foo3", p2.getText()); //$NON-NLS-1$ } @Test public void testUndoText() { testDoText(); action.undo(); assertEquals("foo1", ((IText)g.getShapeAt(0)).getText()); //$NON-NLS-1$ assertEquals("foo2", ((IText)g.getShapeAt(2)).getText()); //$NON-NLS-1$ } @Test public void testRedoText() { testUndoText(); action.redo(); assertEquals("foo3", ((IText)g.getShapeAt(0)).getText()); //$NON-NLS-1$ assertEquals("foo3", ((IText)g.getShapeAt(2)).getText()); //$NON-NLS-1$ } @Test public void testDoTextPosition() { IText p1 = ShapeFactory.createText(); IRectangle rec = ShapeFactory.createRectangle(); IText p2 = ShapeFactory.createText(); g.addShape(p1); g.addShape(rec); g.addShape(p2); p1.setTextPosition(TextPosition.BOT_LEFT); p2.setTextPosition(TextPosition.TOP); action.setGroup(g); action.setProperty(ShapeProperties.TEXT_POSITION); action.setValue(TextPosition.BOT); assertTrue(action.doIt()); assertEquals(TextPosition.BOT, p1.getTextPosition()); assertEquals(TextPosition.BOT, p2.getTextPosition()); } @Test public void testUndoTextPosition() { testDoTextPosition(); action.undo(); assertEquals(TextPosition.BOT_LEFT, ((IText)g.getShapeAt(0)).getTextPosition()); assertEquals(TextPosition.TOP, ((IText)g.getShapeAt(2)).getTextPosition()); } @Test public void testRedoTextPosition() { testUndoTextPosition(); action.redo(); assertEquals(TextPosition.BOT, ((IText)g.getShapeAt(0)).getTextPosition()); assertEquals(TextPosition.BOT, ((IText)g.getShapeAt(2)).getTextPosition()); } @Test public void testDoArrowStyle1() { IPolyline p1 = ShapeFactory.createPolyline(); IRectangle rec = ShapeFactory.createRectangle(); IPolyline p2 = ShapeFactory.createPolyline(); g.addShape(p1); g.addShape(rec); g.addShape(p2); p1.setArrowStyle(ArrowStyle.LEFT_DBLE_ARROW, 1); p2.setArrowStyle(ArrowStyle.RIGHT_DBLE_ARROW, 1); action.setGroup(g); action.setProperty(ShapeProperties.ARROW2_STYLE); action.setValue(ArrowStyle.BAR_IN); assertTrue(action.doIt()); assertEquals(ArrowStyle.BAR_IN, p1.getArrowStyle(1)); assertEquals(ArrowStyle.BAR_IN, p2.getArrowStyle(1)); } @Test public void testUndoArrowStyle1() { testDoArrowStyle1(); action.undo(); assertEquals(ArrowStyle.LEFT_DBLE_ARROW, ((IArrowableShape)g.getShapeAt(0)).getArrowStyle(1)); assertEquals(ArrowStyle.RIGHT_DBLE_ARROW, ((IArrowableShape)g.getShapeAt(2)).getArrowStyle(1)); } @Test public void testRedoArrowStyle1() { testUndoArrowStyle1(); action.redo(); assertEquals(ArrowStyle.BAR_IN, ((IArrowableShape)g.getShapeAt(0)).getArrowStyle(1)); assertEquals(ArrowStyle.BAR_IN, ((IArrowableShape)g.getShapeAt(2)).getArrowStyle(1)); } @Test public void testDoArrowStyle0() { IPolyline p1 = ShapeFactory.createPolyline(); IRectangle rec = ShapeFactory.createRectangle(); IPolyline p2 = ShapeFactory.createPolyline(); g.addShape(p1); g.addShape(rec); g.addShape(p2); p1.setArrowStyle(ArrowStyle.LEFT_DBLE_ARROW, 0); p2.setArrowStyle(ArrowStyle.RIGHT_DBLE_ARROW, 0); action.setGroup(g); action.setProperty(ShapeProperties.ARROW1_STYLE); action.setValue(ArrowStyle.BAR_IN); assertTrue(action.doIt()); assertEquals(ArrowStyle.BAR_IN, p1.getArrowStyle(0)); assertEquals(ArrowStyle.BAR_IN, p2.getArrowStyle(0)); } @Test public void testUndoArrowStyle0() { testDoArrowStyle0(); action.undo(); assertEquals(ArrowStyle.LEFT_DBLE_ARROW, ((IArrowableShape)g.getShapeAt(0)).getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_DBLE_ARROW, ((IArrowableShape)g.getShapeAt(2)).getArrowStyle(0)); } @Test public void testRedoArrowStyle0() { testUndoArrowStyle0(); action.redo(); assertEquals(ArrowStyle.BAR_IN, ((IArrowableShape)g.getShapeAt(0)).getArrowStyle(0)); assertEquals(ArrowStyle.BAR_IN, ((IArrowableShape)g.getShapeAt(2)).getArrowStyle(0)); } @Test public void testDoArcStyle() { IArc arc1 = ShapeFactory.createCircleArc(); IRectangle rec = ShapeFactory.createRectangle(); IArc arc2 = ShapeFactory.createCircleArc(); g.addShape(arc1); g.addShape(rec); g.addShape(arc2); arc1.setArcStyle(ArcStyle.CHORD); arc2.setArcStyle(ArcStyle.WEDGE); action.setGroup(g); action.setProperty(ShapeProperties.ARC_STYLE); action.setValue(ArcStyle.ARC); assertTrue(action.doIt()); assertEquals(ArcStyle.ARC, arc1.getArcStyle()); assertEquals(ArcStyle.ARC, arc2.getArcStyle()); } @Test public void testUndoArcStyle() { testDoArcStyle(); action.undo(); assertEquals(ArcStyle.CHORD, ((IArc)g.getShapeAt(0)).getArcStyle()); assertEquals(ArcStyle.WEDGE, ((IArc)g.getShapeAt(2)).getArcStyle()); } @Test public void testRedoArcStyle() { testUndoArcStyle(); action.redo(); assertEquals(ArcStyle.ARC, ((IArc)g.getShapeAt(0)).getArcStyle()); assertEquals(ArcStyle.ARC, ((IArc)g.getShapeAt(2)).getArcStyle()); } @Test public void testDoAngleEnd() { IArc arc1 = ShapeFactory.createCircleArc(); IRectangle rec = ShapeFactory.createRectangle(); IArc arc2 = ShapeFactory.createCircleArc(); g.addShape(arc1); g.addShape(rec); g.addShape(arc2); arc1.setAngleEnd(111.); arc2.setAngleEnd(-23.43); action.setGroup(g); action.setProperty(ShapeProperties.ARC_END_ANGLE); action.setValue(21.); assertTrue(action.doIt()); assertEquals(21., arc1.getAngleEnd(), 0.0001); assertEquals(21., arc2.getAngleEnd(), 0.0001); } @Test public void testUndoAngleEnd() { testDoAngleEnd(); action.undo(); assertEquals(111., ((IArc)g.getShapeAt(0)).getAngleEnd(), 0.0001); assertEquals(-23.43, ((IArc)g.getShapeAt(2)).getAngleEnd(), 0.0001); } @Test public void testRedoAngleEnd() { testUndoAngleEnd(); action.redo(); assertEquals(21., ((IArc)g.getShapeAt(0)).getAngleEnd(), 0.0001); assertEquals(21., ((IArc)g.getShapeAt(2)).getAngleEnd(), 0.0001); } @Test public void testDoAngleStart() { IArc arc1 = ShapeFactory.createCircleArc(); IRectangle rec = ShapeFactory.createRectangle(); IArc arc2 = ShapeFactory.createCircleArc(); g.addShape(arc1); g.addShape(rec); g.addShape(arc2); arc1.setAngleStart(111.); arc2.setAngleStart(-23.43); action.setGroup(g); action.setProperty(ShapeProperties.ARC_START_ANGLE); action.setValue(21.); assertTrue(action.doIt()); assertEquals(21., arc1.getAngleStart(), 0.0001); assertEquals(21., arc2.getAngleStart(), 0.0001); } @Test public void testUndoAngleStart() { testDoAngleStart(); action.undo(); assertEquals(111., ((IArc)g.getShapeAt(0)).getAngleStart(), 0.0001); assertEquals(-23.43, ((IArc)g.getShapeAt(2)).getAngleStart(), 0.0001); } @Test public void testRedoAngleStart() { testUndoAngleStart(); action.redo(); assertEquals(21., ((IArc)g.getShapeAt(0)).getAngleStart(), 0.0001); assertEquals(21., ((IArc)g.getShapeAt(2)).getAngleStart(), 0.0001); } @Test public void testDoLineColour() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setLineColour(Color.RED); rec2.setLineColour(Color.GREEN); dot.setLineColour(Color.YELLOW); action.setGroup(g); action.setProperty(ShapeProperties.COLOUR_LINE); action.setValue(Color.GRAY); assertTrue(action.doIt()); assertEquals(Color.GRAY, rec1.getLineColour()); assertEquals(Color.GRAY, rec2.getLineColour()); assertEquals(Color.GRAY, dot.getLineColour()); } @Test public void testUndoLineColour() { testDoLineColour(); action.undo(); assertEquals(Color.RED, g.getShapeAt(0).getLineColour()); assertEquals(Color.YELLOW, g.getShapeAt(1).getLineColour()); assertEquals(Color.GREEN, g.getShapeAt(2).getLineColour()); } @Test public void testRedoLineColour() { testUndoLineColour(); action.redo(); assertEquals(Color.GRAY, g.getShapeAt(0).getLineColour()); assertEquals(Color.GRAY, g.getShapeAt(1).getLineColour()); assertEquals(Color.GRAY, g.getShapeAt(2).getLineColour()); } @Test public void testDoBorderPosition() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); g.addShape(rec1); g.addShape(dot); g.addShape(rec2); rec1.setBordersPosition(BorderPos.MID); rec2.setBordersPosition(BorderPos.INTO); action.setGroup(g); action.setProperty(ShapeProperties.BORDER_POS); action.setValue(BorderPos.OUT); assertTrue(action.doIt()); assertEquals(BorderPos.OUT, rec1.getBordersPosition()); assertEquals(BorderPos.OUT, rec2.getBordersPosition()); } @Test public void testUndoBorderPosition() { testDoBorderPosition(); action.undo(); assertEquals(BorderPos.MID, g.getShapeAt(0).getBordersPosition()); assertEquals(BorderPos.INTO, g.getShapeAt(2).getBordersPosition()); } @Test public void testRedoBorderPosition() { testUndoBorderPosition(); action.redo(); assertEquals(BorderPos.OUT, g.getShapeAt(0).getBordersPosition()); assertEquals(BorderPos.OUT, g.getShapeAt(2).getBordersPosition()); } @Override protected ModifyShapeProperty createAction() { return new ModifyShapeProperty(); } @SuppressWarnings("unused") @Override @Test public void testConstructor() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { new ModifyShapeProperty(); } @Override @Test public void testFlush() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { IRectangle rec = ShapeFactory.createRectangle(); g.addShape(rec); action.setGroup(g); action.setProperty(ShapeProperties.BORDER_POS); action.setValue(BorderPos.OUT); action.doIt(); action.flush(); Field f = HelperTest.getField(ModifyShapeProperty.class, "shapes"); //$NON-NLS-1$ assertNull(f.get(action)); f = HelperTest.getField(ModifyShapeProperty.class, "oldValue"); //$NON-NLS-1$ assertNull(f.get(action)); action.flush(); } @Override @Test public void testDo() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { assertFalse(action.doIt()); IRectangle rec = ShapeFactory.createRectangle(); g.addShape(rec); action.setGroup(g); action.setProperty(ShapeProperties.BORDER_POS); action.setValue(BorderPos.OUT); assertTrue(action.doIt()); } @Override @Test public void testCanDo() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { IGroup varTmp = ShapeFactory.createGroup(); assertFalse(action.canDo()); action.setGroup(varTmp); assertFalse(action.canDo()); action.setProperty(ShapeProperties.ARC_END_ANGLE); assertFalse(action.canDo()); action.setValue(100.); assertFalse(action.canDo()); varTmp.addShape(ShapeFactory.createCircleArc()); assertTrue(action.canDo()); action.setGroup(null); assertFalse(action.canDo()); } @Override @Test public void testIsRegisterable() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { assertTrue(action.isRegisterable()); } @Override @Test public void testHadEffect() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { assertFalse(action.hadEffect()); action.done(); assertTrue(action.hadEffect()); } @Test public void testGetUndoName() { assertNotNull(action.getUndoName()); action.setProperty(ShapeProperties.ARC_END_ANGLE); assertNotNull(action.getUndoName()); action.setProperty(null); assertNotNull(action.getUndoName()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/000077500000000000000000000000001321075051700252735ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/000077500000000000000000000000001321075051700265565ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestGLibUtilities.java000066400000000000000000000076361321075051700330060ustar00rootroot00000000000000package test.glib.models ; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import org.junit.Test; public class TestGLibUtilities{ @Test public void testIsValidPoint1() { assertFalse(GLibUtilities.isValidPoint(null)); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NaN, 0))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NaN, Double.NaN))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(0, Double.NaN))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(0, Double.POSITIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, 0))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NaN, Double.NEGATIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, Double.NaN))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.NaN, Double.POSITIVE_INFINITY))); assertFalse(GLibUtilities.isValidPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, Double.NaN))); assertTrue(GLibUtilities.isValidPoint(ShapeFactory.createPoint(0, 0))); assertTrue(GLibUtilities.isValidPoint(ShapeFactory.createPoint(1000000, 1000000))); assertTrue(GLibUtilities.isValidPoint(ShapeFactory.createPoint(-1000000, -1000000))); } @Test public void testIsValidPoint2() { assertFalse(GLibUtilities.isValidPoint(Double.NaN, 0)); assertFalse(GLibUtilities.isValidPoint(Double.NaN, Double.NaN)); assertFalse(GLibUtilities.isValidPoint(0, Double.NaN)); assertFalse(GLibUtilities.isValidPoint(Double.POSITIVE_INFINITY, 0)); assertFalse(GLibUtilities.isValidPoint(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(0, Double.POSITIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.NEGATIVE_INFINITY, 0)); assertFalse(GLibUtilities.isValidPoint(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(0, Double.NEGATIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.NaN, Double.NEGATIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.NEGATIVE_INFINITY, Double.NaN)); assertFalse(GLibUtilities.isValidPoint(Double.NaN, Double.POSITIVE_INFINITY)); assertFalse(GLibUtilities.isValidPoint(Double.POSITIVE_INFINITY, Double.NaN)); assertTrue(GLibUtilities.isValidPoint(0, 0)); assertTrue(GLibUtilities.isValidPoint(1000000, 1000000)); assertTrue(GLibUtilities.isValidPoint(-1000000, -1000000)); } @Test public void testIsValidCoordinate() { assertFalse(GLibUtilities.isValidCoordinate(Double.NaN)); assertFalse(GLibUtilities.isValidCoordinate(Double.POSITIVE_INFINITY)); assertFalse(GLibUtilities.isValidCoordinate(Double.NEGATIVE_INFINITY)); assertTrue(GLibUtilities.isValidCoordinate(0)); assertTrue(GLibUtilities.isValidCoordinate(1000000)); assertTrue(GLibUtilities.isValidCoordinate(-1000000)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLArrow.java000066400000000000000000000003071321075051700314670ustar00rootroot00000000000000package test.glib.models; import org.junit.Test; import test.glib.models.interfaces.TestIArrow; public class TestLArrow extends TestIArrow { @Test public void testConstructors() { //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLAxes.java000066400000000000000000000050661321075051700313040ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIAxes; public class TestLAxes extends TestIAxes { @Before public void setUp() { shape = ShapeFactory.createAxes(ShapeFactory.createPoint()); shape2 = ShapeFactory.createAxes(ShapeFactory.createPoint()); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IStandardGrid.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructor3() { IAxes axes = ShapeFactory.createAxes(ShapeFactory.createPoint(10, -20)); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(10., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(-20., axes.getPtAt(0).getY()); axes = ShapeFactory.createAxes(null); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getY()); axes = ShapeFactory.createAxes(null); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getY()); axes = ShapeFactory.createAxes(ShapeFactory.createPoint(Double.NaN, 0)); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getY()); axes = ShapeFactory.createAxes(ShapeFactory.createPoint(0, Double.NaN)); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getY()); axes = ShapeFactory.createAxes(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0)); assertNotNull(axes.getPtAt(0)); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getX()); HelperTest.assertEqualsDouble(0., axes.getPtAt(0).getY()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLBezierCurve.java000066400000000000000000000045761321075051700326360ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IControlPointShape; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIBezierCurve; public class TestLBezierCurve extends TestIBezierCurve { @Before public void setUp() { shape = ShapeFactory.createBezierCurve(); shape2 = ShapeFactory.createBezierCurve(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IModifiablePointsShape.class)); assertTrue(shape.isTypeOf(IControlPointShape.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { IBezierCurve curve = ShapeFactory.createBezierCurve(); assertNotNull(curve); assertEquals(0, curve.getPoints().size()); assertEquals(0, curve.getFirstCtrlPts().size()); assertEquals(0, curve.getSecondCtrlPts().size()); assertEquals(2, curve.getNbArrows()); } @Test public void testConstructors2() { IBezierCurve curve = ShapeFactory.createBezierCurve( ShapeFactory.createPoint(100, 200), ShapeFactory.createPoint(300, 400)); assertNotNull(curve); assertEquals(2, curve.getPoints().size()); HelperTest.assertEqualsDouble(100., curve.getPoints().get(0).getX()); HelperTest.assertEqualsDouble(200., curve.getPoints().get(0).getY()); HelperTest.assertEqualsDouble(300., curve.getPoints().get(1).getX()); HelperTest.assertEqualsDouble(400., curve.getPoints().get(1).getY()); assertEquals(2, curve.getFirstCtrlPts().size()); assertEquals(2, curve.getSecondCtrlPts().size()); assertEquals(2, curve.getNbArrows()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLCircle.java000066400000000000000000000057231321075051700316050ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestICircle; public class TestLCircle extends TestICircle { @Before public void setUp() { shape = ShapeFactory.createCircle(); shape2 = ShapeFactory.createCircle(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ISquare.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(ISquaredShape.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { ICircle circle = ShapeFactory.createCircle(); assertEquals(4, circle.getNbPoints()); HelperTest.assertEqualsDouble(circle.getWidth(), circle.getHeight()); assertTrue(circle.getHeight()>0); } @Test public void testConstructors2() { ICircle circle = ShapeFactory.createCircle(); HelperTest.assertEqualsDouble(4, circle.getNbPoints()); HelperTest.assertEqualsDouble(circle.getWidth(), circle.getHeight()); assertTrue(circle.getHeight()>0); } @Test public void testConstructors3() { ICircle circle; try { circle = ShapeFactory.createCircle(null, 10.); fail(); }catch(IllegalArgumentException e) {/* */} try { circle = ShapeFactory.createCircle(ShapeFactory.createPoint(Double.NaN, 1), 10.); fail(); }catch(IllegalArgumentException e) {/* */} try { circle = ShapeFactory.createCircle(ShapeFactory.createPoint(1, Double.NEGATIVE_INFINITY), 10.); fail(); }catch(IllegalArgumentException e) {/* */} try { circle = ShapeFactory.createCircle(ShapeFactory.createPoint(1, 1), -10.); fail(); }catch(IllegalArgumentException e) {/* */} try { circle = ShapeFactory.createCircle(ShapeFactory.createPoint(1, 1), 0.); fail(); }catch(IllegalArgumentException e) {/* */} circle = ShapeFactory.createCircle(ShapeFactory.createPoint(1, 2), 10.); HelperTest.assertEqualsDouble(6., circle.getGravityCentre().getX()); HelperTest.assertEqualsDouble(-3., circle.getGravityCentre().getY()); HelperTest.assertEqualsDouble(10., circle.getWidth()); assertEquals(4, circle.getNbPoints()); HelperTest.assertEqualsDouble(circle.getWidth(), circle.getHeight()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLCircleArc.java000066400000000000000000000066451321075051700322370ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestICircleArc; public class TestLCircleArc extends TestICircleArc { @Before public void setUp() { shape = ShapeFactory.createCircleArc(); shape2 = ShapeFactory.createCircleArc(); } @Override @Test public void testGetStartPoint(){ shape.setWidth(2.0); shape.setPosition(-1, -1); shape.setAngleStart(0); HelperTest.assertEqualsDouble(1, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-2, shape.getStartPoint().getY()); shape.setAngleStart(Math.PI/2.); HelperTest.assertEqualsDouble(0, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-3, shape.getStartPoint().getY()); shape.setAngleStart(Math.PI); HelperTest.assertEqualsDouble(-1, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-2, shape.getStartPoint().getY()); shape.setAngleStart(1.5*Math.PI); HelperTest.assertEqualsDouble(0, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-1, shape.getStartPoint().getY()); shape.setAngleStart(2.*Math.PI); HelperTest.assertEqualsDouble(1, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-2, shape.getStartPoint().getY()); shape.setAngleStart(-2.*Math.PI); HelperTest.assertEqualsDouble(1, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-2, shape.getStartPoint().getY()); shape.setAngleStart(-Math.PI/2.); HelperTest.assertEqualsDouble(0, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-1, shape.getStartPoint().getY()); shape.setAngleStart(-Math.PI); HelperTest.assertEqualsDouble(-1, shape.getStartPoint().getX()); HelperTest.assertEqualsDouble(-2, shape.getStartPoint().getY()); } @Override @Test @Ignore public void testGetEndPoint() { //TODO } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test @Ignore public void testConstructors() { //TODO } @Override @Ignore public void testGetTopLeftPoint() { // TODO Auto-generated method stub } @Override @Ignore public void testGetTopRightPoint() { // TODO Auto-generated method stub } @Override @Ignore public void testGetBottomRightPoint() { // TODO Auto-generated method stub } @Override @Ignore public void testGetBottomLeftPoint() { // TODO Auto-generated method stub } @Override @Ignore public void testMirrorHorizontal() { // TODO Auto-generated method stub } @Override @Ignore public void testMirrorVertical() { // TODO Auto-generated method stub } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLDot.java000066400000000000000000000041421321075051700311240ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIDot; public class TestLDot extends TestIDot { @Before public void setUp() { shape = ShapeFactory.createDot(ShapeFactory.createPoint()); shape2 = ShapeFactory.createDot(ShapeFactory.createPoint()); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructor1() { IDot dot1 = ShapeFactory.createDot(ShapeFactory.createPoint()); assertTrue(dot1.getDiametre()>0); assertNotNull(dot1.getDotStyle()); assertNotNull(dot1.getPosition()); HelperTest.assertEqualsDouble(0., dot1.getPosition().getX()); HelperTest.assertEqualsDouble(0., dot1.getPosition().getY()); } @Test public void testConstructor3() { IDot dot1 = ShapeFactory.createDot(null); assertTrue(dot1.getDiametre()>0); assertNotNull(dot1.getDotStyle()); assertNotNull(dot1.getPosition()); HelperTest.assertEqualsDouble(0., dot1.getPosition().getX()); HelperTest.assertEqualsDouble(0., dot1.getPosition().getY()); dot1 = ShapeFactory.createDot(ShapeFactory.createPoint(-1, 2)); HelperTest.assertEqualsDouble(-1., dot1.getPosition().getX()); HelperTest.assertEqualsDouble(2., dot1.getPosition().getY()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLDrawing.java000066400000000000000000000010741321075051700317720ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertNotNull; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIDrawing; public class TestLDrawing extends TestIDrawing { @Before public void setUp() { drawing = ShapeFactory.createDrawing(); } @Test public void testConstructor() { IDrawing d = ShapeFactory.createDrawing(); assertNotNull(d.getSelection()); assertNotNull(d.getShapes()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLEllipse.java000066400000000000000000000054621321075051700320010ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIEllipse; public class TestLEllipse extends TestIEllipse { @Before public void setUp() { shape = ShapeFactory.createEllipse(); shape2 = ShapeFactory.createEllipse(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IRectangularShape.class)); assertTrue(shape.isTypeOf(IEllipse.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors2() { IEllipse ell = ShapeFactory.createEllipse(); assertEquals(4, ell.getNbPoints()); } @Test public void testConstructors3() { IEllipse ell; try { ell = ShapeFactory.createEllipse(null, ShapeFactory.createPoint()); fail(); }catch(IllegalArgumentException ex) { /* */ } try { ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(), null); fail(); }catch(IllegalArgumentException ex) { /* */ } try { ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(), ShapeFactory.createPoint()); fail(); }catch(IllegalArgumentException ex) { /* */ } try { ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(2,0)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,Double.NaN), ShapeFactory.createPoint(2,0)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,2), ShapeFactory.createPoint(2,Double.NaN)); fail(); }catch(IllegalArgumentException ex) { /* */ } ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(20, 26), ShapeFactory.createPoint(30, 35)); HelperTest.assertEqualsDouble(20., ell.getPosition().getX()); HelperTest.assertEqualsDouble(35., ell.getPosition().getY()); HelperTest.assertEqualsDouble(10., ell.getWidth()); HelperTest.assertEqualsDouble(9., ell.getHeight()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLFreeHand.java000066400000000000000000000024611321075051700320540ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIFreehand; public class TestLFreeHand extends TestIFreehand { @Before public void setUp() { shape = ShapeFactory.createFreeHand(); shape2 = ShapeFactory.createFreeHand(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IModifiablePointsShape.class)); assertTrue(shape.isTypeOf(IFreehand.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { final IFreehand fh = ShapeFactory.createFreeHand(); assertNotNull(fh); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLGrid.java000066400000000000000000000031771321075051700312720ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IStandardGrid; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIGrid; public class TestLGrid extends TestIGrid { @Before public void setUp() { shape = ShapeFactory.createGrid(ShapeFactory.createPoint()); shape2 = ShapeFactory.createGrid(ShapeFactory.createPoint()); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IStandardGrid.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { IGrid grid = ShapeFactory.createGrid(ShapeFactory.createPoint()); assertTrue(grid.getGridEndX()>=grid.getGridStartX()); assertTrue(grid.getGridEndY()>=grid.getGridStartY()); HelperTest.assertEqualsDouble(0., grid.getPosition().getX()); HelperTest.assertEqualsDouble(0., grid.getPosition().getY()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLGroup.java000066400000000000000000000216021321075051700314720ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp; import net.sf.latexdraw.glib.models.interfaces.shape.*; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIGroup; public class TestLGroup extends TestIGroup { @Before public void setUp() { shape = ShapeFactory.createGroup(); shape2 = ShapeFactory.createGroup(); } @Test public void testCannotAddShapeWhichIsEmptyGroup() { shape.addShape(ShapeFactory.createGroup()); assertTrue(shape.isEmpty()); shape.addShape(ShapeFactory.createGroup(), -1); assertTrue(shape.isEmpty()); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertTrue(shape.isTypeOf(shape.getClass())); assertTrue(shape.isTypeOf(IShape.class)); assertFalse(shape.isTypeOf(IAxes.class)); shape.addShape(ShapeFactory.createAxes(ShapeFactory.createPoint())); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IBezierCurve.class)); shape.addShape(ShapeFactory.createBezierCurve()); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IEllipse.class)); shape.addShape(ShapeFactory.createEllipse()); assertTrue(shape.isTypeOf(IEllipse.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertFalse(shape.isTypeOf(ICircle.class)); shape.addShape(ShapeFactory.createCircle()); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IArc.class)); shape.addShape(ShapeFactory.createCircleArc()); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(IArcProp.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IDot.class)); shape.addShape(ShapeFactory.createDot(ShapeFactory.createPoint())); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IFreehand.class)); shape.addShape(ShapeFactory.createFreeHand()); assertTrue(shape.isTypeOf(IFreehand.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IGrid.class)); shape.addShape(ShapeFactory.createGrid(ShapeFactory.createPoint())); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertTrue(shape.isTypeOf(IGroup.class)); shape.addShape(ShapeFactory.createGroup()); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IPicture.class)); shape.addShape(ShapeFactory.createPicture(ShapeFactory.createPoint())); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IPolygon.class)); shape.addShape(ShapeFactory.createPolygon()); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IPolyline.class)); shape.addShape(ShapeFactory.createPolyline()); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IRectangle.class)); shape.addShape(ShapeFactory.createRectangle()); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IRhombus.class)); shape.addShape(ShapeFactory.createRhombus()); assertTrue(shape.isTypeOf(IRhombus.class)); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(ISquare.class)); shape.addShape(ShapeFactory.createSquare()); assertTrue(shape.isTypeOf(ISquare.class)); assertTrue(shape.isTypeOf(IRhombus.class)); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(IText.class)); shape.addShape(ShapeFactory.createText()); assertTrue(shape.isTypeOf(IText.class)); assertTrue(shape.isTypeOf(ISquare.class)); assertTrue(shape.isTypeOf(IRhombus.class)); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); assertFalse(shape.isTypeOf(ITriangle.class)); shape.addShape(ShapeFactory.createTriangle()); assertTrue(shape.isTypeOf(ITriangle.class)); assertTrue(shape.isTypeOf(IText.class)); assertTrue(shape.isTypeOf(ISquare.class)); assertTrue(shape.isTypeOf(IRhombus.class)); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(IGroup.class)); assertTrue(shape.isTypeOf(IGrid.class)); assertTrue(shape.isTypeOf(IDot.class)); assertTrue(shape.isTypeOf(ICircleArc.class)); assertTrue(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IBezierCurve.class)); assertTrue(shape.isTypeOf(IArc.class)); assertTrue(shape.isTypeOf(IAxes.class)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLLine.java000066400000000000000000000072521321075051700312720ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestILine; public class TestLLine extends TestILine{ @Before public void setUp() { line = ShapeFactory.createLine(ShapeFactory.createPoint(0,0), ShapeFactory.createPoint(1,1)); } @Test public void testConstructors2() { line = ShapeFactory.createLine(10, ShapeFactory.createPoint(1,1)); assertNotNull(line.getPoint1()); assertNotNull(line.getPoint2()); assertEquals(10., line.getB(), 0.1); assertEquals(-9., line.getA(), 0.1); assertEquals(1., line.getX1(), 0.1); assertEquals(1., line.getY1(), 0.1); line = ShapeFactory.createLine(0, ShapeFactory.createPoint(1,1)); assertNotNull(line.getPoint1()); assertNotNull(line.getPoint2()); assertEquals(0., line.getB(), 0.1); assertEquals(1., line.getA(), 0.1); assertEquals(1., line.getX1(), 0.1); assertEquals(1., line.getY1(), 0.1); line = ShapeFactory.createLine(-10, ShapeFactory.createPoint(1,1)); assertNotNull(line.getPoint1()); assertNotNull(line.getPoint2()); assertEquals(-10., line.getB(), 0.1); assertEquals(11., line.getA(), 0.1); assertEquals(1., line.getX1(), 0.1); assertEquals(1., line.getY1(), 0.1); try { line = ShapeFactory.createLine(Double.NaN, ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(Double.NEGATIVE_INFINITY, ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(Double.POSITIVE_INFINITY, ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(10, ShapeFactory.createPoint(1,Double.NaN)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(10, ShapeFactory.createPoint(Double.NEGATIVE_INFINITY,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(10, null); fail(); }catch(IllegalArgumentException ex) { /* */ } } @Test public void testConstructors3() { line = ShapeFactory.createLine(ShapeFactory.createPoint(1,1), ShapeFactory.createPoint(2,2)); assertNotNull(line.getPoint1()); assertNotNull(line.getPoint2()); assertEquals(0., line.getB(), 0.1); assertEquals(1., line.getA(), 0.1); assertEquals(1., line.getX1(), 0.1); assertEquals(1., line.getY1(), 0.1); assertEquals(2., line.getX2(), 0.1); assertEquals(2., line.getY2(), 0.1); try { line = ShapeFactory.createLine(null, ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(ShapeFactory.createPoint(Double.NaN,2), ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(ShapeFactory.createPoint(2, Double.POSITIVE_INFINITY), ShapeFactory.createPoint(1,2)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(ShapeFactory.createPoint(1,2), null); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(ShapeFactory.createPoint(1,2), ShapeFactory.createPoint(Double.NaN, 1)); fail(); }catch(IllegalArgumentException ex) { /* */ } try { line = ShapeFactory.createLine(ShapeFactory.createPoint(1,2), ShapeFactory.createPoint(1, Double.NEGATIVE_INFINITY)); fail(); }catch(IllegalArgumentException ex) { /* */ } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLPicture.java000066400000000000000000000022461321075051700320140ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPicture; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIPicture; public class TestLPicture extends TestIPicture { @Before public void setUp() { shape = ShapeFactory.createPicture(ShapeFactory.createPoint()); shape2 = ShapeFactory.createPicture(ShapeFactory.createPoint()); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(shape.getClass())); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLPlot.java000066400000000000000000000024421321075051700313150ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIPlot; public class TestLPlot extends TestIPlot { @Before public void setUp() { shape = ShapeFactory.createPlot(ShapeFactory.createPoint(), 1, 10, "x", false); shape2 = ShapeFactory.createPlot(ShapeFactory.createPoint(), 1, 10, "x", false); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IPlot.class)); assertTrue(shape.isTypeOf(IPlotProp.class)); assertTrue(shape.isTypeOf(shape.getClass())); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLPoint.java000066400000000000000000000402001321075051700314620ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import org.junit.Test; public class TestLPoint { @Test public void testLPoint() { IPoint pt = ShapeFactory.createPoint(1.,-200.); assertEquals(ShapeFactory.createPoint(), ShapeFactory.createPoint(0.,0.)); assertEquals(pt.getX(), 1., 0.1); assertEquals(pt.getY(), -200., 0.1); pt = ShapeFactory.createPoint((IPoint)null); assertEquals(pt.getX(), 0., 0.1); assertEquals(pt.getY(), 0., 0.1); pt = ShapeFactory.createPoint(ShapeFactory.createPoint(-1.34, Double.POSITIVE_INFINITY)); assertEquals(pt.getX(), -1.34, 0.1); assertEquals(pt.getY(), Double.POSITIVE_INFINITY, 0.1); } @Test public void testRotatePoint() { IPoint pt = ShapeFactory.createPoint(); assertNull(pt.rotatePoint( null, 0)); assertNull(pt.rotatePoint(null, 0)); assertNull(pt.rotatePoint(ShapeFactory.createPoint(), Double.NaN)); assertNull(pt.rotatePoint(ShapeFactory.createPoint(), Double.NEGATIVE_INFINITY)); assertNull(pt.rotatePoint(ShapeFactory.createPoint(), Double.POSITIVE_INFINITY)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(1,0).rotatePoint(ShapeFactory.createPoint(), Math.PI/2.)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,1).rotatePoint(ShapeFactory.createPoint(), Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(-1,0).rotatePoint(ShapeFactory.createPoint(), Math.PI/2.)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,-1).rotatePoint(ShapeFactory.createPoint(), Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(1,0).rotatePoint(pt, -3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,1).rotatePoint(pt, -3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(-1,0).rotatePoint(pt, -3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,-1).rotatePoint(pt, -3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(1,0).rotatePoint(pt, Math.PI)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,1).rotatePoint(pt, Math.PI)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(-1,0).rotatePoint(pt, Math.PI)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,-1).rotatePoint(pt, Math.PI)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(1,0).rotatePoint(pt, -Math.PI)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,1).rotatePoint(pt, -Math.PI)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(-1,0).rotatePoint(pt, -Math.PI)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,-1).rotatePoint(pt, -Math.PI)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(1,0).rotatePoint(pt, 3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,1).rotatePoint(pt, 3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(-1,0).rotatePoint(pt, 3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,-1).rotatePoint(pt, 3.*Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(1,0).rotatePoint(pt, -Math.PI/2.)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,1).rotatePoint(pt, -Math.PI/2.)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(-1,0).rotatePoint(pt, -Math.PI/2.)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,-1).rotatePoint(pt, -Math.PI/2.)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(1,0).rotatePoint(pt, 2.*Math.PI)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,1).rotatePoint(pt, 2.*Math.PI)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(-1,0).rotatePoint(pt, 2.*Math.PI)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,-1).rotatePoint(pt, 2.*Math.PI)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(1,0).rotatePoint(pt, -2.*Math.PI)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,1).rotatePoint(pt, -2.*Math.PI)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(-1,0).rotatePoint(pt, -2.*Math.PI)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,-1).rotatePoint(pt, -2.*Math.PI)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(1,0).rotatePoint(pt, 0)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,1).rotatePoint(pt, 0)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(-1,0).rotatePoint(pt, 0)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,-1).rotatePoint(pt, 0)); } @Test public void testCentralSymmetry() { IPoint pt = ShapeFactory.createPoint(); assertNull(pt.centralSymmetry(null)); assertEquals(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(1,0).centralSymmetry(pt)); assertEquals(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,1).centralSymmetry(pt)); assertEquals(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(-1,0).centralSymmetry(pt)); assertEquals(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,-1).centralSymmetry(pt)); } @Test public void testComputeAngle() { IPoint pt1 = ShapeFactory.createPoint(); assertEquals(Double.NaN, pt1.computeAngle(null), 0.1); assertEquals(0., pt1.computeAngle(ShapeFactory.createPoint(1,0)), 0.1); assertEquals(Math.PI/2., pt1.computeAngle(ShapeFactory.createPoint(0,1)), 0.1); assertEquals(Math.PI, pt1.computeAngle(ShapeFactory.createPoint(-1,0)), 0.1); assertEquals(3.*Math.PI/2., pt1.computeAngle(ShapeFactory.createPoint(0,-1)), 0.1); pt1.setPoint(1, 1); assertEquals(0., pt1.computeAngle(ShapeFactory.createPoint(2,1)), 0.1); assertEquals(Math.PI/2., pt1.computeAngle(ShapeFactory.createPoint(1,2)), 0.1); assertEquals(Math.PI, pt1.computeAngle(ShapeFactory.createPoint(0,1)), 0.1); assertEquals(3.*Math.PI/2., pt1.computeAngle(ShapeFactory.createPoint(1,0)), 0.1); } @Test public void testComputeRotationAngle() { IPoint pt1 = ShapeFactory.createPoint(); assertEquals(Double.NaN, pt1.computeRotationAngle(null, null), 0.1); assertEquals(Double.NaN, pt1.computeRotationAngle(ShapeFactory.createPoint(), null), 0.1); assertEquals(Double.NaN, pt1.computeRotationAngle(null, ShapeFactory.createPoint()), 0.1); assertEquals(0., pt1.computeRotationAngle(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(1,0)), 0.1); assertEquals(0., pt1.computeRotationAngle(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,1)), 0.1); assertEquals(0., pt1.computeRotationAngle(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(-1,0)), 0.1); assertEquals(0., pt1.computeRotationAngle(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,-1)), 0.1); assertEquals(Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,1)), 0.1); assertEquals(Math.PI, Math.abs(pt1.computeRotationAngle(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(-1,0))), 0.1); assertEquals(3.*Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(0,-1)), 0.1); assertEquals(Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(-1,0)), 0.1); assertEquals(Math.PI, Math.abs(pt1.computeRotationAngle(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(0,-1))), 0.1); assertEquals(-Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(0,1), ShapeFactory.createPoint(1,0)), 0.1); assertEquals(Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,-1)), 0.1); assertEquals(Math.PI, Math.abs(pt1.computeRotationAngle(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(1,0))), 0.1); assertEquals(-Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(-1,0), ShapeFactory.createPoint(0,1)), 0.1); assertEquals(-3.*Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(1,0)), 0.1); assertEquals(Math.PI, Math.abs(pt1.computeRotationAngle(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(0,1))), 0.1); assertEquals(-Math.PI/2., pt1.computeRotationAngle(ShapeFactory.createPoint(0,-1), ShapeFactory.createPoint(-1,0)), 0.1); } @Test public void testEquals() { assertFalse(ShapeFactory.createPoint().equals(null, 0)); assertFalse(ShapeFactory.createPoint().equals(ShapeFactory.createPoint(), Double.NaN)); assertFalse(ShapeFactory.createPoint().equals(ShapeFactory.createPoint(), Double.POSITIVE_INFINITY)); assertFalse(ShapeFactory.createPoint().equals(ShapeFactory.createPoint(), Double.NEGATIVE_INFINITY)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(1,1), 0)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(-1,-1), 0)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(10,10), 9)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(-10,-10), 9)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(Double.NaN,0), 1)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0,Double.NaN), 1)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(Double.POSITIVE_INFINITY,0), 1)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0,Double.POSITIVE_INFINITY), 1)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY,0), 1)); assertFalse(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0,Double.NEGATIVE_INFINITY), 1)); assertFalse(ShapeFactory.createPoint(Double.NaN,0).equals(ShapeFactory.createPoint(0,0), 1)); assertFalse(ShapeFactory.createPoint(0,Double.NaN).equals(ShapeFactory.createPoint(0,0), 1)); assertFalse(ShapeFactory.createPoint(Double.POSITIVE_INFINITY,0).equals(ShapeFactory.createPoint(0,0), 1)); assertFalse(ShapeFactory.createPoint(0,Double.POSITIVE_INFINITY).equals(ShapeFactory.createPoint(0,0), 1)); assertFalse(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY,0).equals(ShapeFactory.createPoint(0,0), 1)); assertFalse(ShapeFactory.createPoint(0,Double.NEGATIVE_INFINITY).equals(ShapeFactory.createPoint(0,0), 1)); assertTrue(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0,0), 0)); assertTrue(ShapeFactory.createPoint(-1,-1).equals(ShapeFactory.createPoint(-1,-1), 0)); assertTrue(ShapeFactory.createPoint(1,1).equals(ShapeFactory.createPoint(10,10), 9)); assertTrue(ShapeFactory.createPoint(-1,-1).equals(ShapeFactory.createPoint(-10,-10), 9)); assertTrue(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0.000001,0), 0.0001)); assertTrue(ShapeFactory.createPoint(0,0).equals(ShapeFactory.createPoint(0, 0.000001), 0.0001)); } @Test public void testGetMiddlePoint() { assertNull(ShapeFactory.createPoint().getMiddlePoint(null)); assertEquals(ShapeFactory.createPoint(10,0).getMiddlePoint(ShapeFactory.createPoint(-10,0)), ShapeFactory.createPoint(0,0)); assertEquals(ShapeFactory.createPoint(0,10).getMiddlePoint(ShapeFactory.createPoint(0,-10)), ShapeFactory.createPoint(0,0)); assertEquals(ShapeFactory.createPoint(10,10).getMiddlePoint(ShapeFactory.createPoint(-10,-10)), ShapeFactory.createPoint(0,0)); assertEquals(ShapeFactory.createPoint(0,0).getMiddlePoint(ShapeFactory.createPoint(5,6)), ShapeFactory.createPoint(2.5,3)); assertEquals(ShapeFactory.createPoint(0,0).getMiddlePoint(ShapeFactory.createPoint(-5,-6)), ShapeFactory.createPoint(-2.5,-3)); assertEquals(ShapeFactory.createPoint(Double.POSITIVE_INFINITY,10).getMiddlePoint(ShapeFactory.createPoint(-10,-10)), ShapeFactory.createPoint(Double.POSITIVE_INFINITY,0)); assertEquals(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY,10).getMiddlePoint(ShapeFactory.createPoint(-10,-10)), ShapeFactory.createPoint(Double.NEGATIVE_INFINITY,0)); assertEquals(ShapeFactory.createPoint(10, Double.POSITIVE_INFINITY).getMiddlePoint(ShapeFactory.createPoint(-10,-10)), ShapeFactory.createPoint(0, Double.POSITIVE_INFINITY)); assertEquals(ShapeFactory.createPoint(10, Double.NEGATIVE_INFINITY).getMiddlePoint(ShapeFactory.createPoint(-10,-10)), ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY)); } @Test public void testTranslate() { IPoint pt1 = ShapeFactory.createPoint(2., 1.); IPoint pt2 = ShapeFactory.createPoint(2., 1.); pt1.translate(Double.NaN, Double.NaN); assertEquals(pt1, pt2); pt1.translate(Double.NaN, 2.); assertEquals(pt1, pt2); pt1.translate(2., Double.NaN); assertEquals(pt1, pt2); pt1.translate(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); assertEquals(pt1, pt2); pt1.translate(Double.POSITIVE_INFINITY, 2.); assertEquals(pt1, pt2); pt1.translate(2., Double.POSITIVE_INFINITY); assertEquals(pt1, pt2); pt1.translate(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY); assertEquals(pt1, pt2); pt1.translate(Double.NEGATIVE_INFINITY, 2.); assertEquals(pt1, pt2); pt1.translate(2., Double.NEGATIVE_INFINITY); assertEquals(pt1, pt2); pt1.translate(0., 0.); assertEquals(pt1, pt2); pt1.translate(0., 10.); assertEquals(pt1, ShapeFactory.createPoint(2., 11.)); pt1.translate(0., -12.); assertEquals(pt1, ShapeFactory.createPoint(2., -1.)); pt1.translate(5., 0.); assertEquals(pt1, ShapeFactory.createPoint(7., -1.)); pt1.translate(-4., 0.); assertEquals(pt1, ShapeFactory.createPoint(3., -1.)); pt1.translate(3.12, 7.98); assertEquals(pt1, ShapeFactory.createPoint(6.12, 6.98)); } @Test public void testHorizontalSymmetry() { IPoint pt = ShapeFactory.createPoint(10., 10.); assertNull(pt.horizontalSymmetry(null)); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(Double.NaN, 1.))); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(1., Double.NaN))); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 1.))); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(1., Double.POSITIVE_INFINITY))); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, 1.))); assertNull(pt.horizontalSymmetry(ShapeFactory.createPoint(1., Double.NEGATIVE_INFINITY))); assertEquals(pt.horizontalSymmetry(ShapeFactory.createPoint(0.,0.)), ShapeFactory.createPoint(-10., 10.)); assertEquals(pt.horizontalSymmetry(ShapeFactory.createPoint(0.,18780.)), ShapeFactory.createPoint(-10., 10.)); assertEquals(ShapeFactory.createPoint(-10., 10.).horizontalSymmetry(ShapeFactory.createPoint(0.,18780.)), pt); assertEquals(ShapeFactory.createPoint(0.,0.).horizontalSymmetry(ShapeFactory.createPoint(0.,0.)), ShapeFactory.createPoint(0., 0.)); } @Test public void testVerticalSymmetry() { IPoint pt = ShapeFactory.createPoint(10., 10.); assertNull(pt.verticalSymmetry(null)); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(Double.NaN, 1.))); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(1., Double.NaN))); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 1.))); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(1., Double.POSITIVE_INFINITY))); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, 1.))); assertNull(pt.verticalSymmetry(ShapeFactory.createPoint(1., Double.NEGATIVE_INFINITY))); assertEquals(pt.verticalSymmetry(ShapeFactory.createPoint(0.,0.)), ShapeFactory.createPoint(10., -10.)); assertEquals(pt.verticalSymmetry(ShapeFactory.createPoint(18780., 0.)), ShapeFactory.createPoint(10., -10.)); assertEquals(ShapeFactory.createPoint(10., -10.).verticalSymmetry(ShapeFactory.createPoint(18780., 0.)), pt); assertEquals(ShapeFactory.createPoint(0.,0.).verticalSymmetry(ShapeFactory.createPoint(0.,0.)), ShapeFactory.createPoint(0., 0.)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLPolygon.java000066400000000000000000000054511321075051700320310ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIPolygon; public class TestLPolygon extends TestIPolygon { @Before public void setUp() { shape = ShapeFactory.createPolygon(); shape2 = ShapeFactory.createPolygon(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IModifiablePointsShape.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(shape.getClass())); } // @Test // public void testGetSetLineArc() { // shape.setLineArc(0); // assertEquals(0., shape.getLineArc()); // shape.setLineArc(1); // assertEquals(1., shape.getLineArc()); // shape.setLineArc(Double.NaN); // assertEquals(1., shape.getLineArc()); // shape.setLineArc(1.001); // assertEquals(1., shape.getLineArc()); // shape.setLineArc(Double.NEGATIVE_INFINITY); // assertEquals(1., shape.getLineArc()); // shape.setLineArc(Double.POSITIVE_INFINITY); // assertEquals(1., shape.getLineArc()); // shape.setLineArc(-0.0001); // assertEquals(1., shape.getLineArc()); // } // // // @Test // public void testIsSetCornerRound() { //// shape.setRoundCorner(true); // assertEquals(true, shape.isRoundCorner()); //// shape.setRoundCorner(false); // assertEquals(false, shape.isRoundCorner()); //// shape.setRoundCorner(true); // assertEquals(true, shape.isRoundCorner()); // } @Test public void testConstructor() { IPoint pt1 = ShapeFactory.createPoint(1, 1); IPoint pt2 = ShapeFactory.createPoint(2, 2); IPolygon pol = ShapeFactory.createPolygon(pt1, pt2); pol = ShapeFactory.createPolygon(pt1, pt2); assertEquals(pt1, pol.getPtAt(0)); assertEquals(pt2, pol.getPtAt(-1)); pol = ShapeFactory.createPolygon(); pol = ShapeFactory.createPolygon(); pol = ShapeFactory.createPolygon(); try { pol = ShapeFactory.createPolygon(null, pt2); fail(); pol = ShapeFactory.createPolygon(pt1, null); fail(); pol = ShapeFactory.createPolygon(null, null); fail(); }catch(IllegalArgumentException e){ /* */ } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLPolyline.java000066400000000000000000000044631321075051700321770ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIPolyline; public class TestLPolyline extends TestIPolyline { @Before public void setUp() { shape = ShapeFactory.createPolyline(); shape2 = ShapeFactory.createPolyline(); shape.addPoint(ShapeFactory.createPoint(1, 1)); shape.addPoint(ShapeFactory.createPoint(2, 2)); shape.addPoint(ShapeFactory.createPoint(3, 3)); shape2.addPoint(ShapeFactory.createPoint(1, 1)); shape2.addPoint(ShapeFactory.createPoint(2, 2)); shape2.addPoint(ShapeFactory.createPoint(3, 3)); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IModifiablePointsShape.class)); assertTrue(shape.isTypeOf(IPolygon.class)); assertTrue(shape.isTypeOf(IPolyline.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructor() { IPoint pt1 = ShapeFactory.createPoint(1, 1); IPoint pt2 = ShapeFactory.createPoint(2, 2); IPolyline pol = ShapeFactory.createPolyline(pt1, pt2); pol = ShapeFactory.createPolyline(pt1, pt2); assertEquals(pt1, pol.getPtAt(0)); assertEquals(pt2, pol.getPtAt(-1)); pol = ShapeFactory.createPolyline(); pol = ShapeFactory.createPolyline(); try { pol = ShapeFactory.createPolyline(null, pt2); fail(); pol = ShapeFactory.createPolyline(pt1, null); fail(); pol = ShapeFactory.createPolyline(null, null); fail(); }catch(IllegalArgumentException e){ /* */ } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLRectangle.java000066400000000000000000000112711321075051700323030ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIRectangle; public class TestLRectangle extends TestIRectangle { @Before public void setUp() { shape = ShapeFactory.createRectangle(); shape2 = ShapeFactory.createRectangle(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IEllipse.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(ILineArcProp.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IRectangularShape.class)); assertTrue(shape.isTypeOf(IRectangle.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test(expected=IllegalArgumentException.class) public void testConstructorNullPoint1() { ShapeFactory.createRectangle(ShapeFactory.createPoint(), null); } @Test(expected=IllegalArgumentException.class) public void testConstructorNullPoint2() { ShapeFactory.createRectangle(null, ShapeFactory.createPoint()); } @Test(expected=IllegalArgumentException.class) public void testConstructorNullPoint3() { ShapeFactory.createRectangle(null, null); } @Test(expected=NullPointerException.class) public void testConstructorNullPoint4() { ShapeFactory.createRectangle(null, 10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid1() { ShapeFactory.createRectangle(ShapeFactory.createPoint(Double.NaN, 0), 10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid2() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), -10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid3() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), Double.NaN, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid4() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), Double.POSITIVE_INFINITY, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid5() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), Double.NEGATIVE_INFINITY, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid6() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 0, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid7() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 10, 0); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid8() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 10, -10); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid9() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 10, Double.NaN); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid10() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 10, Double.NEGATIVE_INFINITY); } @Test(expected=IllegalArgumentException.class) public void testConstructorNotValid11() { ShapeFactory.createRectangle(ShapeFactory.createPoint(0, 0), 10, Double.POSITIVE_INFINITY); } @Test public void testConstructors() { IRectangle rec = ShapeFactory.createRectangle(); assertEquals(4, rec.getNbPoints()); rec = ShapeFactory.createRectangle(ShapeFactory.createPoint(20, 26), ShapeFactory.createPoint(30, 35)); HelperTest.assertEqualsDouble(20., rec.getPosition().getX()); HelperTest.assertEqualsDouble(35., rec.getPosition().getY()); HelperTest.assertEqualsDouble(10., rec.getWidth()); HelperTest.assertEqualsDouble(9., rec.getHeight()); rec = ShapeFactory.createRectangle(ShapeFactory.createPoint(5, 6), 11, 12); HelperTest.assertEqualsDouble(5., rec.getPosition().getX()); HelperTest.assertEqualsDouble(18., rec.getPosition().getY()); HelperTest.assertEqualsDouble(11., rec.getWidth()); HelperTest.assertEqualsDouble(12., rec.getHeight()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLRhombus.java000066400000000000000000000051131321075051700320140ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestIRhombus; public class TestLRhombus extends TestIRhombus { @Before public void setUp() { shape = ShapeFactory.createRhombus(); shape2 = ShapeFactory.createRhombus(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IRectangularShape.class)); assertTrue(shape.isTypeOf(IRhombus.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructor1() { assertEquals(4, shape.getNbPoints()); assertEquals(1.0, shape.getWidth(), 0.0); assertEquals(1.0, shape.getHeight(), 0.0); assertEquals(0, shape.getPosition().getX(), 0.0); assertEquals(0, shape.getPosition().getY(), 0.0); } @Test public void testConstructor2() { IRhombus rho = ShapeFactory.createRhombus(ShapeFactory.createPoint(5, 15), 20, 40); HelperTest.assertEqualsDouble(4, rho.getNbPoints()); assertEquals(20.0, rho.getWidth(), 0.0); assertEquals(40.0, rho.getHeight(), 0.0); assertEquals(-5.0, rho.getPosition().getX(), 0.0); assertEquals(35.0, rho.getPosition().getY(), 0.0); } @Test(expected=NullPointerException.class) public void testConstructorNullPos() { ShapeFactory.createRhombus(null, 10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorInvalidPos() { ShapeFactory.createRhombus(ShapeFactory.createPoint(Double.NaN, 0), 10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorInvalidWidth() { ShapeFactory.createRhombus(ShapeFactory.createPoint(1, 1), -10, 10); } @Test(expected=IllegalArgumentException.class) public void testConstructorInvalidHeight() { ShapeFactory.createRhombus(ShapeFactory.createPoint(1, 1), 10, -10); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLShapeFactory.java000066400000000000000000000053461321075051700327750ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.*; import org.junit.Test; public class TestLShapeFactory{ @Test public void testNewShape() { assertFalse(ShapeFactory.newShape(IRectangle.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPolyline.class).isEmpty()); assertFalse(ShapeFactory.newShape(IBezierCurve.class).isEmpty()); assertFalse(ShapeFactory.newShape(IDot.class).isEmpty()); assertFalse(ShapeFactory.newShape(IFreehand.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGrid.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGroup.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPicture.class).isEmpty()); assertFalse(ShapeFactory.newShape(IAxes.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPolygon.class).isEmpty()); assertFalse(ShapeFactory.newShape(IRhombus.class).isEmpty()); assertFalse(ShapeFactory.newShape(ITriangle.class).isEmpty()); assertFalse(ShapeFactory.newShape(IFreehand.class).isEmpty()); assertFalse(ShapeFactory.newShape(IEllipse.class).isEmpty()); assertFalse(ShapeFactory.newShape(ICircle.class).isEmpty()); assertFalse(ShapeFactory.newShape(ICircleArc.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGroup.class).isEmpty()); assertFalse(ShapeFactory.newShape(IText.class).isEmpty()); assertFalse(ShapeFactory.newShape(ISquare.class).isEmpty()); assertFalse(ShapeFactory.newShape(IRectangle.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPolyline.class).isEmpty()); assertFalse(ShapeFactory.newShape(IBezierCurve.class).isEmpty()); assertFalse(ShapeFactory.newShape(IDot.class).isEmpty()); assertFalse(ShapeFactory.newShape(IFreehand.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGrid.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGroup.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPicture.class).isEmpty()); assertFalse(ShapeFactory.newShape(IAxes.class).isEmpty()); assertFalse(ShapeFactory.newShape(IPolygon.class).isEmpty()); assertFalse(ShapeFactory.newShape(IRhombus.class).isEmpty()); assertFalse(ShapeFactory.newShape(ITriangle.class).isEmpty()); assertFalse(ShapeFactory.newShape(IFreehand.class).isEmpty()); assertFalse(ShapeFactory.newShape(IEllipse.class).isEmpty()); assertFalse(ShapeFactory.newShape(ICircle.class).isEmpty()); assertFalse(ShapeFactory.newShape(ICircleArc.class).isEmpty()); assertFalse(ShapeFactory.newShape(IGroup.class).isEmpty()); assertFalse(ShapeFactory.newShape(IText.class).isEmpty()); assertFalse(ShapeFactory.newShape(ISquare.class).isEmpty()); assertTrue(ShapeFactory.newShape(null).isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLSquare.java000066400000000000000000000054731321075051700316460ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ILineArcProp; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape; import org.junit.Before; import org.junit.Test; import test.HelperTest; import test.glib.models.interfaces.TestISquare; public class TestLSquare extends TestISquare { @Before public void setUp() { shape = ShapeFactory.createSquare(); shape2 = ShapeFactory.createSquare(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IGrid.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(ISquaredShape.class)); assertTrue(shape.isTypeOf(ILineArcProp.class)); assertTrue(shape.isTypeOf(ISquare.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { ISquare sq = ShapeFactory.createSquare(); assertEquals(4, sq.getNbPoints()); try { sq = ShapeFactory.createSquare(null, 10); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(Double.NaN, 0), 10); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(), 0); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(), -10); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(), Double.NaN); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(), Double.POSITIVE_INFINITY); fail(); }catch(IllegalArgumentException ex) { /* */ } try { sq = ShapeFactory.createSquare(ShapeFactory.createPoint(), Double.NEGATIVE_INFINITY); fail(); }catch(IllegalArgumentException ex) { /* */ } sq = ShapeFactory.createSquare(ShapeFactory.createPoint(20, 26), 11); HelperTest.assertEqualsDouble(20., sq.getPosition().getX()); HelperTest.assertEqualsDouble(26., sq.getPosition().getY()); HelperTest.assertEqualsDouble(11., sq.getWidth()); HelperTest.assertEqualsDouble(11., sq.getHeight()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLText.java000066400000000000000000000044721321075051700313300ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestIText; public class TestLText extends TestIText { @Before public void setUp() { FlyweightThumbnail.images().clear(); FlyweightThumbnail.setThread(false); shape = ShapeFactory.createText(); shape2 = ShapeFactory.createText(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IText.class)); assertTrue(shape.isTypeOf(shape.getClass())); } @Test public void testConstructors() { IText txt = ShapeFactory.createText(); assertNotNull(txt.getText()); assertTrue(txt.getText().length()>0); txt = ShapeFactory.createText(); assertNotNull(txt.getText()); assertTrue(txt.getText().length()>0); txt = ShapeFactory.createText(ShapeFactory.createPoint(), "coucou"); //$NON-NLS-1$ assertNotNull(txt.getText()); assertTrue(txt.getText().length()>0); txt = ShapeFactory.createText(ShapeFactory.createPoint(), ""); //$NON-NLS-1$ assertNotNull(txt.getText()); assertTrue(txt.getText().length()>0); txt = ShapeFactory.createText(ShapeFactory.createPoint(), null); assertNotNull(txt.getText()); assertTrue(txt.getText().length()>0); txt = ShapeFactory.createText(null, "aa"); //$NON-NLS-1$ assertEquals(ShapeFactory.createPoint(), txt.getPosition()); txt = ShapeFactory.createText(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY), "aa"); //$NON-NLS-1$ assertEquals(ShapeFactory.createPoint(), txt.getPosition()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/TestLTriangle.java000066400000000000000000000023701321075051700321440ustar00rootroot00000000000000package test.glib.models; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import org.junit.Before; import org.junit.Test; import test.glib.models.interfaces.TestITriangle; public class TestLTriangle extends TestITriangle { @Before public void setUp() { shape = ShapeFactory.createTriangle(); shape2 = ShapeFactory.createTriangle(); } @Override @Test public void testIsTypeOf() { assertFalse(shape.isTypeOf(null)); assertFalse(shape.isTypeOf(IRectangle.class)); assertFalse(shape.isTypeOf(ICircle.class)); assertTrue(shape.isTypeOf(IShape.class)); assertTrue(shape.isTypeOf(IPositionShape.class)); assertTrue(shape.isTypeOf(IRectangularShape.class)); assertTrue(shape.isTypeOf(ITriangle.class)); assertTrue(shape.isTypeOf(shape.getClass())); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/000077500000000000000000000000001321075051700307015ustar00rootroot00000000000000TestArcStyle.java000066400000000000000000000014421321075051700340540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import org.junit.Test; public class TestArcStyle { @Test public void testSupportArrow() { assertFalse(ArcStyle.CHORD.supportArrow()); assertFalse(ArcStyle.WEDGE.supportArrow()); assertTrue(ArcStyle.ARC.supportArrow()); } @Test public void testGetLabel() { assertNotNull(ArcStyle.ARC.getLabel()); assertTrue(ArcStyle.ARC.getLabel().length()>0); assertNotNull(ArcStyle.CHORD.getLabel()); assertTrue(ArcStyle.CHORD.getLabel().length()>0); assertNotNull(ArcStyle.WEDGE.getLabel()); assertTrue(ArcStyle.WEDGE.getLabel().length()>0); } } TestArrowStyle.java000066400000000000000000000126651321075051700344520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestArrowStyle { @Test public void testGetPSTToken() { assertEquals(ArrowStyle.BAR_END.getPSTToken(), PSTricksConstants.BAREND_STYLE); assertEquals(ArrowStyle.BAR_IN.getPSTToken(), PSTricksConstants.BARIN_STYLE); assertEquals(ArrowStyle.CIRCLE_END.getPSTToken(), PSTricksConstants.CIRCLEEND_STYLE); assertEquals(ArrowStyle.CIRCLE_IN.getPSTToken(), PSTricksConstants.CIRCLEIN_STYLE); assertEquals(ArrowStyle.DISK_END.getPSTToken(), PSTricksConstants.DISKEND_STYLE); assertEquals(ArrowStyle.DISK_IN.getPSTToken(), PSTricksConstants.DISKIN_STYLE); assertEquals(ArrowStyle.LEFT_ARROW.getPSTToken(), PSTricksConstants.LARROW_STYLE); assertEquals(ArrowStyle.LEFT_DBLE_ARROW.getPSTToken(), PSTricksConstants.DLARROW_STYLE); assertEquals(ArrowStyle.LEFT_ROUND_BRACKET.getPSTToken(), PSTricksConstants.LRBRACKET_STYLE); assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET.getPSTToken(), PSTricksConstants.LSBRACKET_STYLE); assertEquals(ArrowStyle.NONE.getPSTToken(), ""); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ARROW.getPSTToken(), PSTricksConstants.RARROW_STYLE); assertEquals(ArrowStyle.RIGHT_DBLE_ARROW.getPSTToken(), PSTricksConstants.DRARROW_STYLE); assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET.getPSTToken(), PSTricksConstants.RRBRACKET_STYLE); assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET.getPSTToken(), PSTricksConstants.RSBRACKET_STYLE); assertEquals(ArrowStyle.ROUND_END.getPSTToken(), PSTricksConstants.ROUNDEND_STYLE); assertEquals(ArrowStyle.ROUND_IN.getPSTToken(), PSTricksConstants.ROUNDIN_STYLE); } @Test public void testGetArrowStyle() { assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.BAREND_STYLE), ArrowStyle.BAR_END); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.BARIN_STYLE), ArrowStyle.BAR_IN); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.CIRCLEEND_STYLE), ArrowStyle.CIRCLE_END); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.CIRCLEIN_STYLE), ArrowStyle.CIRCLE_IN); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.DISKEND_STYLE), ArrowStyle.DISK_END); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.DISKIN_STYLE), ArrowStyle.DISK_IN); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.LARROW_STYLE), ArrowStyle.LEFT_ARROW); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.DLARROW_STYLE), ArrowStyle.LEFT_DBLE_ARROW); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.LRBRACKET_STYLE), ArrowStyle.LEFT_ROUND_BRACKET); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.LSBRACKET_STYLE), ArrowStyle.LEFT_SQUARE_BRACKET); assertEquals(ArrowStyle.getArrowStyle(""), ArrowStyle.NONE); //$NON-NLS-1$ assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.RARROW_STYLE), ArrowStyle.RIGHT_ARROW); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.DRARROW_STYLE), ArrowStyle.RIGHT_DBLE_ARROW); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.RRBRACKET_STYLE), ArrowStyle.RIGHT_ROUND_BRACKET); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.RSBRACKET_STYLE), ArrowStyle.RIGHT_SQUARE_BRACKET); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.ROUNDEND_STYLE), ArrowStyle.ROUND_END); assertEquals(ArrowStyle.getArrowStyle(PSTricksConstants.ROUNDIN_STYLE), ArrowStyle.ROUND_IN); assertNull(ArrowStyle.getArrowStyle(null)); assertEquals(ArrowStyle.NONE, ArrowStyle.getArrowStyle("")); //$NON-NLS-1$ assertNull(ArrowStyle.getArrowStyle("diqdo ")); //$NON-NLS-1$ assertNull(ArrowStyle.getArrowStyle("çé _é ")); //$NON-NLS-1$ assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.BAR_END.toString()), ArrowStyle.BAR_END); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.BAR_IN.toString()), ArrowStyle.BAR_IN); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.CIRCLE_END.toString()), ArrowStyle.CIRCLE_END); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.CIRCLE_IN.toString()), ArrowStyle.CIRCLE_IN); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.DISK_END.toString()), ArrowStyle.DISK_END); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.DISK_IN.toString()), ArrowStyle.DISK_IN); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.LEFT_ARROW.toString()), ArrowStyle.LEFT_ARROW); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.LEFT_DBLE_ARROW.toString()), ArrowStyle.LEFT_DBLE_ARROW); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.LEFT_ROUND_BRACKET.toString()), ArrowStyle.LEFT_ROUND_BRACKET); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.LEFT_SQUARE_BRACKET.toString()), ArrowStyle.LEFT_SQUARE_BRACKET); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.NONE.toString()), ArrowStyle.NONE); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.RIGHT_ARROW.toString()), ArrowStyle.RIGHT_ARROW); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.RIGHT_DBLE_ARROW.toString()), ArrowStyle.RIGHT_DBLE_ARROW); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.RIGHT_ROUND_BRACKET.toString()), ArrowStyle.RIGHT_ROUND_BRACKET); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.RIGHT_SQUARE_BRACKET.toString()), ArrowStyle.RIGHT_SQUARE_BRACKET); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.ROUND_END.toString()), ArrowStyle.ROUND_END); assertEquals(ArrowStyle.getArrowStyle(ArrowStyle.ROUND_IN.toString()), ArrowStyle.ROUND_IN); } } TestAxesStyle.java000066400000000000000000000037111321075051700342500ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestAxesStyle { @Test public void testSupportsArrows() { assertTrue(AxesStyle.AXES.supportsArrows()); assertFalse(AxesStyle.FRAME.supportsArrows()); assertFalse(AxesStyle.NONE.supportsArrows()); } @Test public void testGetPSTToken() { assertEquals(PSTricksConstants.TOKEN_AXES_STYLE_AXES, AxesStyle.AXES.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_AXES_STYLE_FRAME, AxesStyle.FRAME.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_AXES_STYLE_NONE, AxesStyle.NONE.getPSTToken()); } @Test public void testToString() { assertNotNull(AxesStyle.AXES.toString()); assertNotNull(AxesStyle.FRAME.toString()); assertNotNull(AxesStyle.NONE.toString()); assertTrue(AxesStyle.AXES.toString().length()>0); assertTrue(AxesStyle.FRAME.toString().length()>0); assertTrue(AxesStyle.NONE.toString().length()>0); } @Test public void testGetStyle() { assertEquals(AxesStyle.getStyle(PSTricksConstants.TOKEN_AXES_STYLE_AXES), AxesStyle.AXES); assertEquals(AxesStyle.getStyle(PSTricksConstants.TOKEN_AXES_STYLE_FRAME), AxesStyle.FRAME); assertEquals(AxesStyle.getStyle(PSTricksConstants.TOKEN_AXES_STYLE_NONE), AxesStyle.NONE); assertNull(AxesStyle.getStyle(null)); assertNull(AxesStyle.getStyle("")); //$NON-NLS-1$ assertNull(AxesStyle.getStyle("-çà( gfd")); //$NON-NLS-1$ assertEquals(AxesStyle.getStyle(AxesStyle.NONE.toString()), AxesStyle.NONE); assertEquals(AxesStyle.getStyle(AxesStyle.AXES.toString()), AxesStyle.AXES); assertEquals(AxesStyle.getStyle(AxesStyle.FRAME.toString()), AxesStyle.FRAME); } } TestBorderPos.java000066400000000000000000000027421321075051700342310ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.*; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestBorderPos { @Test public void testGetLatexToken() { assertEquals(BorderPos.INTO.getLatexToken(), PSTricksConstants.BORDERS_INSIDE); assertEquals(BorderPos.MID.getLatexToken(), PSTricksConstants.BORDERS_MIDDLE); assertEquals(BorderPos.OUT.getLatexToken(), PSTricksConstants.BORDERS_OUTSIDE); } @Test public void testGetStyle() { assertNull(BorderPos.getStyle(null)); assertNull(BorderPos.getStyle("")); //$NON-NLS-1$ assertNull(BorderPos.getStyle("ezpoke zae")); //$NON-NLS-1$ assertNull(BorderPos.getStyle("7dsqd 4ds'")); //$NON-NLS-1$ assertEquals(BorderPos.getStyle(BorderPos.INTO.toString()), BorderPos.INTO); assertEquals(BorderPos.getStyle(BorderPos.MID.toString()), BorderPos.MID); assertEquals(BorderPos.getStyle(BorderPos.OUT.toString()), BorderPos.OUT); assertNull(BorderPos.getStyle(null)); assertNull(BorderPos.getStyle("")); //$NON-NLS-1$ assertNull(BorderPos.getStyle("dez")); //$NON-NLS-1$ assertNull(BorderPos.getStyle("&ç eydfs h")); //$NON-NLS-1$ assertEquals(BorderPos.getStyle(PSTricksConstants.BORDERS_INSIDE), BorderPos.INTO); assertEquals(BorderPos.getStyle(PSTricksConstants.BORDERS_MIDDLE), BorderPos.MID); assertEquals(BorderPos.getStyle(PSTricksConstants.BORDERS_OUTSIDE), BorderPos.OUT); } } TestDotStyle.java000066400000000000000000000076631321075051700341100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestDotStyle { @Test public void testIsFillable() { assertFalse(DotStyle.ASTERISK.isFillable()); assertFalse(DotStyle.BAR.isFillable()); assertFalse(DotStyle.PLUS.isFillable()); assertFalse(DotStyle.X.isFillable()); assertTrue(DotStyle.DIAMOND.isFillable()); assertFalse(DotStyle.DOT.isFillable()); assertFalse(DotStyle.FDIAMOND.isFillable()); assertFalse(DotStyle.FPENTAGON.isFillable()); assertFalse(DotStyle.FSQUARE.isFillable()); assertFalse(DotStyle.FTRIANGLE.isFillable()); assertTrue(DotStyle.O.isFillable()); assertFalse(DotStyle.OPLUS.isFillable()); assertFalse(DotStyle.OTIMES.isFillable()); assertTrue(DotStyle.PENTAGON.isFillable()); assertTrue(DotStyle.SQUARE.isFillable()); assertTrue(DotStyle.TRIANGLE.isFillable()); } @Test public void testGetStyle() { assertEquals(DotStyle.getStyle(PSTricksConstants.ASTERISK_STYLE), DotStyle.ASTERISK); assertEquals(DotStyle.getStyle(PSTricksConstants.BAR_STYLE), DotStyle.BAR); assertEquals(DotStyle.getStyle(PSTricksConstants.DIAMOND_STYLE), DotStyle.DIAMOND); assertEquals(DotStyle.getStyle(PSTricksConstants.DOT_STYLE), DotStyle.DOT); assertEquals(DotStyle.getStyle(PSTricksConstants.FDIAMOND_STYLE), DotStyle.FDIAMOND); assertEquals(DotStyle.getStyle(PSTricksConstants.FPENTAGON_STYLE), DotStyle.FPENTAGON); assertEquals(DotStyle.getStyle(PSTricksConstants.FSQUARE_STYLE), DotStyle.FSQUARE); assertEquals(DotStyle.getStyle(PSTricksConstants.FTRIANGLE_STYLE), DotStyle.FTRIANGLE); assertEquals(DotStyle.getStyle(PSTricksConstants.O_STYLE), DotStyle.O); assertEquals(DotStyle.getStyle(PSTricksConstants.OPLUS_STYLE), DotStyle.OPLUS); assertEquals(DotStyle.getStyle(PSTricksConstants.OTIMES_STYLE), DotStyle.OTIMES); assertEquals(DotStyle.getStyle(PSTricksConstants.PENTAGON_STYLE), DotStyle.PENTAGON); assertEquals(DotStyle.getStyle(PSTricksConstants.PLUS_STYLE), DotStyle.PLUS); assertEquals(DotStyle.getStyle(PSTricksConstants.SQUARE_STYLE), DotStyle.SQUARE); assertEquals(DotStyle.getStyle(PSTricksConstants.TRIANGLE_STYLE), DotStyle.TRIANGLE); assertEquals(DotStyle.getStyle(PSTricksConstants.X_STYLE), DotStyle.X); assertEquals(DotStyle.getStyle(DotStyle.ASTERISK.toString()), DotStyle.ASTERISK); assertEquals(DotStyle.getStyle(DotStyle.BAR.toString()), DotStyle.BAR); assertEquals(DotStyle.getStyle(DotStyle.DIAMOND.toString()), DotStyle.DIAMOND); assertEquals(DotStyle.getStyle(DotStyle.DOT.toString()), DotStyle.DOT); assertEquals(DotStyle.getStyle(DotStyle.FDIAMOND.toString()), DotStyle.FDIAMOND); assertEquals(DotStyle.getStyle(DotStyle.FPENTAGON.toString()), DotStyle.FPENTAGON); assertEquals(DotStyle.getStyle(DotStyle.FSQUARE.toString()), DotStyle.FSQUARE); assertEquals(DotStyle.getStyle(DotStyle.FTRIANGLE.toString()), DotStyle.FTRIANGLE); assertEquals(DotStyle.getStyle(DotStyle.O.toString()), DotStyle.O); assertEquals(DotStyle.getStyle(DotStyle.OPLUS.toString()), DotStyle.OPLUS); assertEquals(DotStyle.getStyle(DotStyle.OTIMES.toString()), DotStyle.OTIMES); assertEquals(DotStyle.getStyle(DotStyle.PENTAGON.toString()), DotStyle.PENTAGON); assertEquals(DotStyle.getStyle(DotStyle.PLUS.toString()), DotStyle.PLUS); assertEquals(DotStyle.getStyle(DotStyle.SQUARE.toString()), DotStyle.SQUARE); assertEquals(DotStyle.getStyle(DotStyle.TRIANGLE.toString()), DotStyle.TRIANGLE); assertEquals(DotStyle.getStyle(DotStyle.X.toString()), DotStyle.X); assertNull(DotStyle.getStyle(null)); assertNull(DotStyle.getStyle("")); //$NON-NLS-1$ assertNull(DotStyle.getStyle("ezpoke zae")); //$NON-NLS-1$ assertNull(DotStyle.getStyle("7dsqd 4ds'")); //$NON-NLS-1$ } } TestFillingStyle.java000066400000000000000000000110711321075051700347320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestFillingStyle { @Test public void testIsFillable() { assertFalse(FillingStyle.GRAD.isFilled()); assertFalse(FillingStyle.CLINES.isFilled()); assertFalse(FillingStyle.VLINES.isFilled()); assertFalse(FillingStyle.HLINES.isFilled()); assertFalse(FillingStyle.NONE.isFilled()); assertTrue(FillingStyle.CLINES_PLAIN.isFilled()); assertTrue(FillingStyle.VLINES_PLAIN.isFilled()); assertTrue(FillingStyle.HLINES_PLAIN.isFilled()); assertTrue(FillingStyle.PLAIN.isFilled()); } @Test public void testGetLatexToken() { assertEquals(FillingStyle.CLINES.getLatexToken(), PSTricksConstants.TOKEN_FILL_CROSSHATCH); assertEquals(FillingStyle.CLINES_PLAIN.getLatexToken(), PSTricksConstants.TOKEN_FILL_CROSSHATCH_F); assertEquals(FillingStyle.GRAD.getLatexToken(), PSTricksConstants.TOKEN_FILL_GRADIENT); assertEquals(FillingStyle.HLINES.getLatexToken(), PSTricksConstants.TOKEN_FILL_HLINES); assertEquals(FillingStyle.HLINES_PLAIN.getLatexToken(), PSTricksConstants.TOKEN_FILL_HLINES_F); assertEquals(FillingStyle.NONE.getLatexToken(), PSTricksConstants.TOKEN_FILL_NONE); assertEquals(FillingStyle.PLAIN.getLatexToken(), PSTricksConstants.TOKEN_FILL_SOLID); assertEquals(FillingStyle.VLINES.getLatexToken(), PSTricksConstants.TOKEN_FILL_VLINES); assertEquals(FillingStyle.VLINES_PLAIN.getLatexToken(), PSTricksConstants.TOKEN_FILL_VLINES_F); } @Test public void testGetStyleFromLatex() { assertNull(FillingStyle.getStyleFromLatex(null)); assertNull(FillingStyle.getStyleFromLatex("")); //$NON-NLS-1$ assertNull(FillingStyle.getStyleFromLatex("azo")); //$NON-NLS-1$ assertNull(FillingStyle.getStyleFromLatex(" ç_è è_d dpo")); //$NON-NLS-1$ assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_CROSSHATCH), FillingStyle.CLINES); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F), FillingStyle.CLINES_PLAIN); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_GRADIENT), FillingStyle.GRAD); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_HLINES), FillingStyle.HLINES); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_HLINES_F), FillingStyle.HLINES_PLAIN); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_NONE), FillingStyle.NONE); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_SOLID), FillingStyle.PLAIN); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_VLINES), FillingStyle.VLINES); assertEquals(FillingStyle.getStyleFromLatex(PSTricksConstants.TOKEN_FILL_VLINES_F), FillingStyle.VLINES_PLAIN); } @Test public void testGetStyle() { assertNull(FillingStyle.getStyle(null)); assertNull(FillingStyle.getStyle("")); //$NON-NLS-1$ assertNull(FillingStyle.getStyle("oiezuroj")); //$NON-NLS-1$ assertNull(FillingStyle.getStyle("zeibvc")); //$NON-NLS-1$ assertEquals(FillingStyle.getStyle(FillingStyle.CLINES.toString()), FillingStyle.CLINES); assertEquals(FillingStyle.getStyle(FillingStyle.VLINES.toString()), FillingStyle.VLINES); assertEquals(FillingStyle.getStyle(FillingStyle.HLINES.toString()), FillingStyle.HLINES); assertEquals(FillingStyle.getStyle(FillingStyle.CLINES_PLAIN.toString()), FillingStyle.CLINES_PLAIN); assertEquals(FillingStyle.getStyle(FillingStyle.VLINES_PLAIN.toString()), FillingStyle.VLINES_PLAIN); assertEquals(FillingStyle.getStyle(FillingStyle.HLINES_PLAIN.toString()), FillingStyle.HLINES_PLAIN); assertEquals(FillingStyle.getStyle(FillingStyle.NONE.toString()), FillingStyle.NONE); assertEquals(FillingStyle.getStyle(FillingStyle.GRAD.toString()), FillingStyle.GRAD); assertEquals(FillingStyle.getStyle(FillingStyle.PLAIN.toString()), FillingStyle.PLAIN); } @Test public void testIsHatchings() { assertFalse(FillingStyle.GRAD.isHatchings()); assertFalse(FillingStyle.NONE.isHatchings()); assertFalse(FillingStyle.PLAIN.isHatchings()); assertTrue(FillingStyle.CLINES.isHatchings()); assertTrue(FillingStyle.CLINES_PLAIN.isHatchings()); assertTrue(FillingStyle.VLINES.isHatchings()); assertTrue(FillingStyle.VLINES_PLAIN.isHatchings()); assertTrue(FillingStyle.HLINES.isHatchings()); assertTrue(FillingStyle.HLINES_PLAIN.isHatchings()); } } TestFreeHandType.java000066400000000000000000000012211321075051700346370ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.*; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp.FreeHandType; import org.junit.Test; public class TestFreeHandType { @Test public void testGetType() { assertEquals(FreeHandType.getType(FreeHandType.CURVES.toString()), FreeHandType.CURVES); assertEquals(FreeHandType.getType(FreeHandType.LINES.toString()), FreeHandType.LINES); assertEquals(FreeHandType.CURVES, FreeHandType.getType(null)); assertEquals(FreeHandType.getType(""), FreeHandType.CURVES); //$NON-NLS-1$ assertEquals(FreeHandType.getType("ds qoqs"), FreeHandType.CURVES); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIArc.java000066400000000000000000000061641321075051700332310ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.interfaces.prop.IArcProp.ArcStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IArc; import org.junit.Test; import test.HelperTest; public abstract class TestIArc extends TestIPositionShape { @Test public abstract void testGetStartPoint(); @Test public abstract void testGetEndPoint(); @Test public void testSetGetStyle() { shape.setArcStyle(ArcStyle.CHORD); assertEquals(ArcStyle.CHORD, shape.getArcStyle()); shape.setArcStyle(ArcStyle.ARC); assertEquals(ArcStyle.ARC, shape.getArcStyle()); shape.setArcStyle(ArcStyle.WEDGE); assertEquals(ArcStyle.WEDGE, shape.getArcStyle()); shape.setArcStyle(null); assertEquals(ArcStyle.WEDGE, shape.getArcStyle()); } @Test public void testSetGetAngleStart() { shape.setAngleStart(Math.PI); HelperTest.assertEqualsDouble(Math.PI, shape.getAngleStart()); shape.setAngleStart(0.); HelperTest.assertEqualsDouble(0., shape.getAngleStart()); shape.setAngleStart(2.*Math.PI); HelperTest.assertEqualsDouble(2.*Math.PI, shape.getAngleStart()); shape.setAngleStart(4.*Math.PI); HelperTest.assertEqualsDouble(4.*Math.PI, shape.getAngleStart()); shape.setAngleStart(-2.*Math.PI); HelperTest.assertEqualsDouble(-2.*Math.PI, shape.getAngleStart()); shape.setAngleStart(-4.*Math.PI); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleStart()); shape.setAngleStart(Double.NaN); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleStart()); shape.setAngleStart(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleStart()); shape.setAngleStart(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleStart()); } @Test public void testSetGetAngleEnd() { shape.setAngleEnd(Math.PI); HelperTest.assertEqualsDouble(Math.PI, shape.getAngleEnd()); shape.setAngleEnd(0.); HelperTest.assertEqualsDouble(0., shape.getAngleEnd()); shape.setAngleEnd(2.*Math.PI); HelperTest.assertEqualsDouble(2.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(4.*Math.PI); HelperTest.assertEqualsDouble(4.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(-2.*Math.PI); HelperTest.assertEqualsDouble(-2.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(-4.*Math.PI); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(Double.NaN); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleEnd()); shape.setAngleEnd(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleEnd()); } @Override @Test public void testCopy() { super.testCopy(); shape2.setAngleEnd(-4.*Math.PI); shape2.setAngleStart(-2.*Math.PI); shape2.setArcStyle(ArcStyle.WEDGE); shape.copy(shape2); HelperTest.assertEqualsDouble(-4.*Math.PI, shape.getAngleEnd()); HelperTest.assertEqualsDouble(-2.*Math.PI, shape.getAngleStart()); assertEquals(ArcStyle.WEDGE, shape.getArcStyle()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIArrow.java000066400000000000000000000033111321075051700336050ustar00rootroot00000000000000package test.glib.models.interfaces; import org.junit.Test; public abstract class TestIArrow { @Test public void testIsWithoutStyle() { //TODO } @Test public void testSetArrowStyleString() { //TODO } @Test public void testSetArrowStyleArrowStyle() { //TODO } @Test public void testSetDotSizeDim() { //TODO } @Test public void testSetDotSizeNum() { //TODO } @Test public void testGetPosition() { //TODO } @Test public void testSetTBarSizeNum() { //TODO } @Test public void testSetTBarSizeDim() { //TODO } @Test public void testGetTBarSizeDim() { //TODO } @Test public void testGetTBarSizeNum() { //TODO } @Test public void testSetRBracketNum() { //TODO } @Test public void testSetBracketNum() { //TODO } @Test public void testSetArrowLength() { //TODO } @Test public void testSetArrowSizeDim() { //TODO } @Test public void testSetArrowSizeNum() { //TODO } @Test public void testSetArrowInset() { //TODO } @Test public void testGetArrowStyle() { //TODO } @Test public void testGetDotSizeDim() { //TODO } @Test public void testGetDotSizeNum() { //TODO } @Test public void testIsLeftArrow() { //TODO } @Test public void testGetBracketNum() { //TODO } @Test public void testIsInverted() { //TODO } @Test public void testGetArrowSizeNum() { //TODO } @Test public void testGetArrowSizeDim() { //TODO } @Test public void testGetArrowInset() { //TODO } @Test public void testGetArrowLength() { //TODO } @Test public void testGetRBracketNum() { //TODO } @Test public void testGetShape() { //TODO } @Test public void testSetShape() { //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIAxes.java000066400000000000000000000332201321075051700334150ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.AxesStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Test; import test.HelperTest; public abstract class TestIAxes extends TestIStandardGrid { @Override @Test public void testGetSetLabelsSize() {//FIXME // shape.setLabelsSize(TestSize.FOOTNOTE.getSize()); // assertEquals(TestSize.FOOTNOTE.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.HUGE1.getSize()); // assertEquals(TestSize.HUGE1.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.HUGE2.getSize()); // assertEquals(TestSize.HUGE2.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.LARGE1.getSize()); // assertEquals(TestSize.LARGE1.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.LARGE2.getSize()); // assertEquals(TestSize.LARGE2.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.LARGE3.getSize()); // assertEquals(TestSize.LARGE3.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.NORMAL.getSize()); // assertEquals(TestSize.NORMAL.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.SCRIPT.getSize()); // assertEquals(TestSize.SCRIPT.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.SMALL.getSize()); // assertEquals(TestSize.SMALL.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(TestSize.TINY.getSize()); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // // shape.setLabelsSize(-1); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(100); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(1); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(2); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(0); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(-100); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(3); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(4); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); // shape.setLabelsSize(5); // assertEquals(TestSize.TINY.getSize(), shape.getLabelsSize()); } @Test public void testGetStep() { HelperTest.assertEqualsDouble(IShape.PPC, shape.getStep()); } @Test public void testGetSetIncrementX() { shape.setIncrementX(10); HelperTest.assertEqualsDouble(10., shape.getIncrementX()); shape.setIncrementX(0.1); HelperTest.assertEqualsDouble(0.1, shape.getIncrementX()); shape.setIncrementX(100.5); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); shape.setIncrementX(0); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); shape.setIncrementX(-10.5); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); shape.setIncrementX(Double.NaN); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); shape.setIncrementX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); shape.setIncrementX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getIncrementX()); } @Test public void testGetSetIncrementY() { shape.setIncrementY(10); HelperTest.assertEqualsDouble(10., shape.getIncrementY()); shape.setIncrementY(0.1); HelperTest.assertEqualsDouble(0.1, shape.getIncrementY()); shape.setIncrementY(100.5); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); shape.setIncrementY(0); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); shape.setIncrementY(-10.5); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); shape.setIncrementY(Double.NaN); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); shape.setIncrementY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); shape.setIncrementY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getIncrementY()); } @Test public void testGetSetDistLabelsX() { shape.setDistLabelsX(10); HelperTest.assertEqualsDouble(10., shape.getDistLabelsX()); shape.setDistLabelsX(0.1); HelperTest.assertEqualsDouble(0.1, shape.getDistLabelsX()); shape.setDistLabelsX(100.5); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); shape.setDistLabelsX(0); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); shape.setDistLabelsX(-10.5); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); shape.setDistLabelsX(Double.NaN); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); shape.setDistLabelsX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); shape.setDistLabelsX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsX()); } @Test public void testGetSetDistLabelsY() { shape.setDistLabelsY(10); HelperTest.assertEqualsDouble(10., shape.getDistLabelsY()); shape.setDistLabelsY(0.1); HelperTest.assertEqualsDouble(0.1, shape.getDistLabelsY()); shape.setDistLabelsY(100.5); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); shape.setDistLabelsY(0); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); shape.setDistLabelsY(-10.5); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); shape.setDistLabelsY(Double.NaN); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); shape.setDistLabelsY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); shape.setDistLabelsY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getDistLabelsY()); } @Test public void testGetSetLabelsDisplayed() { shape.setLabelsDisplayed(PlottingStyle.ALL); assertEquals(PlottingStyle.ALL, shape.getLabelsDisplayed()); shape.setLabelsDisplayed(PlottingStyle.NONE); assertEquals(PlottingStyle.NONE, shape.getLabelsDisplayed()); shape.setLabelsDisplayed(PlottingStyle.X); assertEquals(PlottingStyle.X, shape.getLabelsDisplayed()); shape.setLabelsDisplayed(PlottingStyle.Y); assertEquals(PlottingStyle.Y, shape.getLabelsDisplayed()); shape.setLabelsDisplayed(null); assertEquals(PlottingStyle.Y, shape.getLabelsDisplayed()); shape.setLabelsDisplayed(PlottingStyle.ALL); assertEquals(PlottingStyle.ALL, shape.getLabelsDisplayed()); } @Test public void testIsSetShowOrigin() { shape.setShowOrigin(true); assertTrue(shape.isShowOrigin()); shape.setShowOrigin(false); assertFalse(shape.isShowOrigin()); shape.setShowOrigin(true); assertTrue(shape.isShowOrigin()); } @Test public void testGetSetTicksDisplayed() { shape.setTicksDisplayed(PlottingStyle.ALL); assertEquals(PlottingStyle.ALL, shape.getTicksDisplayed()); shape.setTicksDisplayed(PlottingStyle.NONE); assertEquals(PlottingStyle.NONE, shape.getTicksDisplayed()); shape.setTicksDisplayed(PlottingStyle.X); assertEquals(PlottingStyle.X, shape.getTicksDisplayed()); shape.setTicksDisplayed(PlottingStyle.Y); assertEquals(PlottingStyle.Y, shape.getTicksDisplayed()); shape.setTicksDisplayed(null); assertEquals(PlottingStyle.Y, shape.getTicksDisplayed()); shape.setTicksDisplayed(PlottingStyle.ALL); assertEquals(PlottingStyle.ALL, shape.getTicksDisplayed()); } @Test public void testGetSetTicksStyle() { shape.setTicksStyle(TicksStyle.BOTTOM); assertEquals(TicksStyle.BOTTOM, shape.getTicksStyle()); shape.setTicksStyle(TicksStyle.FULL); assertEquals(TicksStyle.FULL, shape.getTicksStyle()); shape.setTicksStyle(TicksStyle.TOP); assertEquals(TicksStyle.TOP, shape.getTicksStyle()); shape.setTicksStyle(null); assertEquals(TicksStyle.TOP, shape.getTicksStyle()); shape.setTicksStyle(TicksStyle.BOTTOM); assertEquals(TicksStyle.BOTTOM, shape.getTicksStyle()); } @Test public void testGetSetTicksSize() { shape.setTicksSize(10); HelperTest.assertEqualsDouble(10., shape.getTicksSize()); shape.setTicksSize(0.1); HelperTest.assertEqualsDouble(0.1, shape.getTicksSize()); shape.setTicksSize(100.5); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); shape.setTicksSize(0); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); shape.setTicksSize(-10.5); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); shape.setTicksSize(Double.NaN); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); shape.setTicksSize(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); shape.setTicksSize(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(100.5, shape.getTicksSize()); } @Test public void testGetSetAxesStyle() { shape.setAxesStyle(AxesStyle.AXES); assertEquals(AxesStyle.AXES, shape.getAxesStyle()); shape.setAxesStyle(AxesStyle.FRAME); assertEquals(AxesStyle.FRAME, shape.getAxesStyle()); shape.setAxesStyle(AxesStyle.NONE); assertEquals(AxesStyle.NONE, shape.getAxesStyle()); shape.setAxesStyle(null); assertEquals(AxesStyle.NONE, shape.getAxesStyle()); shape.setAxesStyle(AxesStyle.AXES); assertEquals(AxesStyle.AXES, shape.getAxesStyle()); } @Override @Test public void testCopy() { super.testCopy(); shape2.setIncrementX(24); shape2.setIncrementY(28); shape2.setAxesStyle(AxesStyle.FRAME); shape2.setTicksStyle(TicksStyle.BOTTOM); shape2.setDistLabelsX(12); shape2.setDistLabelsY(112); shape2.setShowOrigin(false); shape2.setTicksDisplayed(PlottingStyle.NONE); shape2.setTicksSize(34); shape.copy(shape2); HelperTest.assertEqualsDouble(shape2.getIncrementX(), shape.getIncrementX()); HelperTest.assertEqualsDouble(shape2.getIncrementY(), shape.getIncrementY()); assertEquals(shape2.getAxesStyle(), shape.getAxesStyle()); HelperTest.assertEqualsDouble(shape2.getTicksSize(), shape.getTicksSize()); assertEquals(shape2.getTicksDisplayed(), shape.getTicksDisplayed()); assertEquals(shape2.getTicksStyle(), shape.getTicksStyle()); HelperTest.assertEqualsDouble(shape2.getDistLabelsX(), shape.getDistLabelsX()); HelperTest.assertEqualsDouble(shape2.getDistLabelsY(), shape.getDistLabelsY()); assertEquals(shape2.isShowOrigin(), shape.isShowOrigin()); } @Override @Test public void testDuplicate() { super.testDuplicate(); shape.setIncrementX(24); shape.setIncrementY(28); shape.setAxesStyle(AxesStyle.FRAME); shape.setTicksStyle(TicksStyle.BOTTOM); shape.setDistLabelsX(12); shape.setDistLabelsY(112); shape.setShowOrigin(false); shape.setTicksDisplayed(PlottingStyle.NONE); shape.setTicksSize(34); IAxes s2 = (IAxes)shape.duplicate(); assertNotNull(s2); HelperTest.assertEqualsDouble(s2.getIncrementX(), shape.getIncrementX()); HelperTest.assertEqualsDouble(s2.getIncrementY(), shape.getIncrementY()); assertEquals(s2.getAxesStyle(), shape.getAxesStyle()); HelperTest.assertEqualsDouble(s2.getTicksSize(), shape.getTicksSize()); assertEquals(s2.getTicksDisplayed(), shape.getTicksDisplayed()); assertEquals(s2.getTicksStyle(), shape.getTicksStyle()); HelperTest.assertEqualsDouble(s2.getDistLabelsX(), shape.getDistLabelsX()); HelperTest.assertEqualsDouble(s2.getDistLabelsY(), shape.getDistLabelsY()); assertEquals(s2.isShowOrigin(), shape.isShowOrigin()); } @Override @Test public void testGetBottomLeftPoint() { shape.setPosition(10, 20); HelperTest.assertEqualsDouble(10., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(20., shape.getBottomLeftPoint().getY()); shape.setPosition(-10, -20); HelperTest.assertEqualsDouble(-10., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(-20., shape.getBottomLeftPoint().getY()); } @Override @Test public void testGetBottomRightPoint() { shape.setPosition(10, 10); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); HelperTest.assertEqualsDouble(10.+IShape.PPC*50., shape.getBottomRightPoint().getX()); HelperTest.assertEqualsDouble(10.-IShape.PPC*-100., shape.getBottomRightPoint().getY()); } @Override@Test public void testGetTopLeftPoint() { shape.setPosition(10, 10); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); HelperTest.assertEqualsDouble(10.-200.*IShape.PPC, shape.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(10.-75.*IShape.PPC, shape.getTopLeftPoint().getY()); } @Override@Test public void testGetTopRightPoint() { shape.setPosition(0, 0); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); HelperTest.assertEqualsDouble(IShape.PPC*250., shape.getTopRightPoint().getX()); HelperTest.assertEqualsDouble(-IShape.PPC*175., shape.getTopRightPoint().getY()); } @Override@Test public void testMirrorHorizontal() { shape.setPosition(0, 0); shape.setGridStart(0, 0); shape.setGridEnd(10, 10); shape.mirrorHorizontal(ShapeFactory.createPoint(IShape.PPC*10., 0.)); HelperTest.assertEqualsDouble(IShape.PPC*10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(0., shape.getPosition().getY()); } @Override@Test public void testMirrorVertical() { shape.setPosition(0, 0); shape.setGridStart(0, 0); shape.setGridEnd(10, 10); shape.mirrorVertical(ShapeFactory.createPoint(0., -IShape.PPC*10.)); HelperTest.assertEqualsDouble(0., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-IShape.PPC*10., shape.getPosition().getY()); } } TestIBezierCurve.java000066400000000000000000000011541321075051700346640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import org.junit.Test; public abstract class TestIBezierCurve extends TestIControlPointShape { @Test public void testMovePointAt() { //TODO } @Test public void testIsClosed() { //TODO } @Test public void testSetClosed() { //TODO } @Test public void testGetBalanceGap() { //TODO } @Test public void testSetBalanceGap() { //TODO } @Override @Test public void testCopy() { //TODO } @Override @Test public void testDuplicate() { //TODO } } TestICircle.java000066400000000000000000000105721321075051700336440ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import org.junit.Test; import test.HelperTest; public abstract class TestICircle extends TestISquaredShape { // // @Override // @Test // public void testScale() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(1.5, 1, Position.EAST); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // shape.scale(1, 1.5, Position.SOUTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1.5, 1, Position.WEST); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1, 1.5, Position.NORTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // } // // // // @Override // @Test // public void testScaleNE() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.NE); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // // @Override // @Test // public void testScaleSE() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.SE); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // @Override // @Test // public void testScaleSW() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.SW); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // @Override // @Test // public void testScaleNW() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.NW); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } @Override @Test public void testGetBottomLeftPoint() { shape.setPosition(-5, 0); shape.setWidth(10); HelperTest.assertEqualsDouble(-5., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(0., shape.getBottomLeftPoint().getY()); } @Override @Test public void testGetBottomRightPoint() { shape.setPosition(-15, 100); shape.setWidth(10); HelperTest.assertEqualsDouble(-5., shape.getBottomRightPoint().getX()); HelperTest.assertEqualsDouble(100., shape.getBottomRightPoint().getY()); } @Override @Test public void testGetTopLeftPoint() { shape.setPosition(20, 10); shape.setWidth(20); HelperTest.assertEqualsDouble(20., shape.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(-10., shape.getTopLeftPoint().getY()); } @Override @Test public void testGetTopRightPoint() { shape.setPosition(20, 10); shape.setWidth(10); HelperTest.assertEqualsDouble(30., shape.getTopRightPoint().getX()); HelperTest.assertEqualsDouble(0., shape.getTopRightPoint().getY()); } @Test public void testSetWidth() { shape.setPosition(-5, -5); shape.setWidth(3); HelperTest.assertEqualsDouble(3., shape.getWidth()); HelperTest.assertEqualsDouble(3., shape.getHeight()); } } TestICircleArc.java000066400000000000000000000003001321075051700342560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; public abstract class TestICircleArc extends TestIArc { // } TestIControlPointShape.java000066400000000000000000000025241321075051700360540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IControlPointShape; import org.junit.Test; public abstract class TestIControlPointShape extends TestIShape { @Test public void testGetFirstCtrlPtAt() { //TODO } @Test public void testGetSecondCtrlPtAt() { //TODO } @Test public void testUpdateSecondControlPoints() { //TODO } @Test public void testSetXFirstCtrlPt() { //TODO } @Test public void testSetYFirstCtrlPt() { //TODO } @Test public void testSetXSecondCtrlPt() { //TODO } @Test public void testSetYSecondCtrlPt() { //TODO } @Test public void testGetFirstCtrlPts() { //TODO } @Test public void testGetSecondCtrlPts() { //TODO } @Override @Test public void testCopy() { //TODO } @Override @Test public void testDuplicate() { //TODO } @Override@Test public void testGetBottomLeftPoint() { //TODO } @Override@Test public void testGetBottomRightPoint() { //TODO } @Override@Test public void testGetTopLeftPoint() { //TODO } @Override@Test public void testGetTopRightPoint() { //TODO } @Override@Test public void testMirrorHorizontal() { //TODO } @Override@Test public void testMirrorVertical() { //TODO } @Override@Test public void testTranslate() { //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIDot.java000066400000000000000000000205511321075051700332460ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import org.junit.Test; import test.HelperTest; public abstract class TestIDot extends TestIPositionShape { @Test public void testGetSetDotStyle() { shape.setDotStyle(DotStyle.ASTERISK); assertEquals(DotStyle.ASTERISK, shape.getDotStyle()); shape.setDotStyle(DotStyle.BAR); assertEquals(DotStyle.BAR, shape.getDotStyle()); shape.setDotStyle(DotStyle.DIAMOND); assertEquals(DotStyle.DIAMOND, shape.getDotStyle()); shape.setDotStyle(DotStyle.DOT); assertEquals(DotStyle.DOT, shape.getDotStyle()); shape.setDotStyle(DotStyle.FDIAMOND); assertEquals(DotStyle.FDIAMOND, shape.getDotStyle()); shape.setDotStyle(DotStyle.FPENTAGON); assertEquals(DotStyle.FPENTAGON, shape.getDotStyle()); shape.setDotStyle(DotStyle.FSQUARE); assertEquals(DotStyle.FSQUARE, shape.getDotStyle()); shape.setDotStyle(DotStyle.FTRIANGLE); assertEquals(DotStyle.FTRIANGLE, shape.getDotStyle()); shape.setDotStyle(DotStyle.O); assertEquals(DotStyle.O, shape.getDotStyle()); shape.setDotStyle(DotStyle.OPLUS); assertEquals(DotStyle.OPLUS, shape.getDotStyle()); shape.setDotStyle(DotStyle.OTIMES); assertEquals(DotStyle.OTIMES, shape.getDotStyle()); shape.setDotStyle(DotStyle.PENTAGON); assertEquals(DotStyle.PENTAGON, shape.getDotStyle()); shape.setDotStyle(DotStyle.PLUS); assertEquals(DotStyle.PLUS, shape.getDotStyle()); shape.setDotStyle(DotStyle.SQUARE); assertEquals(DotStyle.SQUARE, shape.getDotStyle()); shape.setDotStyle(DotStyle.TRIANGLE); assertEquals(DotStyle.TRIANGLE, shape.getDotStyle()); shape.setDotStyle(DotStyle.X); assertEquals(DotStyle.X, shape.getDotStyle()); shape.setDotStyle(null); assertEquals(DotStyle.X, shape.getDotStyle()); } @Test public void testGetSetRadius() { shape.setDiametre(22); HelperTest.assertEqualsDouble(22., shape.getDiametre()); shape.setDiametre(1); HelperTest.assertEqualsDouble(1., shape.getDiametre()); shape.setDiametre(0.001); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(0); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(-0.001); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(-1); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(Double.NaN); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); shape.setDiametre(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(0.001, shape.getDiametre()); } @Override @Test public void testCopy() { super.testCopy(); shape2.setDotStyle(DotStyle.DIAMOND); shape2.setDiametre(31); shape.copy(shape2); assertEquals(shape2.getDotStyle(), shape.getDotStyle()); HelperTest.assertEqualsDouble(shape2.getDiametre(), shape.getDiametre()); } @Override @Test public void testGetBottomLeftPoint() { //TODO } @Override @Test public void testGetBottomRightPoint() { //TODO } @Override @Test public void testGetTopLeftPoint() { //TODO } @Override @Test public void testGetTopRightPoint() { //TODO } @Override @Test public void testMirrorHorizontal() { shape.setPosition(-10, -20); shape.mirrorHorizontal(ShapeFactory.createPoint(0, 0)); HelperTest.assertEqualsDouble(10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-20., shape.getPosition().getY()); } @Test public void testMirrorHorizontal2() { shape.setPosition(-10, -20); shape.mirrorHorizontal(null); HelperTest.assertEqualsDouble(-10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-20., shape.getPosition().getY()); } @Test public void testMirrorHorizontal3() { shape.setPosition(-10, -20); shape.mirrorHorizontal(ShapeFactory.createPoint(Double.NaN, Double.POSITIVE_INFINITY)); HelperTest.assertEqualsDouble(-10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-20., shape.getPosition().getY()); } @Override @Test public void testMirrorVertical() { shape.setPosition(-10, -20); shape.mirrorVertical(ShapeFactory.createPoint(100, 0)); HelperTest.assertEqualsDouble(-10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(20., shape.getPosition().getY()); } @Test public void testMirrorVertical2() { shape.setPosition(-10, -20); shape.mirrorVertical(null); HelperTest.assertEqualsDouble(-10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-20., shape.getPosition().getY()); } @Test public void testMirrorVertical3() { shape.setPosition(-10, -20); shape.mirrorVertical(ShapeFactory.createPoint(Double.NaN, Double.POSITIVE_INFINITY)); HelperTest.assertEqualsDouble(-10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-20., shape.getPosition().getY()); } // @Override // public void testScale() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(0, 10, Position.EAST); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // shape.scale(-10, 10, Position.EAST); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // shape.scale(10, 10, null); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // shape.scale(10, 0, Position.WEST); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // shape.scale(10, -10, Position.WEST); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // shape.scale(10, 0, null); // assertEquals(10., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // public void testScaleEast() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.EAST); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // public void testScaleWest() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.WEST); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // public void testScaleNW() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.NW); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // public void testScaleSW() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.SW); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // // public void testScaleNE() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.NE); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // public void testScaleSE() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.SE); // assertEquals(20., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // // public void testScaleNorth() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.NORTH); // assertEquals(30., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } // // // // public void testScaleSouth() { // shape.setPosition(50, 100); // shape.setRadius(10); // shape.scale(2, 3, Position.SOUTH); // assertEquals(30., shape.getRadius()); // assertEquals(50., shape.getPosition().getX()); // assertEquals(100., shape.getPosition().getY()); // } } TestIDrawing.java000066400000000000000000000157221321075051700340400ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IDrawing; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Test; public abstract class TestIDrawing { public IDrawing drawing; @Test public void testAddShapeIShape() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); drawing.addShape(sh1); drawing.addShape(sh2); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh2, drawing.getShapes().get(1)); drawing.addShape((IShape)null); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh2, drawing.getShapes().get(1)); } @Test public void testAddShapeIShapeInt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.addShape(sh1, 1); assertEquals(0, drawing.getShapes().size()); drawing.addShape(sh1, -2); assertEquals(0, drawing.getShapes().size()); drawing.addShape(sh1, 0); assertEquals(1, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); drawing.addShape(null, 0); assertEquals(1, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); drawing.addShape(sh2, 2); assertEquals(1, drawing.getShapes().size()); drawing.addShape(sh2, -2); assertEquals(1, drawing.getShapes().size()); drawing.addShape(sh2, -1); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh2, drawing.getShapes().get(1)); drawing.addShape(sh3, 1); assertEquals(3, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh2, drawing.getShapes().get(2)); assertEquals(sh3, drawing.getShapes().get(1)); } @Test public void testRemoveShapeIShape() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); drawing.getShapes().add(sh2); drawing.getShapes().add(sh3); drawing.removeShape(sh2); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh3, drawing.getShapes().get(1)); drawing.removeShape(null); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh3, drawing.getShapes().get(1)); drawing.removeShape(ShapeFactory.createRectangle()); assertEquals(2, drawing.getShapes().size()); assertEquals(sh1, drawing.getShapes().get(0)); assertEquals(sh3, drawing.getShapes().get(1)); } @Test public void testRemoveShapeInt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); drawing.getShapes().add(sh2); drawing.getShapes().add(sh3); assertNull(drawing.removeShape(4)); assertNull(drawing.removeShape(-2)); assertEquals(sh2, drawing.removeShape(1)); assertEquals(sh1, drawing.removeShape(0)); assertEquals(sh3, drawing.removeShape(-1)); } @Test public void testGetShapeAt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); drawing.getShapes().add(sh2); drawing.getShapes().add(sh3); assertEquals(sh1, drawing.getShapeAt(0)); assertEquals(sh2, drawing.getShapeAt(1)); assertEquals(sh3, drawing.getShapeAt(2)); assertEquals(sh3, drawing.getShapeAt(-1)); assertNull(drawing.getShapeAt(-2)); assertNull(drawing.getShapeAt(3)); } @Test public void testSize() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); assertEquals(1, drawing.size()); drawing.getShapes().add(sh2); assertEquals(2, drawing.size()); drawing.getShapes().add(sh3); assertEquals(3, drawing.size()); drawing.getShapes().clear(); assertEquals(0, drawing.size()); } @Test public void testContains() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); IShape sh4 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); drawing.getShapes().add(sh2); drawing.getShapes().add(sh3); assertFalse(drawing.contains(null)); assertFalse(drawing.contains(sh4)); assertTrue(drawing.contains(sh1)); assertTrue(drawing.contains(sh2)); assertTrue(drawing.contains(sh3)); } @Test public void testIsEmpty() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().clear(); assertTrue(drawing.isEmpty()); drawing.getShapes().add(sh1); assertFalse(drawing.isEmpty()); drawing.getShapes().add(sh2); assertFalse(drawing.isEmpty()); drawing.getShapes().add(sh3); assertFalse(drawing.isEmpty()); drawing.getShapes().clear(); assertTrue(drawing.isEmpty()); } @Test public void testClear() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); drawing.getShapes().add(sh1); drawing.getShapes().add(sh2); drawing.getShapes().add(sh3); drawing.clear(); assertEquals(0, drawing.getShapes().size()); } @Test public void testGetShapes() { assertNotNull(drawing.getShapes()); } @Test public void testGetSelection() { assertNotNull(drawing.getSelection()); } @Test public void testSetSelectionList() { List list = new ArrayList<>(); IGroup selection = drawing.getSelection(); IShape sh = ShapeFactory.createRectangle(); IShape sh2; list.add(sh); drawing.setSelection(list); assertEquals(selection, drawing.getSelection()); assertEquals(1, drawing.getSelection().size()); assertEquals(sh, drawing.getSelection().getShapeAt(0)); list = new ArrayList<>(); sh = ShapeFactory.createRectangle(); sh2 = ShapeFactory.createRectangle(); list.add(sh); list.add(sh2); drawing.setSelection(list); assertEquals(selection, drawing.getSelection()); assertEquals(2, drawing.getSelection().size()); assertEquals(sh, drawing.getSelection().getShapeAt(0)); assertEquals(sh2, drawing.getSelection().getShapeAt(1)); drawing.setSelection(Collections.emptyList()); assertNotNull(drawing.getSelection()); assertEquals(0, drawing.getSelection().size()); } } TestIEllipse.java000066400000000000000000000103711321075051700340350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import org.junit.Test; import test.HelperTest; public abstract class TestIEllipse extends TestIRectangularShape { // @Test // public void testGetIntersectionHoriz1() { // ILine line = ShapeFactory.createLine(ShapeFactory.createPoint(-10,0), ShapeFactory.createPoint(10,0)); // shape.setPosition(-1,1); // shape.setWidth(2); // shape.setHeight(2); // IPoint[] pts = shape.getIntersection(line); // // assertEquals(2, pts.length); // if(pts[0].getX() extends TestIModifiablePointsShape { @Test public void testGetType() { assertEquals(FreeHandType.CURVES, shape.getType()); } @Test public void testSetType() { shape.setType(FreeHandType.LINES); assertEquals(FreeHandType.LINES, shape.getType()); shape.setType(FreeHandType.CURVES); assertEquals(FreeHandType.CURVES, shape.getType()); shape.setType(null); assertEquals(FreeHandType.CURVES, shape.getType()); } @Test public void testIsOpen() { assertTrue(shape.isOpen()); } @Test public void testSetOpen() { shape.setOpen(false); assertFalse(shape.isOpen()); shape.setOpen(true); assertTrue(shape.isOpen()); } @Test public void testGetInterval() { shape.setInterval(22); assertEquals(22, shape.getInterval()); } @Test public void testSetInterval() { shape.setInterval(1); assertEquals(1, shape.getInterval()); shape.setInterval(0); assertEquals(1, shape.getInterval()); shape.setInterval(-1); assertEquals(1, shape.getInterval()); shape.setInterval(50); assertEquals(50, shape.getInterval()); shape.setInterval(Integer.MAX_VALUE); assertEquals(Integer.MAX_VALUE, shape.getInterval()); shape.setInterval(Integer.MIN_VALUE); assertEquals(Integer.MAX_VALUE, shape.getInterval()); } @Override @Test public void testCopy() { shape2.setOpen(false); shape2.setInterval(10); shape2.setType(FreeHandType.LINES); shape.copy(shape2); assertFalse(shape.isOpen()); assertEquals(10, shape.getInterval()); assertEquals(FreeHandType.LINES, shape.getType()); } @Test public void testCopyWhenNotFreeHand() { IShape sh = ShapeFactory.createCircleArc(); shape.copy(sh); // assertTrue(shape.isParametersEquals(sh, false)); // assertTrue(shape.isParametersEquals(sh, true)); //TODO } @Override @Test public void testDuplicate() { shape.setOpen(false); shape.setInterval(10); shape.setType(FreeHandType.LINES); // final IFreehand dup = (IFreehand)shape.duplicate(); // assertTrue(shape.isParametersEquals(dup, false)); // assertTrue(shape.isParametersEquals(dup, true)); //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIGrid.java000066400000000000000000000276701321075051700334160ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.*; import java.awt.Color; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import org.junit.Test; import test.HelperTest; public abstract class TestIGrid extends TestIStandardGrid { @Test public void testGetStep() { shape.setUnit(1); HelperTest.assertEqualsDouble(IShape.PPC, shape.getStep()); shape.setUnit(2); HelperTest.assertEqualsDouble(2.*IShape.PPC, shape.getStep()); } @Test public void testIsSetXLabelSouth() { shape.setXLabelSouth(true); assertTrue(shape.isXLabelSouth()); shape.setXLabelSouth(false); assertFalse(shape.isXLabelSouth()); } @Test public void testIsSetYLabelWest() { shape.setYLabelWest(true); assertTrue(shape.isYLabelWest()); shape.setYLabelWest(false); assertFalse(shape.isYLabelWest()); } @Test public void testGetSetGridDots() { shape.setGridDots(20); assertEquals(20, shape.getGridDots()); shape.setGridDots(10); assertEquals(10, shape.getGridDots()); shape.setGridDots(0); assertEquals(0, shape.getGridDots()); shape.setGridDots(-30); assertEquals(0, shape.getGridDots()); } @Test public void testGetSetGridLabelsColor() { shape.setGridLabelsColour(Color.BLUE); assertEquals(Color.BLUE, shape.getGridLabelsColour()); shape.setGridLabelsColour(Color.RED); assertEquals(Color.RED, shape.getGridLabelsColour()); shape.setGridLabelsColour(null); assertEquals(Color.RED, shape.getGridLabelsColour()); } @Test public void testGetSetGridWidth() { shape.setGridWidth(30); HelperTest.assertEqualsDouble(30., shape.getGridWidth()); shape.setGridWidth(50); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); shape.setGridWidth(0); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); shape.setGridWidth(-1); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); shape.setGridWidth(Double.NaN); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); shape.setGridWidth(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); shape.setGridWidth(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getGridWidth()); } @Test public void testGetSetSubGridColor() { shape.setSubGridColour(Color.BLUE); assertEquals(Color.BLUE, shape.getSubGridColour()); shape.setSubGridColour(Color.RED); assertEquals(Color.RED, shape.getSubGridColour()); shape.setSubGridColour(null); assertEquals(Color.RED, shape.getSubGridColour()); } @Test public void testGetSetSubGridDiv() { shape.setSubGridDiv(20); assertEquals(20, shape.getSubGridDiv()); shape.setSubGridDiv(10); assertEquals(10, shape.getSubGridDiv()); shape.setSubGridDiv(0); assertEquals(0, shape.getSubGridDiv()); shape.setSubGridDiv(-30); assertEquals(0, shape.getSubGridDiv()); } @Test public void testGetSetSubGridDots() { shape.setSubGridDots(20); assertEquals(20, shape.getSubGridDots()); shape.setSubGridDots(10); assertEquals(10, shape.getSubGridDots()); shape.setSubGridDots(0); assertEquals(0, shape.getSubGridDots()); shape.setSubGridDots(-30); assertEquals(0, shape.getSubGridDots()); } @Test public void testGetSetSubGridWidth() { shape.setSubGridWidth(30); HelperTest.assertEqualsDouble(30., shape.getSubGridWidth()); shape.setSubGridWidth(50); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); shape.setSubGridWidth(0); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); shape.setSubGridWidth(-1); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); shape.setSubGridWidth(Double.NaN); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); shape.setSubGridWidth(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); shape.setSubGridWidth(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getSubGridWidth()); } @Test public void testGetSetUnit() { shape.setUnit(30); HelperTest.assertEqualsDouble(30., shape.getUnit()); shape.setUnit(50); HelperTest.assertEqualsDouble(50., shape.getUnit()); shape.setUnit(0); HelperTest.assertEqualsDouble(50., shape.getUnit()); shape.setUnit(-1); HelperTest.assertEqualsDouble(50., shape.getUnit()); shape.setUnit(Double.NaN); HelperTest.assertEqualsDouble(50., shape.getUnit()); shape.setUnit(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getUnit()); shape.setUnit(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(50., shape.getUnit()); } @Override@Test public void testDuplicate() { super.testDuplicate(); shape.setGridDots(45); shape.setSubGridDots(55); shape.setGridLabelsColour(Color.CYAN); shape.setSubGridColour(Color.GREEN); shape.setUnit(0.6); shape.setGridWidth(12); shape.setSubGridWidth(24); shape.setSubGridDiv(32); shape.setXLabelSouth(false); shape.setYLabelWest(false); IGrid g2 = (IGrid)shape.duplicate(); assertEquals(g2.getGridDots(), shape.getGridDots()); assertEquals(g2.getSubGridDiv(), shape.getSubGridDiv()); assertEquals(g2.getGridLabelsColour(), shape.getGridLabelsColour()); assertEquals(g2.getSubGridColour(), shape.getSubGridColour()); HelperTest.assertEqualsDouble(g2.getUnit(), shape.getUnit()); HelperTest.assertEqualsDouble(g2.getGridWidth(), shape.getGridWidth()); HelperTest.assertEqualsDouble(g2.getSubGridWidth(), shape.getSubGridWidth()); assertEquals(g2.getSubGridDiv(), shape.getSubGridDiv()); assertFalse(g2.isXLabelSouth()); assertFalse(g2.isYLabelWest()); } @Override@Test public void testGetBottomLeftPoint() { shape.setPosition(10, 20); HelperTest.assertEqualsDouble(10., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(20., shape.getBottomLeftPoint().getY()); shape.setPosition(-10, -20); HelperTest.assertEqualsDouble(-10., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(-20., shape.getBottomLeftPoint().getY()); } @Override@Test public void testGetBottomRightPoint() { shape.setPosition(0, 0); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); shape.setUnit(2); HelperTest.assertEqualsDouble(2.*IShape.PPC*50., shape.getBottomRightPoint().getX()); HelperTest.assertEqualsDouble(-IShape.PPC*-100., shape.getBottomRightPoint().getY()); } @Override@Test public void testGetTopLeftPoint() { shape.setPosition(0, 0); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); shape.setUnit(2); HelperTest.assertEqualsDouble(IShape.PPC*-200., shape.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(-2.*IShape.PPC*75., shape.getTopLeftPoint().getY()); } @Override@Test public void testGetTopRightPoint() { shape.setPosition(0, 0); shape.setGridStart(-200, -100); shape.setGridEnd(50, 75); shape.setUnit(2); HelperTest.assertEqualsDouble(2.*IShape.PPC*250., shape.getTopRightPoint().getX()); HelperTest.assertEqualsDouble(-2.*IShape.PPC*175., shape.getTopRightPoint().getY()); } @Override@Test public void testMirrorHorizontal() { shape.setPosition(0, 0); shape.setGridStart(0, 0); shape.setGridEnd(10, 10); shape.setUnit(1); shape.mirrorHorizontal(ShapeFactory.createPoint(IShape.PPC*10., 0.)); HelperTest.assertEqualsDouble(IShape.PPC*10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(0., shape.getPosition().getY()); } @Override@Test public void testMirrorVertical() { shape.setPosition(0, 0); shape.setGridStart(0, 0); shape.setGridEnd(10, 10); shape.setUnit(1); shape.mirrorVertical(ShapeFactory.createPoint(0., -IShape.PPC*10.)); HelperTest.assertEqualsDouble(0., shape.getPosition().getX()); HelperTest.assertEqualsDouble(-IShape.PPC*10., shape.getPosition().getY()); } // @Override@Test // public void testScale() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(3., 1., Position.EAST); // assertEquals(pos.getX(), shape.getPosition().getX()); // assertEquals(pos.getY(), shape.getPosition().getY()); // assertEquals(3., shape.getUnit()); // } // // @Test // public void testScaleNE() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(3., 1., Position.NE); // assertEquals(pos.getX(), shape.getPosition().getX()); // assertEquals(pos.getY(), shape.getPosition().getY()); // assertEquals(3., shape.getUnit()); // } // // @Test // public void testScaleSE() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(2., 1., Position.SE); // assertEquals(pos.getX(), shape.getPosition().getX()); // assertEquals(pos.getY()+IShape.PPC*10., shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } // // @Test // public void testScaleNorth() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(3., 2., Position.NORTH); // assertEquals(pos.getX(), shape.getPosition().getX()); // assertEquals(pos.getY(), shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } // // // @Test // public void testScaleSouth() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(3., 2., Position.SOUTH); // assertEquals(pos.getX(), shape.getPosition().getX()); // assertEquals(pos.getY()+IShape.PPC*10., shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } // // // @Test // public void testScaleSW() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(2., 3., Position.SW); // assertEquals(pos.getX()-IShape.PPC*10., shape.getPosition().getX()); // assertEquals(pos.getY()+IShape.PPC*10., shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } // // // @Test // public void testScaleWest() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(2., 3., Position.WEST); // assertEquals(pos.getX()-IShape.PPC*10., shape.getPosition().getX()); // assertEquals(pos.getY(), shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } // // // @Test // public void testScaleNW() { // shape.setPosition(0, 0); // shape.setGridStart(0, 0); // shape.setGridEnd(10, 10); // shape.setUnit(1); // // IPoint pos = shape.getPosition(); // // shape.scale(2., 3., Position.NW); // assertEquals(pos.getX()-IShape.PPC*10., shape.getPosition().getX()); // assertEquals(pos.getY(), shape.getPosition().getY()); // assertEquals(2., shape.getUnit()); // } @Override @Test public void testCopy() { super.testCopy(); shape2.setGridDots(45); shape2.setSubGridDots(55); shape2.setGridLabelsColour(Color.CYAN); shape2.setSubGridColour(Color.GREEN); shape2.setUnit(0.6); shape2.setGridWidth(12); shape2.setSubGridWidth(24); shape2.setSubGridDiv(32); shape2.setXLabelSouth(false); shape2.setYLabelWest(false); shape.copy(shape2); assertEquals(shape2.getGridDots(), shape.getGridDots()); assertEquals(shape2.getSubGridDiv(), shape2.getSubGridDiv()); assertEquals(shape2.getGridLabelsColour(), shape.getGridLabelsColour()); assertEquals(shape2.getSubGridColour(), shape.getSubGridColour()); HelperTest.assertEqualsDouble(shape2.getUnit(), shape.getUnit()); HelperTest.assertEqualsDouble(shape2.getGridWidth(), shape.getGridWidth()); HelperTest.assertEqualsDouble(shape2.getSubGridWidth(), shape.getSubGridWidth()); assertEquals(shape2.getSubGridDiv(), shape.getSubGridDiv()); assertFalse(shape2.isXLabelSouth()); assertFalse(shape2.isYLabelWest()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIGroup.java000066400000000000000000000353271321075051700336230ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.awt.Color; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import org.junit.Test; public abstract class TestIGroup extends TestIShape { @Test public void testAddShapeIShape() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); shape.addShape(sh1); shape.addShape(sh2); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh2, shape.getShapes().get(1)); shape.addShape((IShape)null); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh2, shape.getShapes().get(1)); } @Override @Test public void testAddToRotationAngle() { shape.addShape(ShapeFactory.createRectangle()); shape.addShape(ShapeFactory.createDot(ShapeFactory.createPoint())); super.testAddToRotationAngle(); } @Test public void testAddShapeIShapeInt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.addShape(sh1, 1); assertEquals(0, shape.getShapes().size()); shape.addShape(sh1, -2); assertEquals(0, shape.getShapes().size()); shape.addShape(sh1, 0); assertEquals(1, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); shape.addShape(null, 0); assertEquals(1, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); shape.addShape(sh2, 2); assertEquals(1, shape.getShapes().size()); shape.addShape(sh2, -2); assertEquals(1, shape.getShapes().size()); shape.addShape(sh2, -1); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh2, shape.getShapes().get(1)); shape.addShape(sh3, 1); assertEquals(3, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh2, shape.getShapes().get(2)); assertEquals(sh3, shape.getShapes().get(1)); } @Test public void testRemoveShapeIShape() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); shape.getShapes().add(sh2); shape.getShapes().add(sh3); shape.removeShape(sh2); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh3, shape.getShapes().get(1)); shape.removeShape(null); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh3, shape.getShapes().get(1)); shape.removeShape(ShapeFactory.createRectangle()); assertEquals(2, shape.getShapes().size()); assertEquals(sh1, shape.getShapes().get(0)); assertEquals(sh3, shape.getShapes().get(1)); } @Test public void testRemoveShapeInt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); shape.getShapes().add(sh2); shape.getShapes().add(sh3); assertNull(shape.removeShape(4)); assertNull(shape.removeShape(-2)); assertEquals(sh2, shape.removeShape(1)); assertEquals(sh1, shape.removeShape(0)); assertEquals(sh3, shape.removeShape(-1)); } @Test public void testGetShapeAt() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); shape.getShapes().add(sh2); shape.getShapes().add(sh3); assertEquals(sh1, shape.getShapeAt(0)); assertEquals(sh2, shape.getShapeAt(1)); assertEquals(sh3, shape.getShapeAt(2)); assertEquals(sh3, shape.getShapeAt(-1)); assertNull(shape.getShapeAt(-2)); assertNull(shape.getShapeAt(3)); } @Test public void testSize() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); assertEquals(1, shape.size()); shape.getShapes().add(sh2); assertEquals(2, shape.size()); shape.getShapes().add(sh3); assertEquals(3, shape.size()); shape.getShapes().clear(); assertEquals(0, shape.size()); } @Test public void testContains() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); IShape sh4 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); shape.getShapes().add(sh2); shape.getShapes().add(sh3); assertFalse(shape.contains(null)); assertFalse(shape.contains(sh4)); assertTrue(shape.contains(sh1)); assertTrue(shape.contains(sh2)); assertTrue(shape.contains(sh3)); } @Test public void testIsEmpty() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().clear(); assertTrue(shape.isEmpty()); shape.getShapes().add(sh1); assertFalse(shape.isEmpty()); shape.getShapes().add(sh2); assertFalse(shape.isEmpty()); shape.getShapes().add(sh3); assertFalse(shape.isEmpty()); shape.getShapes().clear(); assertTrue(shape.isEmpty()); } @Test public void testClear() { IShape sh1 = ShapeFactory.createRectangle(); IShape sh2 = ShapeFactory.createRectangle(); IShape sh3 = ShapeFactory.createRectangle(); shape.getShapes().add(sh1); shape.getShapes().add(sh2); shape.getShapes().add(sh3); shape.clear(); assertEquals(0, shape.getShapes().size()); } @Test public void testGetShapes() { assertNotNull(shape.getShapes()); } @Test public void testGetDotStyle() { //TODO } @Test public void testSetDotStyle() { //TODO } @Override @Test public void testCopy() { //TODO } @Override @Test public void testDuplicate() { //TODO } private IRectangle setRectangle(double x, double y, double w, double h) { IRectangle rec = ShapeFactory.createRectangle(); rec.setPosition(x, y); rec.setWidth(w); rec.setHeight(h); return rec; } @Override @Test public void testGetFullBottomRightPoint() { assertTrue(Double.isNaN(shape.getFullBottomRightPoint().getX())); assertTrue(Double.isNaN(shape.getFullBottomRightPoint().getY())); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(rec1.getFullBottomRightPoint(), shape.getFullBottomRightPoint()); IRectangle rec2 = setRectangle(90, 40, 100, 200); shape.addShape(rec2); assertEquals(rec2.getFullBottomRightPoint(), shape.getFullBottomRightPoint()); } @Override @Test public void testGetFullTopLeftPoint() { assertTrue(Double.isNaN(shape.getFullTopLeftPoint().getX())); assertTrue(Double.isNaN(shape.getFullTopLeftPoint().getY())); IRectangle rec2 = setRectangle(90, 40, 10, 21); shape.addShape(rec2); assertEquals(rec2.getFullTopLeftPoint(), shape.getFullTopLeftPoint()); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(rec1.getFullTopLeftPoint(), shape.getFullTopLeftPoint()); } @Override public void testGetBottomLeftPoint() { assertTrue(Double.isNaN(shape.getBottomLeftPoint().getX())); assertTrue(Double.isNaN(shape.getBottomLeftPoint().getY())); IRectangle rec2 = setRectangle(90, 40, 10, 21); shape.addShape(rec2); assertEquals(ShapeFactory.createPoint(90, 40), shape.getBottomLeftPoint()); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(ShapeFactory.createPoint(5, 40), shape.getBottomLeftPoint()); } @Override public void testGetBottomRightPoint() { assertTrue(Double.isNaN(shape.getBottomRightPoint().getX())); assertTrue(Double.isNaN(shape.getBottomRightPoint().getY())); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(ShapeFactory.createPoint(11, 10), shape.getBottomRightPoint()); IRectangle rec2 = setRectangle(90, 40, 10, 21); shape.addShape(rec2); assertEquals(ShapeFactory.createPoint(100, 40), shape.getBottomRightPoint()); } @Override public void testGetTopLeftPoint() { assertTrue(Double.isNaN(shape.getTopLeftPoint().getX())); assertTrue(Double.isNaN(shape.getTopLeftPoint().getY())); IRectangle rec2 = setRectangle(90, 40, 10, 21); shape.addShape(rec2); assertEquals(ShapeFactory.createPoint(90, 19), shape.getTopLeftPoint()); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(ShapeFactory.createPoint(5, -10), shape.getTopLeftPoint()); } @Override public void testGetTopRightPoint() { assertTrue(Double.isNaN(shape.getTopRightPoint().getX())); assertTrue(Double.isNaN(shape.getTopRightPoint().getY())); IRectangle rec1 = setRectangle(5, 10, 6, 20); shape.addShape(rec1); assertEquals(ShapeFactory.createPoint(11, -10), shape.getTopRightPoint()); IRectangle rec2 = setRectangle(90, 40, 10, 21); shape.addShape(rec2); assertEquals(ShapeFactory.createPoint(100, -10), shape.getTopRightPoint()); } @Override public void testMirrorHorizontal() { //TODO } @Override public void testMirrorVertical() { //TODO } @Override public void testTranslate() { //TODO } @Override @Test public void testGetGravityCentre() { assertEquals(ShapeFactory.createPoint(0, 0), shape.getGravityCentre()); IRectangle rec1 = setRectangle(100, 2, 924, 12); IRectangle rec2 = setRectangle(200, 828, 17, 87); shape.addShape(rec1); shape.addShape(rec2); assertEquals(ShapeFactory.createPoint((100+100+924)/2., (828+2-12)/2.), shape.getGravityCentre()); } @Override @Test public void testSetHasHatchings() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); shape.addShape(rec1); shape.addShape(rec2); assertFalse(shape.hasHatchings()); rec2.setFillingStyle(FillingStyle.HLINES); assertTrue(shape.hasHatchings()); rec1.setFillingStyle(FillingStyle.HLINES); rec2.setFillingStyle(FillingStyle.GRAD); assertTrue(shape.hasHatchings()); rec1.setFillingStyle(FillingStyle.HLINES); rec2.setFillingStyle(FillingStyle.VLINES); assertTrue(shape.hasHatchings()); rec1.setFillingStyle(FillingStyle.PLAIN); rec2.setFillingStyle(FillingStyle.GRAD); assertFalse(shape.hasHatchings()); } @Test public void testHasHatchingsWithUnstylableShape() { IGrid grid = ShapeFactory.createGrid(ShapeFactory.createPoint()); // The test is useful only if the shape is not stylable. assertFalse(grid.isInteriorStylable()); shape.addShape(grid); assertFalse(shape.hasHatchings()); grid.setFillingStyle(FillingStyle.CLINES_PLAIN); assertFalse(shape.hasHatchings()); IRectangle rec1 = ShapeFactory.createRectangle(); shape.addShape(rec1); assertFalse(shape.hasHatchings()); rec1.setFillingStyle(FillingStyle.HLINES); assertTrue(shape.hasHatchings()); } @Override @Test public void testSetHasGradient() { IGrid grid = ShapeFactory.createGrid(ShapeFactory.createPoint()); // The test is useful only if the shape is not stylable. assertFalse(grid.isInteriorStylable()); shape.addShape(grid); assertFalse(shape.hasGradient()); grid.setFillingStyle(FillingStyle.GRAD); assertFalse(shape.hasGradient()); IRectangle rec1 = ShapeFactory.createRectangle(); shape.addShape(rec1); assertFalse(shape.hasGradient()); rec1.setFillingStyle(FillingStyle.VLINES_PLAIN); assertFalse(shape.hasGradient()); rec1.setFillingStyle(FillingStyle.GRAD); assertTrue(shape.hasGradient()); } @Override @Test public void testGetSetGradColEnd() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); // The test is useful only if the shape is stylable. assertTrue(rec1.isInteriorStylable()); shape.addShape(rec1); shape.addShape(rec2); shape.setGradColEnd(Color.CYAN); assertEquals(Color.CYAN, rec1.getGradColEnd()); assertEquals(Color.CYAN, rec2.getGradColEnd()); } @Test public void testGetGradColEnd() { IRectangle rec1 = ShapeFactory.createRectangle(); IRectangle rec2 = ShapeFactory.createRectangle(); // The test is useful only if the shape is stylable. assertTrue(rec1.isInteriorStylable()); shape.addShape(rec1); shape.addShape(rec2); rec1.setGradColEnd(Color.ORANGE); rec2.setGradColEnd(Color.PINK); assertNotNull(shape.getGradColEnd()); assertNotEquals(Color.PINK, shape.getGradColEnd()); assertNotEquals(Color.ORANGE, shape.getGradColEnd()); rec1.setFillingStyle(FillingStyle.GRAD); rec2.setFillingStyle(FillingStyle.GRAD); assertEquals(Color.ORANGE, shape.getGradColEnd()); } @Override @Test public void testGetSetGradColStart() { //TODO } @Override @Test public void testGetSetGradAngle() { //TODO } @Override @Test public void testGetSetGradMidPt() { //TODO } @Override @Test public void testGetSetHatchingsSep() { //TODO } @Override @Test public void testGetSetHatchingsCol() { //TODO } @Override @Test public void testGetSetHatchingsAngle() { //TODO } @Override @Test public void testGetSetHatchingsWidth() { //TODO } @Override @Test public void testGetSetRotationAngle() { //TODO } @Override @Test public void testIsSetShowPts() { //TODO } @Override @Test public void testhasSetDbleBord() { //TODO } @Override @Test public void testGetSetDbleBordCol() { //TODO } @Override @Test public void testGetSetDbleBordSep() { //TODO } @Override @Test public void testHasSetShadow() { //TODO } @Override @Test public void testGetSetShadowCol() { //TODO } @Override @Test public void testGetSetShadowAngle() { //TODO } @Override @Test public void testIsSetFilled() { //TODO } @Override @Test public void testGetSetShadowSize() { //TODO } @Override @Test public void testGetSetBorderPosition() { //TODO } @Override @Test public void testSetGetThickness() { //TODO } @Override @Test public void testSetGetLineColour() { //TODO } @Override @Test public void testSetGetLineStyle() { //TODO } @Override @Test public void testSetGetDashSepWhite() { //TODO } @Override @Test public void testSetGetDashSepBlack() { //TODO } @Override @Test public void testSetGetDotSep() { //TODO } @Override @Test public void testSetGetFillingCol() { //TODO } @Override @Test public void testSetGetFillingStyle() { //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestILine.java000066400000000000000000000551451321075051700334160ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ILine; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.util.LNumber; import org.junit.Test; public abstract class TestILine{ protected ILine line; @Test public void testLineAngle() { line.setLine(0, 100, 100, 100); line.updateAandB(); assertEquals(0., line.getLineAngle(), 0.1); line.setLine(0, 100, -100, 100); line.updateAandB(); assertEquals(0., line.getLineAngle(), 0.1); line.setLine(0, 100, 0, 200); line.updateAandB(); assertEquals(Math.PI/2., line.getLineAngle(), 0.1); line.setLine(0, 100, 0, -200); line.updateAandB(); assertEquals(Math.PI/2., line.getLineAngle(), 0.1); line.setLine(100, 100, 100, 100); line.updateAandB(); assertEquals(0., line.getLineAngle(), 0.1); line.setLine(92.27, -12028.2, 98700, 982); line.updateAandB(); assertEquals(Math.atan(line.getA()), line.getLineAngle(), 0.1); } @Test public void testGetSetX1() { line.setX1(0); assertEquals(0., line.getX1(), 0.1); line.setX1(10); assertEquals(10., line.getX1(), 0.1); line.setX1(-10); assertEquals(-10., line.getX1(), 0.1); } @Test public void testGetSetX2() { line.setX2(0); assertEquals(0., line.getX2(), 0.1); line.setX2(10); assertEquals(10., line.getX2(), 0.1); line.setX2(-10); assertEquals(-10., line.getX2(), 0.1); } @Test public void testGetSetY1() { line.setY1(0); assertEquals(0., line.getY1(), 0.1); line.setY1(10); assertEquals(10., line.getY1(), 0.1); line.setY1(-10); assertEquals(-10., line.getY1(), 0.1); } @Test public void testGetSetY2() { line.setY2(0); assertEquals(0., line.getY2(), 0.1); line.setY2(10); assertEquals(10., line.getY2(), 0.1); line.setY2(-10); assertEquals(-10., line.getY2(), 0.1); } @Test public void testGetPoint1() { assertNotNull(line.getPoint1()); line.setP1(ShapeFactory.createPoint(100, 200)); assertEquals(100., line.getPoint1().getX(), 0.1); assertEquals(200., line.getPoint1().getY(), 0.1); line.setP1(ShapeFactory.createPoint(-300, 400)); assertEquals(-300., line.getPoint1().getX(), 0.1); assertEquals(400., line.getPoint1().getY(), 0.1); } @Test public void testGetPoint2() { assertNotNull(line.getPoint1()); line.setP2(ShapeFactory.createPoint(100, 200)); assertEquals(100., line.getPoint2().getX(), 0.1); assertEquals(200., line.getPoint2().getY(), 0.1); line.setP2(ShapeFactory.createPoint(-300, 400)); assertEquals(-300., line.getPoint2().getX(), 0.1); assertEquals(400., line.getPoint2().getY(), 0.1); } @Test public void testSetLine() { line.setLine(10, 20, 30, 40); assertEquals(10., line.getX1(), 0.1); assertEquals(30., line.getX2(), 0.1); assertEquals(20., line.getY1(), 0.1); assertEquals(40., line.getY2(), 0.1); line.setLine(Double.NaN, 21, 31, 41); assertEquals(10., line.getX1(), 0.1); assertEquals(30., line.getX2(), 0.1); assertEquals(20., line.getY1(), 0.1); assertEquals(40., line.getY2(), 0.1); line.setLine(11, Double.POSITIVE_INFINITY, 31, 41); assertEquals(10., line.getX1(), 0.1); assertEquals(30., line.getX2(), 0.1); assertEquals(20., line.getY1(), 0.1); assertEquals(40., line.getY2(), 0.1); line.setLine(11, 21, Double.NEGATIVE_INFINITY, 41); assertEquals(10., line.getX1(), 0.1); assertEquals(30., line.getX2(), 0.1); assertEquals(20., line.getY1(), 0.1); assertEquals(40., line.getY2(), 0.1); line.setLine(11, 21, 31, Double.NaN); assertEquals(10., line.getX1(), 0.1); assertEquals(30., line.getX2(), 0.1); assertEquals(20., line.getY1(), 0.1); assertEquals(40., line.getY2(), 0.1); line.setLine(-11, -21, -31, -41); assertEquals(-11., line.getX1(), 0.1); assertEquals(-31., line.getX2(), 0.1); assertEquals(-21., line.getY1(), 0.1); assertEquals(-41., line.getY2(), 0.1); line.setLine(0, 0, 0, 0); assertEquals(0., line.getX1(), 0.1); assertEquals(0., line.getX2(), 0.1); assertEquals(0., line.getY1(), 0.1); assertEquals(0., line.getY2(), 0.1); } @Test public void testSetP1IPoint() { line.setP1(ShapeFactory.createPoint(20, 30)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(null); assertNotNull(line.getPoint1()); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.NaN, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.NaN)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.POSITIVE_INFINITY)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.NEGATIVE_INFINITY)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); } @Test public void testSetP2IPoint() { line.setP2(ShapeFactory.createPoint(20, 30)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(null); assertNotNull(line.getPoint2()); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.NaN, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.NaN)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.POSITIVE_INFINITY)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.NEGATIVE_INFINITY)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); } @Test public void testSetP1DoubleDouble() { line.setP1(ShapeFactory.createPoint(20, 30)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.NaN, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, -10)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.NaN)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.POSITIVE_INFINITY)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); line.setP1(ShapeFactory.createPoint(-10, Double.NEGATIVE_INFINITY)); assertEquals(20., line.getX1(), 0.1); assertEquals(30., line.getY1(), 0.1); } @Test public void testSetP2DoubleDouble() { line.setP2(ShapeFactory.createPoint(20, 30)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(null); assertNotNull(line.getPoint2()); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.NaN, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, -20)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.NaN)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.POSITIVE_INFINITY)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); line.setP2(ShapeFactory.createPoint(-20, Double.NEGATIVE_INFINITY)); assertEquals(20., line.getX2(), 0.1); assertEquals(30., line.getY2(), 0.1); } @Test public void testGetA() { line.setLine(10, 5, 20, 5); line.updateAandB(); assertEquals(-0., line.getA(), 0.1); line.setLine(0, 0, 1, 1); line.updateAandB(); assertEquals(1., line.getA(), 0.1); line.setLine(0, 0, -1, 1); line.updateAandB(); assertEquals(-1., line.getA(), 0.1); line.setLine(0, 0, 1, 2); line.updateAandB(); assertEquals(2., line.getA(), 0.1); line.setLine(1, 0, 2, 1); line.updateAandB(); assertEquals(1., line.getA(), 0.1); line.setLine(1, 0, 1, 1); line.updateAandB(); assertTrue(Double.isNaN(line.getA())); } @Test public void testGetB() { line.setLine(10, 5, 20, -10); line.updateAandB(); assertEquals(20., line.getB(), 0.1); line.setLine(1, 0, 1, 1); line.updateAandB(); assertTrue(Double.isNaN(line.getB())); } @Test public void testGetTopLeftPoint() { line.setLine(10, 5, 20, -10); assertEquals(10., line.getTopLeftPoint().getX(), 0.1); assertEquals(-10., line.getTopLeftPoint().getY(), 0.1); line.setLine(0, 50, -20, 30); assertEquals(-20., line.getTopLeftPoint().getX(), 0.1); assertEquals(30., line.getTopLeftPoint().getY(), 0.1); line.setLine(0, 0, 0, 0); assertEquals(0., line.getTopLeftPoint().getX(), 0.1); assertEquals(0., line.getTopLeftPoint().getY(), 0.1); } @Test public void testGetBottomRightPoint() { line.setLine(10, 5, 20, -10); assertEquals(20., line.getBottomRightPoint().getX(), 0.1); assertEquals(5., line.getBottomRightPoint().getY(), 0.1); line.setLine(0, 50, -20, 30); assertEquals(0., line.getBottomRightPoint().getX(), 0.1); assertEquals(50., line.getBottomRightPoint().getY(), 0.1); line.setLine(0, 0, 0, 0); assertEquals(0., line.getBottomRightPoint().getX(), 0.1); assertEquals(0., line.getBottomRightPoint().getY(), 0.1); } @Test public void testGetPerpendicularLineHoriz() { line.setLine(-10, 0, 10, 0); line.updateAandB(); ILine line2 = line.getPerpendicularLine(ShapeFactory.createPoint()); assertNotNull(line2); assertEquals(0., line2.getX1(), 0.1); assertEquals(0., line2.getX2(), 0.1); line.setLine(-10, 1, 10, 1); line.updateAandB(); line2 = line.getPerpendicularLine(ShapeFactory.createPoint(1,1)); assertNotNull(line2); assertEquals(1., line2.getX1(), 0.1); assertEquals(1., line2.getX2(), 0.1); line.setLine(-10, -1, 10, -1); line.updateAandB(); line2 = line.getPerpendicularLine(ShapeFactory.createPoint(-1,-1)); assertNotNull(line2); assertEquals(-1., line2.getX1(), 0.1); assertEquals(-1., line2.getX2(), 0.1); } @Test public void testGetPerpendicularLineVert() { line.setLine(0, 10, 0, -10); line.updateAandB(); ILine line2 = line.getPerpendicularLine(ShapeFactory.createPoint()); assertNotNull(line2); assertEquals(0., line2.getY1(), 0.1); assertEquals(0., line2.getY2(), 0.1); line.setLine(1, 10, 1, -10); line.updateAandB(); line2 = line.getPerpendicularLine(ShapeFactory.createPoint(1,1)); assertNotNull(line2); assertEquals(1., line2.getY1(), 0.1); assertEquals(1., line2.getY2(), 0.1); line.setLine(-1, 10, -1, -10); line.updateAandB(); line2 = line.getPerpendicularLine(ShapeFactory.createPoint(-1,-1)); assertNotNull(line2); assertEquals(-1., line2.getY1(), 0.1); assertEquals(-1., line2.getY2(), 0.1); } @Test public void testGetPerpendicularLineDiag() { line.setLine(1, 1, 2, 2); line.updateAandB(); ILine line2 = line.getPerpendicularLine(ShapeFactory.createPoint()); assertNotNull(line2); assertEquals(0., line2.getB(), 0.1); assertEquals(-1., line2.getA(), 0.1); line.setLine(-1, 1, 1, -1); line.updateAandB(); line2 = line.getPerpendicularLine(ShapeFactory.createPoint(0,0)); assertNotNull(line2); assertEquals(0., line2.getB(), 0.1); assertEquals(1., line2.getA(), 0.1); assertNull(line.getPerpendicularLine(null)); assertNull(line.getPerpendicularLine(ShapeFactory.createPoint(Double.NaN, 0))); assertNull(line.getPerpendicularLine(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY))); } @Test public void testGetIntersection() { ILine line2 = ShapeFactory.createLine(72, -981, 0, 0); line.setLine(-237, 17, 13, -82); line.updateAandB(); IPoint pt = line.getIntersection(line2); assertNotNull(pt); assertTrue(LNumber.equalsDouble(5.809358228, pt.getX(), 0.00000001)); assertTrue(LNumber.equalsDouble(-79.152505858, pt.getY(), 0.00000001)); assertNull(line.getIntersection(null)); assertNull(line.getIntersection(line)); assertNull(line.getIntersection(ShapeFactory.createLine(1, 1, 1, 1))); } @Test public void testGetIntersectionVert() { ILine line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); IPoint pt = line.getIntersection(line2); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1, -10, 1, 10); line.updateAandB(); pt = line.getIntersection(line2); assertNotNull(pt); assertEquals(1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(-1, -10, -1, 10); line.updateAandB(); pt = line.getIntersection(line2); assertNotNull(pt); assertEquals(-1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(1, 2, -1, 0); line.setLine(0., -10, 0., 10); line.updateAandB(); pt = line.getIntersection(line2); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(1., pt.getY(), 0.1); } @Test public void testGetIntersectionHoriz() { ILine line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); IPoint pt = line2.getIntersection(line); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1, -10, 1, 10); line.updateAandB(); pt = line2.getIntersection(line); assertNotNull(pt); assertEquals(1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(-1, -10, -1, 10); line.updateAandB(); pt = line2.getIntersection(line); assertNotNull(pt); assertEquals(-1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(1, 2, -1, 0); line.setLine(0., -10, 0., 10); line.updateAandB(); pt = line2.getIntersection(line); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(1., pt.getY(), 0.1); } @Test public void testIsVerticalLine() { line.setLine(1, 1, 1, 1); line.updateAandB(); assertTrue(line.isVerticalLine()); line.setLine(1, 0, 1, 1); line.updateAandB(); assertTrue(line.isVerticalLine()); line.setLine(-1000, -139, -1000, 2938); line.updateAandB(); assertTrue(line.isVerticalLine()); line.setLine(187.3703, 192.456, 187.3703, 938); line.updateAandB(); assertTrue(line.isVerticalLine()); line.setLine(187.3703, 192.456, 187.36, 938); line.updateAandB(); assertFalse(line.isVerticalLine()); line.setLine(187.3503, 938, 187.37035, 938); line.updateAandB(); assertFalse(line.isVerticalLine()); } @Test public void testIsHorizontalLine() { line.setLine(1, 1, 1, 1); line.updateAandB(); assertTrue(line.isHorizontalLine()); line.setLine(0, 1, 1, 1); line.updateAandB(); assertTrue(line.isHorizontalLine()); line.setLine(-1000, -139, -1010, -139); line.updateAandB(); assertTrue(line.isHorizontalLine()); line.setLine(187.3703, 192.456, 185, 192.456); line.updateAandB(); assertTrue(line.isHorizontalLine()); line.setLine(192.456, 187.37035, 938, 187.36); line.updateAandB(); assertFalse(line.isHorizontalLine()); line.setLine(187.3503, 938, 938, 187.37035); line.updateAandB(); assertFalse(line.isHorizontalLine()); } @Test public void testGetIntersectionSegment() { ILine line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1, 1, 0, -1); line.updateAandB(); IPoint pt = line.getIntersectionSegment(line2); assertNotNull(pt); assertEquals(0.5, pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); assertNull(line.getIntersectionSegment(null)); assertNull(line.getIntersectionSegment(line)); assertNull(line.getIntersectionSegment(ShapeFactory.createLine(1, 1, 1, 1))); } @Test public void testGetIntersectionSegmentVert() { ILine line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); IPoint pt = line.getIntersectionSegment(line2); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1, -10, 1, 10); line.updateAandB(); pt = line.getIntersectionSegment(line2); assertNotNull(pt); assertEquals(1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1.001, -10, 1.001, 10); line.updateAandB(); pt = line.getIntersectionSegment(line2); assertNull(pt); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(-0.1, -10, -0.1, 10); line.updateAandB(); pt = line.getIntersectionSegment(line2); assertNull(pt); line2 = ShapeFactory.createLine(1, 2, -1, 0); line.setLine(0., -10, 0., 10); line.updateAandB(); pt = line.getIntersectionSegment(line2); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(1., pt.getY(), 0.1); line2 = ShapeFactory.createLine(1, 2, -1, 0); line.setLine(0., 10, 0., 1.01); line.updateAandB(); pt = line.getIntersectionSegment(line2); assertNull(pt); } @Test public void testGetIntersectionSegmentHoriz() { ILine line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); IPoint pt = line2.getIntersectionSegment(line); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(0.01, 0, 1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNull(pt); line2 = ShapeFactory.createLine(-0.01, 0, -1, 0); line.setLine(0, -10, 0, 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNull(pt); line2 = ShapeFactory.createLine(0, 10.01, 1, 11); line.setLine(0, -10, 0, 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNull(pt); line2 = ShapeFactory.createLine(0, -10.01, 1, -11); line.setLine(0, -10, 0, 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNull(pt); line2 = ShapeFactory.createLine(0, 0, 1, 0); line.setLine(1, -10, 1, 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNotNull(pt); assertEquals(1., pt.getX(), 0.1); assertEquals(0., pt.getY(), 0.1); line2 = ShapeFactory.createLine(1, 2, -1, 0); line.setLine(0., -10, 0., 10); line.updateAandB(); pt = line2.getIntersectionSegment(line); assertNotNull(pt); assertEquals(0., pt.getX(), 0.1); assertEquals(1., pt.getY(), 0.1); } @Test public void testFindPointsDoubleDoubleDouble() { line.setLine(1, 1, 3, 1); line.updateAandB(); assertNull(line.findPoints(Double.NaN, 0, 10)); assertNull(line.findPoints(0, Double.NaN, 10)); assertNull(line.findPoints(0, 0, Double.NaN)); assertNull(line.findPoints(Double.NEGATIVE_INFINITY, 0, 10)); assertNull(line.findPoints(0, Double.NEGATIVE_INFINITY, 10)); assertNull(line.findPoints(0, 0, Double.NEGATIVE_INFINITY)); assertNull(line.findPoints(Double.POSITIVE_INFINITY, 0, 10)); assertNull(line.findPoints(0, Double.POSITIVE_INFINITY, 10)); assertNull(line.findPoints(0, 0, Double.POSITIVE_INFINITY)); IPoint[] pts = line.findPoints(1, 1, 2); assertNotNull(pts); assertEquals(2, pts.length); assertEquals(1., pts[0].getY(), 0.1); assertEquals(1., pts[1].getY(), 0.1); if(pts[0].getX()<1.) { assertEquals(-1., pts[0].getX(), 0.1); assertEquals(3., pts[1].getX(), 0.1); } else { assertEquals(3., pts[0].getX(), 0.1); assertEquals(-1., pts[1].getX(), 0.1); } line.setLine(3, 3, 3, 3); line.updateAandB(); pts = line.findPoints(3, 3, 1); assertNull(pts); line.setLine(0, 3, 3, 3); line.updateAandB(); pts = line.findPoints(10, 10, 1); assertNull(pts); } @Test public void testFindPointsIPointDouble() { line.setLine(1, 1, 3, 1); line.updateAandB(); assertNull(line.findPoints((IPoint)null, 10)); assertNull(line.findPoints(ShapeFactory.createPoint(Double.NaN,10), 10)); assertNull(line.findPoints(ShapeFactory.createPoint(10, Double.POSITIVE_INFINITY), 10)); assertNull(line.findPoints(ShapeFactory.createPoint(10, 10), Double.NaN)); assertNull(line.findPoints(ShapeFactory.createPoint(10, 10), Double.NEGATIVE_INFINITY)); IPoint[] pts = line.findPoints(ShapeFactory.createPoint(1, 1), 2); assertNotNull(pts); assertEquals(2, pts.length); assertEquals(1., pts[0].getY(), 0.1); assertEquals(1., pts[1].getY(), 0.1); if(pts[0].getX()<1.) { assertEquals(-1., pts[0].getX(), 0.1); assertEquals(3., pts[1].getX(), 0.1); } else { assertEquals(3., pts[0].getX(), 0.1); assertEquals(-1., pts[1].getX(), 0.1); } line.setLine(3, 3, 3, 3); line.updateAandB(); pts = line.findPoints(ShapeFactory.createPoint(3, 3), 1); assertNull(pts); line.setLine(0, 3, 3, 3); line.updateAandB(); pts = line.findPoints(ShapeFactory.createPoint(10, 10), 1); assertNull(pts); } @Test public void testUpdateAandB() { line.setLine(0, 0, 1, 1); line.updateAandB(); assertEquals(0., line.getB(), 0.1); assertEquals(1., line.getA(), 0.1); line.setLine(0, 0, -1, 1); line.updateAandB(); assertEquals(0., line.getB(), 0.1); assertEquals(-1., line.getA(), 0.1); line.setLine(0, 1, 1, 2); line.updateAandB(); assertEquals(1., line.getB(), 0.1); assertEquals(1., line.getA(), 0.1); line.setLine(1, 1, 1, 1); line.updateAandB(); assertEquals(Double.NaN, line.getB(), 0.1); assertEquals(Double.NaN, line.getA(), 0.1); line.setLine(1, 1, 1, 3); line.updateAandB(); assertEquals(Double.NaN, line.getB(), 0.1); assertEquals(Double.NaN, line.getA(), 0.1); } } TestIModifiablePointsShape.java000066400000000000000000000402631321075051700366540ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import org.junit.Test; import test.HelperTest; public abstract class TestIModifiablePointsShape extends TestIShape { // @Override // @Test // public void testScale() { // IPoint pt1 = DrawingTK.getFactory().createPoint(0,0); // IPoint pt2 = DrawingTK.getFactory().createPoint(2,0); // IPoint pt3 = DrawingTK.getFactory().createPoint(2,2); // IPoint pt4 = DrawingTK.getFactory().createPoint(0,2); // shape.addPoint(pt1); // shape.addPoint(pt2); // shape.addPoint(pt3); // shape.addPoint(pt4); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(1.5, 1, Position.EAST); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // shape.scale(1, 1.5, Position.SOUTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1.5, 1, Position.WEST); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1, 1.5, Position.NORTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // } @Override @Test public void testMirrorHorizontal() { IPoint pt1 = ShapeFactory.createPoint(1,1); IPoint pt2 = ShapeFactory.createPoint(3,1); IPoint pt3 = ShapeFactory.createPoint(3,3); IPoint pt4 = ShapeFactory.createPoint(1,3); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); shape.mirrorHorizontal(shape.getGravityCentre()); HelperTest.assertEqualsDouble(3., pt1.getX()); HelperTest.assertEqualsDouble(1., pt2.getX()); HelperTest.assertEqualsDouble(1., pt3.getX()); HelperTest.assertEqualsDouble(3., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); } @Override @Test public void testMirrorVertical() { IPoint pt1 = ShapeFactory.createPoint(1,1); IPoint pt2 = ShapeFactory.createPoint(3,1); IPoint pt3 = ShapeFactory.createPoint(3,3); IPoint pt4 = ShapeFactory.createPoint(1,3); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); shape.mirrorVertical(shape.getGravityCentre()); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(3., pt1.getY()); HelperTest.assertEqualsDouble(3., pt2.getY()); HelperTest.assertEqualsDouble(1., pt3.getY()); HelperTest.assertEqualsDouble(1., pt4.getY()); } @Override @Test public void testTranslate() { IPoint pt1 = ShapeFactory.createPoint(1,1); IPoint pt2 = ShapeFactory.createPoint(3,1); IPoint pt3 = ShapeFactory.createPoint(3,3); IPoint pt4 = ShapeFactory.createPoint(1,3); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); shape.translate(10, 0); HelperTest.assertEqualsDouble(11., pt1.getX()); HelperTest.assertEqualsDouble(13., pt2.getX()); HelperTest.assertEqualsDouble(13., pt3.getX()); HelperTest.assertEqualsDouble(11., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(5, 5); HelperTest.assertEqualsDouble(16., pt1.getX()); HelperTest.assertEqualsDouble(18., pt2.getX()); HelperTest.assertEqualsDouble(18., pt3.getX()); HelperTest.assertEqualsDouble(16., pt4.getX()); HelperTest.assertEqualsDouble(6., pt1.getY()); HelperTest.assertEqualsDouble(6., pt2.getY()); HelperTest.assertEqualsDouble(8., pt3.getY()); HelperTest.assertEqualsDouble(8., pt4.getY()); shape.translate(-5, -5); HelperTest.assertEqualsDouble(11., pt1.getX()); HelperTest.assertEqualsDouble(13., pt2.getX()); HelperTest.assertEqualsDouble(13., pt3.getX()); HelperTest.assertEqualsDouble(11., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(-10, 0); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(Double.NaN, -5); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(1, Double.NaN); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(Double.NEGATIVE_INFINITY, -5); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(1, Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(Double.POSITIVE_INFINITY, -5); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(1, Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); shape.translate(0, 0); HelperTest.assertEqualsDouble(1., pt1.getX()); HelperTest.assertEqualsDouble(3., pt2.getX()); HelperTest.assertEqualsDouble(3., pt3.getX()); HelperTest.assertEqualsDouble(1., pt4.getX()); HelperTest.assertEqualsDouble(1., pt1.getY()); HelperTest.assertEqualsDouble(1., pt2.getY()); HelperTest.assertEqualsDouble(3., pt3.getY()); HelperTest.assertEqualsDouble(3., pt4.getY()); } @Override @Test public void testGetGravityCentre() { super.testGetGravityCentre(); IPoint pt1 = ShapeFactory.createPoint(0,0); IPoint pt2 = ShapeFactory.createPoint(2,0); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(0,2); assertNotNull(shape.getGravityCentre()); shape.getPoints().clear(); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); assertTrue(shape.getGravityCentre().equals(ShapeFactory.createPoint(1,1))); } @Test public void testAddPoint() { IPoint pt = ShapeFactory.createPoint(); int size = shape.getNbPoints(); shape.addPoint(null); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt); assertEquals(pt, shape.getPoints().get(shape.getPoints().size()-1)); assertEquals(size+1, shape.getPoints().size()); pt = ShapeFactory.createPoint(1, 1); shape.addPoint(pt); assertEquals(pt, shape.getPoints().get(shape.getPoints().size()-1)); assertEquals(size+2, shape.getPoints().size()); shape.getPoints().remove(shape.getPoints().size()-1); shape.getPoints().remove(shape.getPoints().size()-1); } @Test public void testAddPointAt() { IPoint pt = ShapeFactory.createPoint(); int size = shape.getNbPoints(); shape.addPoint(null, 0); assertEquals(size, shape.getPoints().size()); shape.addPoint(null, -1); assertEquals(size, shape.getPoints().size()); shape.addPoint(null, 7863); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt, Integer.MAX_VALUE); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt, -2); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt, shape.getPoints().size()+1); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt, 0); assertEquals(pt, shape.getPoints().get(0)); assertEquals(size+1, shape.getPoints().size()); shape.removePoint(0); shape.addPoint(pt, -1); assertEquals(pt, shape.getPoints().get(shape.getPoints().size()-1)); assertEquals(size+1, shape.getPoints().size()); shape.removePoint(pt); shape.addPoint(pt, shape.getPoints().size()); assertEquals(pt, shape.getPoints().get(shape.getPoints().size()-1)); assertEquals(size+1, shape.getPoints().size()); shape.removePoint(pt); } @Test public void testRemovePoint() { int size = shape.getPoints().size(); IPoint pt = ShapeFactory.createPoint(); shape.addPoint(pt); assertFalse(shape.removePoint(null)); assertEquals(size+1, shape.getPoints().size()); assertTrue(shape.removePoint(pt)); assertEquals(size, shape.getPoints().size()); } @Test public void testRemovePoint2() { int size = shape.getPoints().size(); IPoint pt = ShapeFactory.createPoint(); shape.addPoint(pt); assertNull(shape.removePoint(Integer.MAX_VALUE)); assertEquals(size+1, shape.getPoints().size()); assertNull(shape.removePoint(Integer.MIN_VALUE)); assertEquals(size+1, shape.getPoints().size()); assertEquals(shape.removePoint(-1), pt); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt); assertEquals(shape.removePoint(shape.getPoints().size()-1), pt); assertEquals(size, shape.getPoints().size()); shape.addPoint(pt, 0); assertEquals(shape.removePoint(0), pt); assertEquals(size, shape.getPoints().size()); } @Test public void testSetPoint() { IPoint pt = ShapeFactory.createPoint(1,0); shape.getPoints().clear(); shape.addPoint(pt); assertFalse(shape.setPoint(ShapeFactory.createPoint(), -2)); assertFalse(shape.setPoint(ShapeFactory.createPoint(), Integer.MIN_VALUE)); assertFalse(shape.setPoint(ShapeFactory.createPoint(), Integer.MAX_VALUE)); assertFalse(shape.setPoint(ShapeFactory.createPoint(0, Double.NaN), 0)); assertFalse(shape.setPoint(ShapeFactory.createPoint(Double.NaN, 0), 0)); assertFalse(shape.setPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0), 0)); assertFalse(shape.setPoint(ShapeFactory.createPoint(0, Double.POSITIVE_INFINITY), 0)); assertFalse(shape.setPoint(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0), 0)); assertFalse(shape.setPoint(ShapeFactory.createPoint(0, Double.POSITIVE_INFINITY), 0)); assertTrue(shape.setPoint(ShapeFactory.createPoint(10, 12), 0)); HelperTest.assertEqualsDouble(10., pt.getX()); HelperTest.assertEqualsDouble(12., pt.getY()); } @Test public void testSetPoint2() { IPoint pt = ShapeFactory.createPoint(1,0); shape.getPoints().clear(); shape.addPoint(pt); assertFalse(shape.setPoint(0, 0, -2)); assertFalse(shape.setPoint(0, 0, Integer.MIN_VALUE)); assertFalse(shape.setPoint(0, 0, Integer.MAX_VALUE)); assertFalse(shape.setPoint(0, Double.NaN, 0)); assertFalse(shape.setPoint(Double.NaN, 0, 0)); assertFalse(shape.setPoint(Double.NEGATIVE_INFINITY, 0, 0)); assertFalse(shape.setPoint(0, Double.NEGATIVE_INFINITY, 0)); assertFalse(shape.setPoint(Double.POSITIVE_INFINITY, 0, 0)); assertFalse(shape.setPoint(0, Double.POSITIVE_INFINITY, 0)); assertTrue(shape.setPoint(10, 12, 0)); HelperTest.assertEqualsDouble(10., pt.getX()); HelperTest.assertEqualsDouble(12., pt.getY()); } @Test public void testReplacePoint() { IPoint pt1 = ShapeFactory.createPoint(2,0); IPoint pt2 = ShapeFactory.createPoint(2,1); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(2,3); shape.getPoints().clear(); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); assertNull(shape.replacePoint(null, 0)); assertNull(shape.replacePoint(pt2, 0)); assertEquals(pt1, shape.replacePoint(pt4, 0)); assertEquals(0, shape.getPoints().indexOf(pt4)); assertEquals(pt3, shape.replacePoint(pt1, -1)); assertEquals(shape.getPoints().size()-1, shape.getPoints().indexOf(pt1)); assertEquals(pt1, shape.replacePoint(pt3, shape.getPoints().size()-1)); assertEquals(shape.getPoints().size()-1, shape.getPoints().indexOf(pt3)); } @Override @Test public void testGetTopLeftPoint() { IPoint pt1 = ShapeFactory.createPoint(0,0); IPoint pt2 = ShapeFactory.createPoint(2,0); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(0,2); assertNotNull(shape.getTopLeftPoint()); shape.getPoints().clear(); assertNotNull(shape.getTopLeftPoint()); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); assertTrue(shape.getTopLeftPoint().equals(pt1)); } @Override @Test public void testGetTopRightPoint() { IPoint pt1 = ShapeFactory.createPoint(0,0); IPoint pt2 = ShapeFactory.createPoint(2,0); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(0,2); assertNotNull(shape.getTopRightPoint()); shape.getPoints().clear(); assertNotNull(shape.getTopRightPoint()); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); assertTrue(shape.getTopRightPoint().equals(pt2)); } @Override @Test public void testGetBottomRightPoint() { IPoint pt1 = ShapeFactory.createPoint(0,0); IPoint pt2 = ShapeFactory.createPoint(2,0); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(0,2); assertNotNull(shape.getBottomRightPoint()); shape.getPoints().clear(); assertNotNull(shape.getBottomRightPoint()); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); assertTrue(shape.getBottomRightPoint().equals(pt3)); } @Override @Test public void testGetBottomLeftPoint() { IPoint pt1 = ShapeFactory.createPoint(0,0); IPoint pt2 = ShapeFactory.createPoint(2,0); IPoint pt3 = ShapeFactory.createPoint(2,2); IPoint pt4 = ShapeFactory.createPoint(0,2); assertNotNull(shape.getBottomLeftPoint()); shape.getPoints().clear(); assertNotNull(shape.getBottomLeftPoint()); shape.addPoint(pt1); shape.addPoint(pt2); shape.addPoint(pt3); shape.addPoint(pt4); assertTrue(shape.getBottomLeftPoint().equals(pt4)); } } TestIPicture.java000066400000000000000000000022671321075051700340600ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IPicture; import org.junit.Test; public abstract class TestIPicture extends TestIPositionShape { @Override @Test public void testDuplicate() { //super.testDuplicate(); //TODO } @Test public void testTheCreationOfTheEPSPicture() { //TODO } @Test public void testLocationOfTheCreatedEPSPicture() { //TODO } @Test public void testGetHeight() { //TODO } @Test public void testGetSetImage() { //TODO } @Test public void testGetSetPathSource() { //TODO } @Test public void testGetSetPathTarget() { //TODO } @Test public void testGetWidth() { //TODO } @Override @Test public void testGetBottomLeftPoint() { //TODO } @Override @Test public void testGetBottomRightPoint() { //TODO } @Override @Test public void testGetTopLeftPoint() { //TODO } @Override @Test public void testGetTopRightPoint() { //TODO } @Override @Test public void testMirrorHorizontal() { //TODO } @Override @Test public void testMirrorVertical() { //TODO } @Override @Test public void testCopy() { //TODO } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIPlot.java000066400000000000000000000306651321075051700334450ustar00rootroot00000000000000package test.glib.models.interfaces; import net.sf.latexdraw.glib.models.GLibUtilities; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.shape.*; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import org.junit.Test; import java.awt.*; import java.util.Arrays; import static org.junit.Assert.*; public abstract class TestIPlot extends TestIPositionShape { @Override @Test public void testDuplicate() { super.testDuplicate(); shape.setPlotEquation("2 x mul"); shape.setPolar(true); shape.setNbPlottedPoints(73); shape.setPlotStyle(IPlotProp.PlotStyle.ECURVE); shape.setPlotMinX(-234.0); shape.setPlotMaxX(123.0); shape.setDotStyle(IDotProp.DotStyle.BAR); shape.setDiametre(23.0); shape.setDotFillingCol(Color.YELLOW); shape.setPlotEquation("x"); final IPlot plot = (IPlot)shape.duplicate(); assertEquals("x", plot.getPlotEquation()); assertTrue(plot.isPolar()); assertEquals(Color.YELLOW, plot.getDotFillingCol()); assertEquals(23.0, plot.getDiametre(), 0.0001); assertEquals(IDotProp.DotStyle.BAR, plot.getDotStyle()); assertEquals(123.0, plot.getPlotMaxX(), 0.0001); assertEquals(-234.0, plot.getPlotMinX(), 0.0001); assertEquals(IPlotProp.PlotStyle.ECURVE, plot.getPlotStyle()); assertEquals(73, plot.getNbPlottedPoints()); } @Test public void testNotValidEquation() { shape.setPlotEquation("x"); shape.setPlotEquation(""); assertEquals("x", shape.getPlotEquation()); shape.setPlotEquation(null); assertEquals("x", shape.getPlotEquation()); } @Test(expected=InvalidFormatPSFunctionException.class) public void testNotValidPSEquation1() { shape.setPlotEquation("y"); } @Test public void testValidEquation() { shape.setPlotEquation("x"); assertEquals("x", shape.getPlotEquation()); shape.setPlotEquation("x 2 sub"); assertEquals("x 2 sub", shape.getPlotEquation()); shape.setPlotEquation("2 x mul sin"); assertEquals("2 x mul sin", shape.getPlotEquation()); } @Test public void testPolar() { shape.setPolar(true); assertTrue(shape.isPolar()); shape.setPolar(false); assertFalse(shape.isPolar()); shape.setPolar(true); assertTrue(shape.isPolar()); } @Test public void testValidPlotXMinMax() { shape.setPlotMaxX(200.0); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); shape.setPlotMinX(100.0); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMaxX(300.0); assertEquals(300.0, shape.getPlotMaxX(), 0.000001); shape.setPlotMinX(200.0); assertEquals(200.0, shape.getPlotMinX(), 0.000001); shape.setPlotMinX(-300.0); assertEquals(-300.0, shape.getPlotMinX(), 0.000001); shape.setPlotMaxX(0.0); assertEquals(0.0, shape.getPlotMaxX(), 0.000001); } @Test public void testNotValidPlotXMinMax() { shape.setPlotMaxX(200.0); shape.setPlotMinX(100.0); shape.setPlotMaxX(0.0); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMaxX(Double.NaN); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMaxX(Double.NEGATIVE_INFINITY); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMaxX(Double.POSITIVE_INFINITY); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMinX(300.0); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMinX(Double.NaN); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMinX(Double.NEGATIVE_INFINITY); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); shape.setPlotMinX(Double.POSITIVE_INFINITY); assertEquals(200.0, shape.getPlotMaxX(), 0.000001); assertEquals(100.0, shape.getPlotMinX(), 0.000001); } @Test public void testValidGetSetNbPlottedPoints() { shape.setNbPlottedPoints(200); assertEquals(200, shape.getNbPlottedPoints()); shape.setNbPlottedPoints(2); assertEquals(2, shape.getNbPlottedPoints()); } @Test public void testNotValidGetSetNbPlottedPoints() { shape.setNbPlottedPoints(200); shape.setNbPlottedPoints(1); assertEquals(200, shape.getNbPlottedPoints()); shape.setNbPlottedPoints(0); assertEquals(200, shape.getNbPlottedPoints()); shape.setNbPlottedPoints(-1); assertEquals(200, shape.getNbPlottedPoints()); shape.setNbPlottedPoints(1); assertEquals(200, shape.getNbPlottedPoints()); } @Test public void testPlottingSet() { shape.setPlotMaxX(10.0); shape.setPlotMinX(1.0); shape.setNbPlottedPoints(10); assertEquals(1.0, shape.getPlottingStep(), 0.00001); } @Test public void testValidPlotStyle() { for(IPlotProp.PlotStyle style : Arrays.asList(IPlotProp.PlotStyle.values())) { shape.setPlotStyle(style); assertEquals(style, shape.getPlotStyle()); } } @Test public void testNotValidPlotStyle() { shape.setPlotStyle(IPlotProp.PlotStyle.ECURVE); shape.setPlotStyle(null); assertEquals(IPlotProp.PlotStyle.ECURVE, shape.getPlotStyle()); } @Test public void testValidDotStyle() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); for(IDotProp.DotStyle style : Arrays.asList(IDotProp.DotStyle.values())) { shape.setDotStyle(style); assertEquals(style, shape.getDotStyle()); } } @Test public void testNotValidDotStyle() { shape.setDotStyle(IDotProp.DotStyle.BAR); shape.setDotStyle(null); assertEquals(IDotProp.DotStyle.BAR, shape.getDotStyle()); } @Test public void testValidDotSize() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); shape.setDiametre(23.0); assertEquals(23.0, shape.getDiametre(), 0.00001); shape.setDiametre(1.0); assertEquals(1.0, shape.getDiametre(), 0.00001); } @Test public void testNotValidDotSize() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); shape.setDiametre(23.0); shape.setDiametre(0.0); assertEquals(23.0, shape.getDiametre(), 0.00001); shape.setDiametre(-1.0); assertEquals(23.0, shape.getDiametre(), 0.00001); shape.setDiametre(Double.NaN); assertEquals(23.0, shape.getDiametre(), 0.00001); shape.setDiametre(Double.NEGATIVE_INFINITY); assertEquals(23.0, shape.getDiametre(), 0.00001); shape.setDiametre(Double.POSITIVE_INFINITY); assertEquals(23.0, shape.getDiametre(), 0.00001); } @Test public void testValidDotFillingCol() { shape.setDotFillingCol(Color.RED); assertEquals(Color.RED, shape.getDotFillingCol()); assertEquals(Color.RED, shape.getFillingCol()); shape.setDotFillingCol(Color.BLUE); assertEquals(Color.BLUE, shape.getDotFillingCol()); assertEquals(Color.BLUE, shape.getFillingCol()); } @Test public void testNotValidDotFillingCol() { shape.setDotFillingCol(Color.RED); shape.setDotFillingCol(null); assertEquals(Color.RED, shape.getDotFillingCol()); assertEquals(Color.RED, shape.getFillingCol()); } @Override @Test public void testGetBottomLeftPoint() { shape.setPlotEquation("x"); shape.setPlotMaxX(20.0); shape.setPlotMinX(10.0); shape.setXScale(1.0); shape.setYScale(1.0); shape.setNbPlottedPoints(30); shape.setPosition(10.0, 20.0); IPoint pt = shape.getBottomLeftPoint(); assertTrue(GLibUtilities.isValidPoint(pt)); assertEquals(10.0+10.0*IShape.PPC, pt.getX(), 0.0001); assertEquals(20.0-10.0*IShape.PPC, pt.getY(), 0.0001); } @Override @Test public void testGetBottomRightPoint() { shape.setPlotEquation("x"); shape.setPlotMaxX(20.0); shape.setPlotMinX(10.0); shape.setXScale(1.0); shape.setYScale(1.0); shape.setNbPlottedPoints(30); shape.setPosition(10.0, 20.0); IPoint pt = shape.getBottomRightPoint(); assertTrue(GLibUtilities.isValidPoint(pt)); assertEquals(10.0+20.0*IShape.PPC, pt.getX(), 0.0001); assertEquals(20.0-10.0*IShape.PPC, pt.getY(), 0.0001); } @Override @Test public void testGetTopLeftPoint() { shape.setPlotEquation("x"); shape.setPlotMaxX(20.0); shape.setPlotMinX(10.0); shape.setXScale(1.0); shape.setYScale(1.0); shape.setNbPlottedPoints(30); shape.setPosition(10.0, 20.0); IPoint pt = shape.getTopLeftPoint(); assertTrue(GLibUtilities.isValidPoint(pt)); assertEquals(10.0+10.0*IShape.PPC, pt.getX(), 0.0001); assertEquals(20.0-20.0*IShape.PPC, pt.getY(), 0.0001); } @Override @Test public void testGetTopRightPoint() { shape.setPlotEquation("x"); shape.setPlotMaxX(20.0); shape.setPlotMinX(10.0); shape.setXScale(1.0); shape.setYScale(1.0); shape.setNbPlottedPoints(30); shape.setPosition(10.0, 20.0); IPoint pt = shape.getTopRightPoint(); assertTrue(GLibUtilities.isValidPoint(pt)); assertEquals(10.0+20.0*IShape.PPC, pt.getX(), 0.0001); assertEquals(20.0-20.0*IShape.PPC, pt.getY(), 0.0001); } @Override @Test public void testGetGravityCentre() { shape.setPlotEquation("x"); shape.setPlotMaxX(20.0); shape.setPlotMinX(10.0); shape.setXScale(1.0); shape.setYScale(1.0); shape.setNbPlottedPoints(30); shape.setPosition(10.0, 20.0); final IPoint gc = shape.getGravityCentre(); assertTrue(GLibUtilities.isValidPoint(gc)); assertEquals((shape.getTopLeftPoint().getX()+shape.getTopRightPoint().getX())/2., gc.getX(), 0.0001); assertEquals((shape.getTopLeftPoint().getY()+shape.getBottomLeftPoint().getY())/2., gc.getY(), 0.0001); } @Test public void testInvalidMirrorHorizontal() { shape.setPosition(100, 200); shape.mirrorHorizontal(null); assertEquals(100.0, shape.getX(), 0.00001); assertEquals(200.0, shape.getY(), 0.00001); } @Test public void testInvalidMirrorVertical() { shape.setPosition(100, 200); shape.mirrorVertical(null); assertEquals(100.0, shape.getX(), 0.00001); assertEquals(200.0, shape.getY(), 0.00001); } @Override @Test public void testMirrorHorizontal() { shape.setPosition(100, 200); shape.mirrorHorizontal(shape.getGravityCentre()); assertEquals(100.0, shape.getX(), 0.00001); assertEquals(200.0, shape.getY(), 0.00001); } @Override @Test public void testMirrorVertical() { shape.setPosition(100, 200); shape.mirrorVertical(shape.getGravityCentre()); assertEquals(100.0, shape.getX(), 0.00001); assertEquals(200.0, shape.getY(), 0.00001); } @Test public void test2ShapesMirrorHorizontal() { shape.setPosition(100, 200); shape2.setPosition(-100, -200); shape.mirrorHorizontal(shape.getGravityCentre().getMiddlePoint(shape2.getGravityCentre())); assertEquals(-100.0, shape.getX(), 0.00001); assertEquals(200.0, shape.getY(), 0.00001); } @Test public void test2ShapesMirrorVertical() { shape.setPosition(100, 200); shape2.setPosition(-100, -200); shape.mirrorVertical(shape.getGravityCentre().getMiddlePoint(shape2.getGravityCentre())); assertEquals(100.0, shape.getX(), 0.00001); assertEquals(-200.0, shape.getY(), 0.00001); } @Test public void testCopyFromOther() { IRectangle rec = ShapeFactory.createRectangle(); rec.setFillingCol(Color.BLUE); shape.copy(rec); assertEquals(Color.BLUE, shape.getFillingCol()); } @Test public void testCopyFromDot() { IDot dot = ShapeFactory.createDot(ShapeFactory.createPoint()); dot.setDotStyle(IDotProp.DotStyle.DIAMOND); dot.setDotFillingCol(Color.BLUE); dot.setDiametre(3.0); shape.copy(dot); assertEquals(Color.BLUE, shape.getDotFillingCol()); assertEquals(3.0, shape.getDiametre(), 0.0001); assertEquals(IDotProp.DotStyle.DIAMOND, shape.getDotStyle()); } @Override @Test public void testCopy() { super.testCopy(); shape2.setPlotEquation("2 x mul"); shape2.setPolar(true); shape2.setNbPlottedPoints(73); shape2.setPlotStyle(IPlotProp.PlotStyle.ECURVE); shape2.setPlotMinX(-234.0); shape2.setPlotMaxX(123.0); shape2.setDotStyle(IDotProp.DotStyle.BAR); shape2.setDiametre(23.0); shape2.setDotFillingCol(Color.YELLOW); shape.setPlotEquation("x"); shape.copy(shape2); assertEquals("2 x mul", shape.getPlotEquation()); assertTrue(shape.isPolar()); assertEquals(Color.YELLOW, shape.getDotFillingCol()); assertEquals(23.0, shape.getDiametre(), 0.0001); assertEquals(IDotProp.DotStyle.BAR, shape.getDotStyle()); assertEquals(123.0, shape.getPlotMaxX(), 0.0001); assertEquals(-234.0, shape.getPlotMinX(), 0.0001); assertEquals(IPlotProp.PlotStyle.ECURVE, shape.getPlotStyle()); assertEquals(73, shape.getNbPlottedPoints()); } } TestIPolygon.java000066400000000000000000000003141321075051700340630ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; public abstract class TestIPolygon extends TestIModifiablePointsShape { // } TestIPolyline.java000066400000000000000000000003021321075051700342240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; public abstract class TestIPolyline extends TestIPolygon { // } TestIPositionShape.java000066400000000000000000000130071321075051700352240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import org.junit.Test; import test.HelperTest; public abstract class TestIPositionShape extends TestIShape { @Override @Test public void testTranslate() { shape.setPosition(0, 0); shape.translate(100, 50); HelperTest.assertEqualsDouble(100., shape.getPosition().getX()); HelperTest.assertEqualsDouble(50., shape.getPosition().getY()); } @Test public void testGetSetX() { shape.setX(10.); HelperTest.assertEqualsDouble(10., shape.getX()); shape.setX(-20.); HelperTest.assertEqualsDouble(-20., shape.getX()); shape.setX(Double.NaN); HelperTest.assertEqualsDouble(-20., shape.getX()); shape.setX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-20., shape.getX()); shape.setX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-20., shape.getX()); } @Test public void testGetSetY() { shape.setY(10.); HelperTest.assertEqualsDouble(10., shape.getY()); shape.setY(-20.); HelperTest.assertEqualsDouble(-20., shape.getY()); shape.setY(Double.NaN); HelperTest.assertEqualsDouble(-20., shape.getY()); shape.setY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-20., shape.getY()); shape.setY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-20., shape.getY()); } @Test public void testSetXThenSetY() { shape.setX(40.); HelperTest.assertEqualsDouble(40., shape.getX()); shape.setX(-30.); HelperTest.assertEqualsDouble(-30., shape.getX()); shape.setY(10.); HelperTest.assertEqualsDouble(10., shape.getY()); HelperTest.assertEqualsDouble(-30., shape.getX()); shape.setY(-20.); HelperTest.assertEqualsDouble(-20., shape.getY()); HelperTest.assertEqualsDouble(-30., shape.getX()); } @Test public void testSetYThenSetX() { shape.setY(10.); HelperTest.assertEqualsDouble(10., shape.getY()); shape.setY(-20.); HelperTest.assertEqualsDouble(-20., shape.getY()); shape.setX(40.); HelperTest.assertEqualsDouble(40., shape.getX()); HelperTest.assertEqualsDouble(-20., shape.getY()); shape.setX(-30.); HelperTest.assertEqualsDouble(-30., shape.getX()); HelperTest.assertEqualsDouble(-20., shape.getY()); } @Test public void testGetSetPosition() { IPoint pt = ShapeFactory.createPoint(15, 25); shape.setPosition(pt); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); HelperTest.assertEqualsDouble(15., shape.getX()); HelperTest.assertEqualsDouble(25., shape.getY()); shape.setPosition(null); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(Double.NaN, 0)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(Double.NEGATIVE_INFINITY, 0)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(0, Double.NaN)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(ShapeFactory.createPoint(0, Double.POSITIVE_INFINITY)); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(15, 25); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); HelperTest.assertEqualsDouble(15., shape.getX()); HelperTest.assertEqualsDouble(25., shape.getY()); shape.setPosition(Double.NaN, 0); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(Double.NEGATIVE_INFINITY, 0); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(Double.POSITIVE_INFINITY, 0); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(0, Double.NaN); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(0, Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); shape.setPosition(0, Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(pt.getX(), shape.getPosition().getX()); HelperTest.assertEqualsDouble(pt.getY(), shape.getPosition().getY()); } } TestIRectangle.java000066400000000000000000000030031321075051700343360ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import org.junit.Test; import test.HelperTest; public abstract class TestIRectangle extends TestIRectangularShape { @Override @Test public void testCopy() { super.testCopy(); shape2.setLineArc(0.55); shape.copy(shape2); HelperTest.assertEqualsDouble(0.55, shape.getLineArc()); assertTrue(shape.isRoundCorner()); } @Test public void testGetSetLineArc() { shape.setLineArc(0.5); HelperTest.assertEqualsDouble(0.5, shape.getLineArc()); shape.setLineArc(1); HelperTest.assertEqualsDouble(1., shape.getLineArc()); shape.setLineArc(0); HelperTest.assertEqualsDouble(0., shape.getLineArc()); shape.setLineArc(-0.0001); HelperTest.assertEqualsDouble(0., shape.getLineArc()); shape.setLineArc(1.0001); HelperTest.assertEqualsDouble(0., shape.getLineArc()); shape.setLineArc(Double.NaN); HelperTest.assertEqualsDouble(0., shape.getLineArc()); shape.setLineArc(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getLineArc()); shape.setLineArc(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getLineArc()); } @Test public void testIsSetRound() { shape.setLineArc(0.1); assertTrue(shape.isRoundCorner()); shape.setLineArc(0.); assertFalse(shape.isRoundCorner()); shape.setLineArc(1.); assertTrue(shape.isRoundCorner()); } } TestIRectangularShape.java000066400000000000000000000343321321075051700356730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import org.junit.Test; import test.HelperTest; public abstract class TestIRectangularShape extends TestIPositionShape { @Override @Test public void testCopy() { super.testCopy(); shape2.setPosition(-120., 200.); shape2.setWidth(385.); shape2.setHeight(300.); shape.copy(shape2); for(int i=0; i extends TestIPositionShape { @Override @Test public void testGetBottomLeftPoint() { shape.setPosition(0, 5); shape.setWidth(10); shape.setHeight(10); assertNotNull(shape.getBottomLeftPoint()); HelperTest.assertEqualsDouble(0., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(5., shape.getBottomLeftPoint().getY()); } @Override @Test public void testGetBottomRightPoint() { shape.setPosition(0, 5); shape.setWidth(10); shape.setHeight(10); assertNotNull(shape.getBottomRightPoint()); HelperTest.assertEqualsDouble(10., shape.getBottomRightPoint().getX()); HelperTest.assertEqualsDouble(5., shape.getBottomRightPoint().getY()); } @Override @Test public void testGetTopLeftPoint() { shape.setPosition(0, 5); shape.setWidth(10); shape.setHeight(10); assertNotNull(shape.getTopLeftPoint()); HelperTest.assertEqualsDouble(0., shape.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(-5., shape.getTopLeftPoint().getY()); } @Override @Test public void testGetTopRightPoint() { shape.setPosition(0, 5); shape.setWidth(10); shape.setHeight(10); assertNotNull(shape.getTopRightPoint()); HelperTest.assertEqualsDouble(10., shape.getTopRightPoint().getX()); HelperTest.assertEqualsDouble(-5., shape.getTopRightPoint().getY()); } @Override @Test public void testMirrorHorizontal() { shape.setPosition(15, 5); shape.setWidth(10); shape.setHeight(20); shape.mirrorHorizontal(shape.getGravityCentre()); assertEquals(15., shape.getPosition().getX(), 0.001); assertEquals(5., shape.getPosition().getY(), 0.001); assertEquals(10., shape.getWidth(), 0.001); assertEquals(20., shape.getHeight(), 0.001); assertEquals(0., shape.getRotationAngle(), 0.001); } @Override @Test public void testMirrorVertical() { shape.setPosition(15, 5); shape.setWidth(10); shape.setHeight(20); shape.mirrorVertical(shape.getGravityCentre()); assertEquals(15., shape.getPosition().getX(), 0.001); assertEquals(5., shape.getPosition().getY(), 0.001); assertEquals(10., shape.getWidth(), 0.001); assertEquals(20., shape.getHeight(), 0.001); assertEquals(0., shape.getRotationAngle(), 0.001); } // // @Override // @Test // public void testScale() { // shape.setPosition(0, 2); // shape.setRight(2); // shape.setTop(0); // // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(1.5, 1, Position.EAST); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // shape.scale(1, 1.5, Position.SOUTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1.5, 1, Position.WEST); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1, 1.5, Position.NORTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // } @Override @Test public void testTranslate() { shape.setPosition(5, 15); shape.setWidth(20); shape.setHeight(10); shape.translate(100, 50); assertEquals(105, shape.getPosition().getX(), 0.0); assertEquals(65, shape.getPosition().getY(), 0.0); assertEquals(20, shape.getWidth(), 0.0); assertEquals(10, shape.getHeight(), 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIShape.java000066400000000000000000000702701321075051700335630ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.awt.Color; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import org.junit.Test; import test.HelperTest; public abstract class TestIShape { public T shape; public T shape2; @Test public abstract void testIsTypeOf(); @Test public void testGetPoints() { assertNotNull(shape.getPoints()); } @Test public void testGetNbPoints() { IPoint pt = ShapeFactory.createPoint(); assertEquals(shape.getPoints().size(), shape.getNbPoints()); shape.getPoints().add(pt); assertEquals(shape.getPoints().size(), shape.getNbPoints()); shape.getPoints().remove(pt); assertEquals(shape.getPoints().size(), shape.getNbPoints()); } @Test public void testGetPtAt() { if(shape.getPoints().isEmpty()) { shape.getPoints().add(ShapeFactory.createPoint()); shape.getPoints().add(ShapeFactory.createPoint()); } for(int i=0; i extends TestISquaredShape { @Override @Test public void testHas4Points() { assertEquals(shape.getNbPoints(), 4); } @Override @Test public void testCopy() { super.testCopy(); shape2.setLineArc(0.55); shape.copy(shape2); HelperTest.assertEqualsDouble(0.55, shape.getLineArc()); assertTrue(shape.isRoundCorner()); } // // @Override // @Test // public void testScale() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(1.5, 1, Position.EAST); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // shape.scale(1, 1.5, Position.SOUTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1.5, 1, Position.WEST); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1, 1.5, Position.NORTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // } // // // // @Override // @Test // public void testScaleNE() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.NE); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // // @Override // @Test // public void testScaleSE() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.SE); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // @Override // @Test // public void testScaleSW() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.SW); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } // // // @Override // @Test // public void testScaleNW() { // shape.setPosition(0, 2); // shape.setWidth(2); // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(2, 1.5, Position.NW); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*2., br2.getY()-tl2.getY()); // assertEquals((br1.getX()-tl1.getX())*2., br2.getX()-tl2.getX()); // } } TestISquaredShape.java000066400000000000000000000332651321075051700350340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPoint; import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape; import org.junit.Test; import test.HelperTest; public abstract class TestISquaredShape extends TestIPositionShape { @Override @Test public void testCopy() { super.testCopy(); shape2.setPosition(-120., 200.); shape2.setWidth(385.); shape.copy(shape2); for(int i=0; i extends TestIPositionShape { @Test public void testGetSetLabelsSize() { shape.setLabelsSize(5); assertEquals(5, shape.getLabelsSize()); shape.setLabelsSize(30); assertEquals(30, shape.getLabelsSize()); shape.setLabelsSize(0); assertEquals(0, shape.getLabelsSize()); shape.setLabelsSize(-1); assertEquals(0, shape.getLabelsSize()); } @Test public void testGetSetGridEndX() { shape.setGridStartX(-10); shape.setGridEndX(5); HelperTest.assertEqualsDouble(5., shape.getGridEndX()); shape.setGridEndX(0); HelperTest.assertEqualsDouble(0., shape.getGridEndX()); shape.setGridEndX(-5); HelperTest.assertEqualsDouble(-5., shape.getGridEndX()); shape.setGridEndX(-15); HelperTest.assertEqualsDouble(-5., shape.getGridEndX()); shape.setGridEndX(Double.NaN); HelperTest.assertEqualsDouble(-5., shape.getGridEndX()); shape.setGridEndX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridEndX()); shape.setGridEndX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridEndX()); } @Test public void testGetSetGridEndY() { shape.setGridStartY(-10); shape.setGridEndY(5); HelperTest.assertEqualsDouble(5., shape.getGridEndY()); shape.setGridEndY(0); HelperTest.assertEqualsDouble(0., shape.getGridEndY()); shape.setGridEndY(-5); HelperTest.assertEqualsDouble(-5., shape.getGridEndY()); shape.setGridEndY(-15); HelperTest.assertEqualsDouble(-5., shape.getGridEndY()); shape.setGridEndY(Double.NaN); HelperTest.assertEqualsDouble(-5., shape.getGridEndY()); shape.setGridEndY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridEndY()); shape.setGridEndY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridEndY()); } @Test public void testSetGridStart() { shape.setGridEnd(5, 9); shape.setGridStart(-5, -4); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); HelperTest.assertEqualsDouble(-4., shape.getGridStartY()); shape.setGridStart(-6, 10); HelperTest.assertEqualsDouble(-6., shape.getGridStartX()); HelperTest.assertEqualsDouble(-4., shape.getGridStartY()); shape.setGridStart(6, 8); HelperTest.assertEqualsDouble(-6., shape.getGridStartX()); HelperTest.assertEqualsDouble(8., shape.getGridStartY()); shape.setGridStart(6, Double.NaN); HelperTest.assertEqualsDouble(-6., shape.getGridStartX()); HelperTest.assertEqualsDouble(8., shape.getGridStartY()); shape.setGridStart(Double.NEGATIVE_INFINITY, 8); HelperTest.assertEqualsDouble(-6., shape.getGridStartX()); HelperTest.assertEqualsDouble(8., shape.getGridStartY()); } @Test public void testSetGridEnd() { shape.setGridStart(-5, -4); shape.setGridEnd(5, 9); HelperTest.assertEqualsDouble(5., shape.getGridEndX()); HelperTest.assertEqualsDouble(9., shape.getGridEndY()); shape.setGridEnd(6, -5); HelperTest.assertEqualsDouble(6., shape.getGridEndX()); HelperTest.assertEqualsDouble(9., shape.getGridEndY()); shape.setGridEnd(-6, 10); HelperTest.assertEqualsDouble(6., shape.getGridEndX()); HelperTest.assertEqualsDouble(10., shape.getGridEndY()); shape.setGridEnd(-6, Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(6., shape.getGridEndX()); HelperTest.assertEqualsDouble(10., shape.getGridEndY()); shape.setGridEnd(Double.NaN, 10); HelperTest.assertEqualsDouble(6., shape.getGridEndX()); HelperTest.assertEqualsDouble(10., shape.getGridEndY()); } @Test public void testGetSetOrigin() { shape.setOrigin(10, 6); HelperTest.assertEqualsDouble(10., shape.getOriginX()); HelperTest.assertEqualsDouble(6., shape.getOriginY()); shape.setOrigin(0, 0); HelperTest.assertEqualsDouble(0., shape.getOriginX()); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOrigin(0, -5); HelperTest.assertEqualsDouble(0., shape.getOriginX()); HelperTest.assertEqualsDouble(-5., shape.getOriginY()); shape.setOrigin(-8, 0); HelperTest.assertEqualsDouble(-8., shape.getOriginX()); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOrigin(-9, Double.NaN); HelperTest.assertEqualsDouble(-9., shape.getOriginX()); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOrigin(Double.POSITIVE_INFINITY, 1); HelperTest.assertEqualsDouble(-9., shape.getOriginX()); HelperTest.assertEqualsDouble(1., shape.getOriginY()); } @Test public void testGetSetGridStartY() { shape.setGridEndY(10); shape.setGridStartY(5); HelperTest.assertEqualsDouble(5., shape.getGridStartY()); shape.setGridStartY(0); HelperTest.assertEqualsDouble(0., shape.getGridStartY()); shape.setGridStartY(-5); HelperTest.assertEqualsDouble(-5., shape.getGridStartY()); shape.setGridStartY(15); HelperTest.assertEqualsDouble(-5., shape.getGridStartY()); shape.setGridStartY(Double.NaN); HelperTest.assertEqualsDouble(-5., shape.getGridStartY()); shape.setGridStartY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridStartY()); shape.setGridStartY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridStartY()); } @Test public void testGetSetGridStartX() { shape.setGridEndX(10); shape.setGridStartX(5); HelperTest.assertEqualsDouble(5., shape.getGridStartX()); shape.setGridStartX(0); HelperTest.assertEqualsDouble(0., shape.getGridStartX()); shape.setGridStartX(-5); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); shape.setGridStartX(15); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); shape.setGridStartX(Double.NaN); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); shape.setGridStartX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); shape.setGridStartX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(-5., shape.getGridStartX()); } @Test public void testGetSetOriginX() { shape.setOriginX(100); HelperTest.assertEqualsDouble(100., shape.getOriginX()); shape.setOriginX(-100); HelperTest.assertEqualsDouble(-100., shape.getOriginX()); shape.setOriginX(0); HelperTest.assertEqualsDouble(0., shape.getOriginX()); shape.setOriginX(Double.NaN); HelperTest.assertEqualsDouble(0., shape.getOriginX()); shape.setOriginX(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getOriginX()); shape.setOriginX(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getOriginX()); } @Test public void testGetSetOriginY() { shape.setOriginY(100); HelperTest.assertEqualsDouble(100., shape.getOriginY()); shape.setOriginY(-100); HelperTest.assertEqualsDouble(-100., shape.getOriginY()); shape.setOriginY(0); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOriginY(Double.NaN); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOriginY(Double.POSITIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getOriginY()); shape.setOriginY(Double.NEGATIVE_INFINITY); HelperTest.assertEqualsDouble(0., shape.getOriginY()); } @Override @Test public void testDuplicate() { super.testDuplicate(); shape.setOrigin(20, 30); shape.setGridStart(-100, -40); shape.setGridEnd(200, 300); // shape.setLabelsSize(IText.TestSize.HUGE1.getSize()); IStandardGrid g2 = (IStandardGrid) shape.duplicate(); HelperTest.assertEqualsDouble(20., g2.getOriginX()); HelperTest.assertEqualsDouble(30., g2.getOriginY()); HelperTest.assertEqualsDouble(-100., g2.getGridStartX()); HelperTest.assertEqualsDouble(-40., g2.getGridStartY()); HelperTest.assertEqualsDouble(200., g2.getGridEndX()); HelperTest.assertEqualsDouble(300., g2.getGridEndY()); // assertEquals(IText.TestSize.HUGE1.getSize(), shape2.getLabelsSize());//FIXME } @Override @Test public void testCopy() { super.testCopy(); shape2.setOrigin(20, 30); shape2.setGridEnd(100, -40); shape2.setGridStart(200, 300); shape2.setLabelsSize(20); shape.copy(shape2); HelperTest.assertEqualsDouble(shape2.getOriginX(), shape.getOriginX()); HelperTest.assertEqualsDouble(shape2.getOriginY(), shape.getOriginY()); HelperTest.assertEqualsDouble(shape2.getGridEndX(), shape.getGridEndX()); HelperTest.assertEqualsDouble(shape2.getGridEndY(), shape.getGridEndY()); HelperTest.assertEqualsDouble(shape2.getGridStartX(), shape.getGridStartX()); HelperTest.assertEqualsDouble(shape2.getGridStartY(), shape.getGridStartY()); assertEquals(shape2.getLabelsSize(), shape.getLabelsSize()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfaces/TestIText.java000066400000000000000000000016541321075051700334470ustar00rootroot00000000000000package test.glib.models.interfaces; import static org.junit.Assert.*; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import org.junit.Test; public abstract class TestIText extends TestIPositionShape { @Override @Test public void testGetBottomLeftPoint() { assertEquals(shape.getBottomLeftPoint(), ((IPositionShape)shape).getPosition()); } @Override @Test public void testGetBottomRightPoint() { //TODO } @Override @Test public void testGetTopLeftPoint() { //TODO } @Override @Test public void testGetTopRightPoint() { //TODO } @Override @Test public void testMirrorHorizontal() { //TODO } @Override @Test public void testMirrorVertical() { //TODO } @Override @Test public void testCopy() { //TODO } @Override @Test public void testDuplicate() { super.testDuplicate(); //TODO } } TestITriangle.java000066400000000000000000000072621321075051700342120ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import org.junit.Test; import test.HelperTest; public abstract class TestITriangle extends TestIPositionShape { @Override @Test public void testGetBottomLeftPoint() { shape.setPosition(10, 20); shape.setWidth(10); shape.setHeight(10); HelperTest.assertEqualsDouble(10., shape.getBottomLeftPoint().getX()); HelperTest.assertEqualsDouble(20., shape.getBottomLeftPoint().getY()); } @Override @Test public void testGetBottomRightPoint() { shape.setPosition(10, 20); shape.setWidth(10); shape.setHeight(10); HelperTest.assertEqualsDouble(20., shape.getBottomRightPoint().getX()); HelperTest.assertEqualsDouble(20., shape.getBottomRightPoint().getY()); } @Override @Test public void testGetTopLeftPoint() { shape.setPosition(10, 20); shape.setWidth(10); shape.setHeight(10); HelperTest.assertEqualsDouble(10., shape.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(10., shape.getTopLeftPoint().getY()); } @Override @Test public void testGetTopRightPoint() { shape.setPosition(10, 20); shape.setWidth(10); shape.setHeight(10); HelperTest.assertEqualsDouble(20., shape.getTopRightPoint().getX()); HelperTest.assertEqualsDouble(10., shape.getTopRightPoint().getY()); } @Override @Test public void testMirrorHorizontal() { shape.setPosition(10, 20); shape.setWidth(30); shape.setHeight(40); shape.mirrorHorizontal(shape.getGravityCentre()); HelperTest.assertEqualsDouble(10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(20., shape.getPosition().getY()); HelperTest.assertEqualsDouble(30., shape.getWidth()); HelperTest.assertEqualsDouble(40., shape.getHeight()); } @Override @Test public void testMirrorVertical() { shape.setPosition(10, 20); shape.setWidth(30); shape.setHeight(40); shape.mirrorVertical(shape.getGravityCentre()); HelperTest.assertEqualsDouble(10., shape.getPosition().getX()); HelperTest.assertEqualsDouble(20., shape.getPosition().getY()); HelperTest.assertEqualsDouble(30., shape.getWidth()); HelperTest.assertEqualsDouble(40., shape.getHeight()); } // // // @Override // @Test // public void testScale() { // shape.setPosition(0, 2); // shape.setRight(2); // shape.setTop(0); // // IPoint tl1 = shape.getTopLeftPoint(); // IPoint br1 = shape.getBottomRightPoint(); // // shape.scale(1.5, 1, Position.EAST); // IPoint tl2 = shape.getTopLeftPoint(); // IPoint br2 = shape.getBottomRightPoint(); // // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // shape.scale(1, 1.5, Position.SOUTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1.5, 1, Position.WEST); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getX()-tl1.getX())*1.5, br2.getX()-tl2.getX()); // // tl1 = shape.getTopLeftPoint(); // br1 = shape.getBottomRightPoint(); // shape.scale(1, 1.5, Position.NORTH); // tl2 = shape.getTopLeftPoint(); // br2 = shape.getBottomRightPoint(); // assertEquals((br1.getY()-tl1.getY())*1.5, br2.getY()-tl2.getY()); // } @Override @Test public void testTranslate() { shape.setPosition(0, 2); shape.setWidth(3); shape.setHeight(2); shape.translate(10, 5); HelperTest.assertEqualsDouble(10.0, shape.getPosition().getX()); HelperTest.assertEqualsDouble(7.0, shape.getPosition().getY()); HelperTest.assertEqualsDouble(3.0, shape.getWidth()); HelperTest.assertEqualsDouble(2.0, shape.getHeight()); } } TestLineStyle.java000066400000000000000000000023731321075051700342420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestLineStyle { @Test public void testgetLatexToken() { assertEquals(LineStyle.DASHED.getLatexToken(), PSTricksConstants.LINE_DASHED_STYLE); assertEquals(LineStyle.DOTTED.getLatexToken(), PSTricksConstants.LINE_DOTTED_STYLE); assertEquals(LineStyle.NONE.getLatexToken(), PSTricksConstants.LINE_NONE_STYLE); assertEquals(LineStyle.SOLID.getLatexToken(), PSTricksConstants.LINE_SOLID_STYLE); } @Test public void testGetStyle() { assertNull(LineStyle.getStyle(null)); assertNull(LineStyle.getStyle("")); //$NON-NLS-1$ assertNull(LineStyle.getStyle("erzter fd")); //$NON-NLS-1$ assertNull(LineStyle.getStyle("ez87 fd")); //$NON-NLS-1$ assertEquals(LineStyle.getStyle(LineStyle.DASHED.toString()), LineStyle.DASHED); assertEquals(LineStyle.getStyle(LineStyle.DOTTED.toString()), LineStyle.DOTTED); assertEquals(LineStyle.getStyle(LineStyle.NONE.toString()), LineStyle.NONE); assertEquals(LineStyle.getStyle(LineStyle.SOLID.toString()), LineStyle.SOLID); } } TestPlotStyle.java000066400000000000000000000031341321075051700342650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp.PlotStyle; import org.junit.Test; public class TestPlotStyle { @Test public void testGetPSTToken() { assertEquals("curve", PlotStyle.CURVE.getPSTToken()); //$NON-NLS-1$ assertEquals("ccurve", PlotStyle.CCURVE.getPSTToken()); //$NON-NLS-1$ assertEquals("dots", PlotStyle.DOTS.getPSTToken()); //$NON-NLS-1$ assertEquals("ecurve", PlotStyle.ECURVE.getPSTToken()); //$NON-NLS-1$ assertEquals("line", PlotStyle.LINE.getPSTToken()); //$NON-NLS-1$ assertEquals("polygon", PlotStyle.POLYGON.getPSTToken()); //$NON-NLS-1$ } @Test public void testGetPlotStyleNULL() { assertEquals(PlotStyle.CURVE, PlotStyle.getPlotStyle(null)); } @Test public void testGetPlotStyleEmpty() { assertEquals(PlotStyle.CURVE, PlotStyle.getPlotStyle("")); //$NON-NLS-1$ } @Test public void testGetPlotStyleNotCorrect() { assertEquals(PlotStyle.CURVE, PlotStyle.getPlotStyle("dfs@fgd")); //$NON-NLS-1$ } @Test public void testGetPlotStyleOK() { assertEquals(PlotStyle.CURVE, PlotStyle.getPlotStyle(PlotStyle.CURVE.getPSTToken())); assertEquals(PlotStyle.CCURVE, PlotStyle.getPlotStyle(PlotStyle.CCURVE.getPSTToken())); assertEquals(PlotStyle.DOTS, PlotStyle.getPlotStyle(PlotStyle.DOTS.getPSTToken())); assertEquals(PlotStyle.ECURVE, PlotStyle.getPlotStyle(PlotStyle.ECURVE.getPSTToken())); assertEquals(PlotStyle.LINE, PlotStyle.getPlotStyle(PlotStyle.LINE.getPSTToken())); assertEquals(PlotStyle.POLYGON, PlotStyle.getPlotStyle(PlotStyle.POLYGON.getPSTToken())); } } TestPlottingStyle.java000066400000000000000000000034461321075051700351550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.PlottingStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestPlottingStyle { @Test public void testIsX() { assertTrue(PlottingStyle.ALL.isX()); assertTrue(PlottingStyle.X.isX()); assertFalse(PlottingStyle.Y.isX()); assertFalse(PlottingStyle.NONE.isX()); } @Test public void testIsY() { assertTrue(PlottingStyle.ALL.isY()); assertTrue(PlottingStyle.Y.isY()); assertFalse(PlottingStyle.X.isY()); assertFalse(PlottingStyle.NONE.isY()); } @Test public void testGetPSTToken() { assertEquals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL, PlottingStyle.ALL.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_NONE, PlottingStyle.NONE.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_X, PlottingStyle.X.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y, PlottingStyle.Y.getPSTToken()); } @Test public void testGetStyle() { assertNull(PlottingStyle.getStyle(null)); assertNull(PlottingStyle.getStyle("")); //$NON-NLS-1$ assertNull(PlottingStyle.getStyle("ezpoke zae")); //$NON-NLS-1$ assertNull(PlottingStyle.getStyle("7dsqd 4ds'")); //$NON-NLS-1$ assertEquals(PlottingStyle.getStyle(PlottingStyle.ALL.toString()), PlottingStyle.ALL); assertEquals(PlottingStyle.getStyle(PlottingStyle.NONE.toString()), PlottingStyle.NONE); assertEquals(PlottingStyle.getStyle(PlottingStyle.X.toString()), PlottingStyle.X); assertEquals(PlottingStyle.getStyle(PlottingStyle.Y.toString()), PlottingStyle.Y); } } TestPosition.java000066400000000000000000000031441321075051700341330ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.Position; import org.junit.Test; public class TestPosition{ @Test public void testIsSouth() { assertTrue(Position.SE.isSouth()); assertTrue(Position.SOUTH.isSouth()); assertTrue(Position.SW.isSouth()); assertFalse(Position.NE.isSouth()); assertFalse(Position.NW.isSouth()); assertFalse(Position.NORTH.isSouth()); assertFalse(Position.WEST.isSouth()); assertFalse(Position.EAST.isSouth()); } @Test public void testIsNorth() { assertTrue(Position.NE.isNorth()); assertTrue(Position.NW.isNorth()); assertTrue(Position.NORTH.isNorth()); assertFalse(Position.SE.isNorth()); assertFalse(Position.SW.isNorth()); assertFalse(Position.SOUTH.isNorth()); assertFalse(Position.WEST.isNorth()); assertFalse(Position.EAST.isNorth()); } @Test public void testIsWest() { assertTrue(Position.WEST.isWest()); assertTrue(Position.NW.isWest()); assertTrue(Position.SW.isWest()); assertFalse(Position.EAST.isWest()); assertFalse(Position.SE.isWest()); assertFalse(Position.NE.isWest()); assertFalse(Position.NORTH.isWest()); assertFalse(Position.SOUTH.isWest()); } @Test public void testIsEast() { assertTrue(Position.EAST.isEast()); assertTrue(Position.NE.isEast()); assertTrue(Position.SE.isEast()); assertFalse(Position.SOUTH.isEast()); assertFalse(Position.NORTH.isEast()); assertFalse(Position.NW.isEast()); assertFalse(Position.SW.isEast()); assertFalse(Position.WEST.isEast()); } } TestTextPosition.java000066400000000000000000000046071321075051700350050ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import org.junit.Test; public class TestTextPosition { @Test public void testGetTextPositionFromText() { assertEquals(IText.TextPosition.BASE, IText.TextPosition.getTextPosition("B")); //$NON-NLS-1$ assertEquals(IText.TextPosition.BASE_LEFT, IText.TextPosition.getTextPosition("Bl")); //$NON-NLS-1$ assertEquals(IText.TextPosition.BASE_RIGHT, IText.TextPosition.getTextPosition("Br")); //$NON-NLS-1$ assertEquals(IText.TextPosition.BOT, IText.TextPosition.getTextPosition("b")); //$NON-NLS-1$ assertEquals(IText.TextPosition.BOT_LEFT, IText.TextPosition.getTextPosition("bl")); //$NON-NLS-1$ assertEquals(IText.TextPosition.BOT_RIGHT, IText.TextPosition.getTextPosition("br")); //$NON-NLS-1$ assertEquals(IText.TextPosition.TOP, IText.TextPosition.getTextPosition("t")); //$NON-NLS-1$ assertEquals(IText.TextPosition.TOP_RIGHT, IText.TextPosition.getTextPosition("tr")); //$NON-NLS-1$ assertEquals(IText.TextPosition.TOP_LEFT, IText.TextPosition.getTextPosition("tl")); //$NON-NLS-1$ assertEquals(IText.TextPosition.CENTER, IText.TextPosition.getTextPosition("")); //$NON-NLS-1$ assertEquals(IText.TextPosition.LEFT, IText.TextPosition.getTextPosition("l")); //$NON-NLS-1$ assertEquals(IText.TextPosition.RIGHT, IText.TextPosition.getTextPosition("r")); //$NON-NLS-1$ } @Test public void testGetLatexToken() { assertEquals("B", IText.TextPosition.BASE.getLatexToken()); //$NON-NLS-1$ assertEquals("Bl", IText.TextPosition.BASE_LEFT.getLatexToken()); //$NON-NLS-1$ assertEquals("Br", IText.TextPosition.BASE_RIGHT.getLatexToken()); //$NON-NLS-1$ assertEquals("b", IText.TextPosition.BOT.getLatexToken()); //$NON-NLS-1$ assertEquals("bl", IText.TextPosition.BOT_LEFT.getLatexToken()); //$NON-NLS-1$ assertEquals("Br", IText.TextPosition.BASE_RIGHT.getLatexToken()); //$NON-NLS-1$ assertEquals("", IText.TextPosition.CENTER.getLatexToken()); //$NON-NLS-1$ assertEquals("l", IText.TextPosition.LEFT.getLatexToken()); //$NON-NLS-1$ assertEquals("r", IText.TextPosition.RIGHT.getLatexToken()); //$NON-NLS-1$ assertEquals("t", IText.TextPosition.TOP.getLatexToken()); //$NON-NLS-1$ assertEquals("tl", IText.TextPosition.TOP_LEFT.getLatexToken()); //$NON-NLS-1$ assertEquals("tr", IText.TextPosition.TOP_RIGHT.getLatexToken()); //$NON-NLS-1$ } } TestTicksStyle.java000066400000000000000000000046071321075051700344320ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/models/interfacespackage test.glib.models.interfaces; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.interfaces.prop.IAxesProp.TicksStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestTicksStyle { @Test public void testGetPSTToken() { assertEquals(PSTricksConstants.TOKEN_TICKS_STYLE_FULL, TicksStyle.FULL.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM, TicksStyle.BOTTOM.getPSTToken()); assertEquals(PSTricksConstants.TOKEN_TICKS_STYLE_TOP, TicksStyle.TOP.getPSTToken()); } @Test public void testIsBottom() { assertTrue(TicksStyle.FULL.isBottom()); assertFalse(TicksStyle.TOP.isBottom()); assertTrue(TicksStyle.BOTTOM.isBottom()); } @Test public void testIsTop() { assertTrue(TicksStyle.FULL.isTop()); assertTrue(TicksStyle.TOP.isTop()); assertFalse(TicksStyle.BOTTOM.isTop()); } @Test public void testToString() { assertNotNull(TicksStyle.BOTTOM.toString()); assertTrue(TicksStyle.BOTTOM.toString().length()>0); assertNotNull(TicksStyle.FULL.toString()); assertTrue(TicksStyle.FULL.toString().length()>0); assertNotNull(TicksStyle.TOP.toString()); assertTrue(TicksStyle.TOP.toString().length()>0); } @Test public void testGetStyle() { assertNull(TicksStyle.getStyle(null)); assertNull(TicksStyle.getStyle("")); //$NON-NLS-1$ assertNull(TicksStyle.getStyle("ezpoke zae")); //$NON-NLS-1$ assertNull(TicksStyle.getStyle("7dsqd 4ds'")); //$NON-NLS-1$ assertEquals(TicksStyle.getStyle(TicksStyle.BOTTOM.toString()), TicksStyle.BOTTOM); assertEquals(TicksStyle.getStyle(TicksStyle.FULL.toString()), TicksStyle.FULL); assertEquals(TicksStyle.getStyle(TicksStyle.TOP.toString()), TicksStyle.TOP); assertNull(TicksStyle.getStyle(null)); assertNull(TicksStyle.getStyle("")); //$NON-NLS-1$ assertNull(TicksStyle.getStyle("dez")); //$NON-NLS-1$ assertNull(TicksStyle.getStyle("&ç eydfs h")); //$NON-NLS-1$ assertEquals(TicksStyle.getStyle(PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM), TicksStyle.BOTTOM); assertEquals(TicksStyle.getStyle(PSTricksConstants.TOKEN_TICKS_STYLE_FULL), TicksStyle.FULL); assertEquals(TicksStyle.getStyle(PSTricksConstants.TOKEN_TICKS_STYLE_TOP), TicksStyle.TOP); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/000077500000000000000000000000001321075051700264305ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/TestAbstractView.java000066400000000000000000000005361321075051700325350ustar00rootroot00000000000000package test.glib.views; import net.sf.latexdraw.glib.views.IAbstractView; import org.junit.Test; import static org.junit.Assert.*; public abstract class TestAbstractView { public T view; @Test public void testGetView() { assertNotNull(view.getShape()); } @Test public void testUpdate() { view.update(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2D/000077500000000000000000000000001321075051700275375ustar00rootroot00000000000000TestFlyweightThumbnail.java000066400000000000000000000074121321075051700347750ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2Dpackage test.glib.views.java2D; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.awt.Image; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.glib.views.Java2D.impl.LViewsFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewText; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.malai.undo.UndoCollector; import scala.Option; import scala.Tuple4; import scala.collection.mutable.Set; public class TestFlyweightThumbnail { protected IViewText viewTxt; @Before public void setUp() { FlyweightThumbnail.images().clear(); View2DTK.setFactory(new LViewsFactory()); UndoCollector.INSTANCE.setSizeMax(0); FlyweightThumbnail.setThread(false); viewTxt = (IViewText)View2DTK.getFactory().createView(ShapeFactory.createText(ShapeFactory.createPoint(), "coucou")); //$NON-NLS-1$ } @Test @Ignore public void testNewTextNewPicture() throws InterruptedException { Image img = viewTxt.getImage(); int cpt=0; while(img==null && cpt<10) { Thread.sleep(1000); cpt++; img = viewTxt.getImage(); } assertNotNull(img); assertEquals(1, FlyweightThumbnail.images().size()); Option,String,String>> optTuple = FlyweightThumbnail.images().get(((IText)viewTxt.getShape()).getLineColour()+((IText)viewTxt.getShape()).getText()); assertTrue(optTuple.isDefined()); assertEquals(img, optTuple.get()._1()); assertEquals(1, optTuple.get()._2().size()); assertEquals(viewTxt, optTuple.get()._2().last()); } @SuppressWarnings("unused") @Test public void testNewTwoSameTextsNewSinglePicture() throws InterruptedException { IViewText v2 = (IViewText)View2DTK.getFactory().createView(ShapeFactory.createText(ShapeFactory.createPoint(), "coucou")); //$NON-NLS-1$ assertEquals(1, FlyweightThumbnail.images().size()); Option,String,String>> optTuple = FlyweightThumbnail.images().get(((IText)viewTxt.getShape()).getLineColour()+((IText)viewTxt.getShape()).getText()); assertTrue(optTuple.isDefined()); assertEquals(2, optTuple.get()._2().size()); } @Test public void testNewTwoSameTextsRemoveOneStillPicture() { IViewText v2 = (IViewText)View2DTK.getFactory().createView(ShapeFactory.createText(ShapeFactory.createPoint(), "coucou")); //$NON-NLS-1$ FlyweightThumbnail.notifyImageFlushed(viewTxt, ((IText)viewTxt.getShape()).getText(), ((IText)viewTxt.getShape()).getLineColour()); assertEquals(1, FlyweightThumbnail.images().size()); Option,String,String>> optTuple = FlyweightThumbnail.images().get(((IText)v2.getShape()).getLineColour()+((IText)v2.getShape()).getText()); assertTrue(optTuple.isDefined()); assertEquals(1, optTuple.get()._2().size()); assertEquals(v2, optTuple.get()._2().last()); } @Test public void testNewTwoTextsRemoveOneOnePictureRemains() { IViewText v2 = (IViewText)View2DTK.getFactory().createView(ShapeFactory.createText(ShapeFactory.createPoint(), "aaa")); //$NON-NLS-1$ assertEquals(2, FlyweightThumbnail.images().size()); FlyweightThumbnail.notifyImageFlushed(viewTxt, ((IText)viewTxt.getShape()).getText(), ((IText)viewTxt.getShape()).getLineColour()); assertEquals(1, FlyweightThumbnail.images().size()); Option,String,String>> optTuple = FlyweightThumbnail.images().get(((IText)v2.getShape()).getLineColour()+((IText)v2.getShape()).getText()); assertTrue(optTuple.isDefined()); assertEquals(1, optTuple.get()._2().size()); assertEquals(v2, optTuple.get()._2().last()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2D/TestLDotView.java000066400000000000000000000076631321075051700327530ustar00rootroot00000000000000package test.glib.views.java2D; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; import org.junit.Test; public class TestLDotView extends TestLShapeView { @Override @Before public void setUp() { super.setUp(); view = View2DTK.getFactory().createView(ShapeFactory.createDot(ShapeFactory.createPoint())); } private IDot getDotShape() { return (IDot) view.getShape(); } private void setDot(final double x, final double y, final DotStyle style, final double size) { IDot dot = getDotShape(); dot.setPosition(x, y); dot.setDotStyle(style); dot.setDiametre(size); view.update(); } @Override @Test public void testContains1() { setDot(100, 200, DotStyle.DOT, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsASTERISK() { setDot(100, 200, DotStyle.ASTERISK, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsBAR() { setDot(100, 200, DotStyle.BAR, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsOPLUS() { setDot(100, 200, DotStyle.OPLUS, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsOTIMES() { setDot(100, 200, DotStyle.OTIMES, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsPLUS() { setDot(100, 200, DotStyle.PLUS, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsX() { setDot(100, 200, DotStyle.X, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsFDIAMOND() { setDot(100, 200, DotStyle.FDIAMOND, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsFTRIANGLE() { setDot(100, 200, DotStyle.FTRIANGLE, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsFPENTAGON() { setDot(100, 200, DotStyle.FPENTAGON, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsDIAMOND() { setDot(100, 200, DotStyle.DIAMOND, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsO() { setDot(100, 200, DotStyle.O, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsTRIANGLE() { setDot(100, 200, DotStyle.TRIANGLE, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsPENTAGON() { setDot(100, 200, DotStyle.PENTAGON, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Test public void testContainsSQUARE() { setDot(100, 200, DotStyle.SQUARE, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Override @Test public void testContains2() { setDot(100, 200, DotStyle.FSQUARE, 10); assertTrue(view.contains(100, 200)); assertFalse(view.contains(0, 0)); } @Override @Test public void testUpdateDblePathOutside() { //TODO } @Override @Test public void testUpdateDblePathInside() { //TODO } @Override @Test public void testUpdateDblePathMiddle() { //TODO } @Override @Test public void testUpdateGeneralPathInside() { //TODO } @Override @Test public void testUpdateGeneralPathMiddle() { //TODO } @Override @Test public void testUpdateGeneralPathOutside() { //TODO } @Override @Test public void testIntersects() { //TODO } } TestLRectangleView.java000066400000000000000000000005711321075051700340410ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2Dpackage test.glib.views.java2D; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; public class TestLRectangleView extends TestLRectangularView { @Before @Override public void setUp() { super.setUp(); view = View2DTK.getFactory().createView(ShapeFactory.createRectangle()); } } TestLRectangularView.java000066400000000000000000000376451321075051700344200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2Dpackage test.glib.views.java2D; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.awt.geom.Path2D; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import org.junit.Test; public abstract class TestLRectangularView extends TestLShapeView { private IRectangularShape getShape() { return (IRectangularShape) view.getShape(); } @Override@Test public void testContains1() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.contains(null)); assertFalse(view.contains(ShapeFactory.createPoint(Double.NaN, 0))); assertFalse(view.contains(ShapeFactory.createPoint(0, Double.NaN))); assertFalse(view.contains(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0))); assertFalse(view.contains(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY))); } @Override@Test public void testContains2() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.contains(Double.NaN, 0)); assertFalse(view.contains(0, Double.NaN)); assertFalse(view.contains(Double.POSITIVE_INFINITY, 0)); assertFalse(view.contains(0, Double.NEGATIVE_INFINITY)); } @Test@Override public void testIntersects() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(null)); assertFalse(view.intersects(new Rectangle2D.Double(Double.NaN, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -10, Double.NaN, 10))); assertFalse(view.intersects(new Rectangle2D.Double(0, -20, 10, Double.NaN))); assertFalse(view.intersects(new Rectangle2D.Double(0, Double.NaN, 10, 10))); } @Test public void testIntersectsInto() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -20, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(110, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -10, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(0, -20, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -21, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(109, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -29, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(1, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(14, -26, 92, 2))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(14, -26, 92, 2))); } @Test public void testIntersectsOut() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.OUT); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -43, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(113, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -17, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(-3, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -42, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(112, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -18, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(-2, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(10, -30, 100, 10))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(10, -30, 100, 10))); } @Test public void testIntersectsMiddle() { IRectangularShape model = getShape(); final double thickness = 3.; final double height = 10.; model.setPosition(10, -20); model.setWidth(100); model.setHeight(height); model.setThickness(thickness); model.setBordersPosition(BorderPos.MID); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -42, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(112, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -18, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(-2, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -41, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(111, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -19, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(-1, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(12, -28, 96, 6))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(12, -28, 96, 6))); } @Test public void testIntersectsDbleMiddle() { //TODO } @Test public void testIntersectsDbleInner() { //TODO } @Test public void testIntersectsDbleOuter() { //TODO } @Override@Test public void testUpdateDblePathInside() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 10.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setDbleBordSep(dble); model.setHeight(height); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.+thickness+dble/2., xMin,0.0001); assertEquals(20.-height+thickness+dble/2., yMin,0.0001); assertEquals(90.-thickness-dble/2., xMax,0.0001); assertEquals(20.-thickness-dble/2., yMax,0.0001); } @Override@Test public void testUpdateDblePathMiddle() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 10.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setDbleBordSep(dble); model.setHeight(height); model.setBordersPosition(BorderPos.MID); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10., xMin,0.0001); assertEquals(20.-height, yMin,0.0001); assertEquals(90., xMax,0.0001); assertEquals(20., yMax,0.0001); } @Override@Test public void testUpdateDblePathOutside() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 10.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setDbleBordSep(dble); model.setHeight(height); model.setBordersPosition(BorderPos.OUT); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.-thickness-dble/2., xMin,0.0001); assertEquals(20.-height-thickness-dble/2., yMin,0.0001); assertEquals(90.+thickness+dble/2., xMax,0.0001); assertEquals(20.+thickness+dble/2., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathInside() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 5.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setHeight(height); model.setBordersPosition(BorderPos.INTO); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.+thickness/2., xMin,0.0001); assertEquals(20.-height+thickness/2., yMin,0.0001); assertEquals(90.-thickness/2., xMax,0.0001); assertEquals(20.-thickness/2., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathMiddle() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 5.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setHeight(height); model.setBordersPosition(BorderPos.MID); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10., xMin,0.0001); assertEquals(20.-height, yMin,0.0001); assertEquals(90., xMax,0.0001); assertEquals(20., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathOutside() { IRectangularShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double height = 5.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); model.setPosition(-10, 20); model.setWidth(100); model.setThickness(thickness); model.setHeight(height); model.setBordersPosition(BorderPos.OUT); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.-thickness/2., xMin,0.0001); assertEquals(20.-height-thickness/2., yMin,0.0001); assertEquals(90.+thickness/2., xMax,0.0001); assertEquals(20.+thickness/2., yMax,0.0001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2D/TestLShapeView.java000066400000000000000000000034131321075051700332520ustar00rootroot00000000000000package test.glib.views.java2D; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.glib.views.Java2D.impl.LViewsFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; import org.junit.Test; import test.glib.views.TestAbstractView; public abstract class TestLShapeView extends TestAbstractView { public Graphics2D g; @Before public void setUp() { FlyweightThumbnail.images().clear(); FlyweightThumbnail.setThread(false); View2DTK.setFactory(new LViewsFactory()); BufferedImage bufferImage = new BufferedImage(2, 2, BufferedImage.TYPE_INT_RGB); g = bufferImage.createGraphics(); bufferImage.flush(); } @Test public abstract void testContains1(); @Test public abstract void testContains2(); @Test public abstract void testUpdateDblePathOutside(); @Test public abstract void testUpdateDblePathInside(); @Test public abstract void testUpdateDblePathMiddle(); @Test public abstract void testUpdateGeneralPathInside(); @Test public abstract void testUpdateGeneralPathMiddle(); @Test public abstract void testUpdateGeneralPathOutside(); @Test public abstract void testIntersects(); @Test public void testPaint() { view.paint(g, null); } @Test public void testPaintBorders() { view.paintBorders(g); } @Test public void testPaintShadow() { view.paintShadow(g); } @Test public void testPaintShowPointsLines() { view.paintShowPointsLines(g); } @Test public void testPaintShowPointsDots() { view.paintShowPointsDots(g); } @Test public void testPaintFilling() { view.paintFilling(g); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2D/TestLSquareView.java000066400000000000000000000005561321075051700334570ustar00rootroot00000000000000package test.glib.views.java2D; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; public class TestLSquareView extends TestLSquaredView { @Before @Override public void setUp() { super.setUp(); view = View2DTK.getFactory().createView(ShapeFactory.createSquare()); } } TestLSquaredView.java000066400000000000000000000365261321075051700335520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2Dpackage test.glib.views.java2D; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.awt.geom.Path2D; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape; import org.junit.Test; public abstract class TestLSquaredView extends TestLShapeView { private ISquaredShape getShape() { return (ISquaredShape) view.getShape(); } @Override@Test public void testContains1() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.contains(null)); assertFalse(view.contains(ShapeFactory.createPoint(Double.NaN, 0))); assertFalse(view.contains(ShapeFactory.createPoint(0, Double.NaN))); assertFalse(view.contains(ShapeFactory.createPoint(Double.POSITIVE_INFINITY, 0))); assertFalse(view.contains(ShapeFactory.createPoint(0, Double.NEGATIVE_INFINITY))); } @Override@Test public void testContains2() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.contains(Double.NaN, 0)); assertFalse(view.contains(0, Double.NaN)); assertFalse(view.contains(Double.POSITIVE_INFINITY, 0)); assertFalse(view.contains(0, Double.NEGATIVE_INFINITY)); } @Test@Override public void testIntersects() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(null)); assertFalse(view.intersects(new Rectangle2D.Double(Double.NaN, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -10, Double.NaN, 10))); assertFalse(view.intersects(new Rectangle2D.Double(0, -20, 10, Double.NaN))); assertFalse(view.intersects(new Rectangle2D.Double(0, Double.NaN, 10, 10))); } @Test public void testIntersectsInto() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -20, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(110, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -10, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(0, -20, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -21, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(109, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -29, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(1, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(14, -26, 92, 2))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(14, -26, 92, 2))); } @Test public void testIntersectsOut() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.OUT); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -43, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(113, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -17, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(-3, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -42, 100, 100))); assertTrue(view.intersects(new Rectangle2D.Double(112, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -18, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(-2, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(10, -30, 100, 10))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(10, -30, 100, 10))); } @Test public void testIntersectsMiddle() { ISquaredShape model = getShape(); final double thickness = 3.; model.setPosition(10, -20); model.setWidth(100); model.setThickness(thickness); model.setBordersPosition(BorderPos.MID); model.setHasDbleBord(false); view.update(); assertFalse(view.intersects(new Rectangle2D.Double(15, -42, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(112, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(15, -18, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(-2, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -41, 100, 100))); assertTrue(view.intersects(new Rectangle2D.Double(111, -25, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(15, -19, 10, 10))); assertTrue(view.intersects(new Rectangle2D.Double(-1, -25, 10, 10))); assertFalse(view.intersects(new Rectangle2D.Double(12, -28, 96, 6))); model.setFilled(true); assertTrue(view.intersects(new Rectangle2D.Double(12, -28, 96, 6))); } @Test public void testIntersectsDbleMiddle() { //TODO } @Test public void testIntersectsDbleInner() { //TODO } @Test public void testIntersectsDbleOuter() { //TODO } @Override@Test public void testUpdateDblePathInside() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setDbleBordSep(dble); model.setBordersPosition(BorderPos.INTO); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.+thickness+dble/2., xMin,0.0001); assertEquals(20.-width+thickness+dble/2., yMin,0.0001); assertEquals(90.-thickness-dble/2., xMax,0.0001); assertEquals(20.-thickness-dble/2., yMax,0.0001); } @Override@Test public void testUpdateDblePathMiddle() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setDbleBordSep(dble); model.setBordersPosition(BorderPos.MID); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10., xMin,0.0001); assertEquals(20.-width, yMin,0.0001); assertEquals(90., xMax,0.0001); assertEquals(20., yMax,0.0001); } @Override@Test public void testUpdateDblePathOutside() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; final double dble = 1.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setDbleBordSep(dble); model.setBordersPosition(BorderPos.OUT); model.setHasDbleBord(true); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.-thickness-dble/2., xMin,0.0001); assertEquals(20.-width-thickness-dble/2., yMin,0.0001); assertEquals(90.+thickness+dble/2., xMax,0.0001); assertEquals(20.+thickness+dble/2., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathInside() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setBordersPosition(BorderPos.INTO); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.+thickness/2., xMin,0.0001); assertEquals(20.-width+thickness/2., yMin,0.0001); assertEquals(90.-thickness/2., xMax,0.0001); assertEquals(20.-thickness/2., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathMiddle() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setBordersPosition(BorderPos.MID); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10., xMin,0.0001); assertEquals(20.-width, yMin,0.0001); assertEquals(90., xMax,0.0001); assertEquals(20., yMax,0.0001); } @Override@Test public void testUpdateGeneralPathOutside() { ISquaredShape model = getShape(); Path2D path; PathIterator pi; double[] coords = new double[6]; final double thickness = 3.; List xs = new ArrayList<>(); List ys = new ArrayList<>(); double width = 100; model.setPosition(-10, 20); model.setWidth(width); model.setThickness(thickness); model.setBordersPosition(BorderPos.OUT); view.update(); path = view.getPath(); pi = path.getPathIterator(null); assertEquals(PathIterator.SEG_MOVETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_LINETO, pi.currentSegment(coords)); xs.add(coords[0]); ys.add(coords[1]); pi.next(); assertEquals(PathIterator.SEG_CLOSE, pi.currentSegment(coords)); double xMin = Double.MAX_VALUE, yMin = Double.MAX_VALUE; double xMax = Double.MIN_VALUE, yMax = Double.MIN_VALUE; int i=0, size = xs.size(); double val; while(ixMax) xMax = val; val = ys.get(i); if(valyMax) yMax = val; i++; } assertEquals(-10.-thickness/2., xMin,0.0001); assertEquals(20.-width-thickness/2., yMin,0.0001); assertEquals(90.+thickness/2., xMax,0.0001); assertEquals(20.+thickness/2., yMax,0.0001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/java2D/TestViewFactory.java000066400000000000000000000113161321075051700335060ustar00rootroot00000000000000package test.glib.views.java2D; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.views.Java2D.impl.LViewsFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewShape; import net.sf.latexdraw.glib.views.Java2D.interfaces.IViewsFactory; import net.sf.latexdraw.glib.views.Java2D.interfaces.View2DTK; import org.junit.Before; import org.junit.Test; public class TestViewFactory { protected IViewsFactory viewFac; static { View2DTK.setFactory(new LViewsFactory()); } @Before public void setUp() { viewFac = View2DTK.getFactory(); } @Test public void testCreateGroupView() { IGroup gp = ShapeFactory.createGroup(); gp.addShape(ShapeFactory.createText()); IViewShape view = viewFac.createView(gp); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("group")); //$NON-NLS-1$ } @Test public void testCreateTextView() { IViewShape view = viewFac.createView(ShapeFactory.createText()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("text")); //$NON-NLS-1$ } @Test public void testCreateArcCircleView() { IViewShape view = viewFac.createView(ShapeFactory.createCircleArc()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("circlearc")); //$NON-NLS-1$ } @Test public void testCreateRectangleView() { IViewShape view = viewFac.createView(ShapeFactory.createRectangle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("rectangle")); //$NON-NLS-1$ } @Test public void testCreateSquareView() { IViewShape view = viewFac.createView(ShapeFactory.createSquare()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("square")); //$NON-NLS-1$ } @Test public void testCreateEllipseView() { IViewShape view = viewFac.createView(ShapeFactory.createEllipse()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("ellipse")); //$NON-NLS-1$ } @Test public void testCreateCircleView() { IViewShape view = viewFac.createView(ShapeFactory.createCircle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("circle")); //$NON-NLS-1$ } @Test public void testCreateGridView() { IViewShape view = viewFac.createView(ShapeFactory.createGrid(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("grid")); //$NON-NLS-1$ } @Test public void testCreateAxesView() { IViewShape view = viewFac.createView(ShapeFactory.createAxes(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("axes")); //$NON-NLS-1$ } @Test public void testCreatePolygonView() { IViewShape view = viewFac.createView(ShapeFactory.createPolygon()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("polygon")); //$NON-NLS-1$ } @Test public void testCreatePolylineView() { IViewShape view = viewFac.createView(ShapeFactory.createPolyline()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("polyline")); //$NON-NLS-1$ } @Test public void testCreateTriangleView() { IViewShape view = viewFac.createView(ShapeFactory.createTriangle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("triangle")); //$NON-NLS-1$ } @Test public void testCreateRhombusView() { IViewShape view = viewFac.createView(ShapeFactory.createRhombus()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("rhombus")); //$NON-NLS-1$ } @Test public void testCreateFreehandView() { IViewShape view = viewFac.createView(ShapeFactory.createFreeHand()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("freehand")); //$NON-NLS-1$ } @Test public void testCreatePictureView() { IViewShape view = viewFac.createView(ShapeFactory.createPicture(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("picture")); //$NON-NLS-1$ } @Test public void testCreateDotView() { IViewShape view = viewFac.createView(ShapeFactory.createDot(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("dot")); //$NON-NLS-1$ } @Test public void testCreateBezierCurveView() { IViewShape view = viewFac.createView(ShapeFactory.createBezierCurve()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("beziercurve")); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/pst/000077500000000000000000000000001321075051700272365ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/glib/views/pst/TestPSTViewFactory.java000066400000000000000000000111111321075051700335650ustar00rootroot00000000000000package test.glib.views.pst; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.views.pst.PSTViewsFactory; public class TestPSTViewFactory { @Test public void testCreateGroupViewPST() { IGroup gp = ShapeFactory.createGroup(); gp.addShape(ShapeFactory.createText()); Object view = PSTViewsFactory.INSTANCE.createView(gp); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("group")); //$NON-NLS-1$ } @Test public void testCreateTextViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createText()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("text")); //$NON-NLS-1$ } @Test public void testCreateArcCircleViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createCircleArc()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("arc")); //$NON-NLS-1$ } @Test public void testCreateRectangleViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createRectangle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("rect")); //$NON-NLS-1$ } @Test public void testCreateSquareViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createSquare()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("square")); //$NON-NLS-1$ } @Test public void testCreateEllipseViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createEllipse()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("ellipse")); //$NON-NLS-1$ } @Test public void testCreateCircleViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createCircle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("circle")); //$NON-NLS-1$ } @Test public void testCreateGridViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createGrid(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("grid")); //$NON-NLS-1$ } @Test public void testCreateAxesViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createAxes(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("axes")); //$NON-NLS-1$ } @Test public void testCreatePolygonViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createPolygon()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("polygon")); //$NON-NLS-1$ } @Test public void testCreatePolylineViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createPolyline()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("lines")); //$NON-NLS-1$ } @Test public void testCreateTriangleViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createTriangle()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("triangle")); //$NON-NLS-1$ } @Test public void testCreateRhombusViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createRhombus()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("rhombus")); //$NON-NLS-1$ } @Test public void testCreateFreehandViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createFreeHand()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("freehand")); //$NON-NLS-1$ } @Test public void testCreatePictureViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createPicture(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("picture")); //$NON-NLS-1$ } @Test public void testCreateDotViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createDot(ShapeFactory.createPoint())); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("dot")); //$NON-NLS-1$ } @Test public void testCreateBezierCurveViewPST() { Object view = PSTViewsFactory.INSTANCE.createView(ShapeFactory.createBezierCurve()); assertNotNull(view); assertTrue(view.getClass().getName().toLowerCase().contains("beziercurve")); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/instruments/000077500000000000000000000000001321075051700267515ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/instruments/TestInstrument.java000066400000000000000000000020071321075051700326230ustar00rootroot00000000000000package test.instruments; import org.junit.Test; import org.malai.instrument.Instrument; import org.malai.instrument.Interactor; import java.util.List; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public abstract class TestInstrument { protected T instrument; @Test public void testNotNoLink() { assertTrue(instrument.getNbInteractors()==0); instrument.setActivated(true); assertTrue(instrument.getNbInteractors()>0); } @Test public void testActivation() { instrument.setActivated(true); assertTrue(instrument.isActivated()); instrument.setActivated(false); assertFalse(instrument.isActivated()); } public Interactor getLink(final String nameClassInteractor) { Interactor link = null; List interactors = instrument.getInteractors(); for(int i=0; i { protected LCanvas canvas; @Before @SuppressWarnings("unused") public void setUp() { View2DTK.setFactory(new LViewsFactory()); IDrawing drawing = ShapeFactory.createDrawing(); MLayeredPane layers = new MLayeredPane(false, false); canvas = new LCanvas(drawing); LMagneticGrid grid = new LMagneticGrid(canvas); WidgetZoomer zoomer = new WidgetZoomer(canvas, true, true, null, "", null, "", true); //$NON-NLS-1$ //$NON-NLS-2$ instrument = new Pencil(canvas, new TextSetter(layers), layers, new JLabel()); instrument.addEventable(canvas); } @Test public void testExceptionConstructor() {//FIXME // try { // new Pencil(null, new Zoomer(new LCanvas())); // fail(); // }catch(IllegalArgumentException ex) { /* ok */ } // try { // new Pencil(null, null); // fail(); // }catch(IllegalArgumentException ex) { /* ok */ } // try { // new Pencil(new LDrawing(), null); // fail(); // }catch(IllegalArgumentException ex) { /* ok */ } } @Test public void testLinkDnD2AddShape_PressEventCreatesRectangle() { instrument.setActivated(true); double x = 100.+canvas.getOrigin().getX(), y = 300.+canvas.getOrigin().getY(); changePencilShapeAttributes(); instrument.setCurrentChoice(EditionChoice.RECT); canvas.getEventManager().mousePressed(new MouseEvent(canvas, 0, 100, 0, (int)x, (int)y, 0, 0, 0, false, MouseEvent.BUTTON1)); Interactor link = getLink("DnD2AddShape"); //$NON-NLS-1$ assertTrue(link.getAction() instanceof AddShape); assertTrue(((AddShape)link.getAction()).shape().get() instanceof IRectangle); IRectangle rec = (IRectangle) ((AddShape)link.getAction()).shape().get(); checkShape(rec); HelperTest.assertEqualsDouble(100., rec.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(300., rec.getTopLeftPoint().getY()); assertTrue(rec.getWidth()>0); assertTrue(rec.getHeight()>0); } @Test public void testLinkDnD2AddShape_PressEventCreatesEllipse() { instrument.setActivated(true); double x = 100.+canvas.getOrigin().getX(), y = 300.+canvas.getOrigin().getY(); changePencilShapeAttributes(); instrument.setCurrentChoice(EditionChoice.ELLIPSE); canvas.getEventManager().mousePressed(new MouseEvent(canvas, 0, 100, 0, (int)x, (int)y, 0, 0, 0, false, MouseEvent.BUTTON1)); Interactor link = getLink("DnD2AddShape"); //$NON-NLS-1$ assertTrue(link.getAction() instanceof AddShape); assertTrue(((AddShape)link.getAction()).shape().get() instanceof IEllipse); IEllipse ell = (IEllipse) ((AddShape)link.getAction()).shape().get(); checkShape(ell); HelperTest.assertEqualsDouble(100., ell.getTopLeftPoint().getX()); HelperTest.assertEqualsDouble(300., ell.getTopLeftPoint().getY()); assertTrue(ell.getWidth()>0); assertTrue(ell.getHeight()>0); } @Test public void testLinkDnD2AddShape_PressEventCreatesCircle() { instrument.setActivated(true); double x = 100.+canvas.getOrigin().getX(), y = 300.+canvas.getOrigin().getY(); changePencilShapeAttributes(); instrument.setCurrentChoice(EditionChoice.CIRCLE); canvas.getEventManager().mousePressed(new MouseEvent(canvas, 0, 100, 0, (int)x, (int)y, 0, 0, 0, false, MouseEvent.BUTTON1)); Interactor link = getLink("DnD2AddShape"); //$NON-NLS-1$ assertTrue(link.getAction() instanceof AddShape); assertTrue(((AddShape)link.getAction()).shape().get() instanceof ICircle); ICircle circle = (ICircle) ((AddShape)link.getAction()).shape().get(); checkShape(circle); HelperTest.assertEqualsDouble(100., circle.getGravityCentre().getX()); HelperTest.assertEqualsDouble(300., circle.getGravityCentre().getY()); assertTrue(circle.getWidth()>0); assertTrue(circle.getHeight()>0); } @Test public void testLinkDnD2AddShape_PressEventCreatesSquare() { instrument.setActivated(true); double x = 100.+canvas.getOrigin().getX(), y = 300.+canvas.getOrigin().getY(); changePencilShapeAttributes(); instrument.setCurrentChoice(EditionChoice.SQUARE); canvas.getEventManager().mousePressed(new MouseEvent(canvas, 0, 100, 0, (int)x, (int)y, 0, 0, 0, false, MouseEvent.BUTTON1)); Interactor link = getLink("DnD2AddShape"); //$NON-NLS-1$ assertTrue(link.getAction() instanceof AddShape); assertTrue(((AddShape)link.getAction()).shape().get() instanceof ISquare); ISquare square = (ISquare) ((AddShape)link.getAction()).shape().get(); checkShape(square); HelperTest.assertEqualsDouble(100., square.getGravityCentre().getX()); HelperTest.assertEqualsDouble(300., square.getGravityCentre().getY()); assertTrue(square.getWidth()>0); assertTrue(square.getHeight()>0); } public void changePencilShapeAttributes() { instrument.setActivated(true); instrument._groupParams().setLineColour(Color.BLUE); instrument._groupParams().setThickness(13.); instrument._groupParams().setBordersPosition(BorderPos.OUT); instrument._groupParams().setDotStyle(DotStyle.BAR); instrument._groupParams().setDiametre(24.); instrument._groupParams().setHasDbleBord(true); instrument._groupParams().setDbleBordCol(Color.CYAN); instrument._groupParams().setHasShadow(true); instrument._groupParams().setFillingCol(Color.MAGENTA); instrument._groupParams().setFillingStyle(FillingStyle.GRAD); instrument._groupParams().setGradColEnd(Color.RED); instrument._groupParams().setGradColStart(Color.YELLOW); instrument._groupParams().setHatchingsCol(Color.GRAY); instrument._groupParams().setLineStyle(LineStyle.DOTTED); instrument._groupParams().setShadowCol(Color.GREEN); } public void checkShape(@SuppressWarnings("unused") final IShape shape) {//FIXME // assertEquals(instrument.getLineColor(), shape.getLineColour()); // assertEquals(instrument.getThickness(), shape.getThickness()); // if(shape.isBordersMovable()) // assertEquals(instrument.getBorderPosition(), shape.getBordersPosition()); // if(shape instanceof IDot) { // assertEquals(instrument.getDotStyle(), ((IDot)shape).getDotStyle()); // assertEquals(instrument.getDotSize(), ((IDot)shape).getRadius()*2.); // } // if(shape.isDbleBorderable()) { // assertEquals(instrument.isDoubleBorder(), shape.hasDbleBord()); // assertEquals(instrument.getDoubleBorderColor(), shape.getDbleBordCol()); // } // if(shape.isFillable()) { // assertEquals(instrument.getFillingColor(), shape.getFillingCol()); // // if(shape.isInteriorStylable()) { // assertEquals(instrument.getFillingStyle(), shape.getFillingStyle()); // assertEquals(instrument.getGradEndColor(), shape.getGradColEnd()); // assertEquals(instrument.getGradStartColor(), shape.getGradColStart()); // assertEquals(instrument.getHatchingsColor(), shape.getHatchingsCol()); // } // } // // if(shape.isLineStylable()) // assertEquals(instrument.getLineStyle(), shape.getLineStyle()); // if(shape.isShadowable()) { // assertEquals(instrument.getShadowColor(), shape.getShadowCol()); // assertEquals(instrument.isShadow(), shape.hasShadow()); // } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/000077500000000000000000000000001321075051700256525ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/TestCodeParser.java000066400000000000000000000106141321075051700314060ustar00rootroot00000000000000package test.parser; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.CodeParser; import org.junit.Test; public abstract class TestCodeParser { protected CodeParser parser; protected CodeParser parser2; @Test public void testInitialise() { parser.setPosition(10); parser.initialise(); assertTrue(parser.getPosition()==0); } @Test public void testGetCharAt() { parser.setCode("test"); //$NON-NLS-1$ 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)); } @Test public void testGetCode() { String code = "this is my code"; //$NON-NLS-1$ parser.setCode(code); assertEquals(parser.getCode(), code); code = ""; //$NON-NLS-1$ parser.setCode(code); assertEquals(parser.getCode(), code); } @Test public void testSetCode() { String code = "a piece of code"; //$NON-NLS-1$ parser.setPosition(10); parser.setCode(code); assertTrue(parser.getPosition()==0); parser.setCode(null); assertEquals(parser.getCode(), code); } @Test public void testNextChar() { parser.setCode("code"); //$NON-NLS-1$ 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); } @Test public void testGetChar() { parser.setCode("my code"); //$NON-NLS-1$ 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); } @Test public void testIsEOC() { parser.setCode(""); //$NON-NLS-1$ assertTrue(parser.isEOC()); parser.setCode("aa"); //$NON-NLS-1$ assertFalse(parser.isEOC()); parser.nextChar(); assertFalse(parser.isEOC()); parser.nextChar(); assertTrue(parser.isEOC()); parser.setPosition(100); assertTrue(parser.isEOC()); } @Test public void testGetPosition() { parser.initialise(); assertTrue(parser.getPosition()==0); parser.setPosition(10); assertTrue(parser.getPosition()==10); parser.setPosition(100); assertTrue(parser.getPosition()==100); } @Test public abstract void testSkipComment() throws ParseException; @Test public abstract void testSkipWSP() throws ParseException; @Test public abstract void testParse() throws ParseException; @Test public void testIsEOL() { parser.setCode(""); //$NON-NLS-1$ assertFalse(parser.isEOL()); parser.setCode("a"); //$NON-NLS-1$ assertFalse(parser.isEOL()); parser.nextChar(); assertFalse(parser.isEOL()); parser.setCode("a\n"); //$NON-NLS-1$ assertFalse(parser.isEOL()); parser.nextChar(); assertTrue(parser.isEOL()); parser.setCode("a\r"); //$NON-NLS-1$ assertFalse(parser.isEOL()); parser.nextChar(); assertTrue(parser.isEOL()); parser.setCode("a\r\n"); //$NON-NLS-1$ assertFalse(parser.isEOL()); parser.nextChar(); assertTrue(parser.isEOL()); assertTrue(parser.getPosition()==2); } @Test public void testSetPosition() { parser.setCode(""); //$NON-NLS-1$ 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()); } @Test 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()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/TestCssColor.java000077500000000000000000001060241321075051700311120ustar00rootroot00000000000000package test.parser; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.awt.Color; import net.sf.latexdraw.parsers.svg.CSSColors; import org.junit.Test; public class TestCssColor { @Test public void testGetColour() { assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ALICEBLUE_NAME), CSSColors.CSS_ALICEBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ANTIQUEWHITE_NAME), CSSColors.CSS_ANTIQUEWHITE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_AQUA_NAME), CSSColors.CSS_AQUA_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_AQUAMARINE_NAME), CSSColors.CSS_AQUAMARINE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_AZURE_NAME), CSSColors.CSS_AZURE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BEIGE_NAME), CSSColors.CSS_BEIGE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BISQUE_NAME), CSSColors.CSS_BISQUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BLACK_NAME), CSSColors.CSS_BLACK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BLANCHEDALMOND_NAME), CSSColors.CSS_BLANCHEDALMOND_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BLUE_NAME), CSSColors.CSS_BLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BLUEVIOLET_NAME), CSSColors.CSS_BLUEVIOLET_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BROWN_NAME), CSSColors.CSS_BROWN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_BURLYWOOD_NAME), CSSColors.CSS_BURLYWOOD_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CADETBLUE_NAME), CSSColors.CSS_CADETBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CHARTREUSE_NAME), CSSColors.CSS_CHARTREUSE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CHOCOLATE_NAME), CSSColors.CSS_CHOCOLATE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CORAL_NAME), CSSColors.CSS_CORAL_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CORNFLOWERBLUE_NAME), CSSColors.CSS_CORNFLOWERBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CORNSILK_NAME), CSSColors.CSS_CORNSILK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CRIMSON_NAME), CSSColors.CSS_CRIMSON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_CYAN_NAME), CSSColors.CSS_CYAN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKBLUE_NAME), CSSColors.CSS_DARKBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKCYAN_NAME), CSSColors.CSS_DARKCYAN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKGOLDENROD_NAME), CSSColors.CSS_DARKGOLDENROD_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKGRAY_NAME), CSSColors.CSS_DARKGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKGREEN_NAME), CSSColors.CSS_DARKGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKGREY_NAME), CSSColors.CSS_DARKGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKKHAKI_NAME), CSSColors.CSS_DARKKHAKI_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKMAGENTA_NAME), CSSColors.CSS_DARKMAGENTA_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKOLIVEGREEN_NAME), CSSColors.CSS_DARKOLIVEGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKORANGE_NAME), CSSColors.CSS_DARKORANGE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKORCHID_NAME), CSSColors.CSS_DARKORCHID_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKRED_NAME), CSSColors.CSS_DARKRED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKSALMON_NAME), CSSColors.CSS_DARKSALMON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKSEAGREEN_NAME), CSSColors.CSS_DARKSEAGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKSLATEBLUE_NAME), CSSColors.CSS_DARKSLATEBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKSLATEGRAY_NAME), CSSColors.CSS_DARKSLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKSLATEGREY_NAME), CSSColors.CSS_DARKSLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKTURQUOISE_NAME), CSSColors.CSS_DARKTURQUOISE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DARKVIOLET_NAME), CSSColors.CSS_DARKVIOLET_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DEEPPINK_NAME), CSSColors.CSS_DEEPPINK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DEEPSKYBLUE_NAME), CSSColors.CSS_DEEPSKYBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DIMGRAY_NAME), CSSColors.CSS_DIMGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DIMGREY_NAME), CSSColors.CSS_DIMGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_DODGERBLUE_NAME), CSSColors.CSS_DODGERBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_FIREBRICK_NAME), CSSColors.CSS_FIREBRICK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_FLORALWHITE_NAME), CSSColors.CSS_FLORALWHITE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_FORESTGREEN_NAME), CSSColors.CSS_FORESTGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_FUCHSIA_NAME), CSSColors.CSS_FUCHSIA_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GAINSBORO_NAME), CSSColors.CSS_GAINSBORO_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GHOSTWHITE_NAME), CSSColors.CSS_GHOSTWHITE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GOLD_NAME), CSSColors.CSS_GOLD_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GOLDENROD_NAME), CSSColors.CSS_GOLDENROD_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GRAY_NAME), CSSColors.CSS_GRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GREEN_NAME), CSSColors.CSS_GREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GREENYELLOW_NAME), CSSColors.CSS_GREENYELLOW_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_GREY_NAME), CSSColors.CSS_GRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_HONEYDEW_NAME), CSSColors.CSS_HONEYDEW_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_HOTPINK_NAME), CSSColors.CSS_HOTPINK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_INDIGO_NAME), CSSColors.CSS_INDIGO_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_IVORY_NAME), CSSColors.CSS_IVORY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_INDIANRED_NAME), CSSColors.CSS_INDIANRED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_KHAKI_NAME), CSSColors.CSS_KHAKI_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LAVENDER_NAME), CSSColors.CSS_LAVENDER_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LAVENDERBLUSH_NAME), CSSColors.CSS_LAVENDERBLUSH_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LAWNGREEN_NAME), CSSColors.CSS_LAWNGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LEMONCHIFFON_NAME), CSSColors.CSS_LEMONCHIFFON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTBLUE_NAME), CSSColors.CSS_LIGHTBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTCORAL_NAME), CSSColors.CSS_LIGHTCORAL_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTCYAN_NAME), CSSColors.CSS_LIGHTCYAN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTGOLDENRODYELLOW_NAME), CSSColors.CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTGRAY_NAME), CSSColors.CSS_LIGHTGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTGREEN_NAME), CSSColors.CSS_LIGHTGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTGREY_NAME), CSSColors.CSS_LIGHTGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTPINK_NAME), CSSColors.CSS_LIGHTPINK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSALMON_NAME), CSSColors.CSS_LIGHTSALMON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSEAGREEN_NAME), CSSColors.CSS_LIGHTSEAGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSKYBLUE_NAME), CSSColors.CSS_LIGHTSKYBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSLATEGRAY_NAME), CSSColors.CSS_LIGHTSLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSLATEGREY_NAME), CSSColors.CSS_LIGHTSLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTSTEELBLUE_NAME), CSSColors.CSS_LIGHTSTEELBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIGHTYELLOW_NAME), CSSColors.CSS_LIGHTYELLOW_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIME_NAME), CSSColors.CSS_LIME_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_LIMEGREEN_NAME), CSSColors.CSS_LIMEGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MAGENTA_NAME), CSSColors.CSS_MAGENTA_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MAROON_NAME), CSSColors.CSS_MAROON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMAQUAMARINE_NAME), CSSColors.CSS_MEDIUMAQUAMARINE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMBLUE_NAME), CSSColors.CSS_MEDIUMBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMORCHID_NAME), CSSColors.CSS_MEDIUMORCHID_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMPURPLE_NAME), CSSColors.CSS_MEDIUMPURPLE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMSEAGREEN_NAME), CSSColors.CSS_MEDIUMSEAGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMSLATEBLUE_NAME), CSSColors.CSS_MEDIUMSLATEBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMSPRINGGREEN_NAME), CSSColors.CSS_MEDIUMSPRINGGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMTURQUOISE_NAME), CSSColors.CSS_MEDIUMTURQUOISE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MEDIUMVIOLETRED_NAME), CSSColors.CSS_MEDIUMVIOLETRED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MIDNIGHTBLUE_NAME), CSSColors.CSS_MIDNIGHTBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MINTCREAM_NAME), CSSColors.CSS_MINTCREAM_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MISTYROSE_NAME), CSSColors.CSS_MISTYROSE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_MOCCASIN_NAME), CSSColors.CSS_MOCCASIN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_NAVAJOWHITE_NAME), CSSColors.CSS_NAVAJOWHITE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_NAVY_NAME), CSSColors.CSS_NAVY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_OLDLACE_NAME), CSSColors.CSS_OLDLACE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_OLIVEDRAB_NAME), CSSColors.CSS_OLIVEDRAB_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_OLIVE_NAME), CSSColors.CSS_OLIVE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ORANGERED_NAME), CSSColors.CSS_ORANGERED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ORANGE_NAME), CSSColors.CSS_ORANGE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ORCHID_NAME), CSSColors.CSS_ORCHID_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PALEGOLDENROD_NAME), CSSColors.CSS_PALEGOLDENROD_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PALEGREEN_NAME), CSSColors.CSS_PALEGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PALETURQUOISE_NAME), CSSColors.CSS_PALETURQUOISE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PALEVIOLETRED_NAME), CSSColors.CSS_PALEVIOLETRED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PAPAYAWHIP_NAME), CSSColors.CSS_PAPAYAWHIP_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PEACHPUFF_NAME), CSSColors.CSS_PEACHPUFF_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PERU_NAME), CSSColors.CSS_PERU_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PINK_NAME), CSSColors.CSS_PINK_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PLUM_NAME), CSSColors.CSS_PLUM_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_POWDERBLUE_NAME), CSSColors.CSS_POWDERBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_PURPLE_NAME), CSSColors.CSS_PURPLE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_RED_NAME), CSSColors.CSS_RED_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ROSYBROWN_NAME), CSSColors.CSS_ROSYBROWN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_ROYALBLUE_NAME), CSSColors.CSS_ROYALBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SADDLEBROWN_NAME), CSSColors.CSS_SADDLEBROWN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SALMON_NAME), CSSColors.CSS_SALMON_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SANDYBROWN_NAME), CSSColors.CSS_SANDYBROWN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SEAGREEN_NAME), CSSColors.CSS_SEAGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SEASHELL_NAME), CSSColors.CSS_SEASHELL_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SIENNA_NAME), CSSColors.CSS_SIENNA_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SILVER_NAME), CSSColors.CSS_SILVER_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SKYBLUE_NAME), CSSColors.CSS_SKYBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SLATEBLUE_NAME), CSSColors.CSS_SLATEBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SLATEGRAY_NAME), CSSColors.CSS_SLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SLATEGREY_NAME), CSSColors.CSS_SLATEGRAY_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SNOW_NAME), CSSColors.CSS_SNOW_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_SPRINGGREEN_NAME), CSSColors.CSS_SPRINGGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_STEELBLUE_NAME), CSSColors.CSS_STEELBLUE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_TAN_NAME), CSSColors.CSS_TAN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_TEAL_NAME), CSSColors.CSS_TEAL_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_THISTLE_NAME), CSSColors.CSS_THISTLE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_TOMATO_NAME), CSSColors.CSS_TOMATO_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_TURQUOISE_NAME), CSSColors.CSS_TURQUOISE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_VIOLET_NAME), CSSColors.CSS_VIOLET_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_WHEAT_NAME), CSSColors.CSS_WHEAT_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_WHITESMOKE_NAME), CSSColors.CSS_WHITESMOKE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_WHITE_NAME), CSSColors.CSS_WHITE_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor("white"), CSSColors.CSS_WHITE_RGB_VALUE); //$NON-NLS-1$ assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_YELLOWGREEN_NAME), CSSColors.CSS_YELLOWGREEN_RGB_VALUE); assertEquals(CSSColors.INSTANCE.getColor(CSSColors.CSS_YELLOW_NAME), CSSColors.CSS_YELLOW_RGB_VALUE); assertNull(CSSColors.INSTANCE.getColor(null)); assertNull(CSSColors.INSTANCE.getColor("")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.getColor("fjdsfijsdofijdsofijertngf")); //$NON-NLS-1$ } @Test public void testGetColorName() { assertNull(CSSColors.INSTANCE.getColorName(null, true)); assertNull(CSSColors.INSTANCE.getColorName(new Color(3, 2, 1), false)); assertNotNull(CSSColors.INSTANCE.getColorName(new Color(4, 2, 1), true)); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ALICEBLUE_RGB_VALUE, false), CSSColors.CSS_ALICEBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ANTIQUEWHITE_RGB_VALUE, false), CSSColors.CSS_ANTIQUEWHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_AQUAMARINE_RGB_VALUE, false), CSSColors.CSS_AQUAMARINE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_AZURE_RGB_VALUE, false), CSSColors.CSS_AZURE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BEIGE_RGB_VALUE, false), CSSColors.CSS_BEIGE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BISQUE_RGB_VALUE, false), CSSColors.CSS_BISQUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BLACK_RGB_VALUE, false), CSSColors.CSS_BLACK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BLANCHEDALMOND_RGB_VALUE, false), CSSColors.CSS_BLANCHEDALMOND_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BLUE_RGB_VALUE, false), CSSColors.CSS_BLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BLUEVIOLET_RGB_VALUE, false), CSSColors.CSS_BLUEVIOLET_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BROWN_RGB_VALUE, false), CSSColors.CSS_BROWN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_BURLYWOOD_RGB_VALUE, false), CSSColors.CSS_BURLYWOOD_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CADETBLUE_RGB_VALUE, false), CSSColors.CSS_CADETBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CHARTREUSE_RGB_VALUE, false), CSSColors.CSS_CHARTREUSE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CHOCOLATE_RGB_VALUE, false), CSSColors.CSS_CHOCOLATE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CORAL_RGB_VALUE, false), CSSColors.CSS_CORAL_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CORNFLOWERBLUE_RGB_VALUE, false), CSSColors.CSS_CORNFLOWERBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CORNSILK_RGB_VALUE, false), CSSColors.CSS_CORNSILK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CRIMSON_RGB_VALUE, false), CSSColors.CSS_CRIMSON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_CYAN_RGB_VALUE, false), CSSColors.CSS_CYAN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKBLUE_RGB_VALUE, false), CSSColors.CSS_DARKBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKCYAN_RGB_VALUE, false), CSSColors.CSS_DARKCYAN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKGOLDENROD_RGB_VALUE, false), CSSColors.CSS_DARKGOLDENROD_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKGRAY_RGB_VALUE, false), CSSColors.CSS_DARKGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKGREEN_RGB_VALUE, false), CSSColors.CSS_DARKGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKKHAKI_RGB_VALUE, false), CSSColors.CSS_DARKKHAKI_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKMAGENTA_RGB_VALUE, false), CSSColors.CSS_DARKMAGENTA_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKOLIVEGREEN_RGB_VALUE, false), CSSColors.CSS_DARKOLIVEGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKORANGE_RGB_VALUE, false), CSSColors.CSS_DARKORANGE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKORCHID_RGB_VALUE, false), CSSColors.CSS_DARKORCHID_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKRED_RGB_VALUE, false), CSSColors.CSS_DARKRED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKSALMON_RGB_VALUE, false), CSSColors.CSS_DARKSALMON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKSEAGREEN_RGB_VALUE, false), CSSColors.CSS_DARKSEAGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKSLATEBLUE_RGB_VALUE, false), CSSColors.CSS_DARKSLATEBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKSLATEGRAY_RGB_VALUE, false), CSSColors.CSS_DARKSLATEGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKTURQUOISE_RGB_VALUE, false), CSSColors.CSS_DARKTURQUOISE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DARKVIOLET_RGB_VALUE, false), CSSColors.CSS_DARKVIOLET_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DEEPPINK_RGB_VALUE, false), CSSColors.CSS_DEEPPINK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DEEPSKYBLUE_RGB_VALUE, false), CSSColors.CSS_DEEPSKYBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DIMGRAY_RGB_VALUE, false), CSSColors.CSS_DIMGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_DODGERBLUE_RGB_VALUE, false), CSSColors.CSS_DODGERBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_FIREBRICK_RGB_VALUE, false), CSSColors.CSS_FIREBRICK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_FLORALWHITE_RGB_VALUE, false), CSSColors.CSS_FLORALWHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_FORESTGREEN_RGB_VALUE, false), CSSColors.CSS_FORESTGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GAINSBORO_RGB_VALUE, false), CSSColors.CSS_GAINSBORO_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GHOSTWHITE_RGB_VALUE, false), CSSColors.CSS_GHOSTWHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GOLD_RGB_VALUE, false), CSSColors.CSS_GOLD_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GOLDENROD_RGB_VALUE, false), CSSColors.CSS_GOLDENROD_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GRAY_RGB_VALUE, false), CSSColors.CSS_GRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GREEN_RGB_VALUE, false), CSSColors.CSS_GREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_GREENYELLOW_RGB_VALUE, false), CSSColors.CSS_GREENYELLOW_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_HONEYDEW_RGB_VALUE, false), CSSColors.CSS_HONEYDEW_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_HOTPINK_RGB_VALUE, false), CSSColors.CSS_HOTPINK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_INDIGO_RGB_VALUE, false), CSSColors.CSS_INDIGO_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_IVORY_RGB_VALUE, false), CSSColors.CSS_IVORY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_INDIANRED_RGB_VALUE, false), CSSColors.CSS_INDIANRED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_KHAKI_RGB_VALUE, false), CSSColors.CSS_KHAKI_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LAVENDER_RGB_VALUE, false), CSSColors.CSS_LAVENDER_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LAVENDERBLUSH_RGB_VALUE, false), CSSColors.CSS_LAVENDERBLUSH_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LAWNGREEN_RGB_VALUE, false), CSSColors.CSS_LAWNGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LEMONCHIFFON_RGB_VALUE, false), CSSColors.CSS_LEMONCHIFFON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTCORAL_RGB_VALUE, false), CSSColors.CSS_LIGHTCORAL_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTCYAN_RGB_VALUE, false), CSSColors.CSS_LIGHTCYAN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE, false), CSSColors.CSS_LIGHTGOLDENRODYELLOW_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTGRAY_RGB_VALUE, false), CSSColors.CSS_LIGHTGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTGREEN_RGB_VALUE, false), CSSColors.CSS_LIGHTGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTPINK_RGB_VALUE, false), CSSColors.CSS_LIGHTPINK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTSALMON_RGB_VALUE, false), CSSColors.CSS_LIGHTSALMON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTSEAGREEN_RGB_VALUE, false), CSSColors.CSS_LIGHTSEAGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTSKYBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTSKYBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTSLATEGRAY_RGB_VALUE, false), CSSColors.CSS_LIGHTSLATEGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTSTEELBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTSTEELBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIGHTYELLOW_RGB_VALUE, false), CSSColors.CSS_LIGHTYELLOW_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIME_RGB_VALUE, false), CSSColors.CSS_LIME_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_LIMEGREEN_RGB_VALUE, false), CSSColors.CSS_LIMEGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MAGENTA_RGB_VALUE, false), CSSColors.CSS_MAGENTA_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MAROON_RGB_VALUE, false), CSSColors.CSS_MAROON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMAQUAMARINE_RGB_VALUE, false), CSSColors.CSS_MEDIUMAQUAMARINE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMBLUE_RGB_VALUE, false), CSSColors.CSS_MEDIUMBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMORCHID_RGB_VALUE, false), CSSColors.CSS_MEDIUMORCHID_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMPURPLE_RGB_VALUE, false), CSSColors.CSS_MEDIUMPURPLE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMSEAGREEN_RGB_VALUE, false), CSSColors.CSS_MEDIUMSEAGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMSLATEBLUE_RGB_VALUE, false), CSSColors.CSS_MEDIUMSLATEBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMSPRINGGREEN_RGB_VALUE, false), CSSColors.CSS_MEDIUMSPRINGGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMTURQUOISE_RGB_VALUE, false), CSSColors.CSS_MEDIUMTURQUOISE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MEDIUMVIOLETRED_RGB_VALUE, false), CSSColors.CSS_MEDIUMVIOLETRED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MIDNIGHTBLUE_RGB_VALUE, false), CSSColors.CSS_MIDNIGHTBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MINTCREAM_RGB_VALUE, false), CSSColors.CSS_MINTCREAM_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MISTYROSE_RGB_VALUE, false), CSSColors.CSS_MISTYROSE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_MOCCASIN_RGB_VALUE, false), CSSColors.CSS_MOCCASIN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_NAVAJOWHITE_RGB_VALUE, false), CSSColors.CSS_NAVAJOWHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_NAVY_RGB_VALUE, false), CSSColors.CSS_NAVY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_OLDLACE_RGB_VALUE, false), CSSColors.CSS_OLDLACE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_OLIVEDRAB_RGB_VALUE, false), CSSColors.CSS_OLIVEDRAB_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_OLIVE_RGB_VALUE, false), CSSColors.CSS_OLIVE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ORANGERED_RGB_VALUE, false), CSSColors.CSS_ORANGERED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ORANGE_RGB_VALUE, false), CSSColors.CSS_ORANGE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ORCHID_RGB_VALUE, false), CSSColors.CSS_ORCHID_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PALEGOLDENROD_RGB_VALUE, false), CSSColors.CSS_PALEGOLDENROD_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PALEGREEN_RGB_VALUE, false), CSSColors.CSS_PALEGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PALETURQUOISE_RGB_VALUE, false), CSSColors.CSS_PALETURQUOISE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PALEVIOLETRED_RGB_VALUE, false), CSSColors.CSS_PALEVIOLETRED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PAPAYAWHIP_RGB_VALUE, false), CSSColors.CSS_PAPAYAWHIP_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PEACHPUFF_RGB_VALUE, false), CSSColors.CSS_PEACHPUFF_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PERU_RGB_VALUE, false), CSSColors.CSS_PERU_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PINK_RGB_VALUE, false), CSSColors.CSS_PINK_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PLUM_RGB_VALUE, false), CSSColors.CSS_PLUM_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_POWDERBLUE_RGB_VALUE, false), CSSColors.CSS_POWDERBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_PURPLE_RGB_VALUE, false), CSSColors.CSS_PURPLE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_RED_RGB_VALUE, false), CSSColors.CSS_RED_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ROSYBROWN_RGB_VALUE, false), CSSColors.CSS_ROSYBROWN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_ROYALBLUE_RGB_VALUE, false), CSSColors.CSS_ROYALBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SADDLEBROWN_RGB_VALUE, false), CSSColors.CSS_SADDLEBROWN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SALMON_RGB_VALUE, false), CSSColors.CSS_SALMON_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SANDYBROWN_RGB_VALUE, false), CSSColors.CSS_SANDYBROWN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SEAGREEN_RGB_VALUE, false), CSSColors.CSS_SEAGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SEASHELL_RGB_VALUE, false), CSSColors.CSS_SEASHELL_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SIENNA_RGB_VALUE, false), CSSColors.CSS_SIENNA_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SILVER_RGB_VALUE, false), CSSColors.CSS_SILVER_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SKYBLUE_RGB_VALUE, false), CSSColors.CSS_SKYBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SLATEBLUE_RGB_VALUE, false), CSSColors.CSS_SLATEBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SLATEGRAY_RGB_VALUE, false), CSSColors.CSS_SLATEGRAY_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SNOW_RGB_VALUE, false), CSSColors.CSS_SNOW_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_SPRINGGREEN_RGB_VALUE, false), CSSColors.CSS_SPRINGGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_STEELBLUE_RGB_VALUE, false), CSSColors.CSS_STEELBLUE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_TAN_RGB_VALUE, false), CSSColors.CSS_TAN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_TEAL_RGB_VALUE, false), CSSColors.CSS_TEAL_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_THISTLE_RGB_VALUE, false), CSSColors.CSS_THISTLE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_TOMATO_RGB_VALUE, false), CSSColors.CSS_TOMATO_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_TURQUOISE_RGB_VALUE, false), CSSColors.CSS_TURQUOISE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_VIOLET_RGB_VALUE, false), CSSColors.CSS_VIOLET_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_WHEAT_RGB_VALUE, false), CSSColors.CSS_WHEAT_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_WHITESMOKE_RGB_VALUE, false), CSSColors.CSS_WHITESMOKE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_WHITE_RGB_VALUE, false), CSSColors.CSS_WHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(new Color(255,255,255), false), CSSColors.CSS_WHITE_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_YELLOWGREEN_RGB_VALUE, false), CSSColors.CSS_YELLOWGREEN_NAME); assertEquals(CSSColors.INSTANCE.getColorName(CSSColors.CSS_YELLOW_RGB_VALUE, false), CSSColors.CSS_YELLOW_NAME); } @Test public void testGetRGBColour() { assertNull(CSSColors.INSTANCE.getRGBColour(null)); assertNull(CSSColors.INSTANCE.getRGBColour("")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.getRGBColour("dsqdqsdgfhfdsfs")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.getRGBColour("#12")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.getRGBColour("#DHS78EZ7DS")); //$NON-NLS-1$ assertEquals(CSSColors.INSTANCE.getRGBColour("#580"), new Color(85, 136, 0)); //$NON-NLS-1$ assertEquals(CSSColors.INSTANCE.getRGBColour("#ff1493"), CSSColors.CSS_DEEPPINK_RGB_VALUE); //$NON-NLS-1$ assertEquals(CSSColors.INSTANCE.getRGBColour("blue"), CSSColors.CSS_BLUE_RGB_VALUE); //$NON-NLS-1$ assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.INSTANCE.getRGBColour("rgb( 0% , 0% , 100% )")); //$NON-NLS-1$ assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.INSTANCE.getRGBColour("rgb( 0 , 0 , 255 )")); //$NON-NLS-1$ } @Test public void testSVGRGBtoRGB() { assertNull(CSSColors.INSTANCE.svgRgbtoRgb(null)); assertNull(CSSColors.INSTANCE.svgRgbtoRgb("")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("dsfdgdui")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgbdf")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb()")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(a, b, c)")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(12, 76, )")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(12, )")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(,,)")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(123,12,98,98)")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(98721,-12,0987)")); //$NON-NLS-1$ assertNull(CSSColors.INSTANCE.svgRgbtoRgb("rgb(0%,0,0%)")); //$NON-NLS-1$ assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.INSTANCE.svgRgbtoRgb("rgb(0,0,255)")); //$NON-NLS-1$ assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.INSTANCE.svgRgbtoRgb("rgb( 0 , 0 , 255 )")); //$NON-NLS-1$ assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.INSTANCE.svgRgbtoRgb("rgb( 0% , 0% , 100% )")); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/TestDviPsColors.java000077500000000000000000000353221321075051700315740ustar00rootroot00000000000000package test.parser; import static org.junit.Assert.*; import java.awt.Color; import net.sf.latexdraw.glib.views.latex.DviPsColors; import org.junit.Test; public class TestDviPsColors { @Test public void test_convertHTML2rgb_success() { assertEquals(new Color(255, 0, 100), DviPsColors.INSTANCE.convertHTML2rgb("#FF0064")); //$NON-NLS-1$ } @Test(expected=IllegalArgumentException.class) public void test_convertHTML2rgb_fail_tooshort() { DviPsColors.INSTANCE.convertHTML2rgb("DU87"); //$NON-NLS-1$ } @Test(expected=IllegalArgumentException.class) public void test_convertHTML2rgb_fail_toolong() { DviPsColors.INSTANCE.convertHTML2rgb("#FF00643"); //$NON-NLS-1$ } @Test public void test_convertRGB2rgb_success() { assertEquals(new Color(0f, 0.5f, 1f), DviPsColors.INSTANCE.convertRGB2rgb(0, 255./2., 255.)); } @Test(expected=IllegalArgumentException.class) public void test_convertRGB2rgb_fail() { DviPsColors.INSTANCE.convertRGB2rgb(-1, -255./2., -255.); } @Test public void test_convertcmyk2rgb_success() { assertEquals(new Color(255, 0, 100), DviPsColors.INSTANCE.convertcmyk2rgb(0, 1, 0.608, 0)); } @Test(expected=IllegalArgumentException.class) public void test_convertcmyk2rgb_fail() { DviPsColors.INSTANCE.convertcmyk2rgb(-1, -2, 1, 3); } @Test public void testGetColorName() { Color c2 = new Color(218, 29, 78); assertNull(DviPsColors.INSTANCE.getColourName(null)); String nameColour = DviPsColors.INSTANCE.addUserColour(c2); assertEquals(nameColour, DviPsColors.INSTANCE.getColourName(c2)); assertEquals(DviPsColors.N_APRICOT, DviPsColors.INSTANCE.getColourName(DviPsColors.APRICOT)); assertEquals(DviPsColors.N_AQUAMARINE, DviPsColors.INSTANCE.getColourName(DviPsColors.AQUAMARINE)); assertEquals(DviPsColors.N_BITTERSWEET, DviPsColors.INSTANCE.getColourName(DviPsColors.BITTERSWEET)); assertEquals(DviPsColors.N_BLUEGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.BLUEGREEN)); assertEquals(DviPsColors.N_BLUEVIOLET, DviPsColors.INSTANCE.getColourName(DviPsColors.BLUEVIOLET)); assertEquals(DviPsColors.N_BRICKRED, DviPsColors.INSTANCE.getColourName(DviPsColors.BRICKRED)); assertEquals(DviPsColors.N_BURNT_ORANGE, DviPsColors.INSTANCE.getColourName(DviPsColors.BURNT_ORANGE)); assertEquals(DviPsColors.N_CADETBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.CADETBLUE)); assertEquals(DviPsColors.N_CARNATIONPINK, DviPsColors.INSTANCE.getColourName(DviPsColors.CARNATIONPINK)); assertEquals(DviPsColors.N_CERULEAN, DviPsColors.INSTANCE.getColourName(DviPsColors.CERULEAN)); assertEquals(DviPsColors.N_CORNFLOWERBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.CORNFLOWERBLUE)); assertEquals(DviPsColors.N_DANDELION, DviPsColors.INSTANCE.getColourName(DviPsColors.DANDELION)); assertEquals(DviPsColors.N_DARK_GRAY, DviPsColors.INSTANCE.getColourName(Color.DARK_GRAY)); assertEquals(DviPsColors.N_DARKORCHID, DviPsColors.INSTANCE.getColourName(DviPsColors.DARKORCHID)); assertEquals(DviPsColors.N_EMERALD, DviPsColors.INSTANCE.getColourName(DviPsColors.EMERALD)); assertEquals(DviPsColors.N_FORESTGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.FORESTGREEN)); assertEquals(DviPsColors.N_FUSHIA, DviPsColors.INSTANCE.getColourName(DviPsColors.FUSHIA)); assertEquals(DviPsColors.N_GOLDEN_ROD, DviPsColors.INSTANCE.getColourName(DviPsColors.GOLDEN_ROD)); assertEquals(DviPsColors.N_GREEN_YELLOW, DviPsColors.INSTANCE.getColourName(DviPsColors.GREEN_YELLOW)); assertEquals(DviPsColors.N_JUNGLEGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.JUNGLEGREEN)); assertEquals(DviPsColors.N_LAVENDER, DviPsColors.INSTANCE.getColourName(DviPsColors.LAVENDER)); assertEquals(DviPsColors.N_LIGHT_GRAY, DviPsColors.INSTANCE.getColourName(Color.LIGHT_GRAY)); assertEquals(DviPsColors.N_LIMEGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.LIMEGREEN)); assertEquals(DviPsColors.N_MAHOGANY, DviPsColors.INSTANCE.getColourName(DviPsColors.MAHOGANY)); assertEquals(DviPsColors.N_MAROON, DviPsColors.INSTANCE.getColourName(DviPsColors.MAROON)); assertEquals(DviPsColors.N_MELON, DviPsColors.INSTANCE.getColourName(DviPsColors.MELON)); assertEquals(DviPsColors.N_MIDNIGHTBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.MIDNIGHTBLUE)); assertEquals(DviPsColors.N_MULBERRY, DviPsColors.INSTANCE.getColourName(DviPsColors.MULBERRY)); assertEquals(DviPsColors.N_NAVYBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.NAVYBLUE)); assertEquals(DviPsColors.N_OLIVEGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.OLIVEGREEN)); assertEquals(DviPsColors.N_ORANGERED, DviPsColors.INSTANCE.getColourName(DviPsColors.ORANGERED)); assertEquals(DviPsColors.N_ORCHID, DviPsColors.INSTANCE.getColourName(DviPsColors.ORCHID)); assertEquals(DviPsColors.N_PEACH, DviPsColors.INSTANCE.getColourName(DviPsColors.PEACH)); assertEquals(DviPsColors.N_PERIWINKLE, DviPsColors.INSTANCE.getColourName(DviPsColors.PERIWINKLE)); assertEquals(DviPsColors.N_PINEGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.PINEGREEN)); assertEquals(DviPsColors.N_PINK, DviPsColors.INSTANCE.getColourName(DviPsColors.PINK)); assertEquals(DviPsColors.N_PLUM, DviPsColors.INSTANCE.getColourName(DviPsColors.PLUM)); assertEquals(DviPsColors.N_PROCESSBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.PROCESSBLUE)); assertEquals(DviPsColors.N_RAWSIENNA, DviPsColors.INSTANCE.getColourName(DviPsColors.RAWSIENNA)); assertEquals(DviPsColors.N_RED_ORANGE, DviPsColors.INSTANCE.getColourName(DviPsColors.RED_ORANGE)); assertEquals(DviPsColors.N_REDVIOLET, DviPsColors.INSTANCE.getColourName(DviPsColors.REDVIOLET)); assertEquals(DviPsColors.N_RHODAMINE, DviPsColors.INSTANCE.getColourName(DviPsColors.RHODAMINE)); assertEquals(DviPsColors.N_ROYALBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.ROYALBLUE)); assertEquals(DviPsColors.N_ROYALPURPLE, DviPsColors.INSTANCE.getColourName(DviPsColors.ROYALPURPLE)); assertEquals(DviPsColors.N_RUBINERED, DviPsColors.INSTANCE.getColourName(DviPsColors.RUBINERED)); assertEquals(DviPsColors.N_SALMON, DviPsColors.INSTANCE.getColourName(DviPsColors.SALMON)); assertEquals(DviPsColors.N_SEAGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.SEAGREEN)); assertEquals(DviPsColors.N_SEPIA, DviPsColors.INSTANCE.getColourName(DviPsColors.SEPIA)); assertEquals(DviPsColors.N_SKYBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.SKYBLUE)); assertEquals(DviPsColors.N_SPRINGGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.SPRINGGREEN)); assertEquals(DviPsColors.N_TAN, DviPsColors.INSTANCE.getColourName(DviPsColors.TAN)); assertEquals(DviPsColors.N_TEALBLUE, DviPsColors.INSTANCE.getColourName(DviPsColors.TEALBLUE)); assertEquals(DviPsColors.N_THISTLE, DviPsColors.INSTANCE.getColourName(DviPsColors.THISTLE)); assertEquals(DviPsColors.N_TURQUOISE, DviPsColors.INSTANCE.getColourName(DviPsColors.TURQUOISE)); assertEquals(DviPsColors.N_VIOLETRED, DviPsColors.INSTANCE.getColourName(DviPsColors.VIOLETRED)); assertEquals(DviPsColors.N_WILDSTRAWBERRY, DviPsColors.INSTANCE.getColourName(DviPsColors.WILDSTRAWBERRY)); assertEquals(DviPsColors.N_YELLOW_ORANGE, DviPsColors.INSTANCE.getColourName(DviPsColors.YELLOW_ORANGE)); assertEquals(DviPsColors.N_YELLOWGREEN, DviPsColors.INSTANCE.getColourName(DviPsColors.YELLOWGREEN)); } @Test public void testGetColor() { assertEquals(null, DviPsColors.INSTANCE.getColour("testColour")); //$NON-NLS-1$ assertEquals(DviPsColors.APRICOT, DviPsColors.INSTANCE.getColour(DviPsColors.N_APRICOT)); assertEquals(DviPsColors.AQUAMARINE, DviPsColors.INSTANCE.getColour(DviPsColors.N_AQUAMARINE)); assertEquals(DviPsColors.BITTERSWEET, DviPsColors.INSTANCE.getColour(DviPsColors.N_BITTERSWEET)); assertEquals(DviPsColors.BLUEGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_BLUEGREEN)); assertEquals(DviPsColors.BLUEVIOLET, DviPsColors.INSTANCE.getColour(DviPsColors.N_BLUEVIOLET)); assertEquals(DviPsColors.BRICKRED, DviPsColors.INSTANCE.getColour(DviPsColors.N_BRICKRED)); assertEquals(DviPsColors.BURNT_ORANGE, DviPsColors.INSTANCE.getColour(DviPsColors.N_BURNT_ORANGE)); assertEquals(DviPsColors.CADETBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_CADETBLUE)); assertEquals(DviPsColors.CARNATIONPINK, DviPsColors.INSTANCE.getColour(DviPsColors.N_CARNATIONPINK)); assertEquals(DviPsColors.CERULEAN, DviPsColors.INSTANCE.getColour(DviPsColors.N_CERULEAN)); assertEquals(DviPsColors.CORNFLOWERBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_CORNFLOWERBLUE)); assertEquals(DviPsColors.DANDELION, DviPsColors.INSTANCE.getColour(DviPsColors.N_DANDELION)); assertEquals(Color.DARK_GRAY, DviPsColors.INSTANCE.getColour(DviPsColors.N_DARK_GRAY)); assertEquals(DviPsColors.DARKORCHID, DviPsColors.INSTANCE.getColour(DviPsColors.N_DARKORCHID)); assertEquals(DviPsColors.EMERALD, DviPsColors.INSTANCE.getColour(DviPsColors.N_EMERALD)); assertEquals(DviPsColors.FORESTGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_FORESTGREEN)); assertEquals(DviPsColors.FUSHIA, DviPsColors.INSTANCE.getColour(DviPsColors.N_FUSHIA)); assertEquals(DviPsColors.GOLDEN_ROD, DviPsColors.INSTANCE.getColour(DviPsColors.N_GOLDEN_ROD)); assertEquals(DviPsColors.GREEN_YELLOW, DviPsColors.INSTANCE.getColour(DviPsColors.N_GREEN_YELLOW)); assertEquals(DviPsColors.JUNGLEGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_JUNGLEGREEN)); assertEquals(DviPsColors.LAVENDER, DviPsColors.INSTANCE.getColour(DviPsColors.N_LAVENDER)); assertEquals(Color.LIGHT_GRAY, DviPsColors.INSTANCE.getColour(DviPsColors.N_LIGHT_GRAY)); assertEquals(DviPsColors.LIMEGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_LIMEGREEN)); assertEquals(DviPsColors.MAHOGANY, DviPsColors.INSTANCE.getColour(DviPsColors.N_MAHOGANY)); assertEquals(DviPsColors.MAROON, DviPsColors.INSTANCE.getColour(DviPsColors.N_MAROON)); assertEquals(DviPsColors.MELON, DviPsColors.INSTANCE.getColour(DviPsColors.N_MELON)); assertEquals(DviPsColors.MIDNIGHTBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_MIDNIGHTBLUE)); assertEquals(DviPsColors.MULBERRY, DviPsColors.INSTANCE.getColour(DviPsColors.N_MULBERRY)); assertEquals(DviPsColors.NAVYBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_NAVYBLUE)); assertEquals(DviPsColors.OLIVEGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_OLIVEGREEN)); assertEquals(DviPsColors.ORANGERED, DviPsColors.INSTANCE.getColour(DviPsColors.N_ORANGERED)); assertEquals(DviPsColors.ORCHID, DviPsColors.INSTANCE.getColour(DviPsColors.N_ORCHID)); assertEquals(DviPsColors.PEACH, DviPsColors.INSTANCE.getColour(DviPsColors.N_PEACH)); assertEquals(DviPsColors.PERIWINKLE, DviPsColors.INSTANCE.getColour(DviPsColors.N_PERIWINKLE)); assertEquals(DviPsColors.PINEGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_PINEGREEN)); assertEquals(DviPsColors.PINK, DviPsColors.INSTANCE.getColour(DviPsColors.N_PINK)); assertEquals(DviPsColors.PLUM, DviPsColors.INSTANCE.getColour(DviPsColors.N_PLUM)); assertEquals(DviPsColors.PROCESSBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_PROCESSBLUE)); assertEquals(DviPsColors.RAWSIENNA, DviPsColors.INSTANCE.getColour(DviPsColors.N_RAWSIENNA)); assertEquals(DviPsColors.RED_ORANGE, DviPsColors.INSTANCE.getColour(DviPsColors.N_RED_ORANGE)); assertEquals(DviPsColors.REDVIOLET, DviPsColors.INSTANCE.getColour(DviPsColors.N_REDVIOLET)); assertEquals(DviPsColors.RHODAMINE, DviPsColors.INSTANCE.getColour(DviPsColors.N_RHODAMINE)); assertEquals(DviPsColors.ROYALBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_ROYALBLUE)); assertEquals(DviPsColors.ROYALPURPLE, DviPsColors.INSTANCE.getColour(DviPsColors.N_ROYALPURPLE)); assertEquals(DviPsColors.RUBINERED, DviPsColors.INSTANCE.getColour(DviPsColors.N_RUBINERED)); assertEquals(DviPsColors.SALMON, DviPsColors.INSTANCE.getColour(DviPsColors.N_SALMON)); assertEquals(DviPsColors.SEAGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_SEAGREEN)); assertEquals(DviPsColors.SEPIA, DviPsColors.INSTANCE.getColour(DviPsColors.N_SEPIA)); assertEquals(DviPsColors.SKYBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_SKYBLUE)); assertEquals(DviPsColors.SPRINGGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_SPRINGGREEN)); assertEquals(DviPsColors.TAN, DviPsColors.INSTANCE.getColour(DviPsColors.N_TAN)); assertEquals(DviPsColors.TEALBLUE, DviPsColors.INSTANCE.getColour(DviPsColors.N_TEALBLUE)); assertEquals(DviPsColors.THISTLE, DviPsColors.INSTANCE.getColour(DviPsColors.N_THISTLE)); assertEquals(DviPsColors.TURQUOISE, DviPsColors.INSTANCE.getColour(DviPsColors.N_TURQUOISE)); assertEquals(DviPsColors.VIOLETRED, DviPsColors.INSTANCE.getColour(DviPsColors.N_VIOLETRED)); assertEquals(DviPsColors.WILDSTRAWBERRY, DviPsColors.INSTANCE.getColour(DviPsColors.N_WILDSTRAWBERRY)); assertEquals(DviPsColors.YELLOW_ORANGE, DviPsColors.INSTANCE.getColour(DviPsColors.N_YELLOW_ORANGE)); assertEquals(DviPsColors.YELLOWGREEN, DviPsColors.INSTANCE.getColour(DviPsColors.N_YELLOWGREEN)); } @Test public void testAddUserColor() { Color c2 = new Color(18, 29, 78); String nameColour = DviPsColors.INSTANCE.addUserColour(c2); assertEquals(nameColour, DviPsColors.INSTANCE.getColourName(c2)); } @Test public void testGetUserColorsCode() { Color c = new Color(230, 65, 78); String nameColour = DviPsColors.INSTANCE.addUserColour(c); assertNotNull(DviPsColors.INSTANCE.getUsercolourCode(null)); assertNotNull(DviPsColors.INSTANCE.getUsercolourCode(nameColour)); } @Test public void testCMYK2RGB() { try { DviPsColors.INSTANCE.convertcmyk2rgb(-1, 0.5, 0.5, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(2, 0.5, 0.5, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, -1, 0.5, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 2, 0.5, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 0.5, -1, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 0.5, 2, 0.5); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 0.5, 0.5, -1); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 0.5, 0.5, 2); fail(); }catch(IllegalArgumentException e) { /* Good. */ } assertEquals(new Color(51, 92, 71), DviPsColors.INSTANCE.convertcmyk2rgb(0.5, 0.1, 0.3, 0.6)); } @Test public void testGray2RBG() { try { DviPsColors.INSTANCE.convertgray2rgb(-10); fail(); }catch(IllegalArgumentException e) { /* Good. */ } try { DviPsColors.INSTANCE.convertgray2rgb(300); fail(); }catch(IllegalArgumentException e) { /* Good. */ } assertEquals(new Color(255, 255, 255), DviPsColors.INSTANCE.convertgray2rgb(1)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/TestPSTricksConstants.java000077500000000000000000000022721321075051700327620ustar00rootroot00000000000000package test.parser; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import org.junit.Test; public class TestPSTricksConstants{ @Test public void testIsValidArrowStyle() { assertFalse(PSTricksConstants.isValidFillStyle(null)); assertFalse(PSTricksConstants.isValidFillStyle("coucou!!")); //$NON-NLS-1$ 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)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/000077500000000000000000000000001321075051700262745ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSAbsCommand.java000066400000000000000000000022741321075051700322530ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSAbsCommand; import org.junit.Test; public class TestPSAbsCommand extends TestPSCommand { @Override protected PSAbsCommand createCmd() { return new PSAbsCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSAddCommand.java000066400000000000000000000033421321075051700322330ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSAddCommand; import org.junit.Test; public class TestPSAddCommand extends TestPSCommand { @Override protected PSAddCommand createCmd() { return new PSAddCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(12.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-12.1); dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(-22.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(22.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Test public void testExecuteValPosNeg() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(2.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(12.1); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSCeilingCommand.java000066400000000000000000000023471321075051700331210ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSCeilingCommand; import org.junit.Test; public class TestPSCeilingCommand extends TestPSCommand { @Override protected PSCeilingCommand createCmd() { return new PSCeilingCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-11.2); cmd.execute(dequeue, 0.0); assertEquals(Math.ceil(-11.2),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(11.2); cmd.execute(dequeue, 0.0); assertEquals(Math.ceil(11.2),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSClearCommand.java000066400000000000000000000020641321075051700325710ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSClearCommand; import org.junit.Test; public class TestPSClearCommand extends TestPSCommand { @Override protected PSClearCommand createCmd() { return new PSClearCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertTrue(dequeue.isEmpty()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-11.2); cmd.execute(dequeue, 0.0); assertTrue(dequeue.isEmpty()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(11.2); cmd.execute(dequeue, 0.0); assertTrue(dequeue.isEmpty()); } @Override @Test public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); assertTrue(dequeue.isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSCommand.java000066400000000000000000000020141321075051700316150ustar00rootroot00000000000000package test.parser.ps; import java.util.ArrayDeque; import java.util.Deque; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSArithemticCommand; import org.junit.Before; import org.junit.Test; public abstract class TestPSCommand { T cmd; Deque dequeue; @Before public void setUp() throws Exception { cmd = createCmd(); dequeue = new ArrayDeque<>(); } protected abstract T createCmd(); @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteNullDequeue() throws InvalidFormatPSFunctionException { cmd.execute(null, 0.0); } @Test public abstract void testExecuteVal0() throws InvalidFormatPSFunctionException; @Test public abstract void testExecuteValNeg() throws InvalidFormatPSFunctionException; @Test public abstract void testExecuteValPos() throws InvalidFormatPSFunctionException; @Test public abstract void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException; } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSCosCommand.java000066400000000000000000000024071321075051700322700ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSCosCommand; import org.junit.Test; public class TestPSCosCommand extends TestPSCommand { @Override protected PSCosCommand createCmd() { return new PSCosCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(Math.cos(0.0),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(Math.cos(Math.toRadians(-10.0)),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(Math.cos(Math.toRadians(10.0)),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSCountCommand.java000066400000000000000000000022131321075051700326270ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSCountCommand; import org.junit.Test; public class TestPSCountCommand extends TestPSCommand { @Override protected PSCountCommand createCmd() { return new PSCountCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(1.0,dequeue.peek(),0.0); assertEquals(2, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(2.0,dequeue.peek(),0.0); assertEquals(3, dequeue.size()); } @Override @Test public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { // Nothing to do. } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSDivCommand.java000066400000000000000000000035141321075051700322660ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.*; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSDivCommand; import org.junit.Test; public class TestPSDivCommand extends TestPSCommand { @Override protected PSDivCommand createCmd() { return new PSDivCommand(); } @Override @Test(expected=ArithmeticException.class) public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Test(expected=ArithmeticException.class) public void testExecuteVal01() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); dequeue.push(-20.0); cmd.execute(dequeue, 0.0); assertEquals(0.5,dequeue.peek(),0.000001); assertEquals(1, dequeue.size()); } @Test public void testExecuteValNegPos() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); dequeue.push(20.0); cmd.execute(dequeue, 0.0); assertEquals(-0.5,dequeue.peek(),0.000001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(20.0); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(2.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSDupCommand.java000066400000000000000000000022721321075051700322740ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSDupCommand; import org.junit.Test; public class TestPSDupCommand extends TestPSCommand { @Override protected PSDupCommand createCmd() { return new PSDupCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(2,dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(-10.0,dequeue.peek(),0.0); assertEquals(2,dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(2,dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSExchCommand.java000066400000000000000000000030471321075051700324340ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSExchCommand; import org.junit.Test; public class TestPSExchCommand extends TestPSCommand { @Override protected PSExchCommand createCmd() { return new PSExchCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(10.0,dequeue.getLast(),0.0); assertEquals(2,dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-20.0); dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(-20.0,dequeue.pop(),0.0); assertEquals(-10.0,dequeue.pop(),0.0); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(20.0); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(20.0,dequeue.peek(),0.0); assertEquals(10.0,dequeue.getLast(),0.0); assertEquals(2,dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(20.0); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSExpCommand.java000066400000000000000000000032671321075051700323050ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSExpCommand; import org.junit.Test; public class TestPSExpCommand extends TestPSCommand { @Override protected PSExpCommand createCmd() { return new PSExpCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(1.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); dequeue.push(3.0); cmd.execute(dequeue, 0.0); assertEquals(-1000.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Test public void testExecuteValNeg2() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(-3.0); cmd.execute(dequeue, 0.0); assertEquals(0.001,dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(2.0); cmd.execute(dequeue, 0.0); assertEquals(100.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSFloorCommand.java000066400000000000000000000032451321075051700326260ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSFloorCommand; import org.junit.Test; public class TestPSFloorCommand extends TestPSCommand { @Override protected PSFloorCommand createCmd() { return new PSFloorCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-12.3); cmd.execute(dequeue, 0.0); assertEquals(Math.floor(-12.3),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Test public void testExecuteValNeg2() throws InvalidFormatPSFunctionException { dequeue.push(-12.8); cmd.execute(dequeue, 0.0); assertEquals(Math.floor(-12.8),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.1); cmd.execute(dequeue, 0.0); assertEquals(Math.floor(10.1),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Test public void testExecuteValPos2() throws InvalidFormatPSFunctionException { dequeue.push(10.9); cmd.execute(dequeue, 0.0); assertEquals(Math.floor(10.9),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSFunctionParser.java000066400000000000000000000117631321075051700332140ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSFunctionParser; import org.junit.Test; public class TestPSFunctionParser { @SuppressWarnings("unused") @Test(expected=IllegalArgumentException.class) public void testPSFunctionParserNull() throws InvalidFormatPSFunctionException { new PSFunctionParser(null); } @SuppressWarnings("unused") @Test(expected=IllegalArgumentException.class) public void testPSFunctionParserEmpty() throws InvalidFormatPSFunctionException { new PSFunctionParser(""); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test(expected=InvalidFormatPSFunctionException.class) public void testPSFunctionParserInvalid1() throws InvalidFormatPSFunctionException { new PSFunctionParser("Y"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserSinOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("sin"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserCosOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("cos"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserAddOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("add"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserModOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("mod"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserMulOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("mul"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserAbsOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("abs"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserCeilingOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("ceiling"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserClearOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("clear"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserCountOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("count"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserDivOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("div"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserDupOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("dup"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserExchOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("exch"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserExpOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("exp"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserFloorOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("floor"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserIDivOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("idiv"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserNegOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("neg"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserPlotXOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("x"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserPopOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("pop"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testPSFunctionParserSubOk() throws InvalidFormatPSFunctionException { new PSFunctionParser("sub"); //$NON-NLS-1$ } @Test public void testPSFunctionParserValueOk() throws InvalidFormatPSFunctionException { PSFunctionParser parser = new PSFunctionParser("2.3"); //$NON-NLS-1$ assertEquals(2.3,parser.getY(0),0.0); } @Test public void testGetYX() throws InvalidFormatPSFunctionException { PSFunctionParser parser = new PSFunctionParser("x"); //$NON-NLS-1$ assertEquals(2.0,parser.getY(2),0.0); } @Test public void testGetYSinX() throws InvalidFormatPSFunctionException { PSFunctionParser parser = new PSFunctionParser("x sin"); //$NON-NLS-1$ assertEquals(Math.sin(Math.toRadians(2.0)),parser.getY(2),0.0); } @Test public void testGetYXAdd2() throws InvalidFormatPSFunctionException { PSFunctionParser parser = new PSFunctionParser("x 2 add"); //$NON-NLS-1$ assertEquals(5.0,parser.getY(3),0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testGetYXAdd_notOK() throws InvalidFormatPSFunctionException { PSFunctionParser parser = new PSFunctionParser("x add"); //$NON-NLS-1$ parser.getY(3); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSIDivCommand.java000066400000000000000000000031721321075051700323770ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSIDivCommand; import org.junit.Test; public class TestPSIDivCommand extends TestPSCommand { @Override protected PSIDivCommand createCmd() { return new PSIDivCommand(); } @Override @Test(expected=ArithmeticException.class) public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Test(expected=ArithmeticException.class) public void testExecuteVal02() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.1); dequeue.push(-5.2); cmd.execute(dequeue, 0.0); assertEquals((int)(-10.1/-5.2),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.1); dequeue.push(5.3); cmd.execute(dequeue, 0.0); assertEquals((int)(10.1/5.3),dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(10.1); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSModCommand.java000066400000000000000000000031271321075051700322630ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSModCommand; import org.junit.Test; public class TestPSModCommand extends TestPSCommand { @Override protected PSModCommand createCmd() { return new PSModCommand(); } @Override @Test(expected=ArithmeticException.class) public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Test(expected=ArithmeticException.class) public void testExecuteVal01() throws InvalidFormatPSFunctionException { dequeue.push(2.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-9.0); dequeue.push(2.0); cmd.execute(dequeue, 0.0); assertEquals(-1.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(9.0); dequeue.push(2.0); cmd.execute(dequeue, 0.0); assertEquals(1.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(9.0); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSMultCommand.java000066400000000000000000000036361321075051700324720ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSMulCommand; import org.junit.Test; public class TestPSMultCommand extends TestPSCommand { @Override protected PSMulCommand createCmd() { return new PSMulCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Test public void testExecuteVal01() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); dequeue.push(-20.0); cmd.execute(dequeue, 0.0); assertEquals(200.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Test public void testExecuteValNeg2() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(-20.0); cmd.execute(dequeue, 0.0); assertEquals(-200.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(5.0); cmd.execute(dequeue, 0.0); assertEquals(50.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize2() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSNegCommand.java000066400000000000000000000022761321075051700322610ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSNegCommand; import org.junit.Test; public class TestPSNegCommand extends TestPSCommand { @Override protected PSNegCommand createCmd() { return new PSNegCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(-0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(-10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSPlotXCommand.java000066400000000000000000000021141321075051700326050ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSPlotXVariable; import org.junit.Test; public class TestPSPlotXCommand extends TestPSCommand { @Override protected PSPlotXVariable createCmd() { return new PSPlotXVariable(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, -10.0); assertEquals(-10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 10.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { // Nothing to do. } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSPopCommand.java000066400000000000000000000023301321075051700322750ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSPopCommand; import org.junit.Test; public class TestPSPopCommand extends TestPSCommand { @Override protected PSPopCommand createCmd() { return new PSPopCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(0, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); dequeue.push(-20.0); cmd.execute(dequeue, 0.0); assertEquals(-10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); dequeue.push(20.0); dequeue.push(30.0); cmd.execute(dequeue, 0.0); assertEquals(20.0,dequeue.peek(),0.0); assertEquals(2, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSSinCommand.java000066400000000000000000000024071321075051700322750ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSSinCommand; import org.junit.Test; public class TestPSSinCommand extends TestPSCommand { @Override protected PSSinCommand createCmd() { return new PSSinCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(Math.sin(0.0),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(Math.sin(Math.toRadians(-10.0)),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(Math.sin(Math.toRadians(10.0)),dequeue.peek(),0.00001); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSSubCommand.java000066400000000000000000000033411321075051700322730ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSSubCommand; import org.junit.Test; public class TestPSSubCommand extends TestPSCommand { @Override protected PSSubCommand createCmd() { return new PSSubCommand(); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(0.0); cmd.execute(dequeue, 0.0); assertEquals(12.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { dequeue.push(-12.1); dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(-2.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(10.0); cmd.execute(dequeue, 0.0); assertEquals(2.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Test public void testExecuteValPosNeg() throws InvalidFormatPSFunctionException { dequeue.push(12.1); dequeue.push(-10.0); cmd.execute(dequeue, 0.0); assertEquals(22.1,dequeue.peek(),0.000000000001); assertEquals(1, dequeue.size()); } @Override @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { cmd.execute(dequeue, 0.0); } @Test(expected=InvalidFormatPSFunctionException.class) public void testExecuteInvalidDequeueSize1() throws InvalidFormatPSFunctionException { dequeue.push(12.1); cmd.execute(dequeue, 0.0); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/ps/TestPSValueCommand.java000066400000000000000000000021751321075051700326220ustar00rootroot00000000000000package test.parser.ps; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.ps.InvalidFormatPSFunctionException; import net.sf.latexdraw.parsers.ps.PSValue; import org.junit.Test; public class TestPSValueCommand extends TestPSCommand { @Override protected PSValue createCmd() { return new PSValue(2.0); } @Override @Test public void testExecuteVal0() throws InvalidFormatPSFunctionException { cmd = new PSValue(0.0); cmd.execute(dequeue, 0.0); assertEquals(0.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValNeg() throws InvalidFormatPSFunctionException { cmd = new PSValue(-10.0); cmd.execute(dequeue, 0.0); assertEquals(-10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override @Test public void testExecuteValPos() throws InvalidFormatPSFunctionException { cmd = new PSValue(10.0); cmd.execute(dequeue, 0.0); assertEquals(10.0,dequeue.peek(),0.0); assertEquals(1, dequeue.size()); } @Override public void testExecuteInvalidDequeueSize() throws InvalidFormatPSFunctionException { // Nothing to do. } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/000077500000000000000000000000001321075051700264605ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestPSTGeneralFeatures.java000066400000000000000000000261311321075051700336310ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestPSTGeneralFeatures extends TestPSTParser { @Test public void testBug756733() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/756733 IGroup gp = parser.parsePSTCode("\\psset{unit=5}\\psdot(1,1)\\psdot(1,10pt)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); IDot dot = (IDot)gp.getShapeAt(0); assertEquals(5.*IShape.PPC, dot.getX(), 0.000001); assertEquals(5.*-IShape.PPC, dot.getY(), 0.000001); dot = (IDot)gp.getShapeAt(1); assertEquals(5.*IShape.PPC, dot.getX(), 0.000001); assertEquals(10.*-IShape.PPC/PSTricksConstants.CM_VAL_PT, dot.getY(), 0.000001); } @Test public void test_bug_psset_setOfShapes() throws ParseException { IGroup gp = parser.parsePSTCode("\\psframe(0.5,0.5)(1.5,1.5)\\psdot[linewidth=1cm,dotsize=1](1,1)\\psset{unit=2}\\psframe(0.5,0.5)(1.5,1.5)\\psdot(2,2)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); IRectangle rec = (IRectangle)gp.getShapeAt(0); assertEquals(0.5*IShape.PPC, rec.getX(), 0.000001); assertEquals(-0.5*IShape.PPC, rec.getY(), 0.000001); assertEquals(IShape.PPC, rec.getWidth(), 0.000001); assertEquals(IShape.PPC, rec.getHeight(), 0.000001); IDot dot = (IDot)gp.getShapeAt(1); assertEquals(IShape.PPC, dot.getX(), 0.000001); assertEquals(-IShape.PPC, dot.getY(), 0.000001); rec = (IRectangle)gp.getShapeAt(2); assertEquals(0.5*2.*IShape.PPC, rec.getX(), 0.000001); assertEquals(-0.5*2.*IShape.PPC, rec.getY(), 0.000001); assertEquals(2.*IShape.PPC, rec.getWidth(), 0.000001); assertEquals(2.*IShape.PPC, rec.getHeight(), 0.000001); dot = (IDot)gp.getShapeAt(3); assertEquals(2.*2.*IShape.PPC, dot.getX(), 0.000001); assertEquals(-2.*2.*IShape.PPC, dot.getY(), 0.000001); } @Test public void test_psset_linewidth() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\psset{linewidth=2cm}\\psframe(10,10)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*IShape.PPC, rec.getThickness(), 0.0001); } @Test public void testUnknownCommand() throws ParseException { parser.parsePSTCode("\\fuhfisduf"); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Test(expected=ParseException.class) public void test_BeginCenter_fail_no_begin() throws ParseException { parser.parsePSTCode("\\psline(1,1)(1,0)\\end{center}"); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void test_BeginCenter_fail_no_end() throws ParseException { parser.parsePSTCode("\\begin{center}\\psline(1,1)(1,0)"); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void test_BeginCenter_failWithBeginPsPictureInterlacing() throws ParseException { parser.parsePSTCode("\\begin{center}\\begin{pspicture}(1,1)\\psline(1,1)(1,0)\\end{center}\\end{pspicture}"); //$NON-NLS-1$ } @Test public void test_BeginCenter_okWithBeginPsPicture() throws ParseException { IGroup gp = parser.parsePSTCode("\\begin{center}\\begin{pspicture}(1,1)\\psline(1,1)(1,0)\\end{pspicture}\\end{center}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(1, gp.getShapes().size()); } @Test public void test_BeginCenter_ok() throws ParseException { IGroup gp = parser.parsePSTCode("\\begin{center}\\psline(1,1)(1,0)\\end{center}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(1, gp.getShapes().size()); } @Test public void test_psscalebox() throws ParseException { IGroup gp = parser.parsePSTCode("\\psscalebox{1 1}{\\psframe(2,3)(5,1)}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(1, gp.getShapes().size()); } @Test public void test_scalebox() throws ParseException { IGroup gp = parser.parsePSTCode("\\scalebox{0.75}{\\psframe(2,3)(5,1)}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(1, gp.getShapes().size()); } @Test public void testTwoShapesDoNotShareTheirParameters() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{rgb}{0.6901960784313725,0.6745098039215687,0.9294117647058824}"+ //$NON-NLS-1$ "\\definecolor{color0}{rgb}{0.00392156862745098,0.00392156862745098,0.00392156862745098}"+ //$NON-NLS-1$ "\\psframe[linewidth=0.02,linecolor=color0,dimen=outer,fillstyle=solid,fillcolor=color0b](6.5836487,0.3584497)(4.591824,-1.2415503)"+ //$NON-NLS-1$ "\\psbezier[linewidth=0.02](1.3918242,0.7584497)(2.0668242,0.95844966)(4.3168244,0.95844966)(4.991824,0.7584497)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2, gp.getShapes().size()); assertFalse(gp.getShapeAt(1).isFilled()); assertEquals(Color.WHITE, gp.getShapeAt(1).getFillingCol()); } @Test public void testDefineColor_hsb() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{hsb}{1,0, 0.5}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_HTML() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{HTML}{#001eff}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_gray() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{gray}{0.4}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_cmyk() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{cmyk}{0.2,0.6,0.5,0.3}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_cmy() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{cmy}{0.2,0.6,0.5}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_RGB() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{RGB}{100,50,200}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDefineColor_rgb() throws ParseException { parser.parsePSTCode("\\definecolor{color0b}{rgb}{0.5,0.5,0.5}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testrgbColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{rgb}{0.5,0.5,0.5}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(0.5f,0.5f,0.5f), gp.getShapeAt(0).getLineColour()); } @Test public void testHTMLColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{HTML}{#FF0064}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(255,0,100), gp.getShapeAt(0).getLineColour()); } @Test public void testgrayColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{gray}{0.8}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(0.8f,0.8f,0.8f), gp.getShapeAt(0).getLineColour()); } @Test public void testcmyColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{cmy}{0,1,0.5}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(1f,0f,0.5f), gp.getShapeAt(0).getLineColour()); } @Test public void testcmykColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{cmyk}{0,1,0.608,0}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(255,0,100), gp.getShapeAt(0).getLineColour()); } @Test public void testhsbColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{color0b}{hsb}{0,0,0.95}\\psframe[linecolor=color0b](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(242,242,242), gp.getShapeAt(0).getLineColour()); } @Test public void testRGBColorUsedInShape() throws ParseException { IGroup gp = parser.parsePSTCode("\\definecolor{c}{RGB}{200,100,0}\\psframe[linecolor=c](10,10)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(gp.size()==1); assertEquals(new Color(200,100,0), gp.getShapeAt(0).getLineColour()); } @Test(expected=ParseException.class) public void testBackSlackNotSeparatedFromCommand() throws ParseException { parser.parsePSTCode("\\ specialCoors"); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testErrorOnNotClosedParamsBlock() throws ParseException { parser.parsePSTCode("\\psframe[linewidth=0.04, dimen=o"); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testNotCloseBracketShouldNotParse() throws ParseException { parser.parsePSTCode("{ "); //$NON-NLS-1$ } @Test public void testParseOrigin() {// throws ParseException { //TODO // parser.parsePSTCode("\\psframe[origin={1,2}](5,10)"); // assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseSwapaxes() throws ParseException { parser.parsePSTCode("\\psframe[swapaxes=true](5,10)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[swapaxes=false](5,10)"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseComment() throws ParseException { assertTrue(parser.parsePSTCode("%Foo").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("% Foo").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("% Foo \\test {").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("% Foo \n \t%Bar").isDefined()); //$NON-NLS-1$ } @Test public void testClosedBracketsMustParse() throws ParseException { assertTrue(parser.parsePSTCode("{ }").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("{}").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("{\n}").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("{\n \n}").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("{\n%foo\n}").isDefined()); //$NON-NLS-1$ } @Test public void testBackSlashBracketShouldBeIgnored() throws ParseException { assertTrue(parser.parsePSTCode("{ \\{ }").isDefined()); //$NON-NLS-1$ assertTrue(parser.parsePSTCode("{ \\} }").isDefined()); //$NON-NLS-1$ } @Override public String getCommandName() { return ""; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestPSTParser.java000066400000000000000000000010121321075051700320000ustar00rootroot00000000000000package test.parser.pst; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Before; public abstract class TestPSTParser { protected PSTParser parser; @Before public void setUp() throws Exception { FlyweightThumbnail.images().clear(); FlyweightThumbnail.setThread(false); parser = new PSTParser(); PSTParser.cleanErrors(); } public abstract String getCommandName(); public abstract String getBasicCoordinates(); } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingArrow.java000066400000000000000000000414051321075051700326050ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingArrow extends TestPSTParser { @Test public void testParamArrowScaleDimDim() throws ParseException { parser.parsePSTCode("\\psline[arrows=<->, arrowscale=0.1 cm 3](1,1)"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowScaleDim() throws ParseException { parser.parsePSTCode("\\psline[arrows=<->, arrowscale=2.55](1,1)"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowtBracketLength() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, rbracketlength=2.55](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(2.55, line.getRBracketNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowBracketLength() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, bracketlength=2.55](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(2.55, line.getBracketNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowInset() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowinset=2.5](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(2.5, line.getArrowInset(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowlength() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowlength=1.5](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(1.5, line.getArrowLength(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowtbarDimNum() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, tbarsize=1.5cm 3](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(1.5*IShape.PPC, line.getTBarSizeDim(), 0.0001); assertEquals(3., line.getTBarSizeNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamtbarsizeDim() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, tbarsize=2cm](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(2.*IShape.PPC, line.getTBarSizeDim(), 0.0001); assertEquals(0., line.getTBarSizeNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsizeDimNum() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowsize=1.5cm 3](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(1.5*IShape.PPC, line.getArrowSizeDim(), 0.0001); assertEquals(3., line.getArrowSizeNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsizeDim() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->, arrowsize=2cm](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(2.*IShape.PPC, line.getArrowSizeDim(), 0.0001); assertEquals(0., line.getArrowSizeNum(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsArrows() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->]{-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsRRBracker() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=)-](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsBarEnd() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=|*-](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsRLBracker() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=(-](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsSLBracket() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=[-](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrows() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline[arrows=<->](1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneC() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-C}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.SQUARE_END, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{C-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.SQUARE_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNonecc() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-cc}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.ROUND_IN, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testccNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{cc-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.ROUND_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNonec() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-c}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.ROUND_END, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testcNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{c-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.ROUND_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneDiskIn() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-**}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.DISK_IN, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDiskInNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{**-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.DISK_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneCircleIn() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-oo}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.CIRCLE_IN, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCircleInNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{oo-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.CIRCLE_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneDiskEnd() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-*}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.DISK_END, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDiskEndNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{*-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.DISK_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneCircleEnd() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-o}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.CIRCLE_END, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCircleEndNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{o-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.CIRCLE_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneRightRoundBracket() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-(}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testLeftRoundBracketNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{)-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneLeftRoundBracket() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-)}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testRoundRightBracketNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{(-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneRightSquareBracket() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-[}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testSquareLeftBracketNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{]-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneLeftSquareBracket() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-]}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testSquareRightBracketTbarEnd() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{[-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneTbarEnd() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-|*}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testTbarEndNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{|*-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneTbar() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-|}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testTbarNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{|-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDbleArrowLeftDbleArrowRight() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{<<->>}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_DBLE_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_DBLE_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testArrowheadRightArrowheadLeft() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{>-<}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneArrowheadRight() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{->}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoneArrowheadLeft() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{-<}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testArrowheadRightNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{>-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testArrowheadLeftNone() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psline{<-}(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return ""; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingNewpsobject.java000066400000000000000000000017041321075051700337740ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingNewpsobject extends TestPSTParser { @Test public void testParseCommandExample2() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{mygrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=7pt}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testParseCommandExample1() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{myline}{psline}{linecolor=green,linestyle=dotted}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Override public String getCommandName() { return "newpsobject"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "{myline}{psline}{linecolor=green,linestyle=dotted}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingNewpsstyle.java000066400000000000000000000012121321075051700336600ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingNewpsstyle extends TestPSTParser { @Test public void testParseCommandExample() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Override public String getCommandName() { return "newpsstyle"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "{mystyle}{linecolor=green,linestyle=dotted}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPSbezier.java000066400000000000000000000251071321075051700332370ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IBezierCurve; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPSbezier extends TestParsingShape { @Test public void testSimpleBezierCurveOpen() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode( "\\psbezier[linecolor=black, linewidth=0.04](0.014142151,-1.4747834)(0.7212489,-2.1818902)(4.9070354,-1.3818903)(5.614142,-0.6747834777832031)(6.321249,0.032323305)(4.2040915,1.8666378)(3.214142,1.7252165)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertFalse(bc.isClosed()); } @Test public void testSimpleBezierCurveClose() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode( "\\psbezier[linecolor=black, linewidth=0.04](0.10361466,-0.36860093)(0.76211923,-1.1211777)(7.561873,-1.9049373)(8.503614,-1.5686009216308594)(9.445356,-1.2322645)(6.693564,1.4899777)(5.7036147,1.631399)(4.713665,1.7728205)(-0.55489,0.38397577)(0.10361466,-0.36860093)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(bc.isClosed()); } @Test public void testSimpleBezierCurve() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode( "\\psbezier[linewidth=0.02](1.3918242,0.7584497)(2.0668242,0.95844966)(4.3168244,0.95844966)(4.991824,0.7584497)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(bc.getPtAt(0).getY(), bc.getPtAt(1).getY(), 0.001); assertEquals(bc.getFirstCtrlPtAt(0).getY(), bc.getFirstCtrlPtAt(1).getY(), 0.001); assertFalse(bc.isFilled()); } @Test public void testParamArrowsArrowsNoneNone() throws ParseException { IBezierCurve line = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"[arrows=<->]{-}(1,2)(3,4)(5,6)(7,8)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamBarInSqureBracket() throws ParseException { IBezierCurve line = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"{|-]}(1,2)(3,4)(5,6)(7,8)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsArrows() throws ParseException { IBezierCurve line = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"[arrows=<->](1,2)(3,4)(5,6)(7,8)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test9Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16)(17,18)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(4, bc.getNbPoints()); assertEquals(0., bc.getPtAt(0).getX(), 0.0001); assertEquals(0., bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(11.*IShape.PPC, bc.getPtAt(2).getX(), 0.0001); assertEquals(-12.*IShape.PPC, bc.getPtAt(2).getY(), 0.0001); assertEquals(17.*IShape.PPC, bc.getPtAt(3).getX(), 0.0001); assertEquals(-18.*IShape.PPC, bc.getPtAt(3).getY(), 0.0001); assertEquals(-1.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(2.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(7.*IShape.PPC, bc.getSecondCtrlPtAt(1).getX(), 0.0001); assertEquals(-8.*IShape.PPC, bc.getSecondCtrlPtAt(1).getY(), 0.0001); assertEquals(13.*IShape.PPC, bc.getSecondCtrlPtAt(2).getX(), 0.0001); assertEquals(-14.*IShape.PPC, bc.getSecondCtrlPtAt(2).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getFirstCtrlPtAt(2).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getFirstCtrlPtAt(2).getY(), 0.0001); assertEquals(15.*IShape.PPC, bc.getFirstCtrlPtAt(3).getX(), 0.0001); assertEquals(-16.*IShape.PPC, bc.getFirstCtrlPtAt(3).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test10Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(5,10)(1,2)(3,4)(5,6)(7,8)(9,10)(11,12)(13,14)(15,16)(17,18)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(4, bc.getNbPoints()); assertEquals(5.*IShape.PPC, bc.getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(11.*IShape.PPC, bc.getPtAt(2).getX(), 0.0001); assertEquals(-12.*IShape.PPC, bc.getPtAt(2).getY(), 0.0001); assertEquals(17.*IShape.PPC, bc.getPtAt(3).getX(), 0.0001); assertEquals(-18.*IShape.PPC, bc.getPtAt(3).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(-18.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(7.*IShape.PPC, bc.getSecondCtrlPtAt(1).getX(), 0.0001); assertEquals(-8.*IShape.PPC, bc.getSecondCtrlPtAt(1).getY(), 0.0001); assertEquals(13.*IShape.PPC, bc.getSecondCtrlPtAt(2).getX(), 0.0001); assertEquals(-14.*IShape.PPC, bc.getSecondCtrlPtAt(2).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getFirstCtrlPtAt(2).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getFirstCtrlPtAt(2).getY(), 0.0001); assertEquals(15.*IShape.PPC, bc.getFirstCtrlPtAt(3).getX(), 0.0001); assertEquals(-16.*IShape.PPC, bc.getFirstCtrlPtAt(3).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test6Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(1,2)(3,4)(5,6)(7,8)(9,10)(11,12)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, bc.getNbPoints()); assertEquals(0., bc.getPtAt(0).getX(), 0.0001); assertEquals(0., bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(11.*IShape.PPC, bc.getPtAt(2).getX(), 0.0001); assertEquals(-12.*IShape.PPC, bc.getPtAt(2).getY(), 0.0001); assertEquals(-1.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(2.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(7.*IShape.PPC, bc.getSecondCtrlPtAt(1).getX(), 0.0001); assertEquals(-8.*IShape.PPC, bc.getSecondCtrlPtAt(1).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getFirstCtrlPtAt(2).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getFirstCtrlPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test7Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(5,10)(1,2)(3,4)(5,6)(7,8)(9,10)(11,12)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, bc.getNbPoints()); assertEquals(5.*IShape.PPC, bc.getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(11.*IShape.PPC, bc.getPtAt(2).getX(), 0.0001); assertEquals(-12.*IShape.PPC, bc.getPtAt(2).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(-18.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(7.*IShape.PPC, bc.getSecondCtrlPtAt(1).getX(), 0.0001); assertEquals(-8.*IShape.PPC, bc.getSecondCtrlPtAt(1).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getFirstCtrlPtAt(2).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getFirstCtrlPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test3Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(1,2)(3,4)(5,6)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, bc.getNbPoints()); assertEquals(0., bc.getPtAt(0).getX(), 0.0001); assertEquals(0., bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(-1.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(2.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test4Coordinates() throws ParseException { IBezierCurve bc = (IBezierCurve)parser.parsePSTCode("\\"+getCommandName()+"(5,10)(1,2)(3,4)(5,6)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, bc.getNbPoints()); assertEquals(5.*IShape.PPC, bc.getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, bc.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, bc.getPtAt(1).getX(), 0.0001); assertEquals(-6.*IShape.PPC, bc.getPtAt(1).getY(), 0.0001); assertEquals(9.*IShape.PPC, bc.getSecondCtrlPtAt(0).getX(), 0.0001); assertEquals(-18.*IShape.PPC, bc.getSecondCtrlPtAt(0).getY(), 0.0001); assertEquals(3.*IShape.PPC, bc.getFirstCtrlPtAt(1).getX(), 0.0001); assertEquals(-4.*IShape.PPC, bc.getFirstCtrlPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psbezier"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(0,0)(1,1)(2,2)(3,3)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPSdot.java000066400000000000000000000374161321075051700325530ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Ignore; import org.junit.Test; public class TestParsingPSdot extends TestParsingShape { @Test public void test_psset_unit_yunit() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\psset{unit=2,yunit=3}\\psdot(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*IShape.PPC, dot.getX(), 0.000001); assertEquals(-2.*3.*IShape.PPC, dot.getY(), 0.000001); } @Test public void test_psset_unit_xunit() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\psset{unit=2,xunit=3}\\psdot(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*3.*IShape.PPC, dot.getX(), 0.000001); assertEquals(-2.*IShape.PPC, dot.getY(), 0.000001); } @Test public void test_psset_dot_unit_dot() throws ParseException { IGroup gp = parser.parsePSTCode("\\psdot(1,1)\\psset{unit=2}\\psdot(1,1)").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); IDot dot = (IDot)gp.getShapeAt(1); assertEquals(2.*IShape.PPC, dot.getX(), 0.000001); assertEquals(-2.*IShape.PPC, dot.getY(), 0.000001); dot = (IDot)gp.getShapeAt(0); assertEquals(IShape.PPC, dot.getX(), 0.000001); assertEquals(-IShape.PPC, dot.getY(), 0.000001); } @Test public void test_psset_unit() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\psset{unit=2}\\psdot(1,1)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*IShape.PPC, dot.getX(), 0.000001); assertEquals(-2.*IShape.PPC, dot.getY(), 0.000001); } @Test public void testDotAngle() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotangle=90]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.PI/2., dot.getRotationAngle(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotScale2num() throws ParseException { IDot dot1 = (IDot)parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ IDot dot2 = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotscale=2 3]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(dot1.getDiametre()*2., dot2.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotScale1num() throws ParseException { IDot dot1 = (IDot)parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ IDot dot2 = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotscale=2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(dot1.getDiametre()*2., dot2.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotsizeNoUnit() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=1.5 2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.5*IShape.PPC+2.*PSTricksConstants.DEFAULT_LINE_WIDTH*IShape.PPC, dot.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotsizeNoNum() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=1.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotsizeNoNumWithUnit() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=15 mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotsizeNoNumWithWhitespace() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=15 mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.5*IShape.PPC, dot.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotsize() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotsize=1.5 cm 4]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.5*IShape.PPC+4.*PSTricksConstants.DEFAULT_LINE_WIDTH*IShape.PPC, dot.getDiametre(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStylePentagonStar() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=pentagon*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.FPENTAGON, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStylePentagon() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=pentagon]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.PENTAGON, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleTriangleStar() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=triangle*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.FTRIANGLE, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleTriangle() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=triangle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.TRIANGLE, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleDiamondStar() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=diamond*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.FDIAMOND, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleDiamond() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=diamond]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.DIAMOND, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleSquareStar() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=square*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.FSQUARE, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleSquare() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=square]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.SQUARE, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBpentagon() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Bpentagon]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBtriangle() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Btriangle]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBdiamond() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Bdiamond]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBsquare() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Bsquare]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBbar() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=B|]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleBar() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=|]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.BAR, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleOtimes() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=otimes]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.OTIMES, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleOplus() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=oplus]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.OPLUS, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBasterisk() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Basterisk]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleAsterisk() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=asterisk]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.ASTERISK, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBPlus() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=B+]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStylePlus() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=+]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.PLUS, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleX() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=x]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.X, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Ignore @Test public void testDotStyleBo() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=Bo]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleo() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=o]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.O, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testDotStyleDot() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(DotStyle.DOT, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoDotStyle() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()).get().getShapeAt(0); //$NON-NLS-1$ assertEquals(DotStyle.DOT, dot.getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoCoordinate() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()).get().getShapeAt(0); //$NON-NLS-1$ assertEquals(0., dot.getPtAt(0).getX(), 0.0001); assertEquals(0., dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(5,10)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(5.*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, dot.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/PSTricksConstants.CM_VAL_PT, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(350mm,200mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35in,20in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/2.54, dot.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/2.54, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testFloatSigns() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testStarFillingParametershaveNoEffect() throws ParseException { // } @Override @Test public void testStarLineColourIsFillingColour() throws ParseException { IDot sh = (IDot)parser.parsePSTCode("\\"+getCommandName()+"*["+"linecolor=green, dotstyle=o]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(Color.GREEN, sh.getFillingCol()); assertEquals(Color.GREEN, sh.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesFloat2() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psdot"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(1,1)"; //$NON-NLS-1$ } } TestParsingPSellipticarc.java000066400000000000000000000016111321075051700341650ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pstpackage test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPSellipticarc extends TestPSTParser { @Test public void testCanParsePsellipticarcn() throws ParseException { assertTrue(parser.parsePSTCode("\\psellipticarcn[]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Test public void testCanParsePsellipticarc() throws ParseException { assertTrue(parser.parsePSTCode("\\psellipticarc[]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psellipticarc"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(.5,0)(1.5,1){215}{0}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingParabola.java000066400000000000000000000014611321075051700332320ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingParabola extends TestPSTParser { @Test public void testParseCurvature() throws ParseException { parser.parsePSTCode("\\psline[curvature=1 -1 0.33](35,20)(35,20)"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCanParse() throws ParseException { assertTrue(parser.parsePSTCode("\\parabola(35,20)(35,20)").get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "parabola"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(35,20)(35,20)"; //$NON-NLS-1$ } } TestParsingPlotCommands.java000066400000000000000000000156361321075051700340430ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pstpackage test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.prop.IPlotProp; import net.sf.latexdraw.glib.models.interfaces.shape.IPlot; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPlotCommands extends TestPSTParser { @Test public void testParametricplot() throws ParseException { parser.parsePSTCode("\\parametricplot[plotstyle=dots,plotpoints=13]{-6}{6}{1.2 t exp 1.2 t neg exp}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testParametricplotStar() throws ParseException { parser.parsePSTCode("\\parametricplot*[plotstyle=dots,plotpoints=13]{-6}{6}{1.2 t exp 1.2 t neg exp}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsplot() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.0, plot.getPlotMinX(), 0.0); assertEquals(720.0, plot.getPlotMaxX(), 0.0); assertEquals("x sin", plot.getPlotEquation()); //$NON-NLS-1$ } @Test public void testPsplotNbPoints() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotpoints=213]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(213, plot.getNbPlottedPoints()); } @Test public void testPsplotPlotStyleCurve() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=curve]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.CURVE, plot.getPlotStyle()); } @Test public void testPsplotPlotStyleCCurve() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=ccurve]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.CCURVE, plot.getPlotStyle()); } @Test public void testPsplotPlotStyleECurve() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=ecurve]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.ECURVE, plot.getPlotStyle()); } @Test public void testPsplotPlotStyleDots() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=dots]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.DOTS, plot.getPlotStyle()); } @Test public void testPsplotPlotStyleLine() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=line]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.LINE, plot.getPlotStyle()); } @Test public void testPsplotPlotStylePloygon() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[plotstyle=polygon]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IPlotProp.PlotStyle.POLYGON, plot.getPlotStyle()); } @Test public void testPsplotXUnit() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[xunit=0.1]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.1, plot.getXScale(), 0.0); } @Test public void testPsplotYUnit() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot[yunit=0.1]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.1, plot.getYScale(), 0.0); } @Test public void testPsplotStar() throws ParseException { final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot*[plotpoints=200]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.0, plot.getPlotMinX(), 0.0); assertEquals(720.0, plot.getPlotMaxX(), 0.0); assertEquals("x sin", plot.getPlotEquation()); //$NON-NLS-1$ assertEquals(IShape.FillingStyle.PLAIN, plot.getFillingStyle()); } @Test public void testListplot() throws ParseException { parser.parsePSTCode("\\listplot[plotstyle=line]{\\mydata}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testListplotStar() throws ParseException { parser.parsePSTCode("\\listplot*[plotstyle=line]{\\mydata}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testFileplot() throws ParseException { parser.parsePSTCode("\\fileplot[plotstyle=line]{file}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testFileplotStar() throws ParseException { parser.parsePSTCode("\\fileplot*[plotstyle=line]{file}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testDataplot() throws ParseException { parser.parsePSTCode("\\dataplot[plotstyle=line]{\\cmdName}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testDataplotStar() throws ParseException { parser.parsePSTCode("\\dataplot*[plotstyle=line]{\\foo\\bar}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testSavedata() throws ParseException { parser.parsePSTCode("\\savedata{\\foo}[{{0, 0}, {1., 0.946083}, {2., 1.60541}, {3., 1.84865}, {4., 1.7582}," + //$NON-NLS-1$ "{5., 1.54993}, {6., 1.42469}, {7., 1.4546}, {8., 1.57419}," + //$NON-NLS-1$ "{9., 1.66504}, {10., 1.65835}, {11., 1.57831}, {12., 1.50497}," + //$NON-NLS-1$ "{13., 1.49936}, {14., 1.55621}, {15., 1.61819}, {16., 1.6313}," + //$NON-NLS-1$ "{17., 1.59014}, {18., 1.53661}, {19., 1.51863}, {20., 1.54824}}]"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testReaddata() throws ParseException { parser.parsePSTCode("\\readdata{\\foo}{foo.data}"); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPlotstyle() throws ParseException { parser.parsePSTCode("\\psframe[plotstyle=line](1,1)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[plotstyle=dots](1,1)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[plotstyle=polygon](1,1)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[plotstyle=curve](1,1)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[plotstyle=ecurve](1,1)"); //$NON-NLS-1$ parser.parsePSTCode("\\psframe[plotstyle=ccurve](1,1)"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "dataplot"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return null; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsBegin.java000066400000000000000000000134551321075051700330460ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsBegin extends TestPSTParser { @Test public void testPspictureWithGridAndShapesBasic() throws ParseException { IGroup group = parser.parsePSTCode("\\pspicture(0,0)(2,2)\n\\psgrid\n\\psframe(0,0)(2,2)\n\\psframe(1,1)(3,3)\n\\endpspicture").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); IRectangle rec1 = (IRectangle)group.getShapeAt(1); IRectangle rec2 = (IRectangle)group.getShapeAt(2); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0., grid.getPosition().getX(), 0.001); assertEquals(0., grid.getPosition().getY(), 0.001); assertEquals(0., rec1.getPosition().getX(), 0.001); assertEquals(0., rec1.getPosition().getY(), 0.001); assertEquals(IShape.PPC, rec2.getPosition().getX(), 0.001); assertEquals(-(double)IShape.PPC, rec2.getPosition().getY(), 0.001); } @Test public void testPspictureWithGridAndShapesComplex() throws ParseException { IGroup group = parser.parsePSTCode("\\pspicture(-3,-3)(2,2)\n\\psgrid\n\\psframe(0,0)(2,2)\n\\psframe(1,1)(3,3)\n\\endpspicture").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); IRectangle rec1 = (IRectangle)group.getShapeAt(1); IRectangle rec2 = (IRectangle)group.getShapeAt(2); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.0, grid.getPosition().getX(), 0.001); assertEquals(0.0, grid.getPosition().getY(), 0.001); assertEquals(0., rec1.getPosition().getX(), 0.001); assertEquals(0., rec1.getPosition().getY(), 0.001); assertEquals(IShape.PPC, rec2.getPosition().getX(), 0.001); assertEquals(-(double)IShape.PPC, rec2.getPosition().getY(), 0.001); } @Test public void testPspictureWithGrid() throws ParseException { IGroup group = parser.parsePSTCode("\\pspicture\\psgrid\\endpspicture").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(10., grid.getGridMaxX(), 0.001); assertEquals(10., grid.getGridMaxY(), 0.001); assertEquals(0., grid.getGridMinY(), 0.001); assertEquals(0., grid.getGridMinX(), 0.001); } @Test public void testBeginPsPictureWithGrid() throws ParseException { IGroup group = parser.parsePSTCode("\\begin{pspicture}\\psgrid\\end{pspicture}").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(10., grid.getGridMaxX(), 0.001); assertEquals(10., grid.getGridMaxY(), 0.001); assertEquals(0., grid.getGridMinY(), 0.001); assertEquals(0., grid.getGridMinX(), 0.001); } @Test public void testBeginPsPictureWithGridAndShapesBasic() throws ParseException { IGroup group = parser.parsePSTCode("\\begin{pspicture}(0,0)(2,2)\n\\psgrid\n\\psframe(0,0)(2,2)\n\\psframe(1,1)(3,3)\n\\end{pspicture}").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); IRectangle rec1 = (IRectangle)group.getShapeAt(1); IRectangle rec2 = (IRectangle)group.getShapeAt(2); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0., grid.getPosition().getX(), 0.001); assertEquals(0., grid.getPosition().getY(), 0.001); assertEquals(0., rec1.getPosition().getX(), 0.001); assertEquals(0., rec1.getPosition().getY(), 0.001); assertEquals(IShape.PPC, rec2.getPosition().getX(), 0.001); assertEquals(-(double)IShape.PPC, rec2.getPosition().getY(), 0.001); } @Test public void testBeginPsPictureWithGridAndShapesComplex() throws ParseException { IGroup group = parser.parsePSTCode("\\begin{pspicture}(-3,-3)(2,2)\n\\psgrid\n\\psframe(0,0)(2,2)\n\\psframe(1,1)(3,3)\n\\end{pspicture}").get(); //$NON-NLS-1$ IGrid grid = (IGrid)group.getShapeAt(0); IRectangle rec1 = (IRectangle)group.getShapeAt(1); IRectangle rec2 = (IRectangle)group.getShapeAt(2); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(0.0, grid.getPosition().getX(), 0.001); assertEquals(0.0, grid.getPosition().getY(), 0.001); assertEquals(0., rec1.getPosition().getX(), 0.001); assertEquals(0., rec1.getPosition().getY(), 0.001); assertEquals(IShape.PPC, rec2.getPosition().getX(), 0.001); assertEquals(-(double)IShape.PPC, rec2.getPosition().getY(), 0.001); } @Test public void testBeginPsPictureStar2Coord() throws ParseException { parser.parsePSTCode("\\begin{pspicture*}(0,0)(1,1)\n\n\\end{pspicture*}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBeginPsPictureStar1Coord() throws ParseException { parser.parsePSTCode("\\begin{pspicture*}(1,1)\n\n\\end{pspicture*}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBeginPsPicture2Coord() throws ParseException { parser.parsePSTCode("\\begin{pspicture}(0,0)(1,1)\n\n\\end{pspicture}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBeginPsPicture1Coord() throws ParseException { parser.parsePSTCode("\\begin{pspicture}(1,1)\n\n\\end{pspicture}"); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test(expected=ParseException.class) public void testBeginPsPictureErrorOnNoEnd() throws ParseException { parser.parsePSTCode("\\begin{pspicture}(1,1)"); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testBeginPsPictureErrorOnNoStart() throws ParseException { parser.parsePSTCode("\\end{pspicture}"); //$NON-NLS-1$ } @Override public String getCommandName() { return ""; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsarc.java000066400000000000000000000050711321075051700325620ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsarc extends TestParsingPswedge { @Test public void testArcsepParsed() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[arcsep=0.3cm](5,10){1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testArcsepBParsed() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[arcsepB=0.3cm](5,10){1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testArcsepAParsed() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[arcsepA=0.3cm](5,10){1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsArrowsNoneNone() throws ParseException { ICircleArc line = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"[arrows=<->]{-}{1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.NONE, line.getArrowStyle(0)); assertEquals(ArrowStyle.NONE, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamBarInSqureBracket() throws ParseException { ICircleArc line = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{|-]}{1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamArrowsArrows() throws ParseException { ICircleArc line = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"[arrows=<->]{1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testErrorOnNoAngle2() throws ParseException { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"(,){1}{30}{}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psarc"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsarcn.java000066400000000000000000000061071321075051700327410ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow.ArrowStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsarcn extends TestParsingPsarc { @Override @Test public void testAngle1Angle2() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{200}{100}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(100.), arc.getAngleStart(), 0.0000001); assertEquals(Math.toRadians(200.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{100}{200}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(200.), arc.getAngleStart(), 0.0000001); assertEquals(Math.toRadians(100.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testAngle1() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{11}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(20.), arc.getAngleStart(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{11}{-200.15}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-200.15), arc.getAngleStart(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testAngle2() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(10.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{-10.12}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-10.12), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testParamBarInSqureBracket() throws ParseException { ICircleArc line = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{|-]}{1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(0)); assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testParamArrowsArrows() throws ParseException { ICircleArc line = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"[arrows=<->]{1}{30}{40}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0)); assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1)); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psarcn"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsaxes.java000066400000000000000000000040021321075051700327460ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IAxes; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsaxes extends TestPSTParser { @Test public void testArrows() throws ParseException { final IAxes grid = (IAxes)parser.parsePSTCode("\\"+getCommandName()+"{|->}(0,0)(0,0)(3,4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(grid.getArrowAt(0).getArrowStyle(), IArrow.ArrowStyle.BAR_IN); assertEquals(grid.getArrowAt(2).getArrowStyle(), IArrow.ArrowStyle.RIGHT_ARROW); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test3Coord() throws ParseException { IAxes grid = (IAxes)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(0,0)(3,4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(0., grid.getOriginY(), 0.0001); assertEquals(0., grid.getGridStartX(), 0.0001); assertEquals(0., grid.getGridStartY(), 0.0001); assertEquals(3., grid.getGridEndX(), 0.0001); assertEquals(4., grid.getGridEndY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test3Coord2() throws ParseException { IAxes grid = (IAxes)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(1,2)(3,4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(0., grid.getOriginY(), 0.0001); assertEquals(1., grid.getGridStartX(), 0.0001); assertEquals(2., grid.getGridStartY(), 0.0001); assertEquals(3., grid.getGridEndX(), 0.0001); assertEquals(4., grid.getGridEndY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() {return "psaxes";} //$NON-NLS-1$ @Override public String getBasicCoordinates() { return "(0,0)(0,0)(1,1)"; } //$NON-NLS-1$ } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPscircle.java000066400000000000000000000140231321075051700332530ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPscircle extends TestParsingShape { @Override public String getCommandName() { return "pscircle"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "{1}"; //$NON-NLS-1$ } @Test public void testUnit() throws ParseException { ICircle sh = (ICircle)parser.parsePSTCode("\\psset{unit=4}\\pscircle(2,3cm){5}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(4.*2.*IShape.PPC-5.*IShape.PPC, sh.getX(), 0.0001); assertEquals(-3.*IShape.PPC+5.*IShape.PPC, sh.getY(), 0.0001); assertEquals(2.*5.*IShape.PPC, sh.getWidth(), 0.0001); } @Test public void testCoordinatesPt() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT-10.*IShape.PPC/PSTricksConstants.CM_VAL_PT, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC/PSTricksConstants.CM_VAL_PT-10.*IShape.PPC/PSTricksConstants.CM_VAL_PT)*-1., cir.getPosition().getY(), 0.001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., cir.getWidth(), 0.0000001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(350mm,200mm){10mm}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-1.*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC-1.*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(1.*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(1.*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35in,20in){1.2in}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/2.54-1.2*IShape.PPC/2.54, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC/2.54-1.2*IShape.PPC/2.54)*-1., cir.getPosition().getY(), 0.001); assertEquals(1.2*IShape.PPC/2.54*2., cir.getWidth(), 0.0000001); assertEquals(1.2*IShape.PPC/2.54*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm){.5cm}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-.5*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC-.5*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(.5*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(.5*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesRadius() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35,20){10}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-10.*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC-10.*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(10.*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(10.*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testFloatSigns() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5){--+12}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC-12.*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((50.5*IShape.PPC-12.*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(12.*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(12.*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNegativeRadius() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(0,0){-1}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(cir.getWidth()>0); assertTrue(cir.getHeight()>0); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5){1.25}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC-1.25*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((50.5*IShape.PPC-1.25*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(1.25*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(1.25*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMissing() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(,){1}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(IShape.PPC-1.*IShape.PPC, cir.getPosition().getX(), 0.0000001); assertEquals((IShape.PPC-1.*IShape.PPC)*-1., cir.getPosition().getY(), 0.0000001); assertEquals(1.*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(1.*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testErrorOnNoRadius() { try { parser.parsePSTCode("\\"+getCommandName()+"(,){}").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPscurve.java000066400000000000000000000056321321075051700331440ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPscurve extends TestPSTParser { @Test public void testCanParsePsecurveWithErrorsOnIncorrectLiftpen() throws ParseException { assertTrue(parser.parsePSTCode("\\psecurve[liftpen=3]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(2, PSTParser.errorLogs().size()); PSTParser.errorLogs().clear(); assertTrue(parser.parsePSTCode("\\psecurve[liftpen=1.2]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(2, PSTParser.errorLogs().size()); PSTParser.errorLogs().clear(); assertTrue(parser.parsePSTCode("\\psecurve[liftpen=foo]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(2, PSTParser.errorLogs().size()); PSTParser.errorLogs().clear(); assertTrue(parser.parsePSTCode("\\psecurve[liftpen=-1]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(2, PSTParser.errorLogs().size()); PSTParser.errorLogs().clear(); assertTrue(parser.parsePSTCode("\\psecurve[liftpen=1cm]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(2, PSTParser.errorLogs().size()); PSTParser.errorLogs().clear(); } @Test public void testCanParsePsecurveWithLiftpen2() throws ParseException { assertTrue(parser.parsePSTCode("\\psecurve[liftpen=2]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testCanParsePsecurveWithLiftpen1() throws ParseException { assertTrue(parser.parsePSTCode("\\psecurve[liftpen=1]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testCanParsePsecurveWithLiftpen0() throws ParseException { assertTrue(parser.parsePSTCode("\\psecurve[liftpen=0]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testCanParsePsecurve() throws ParseException { assertTrue(parser.parsePSTCode("\\psecurve[]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Test public void testCanParsePsccurve() throws ParseException { assertTrue(parser.parsePSTCode("\\psccurve[]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Test public void testCanParsePscurve() throws ParseException { assertTrue(parser.parsePSTCode("\\pscurve[]{<->}"+getBasicCoordinates()).get().isEmpty()); //$NON-NLS-1$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "pscurve"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPscustom.java000066400000000000000000000245631321075051700333360ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.prop.IFreeHandProp; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IFreehand; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPscustom extends TestPSTParser { @Test public void testPsCustomRlineto() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\rlineto(2,3)}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomMovepath() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\movepath(2,3)}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomClosedshadow() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\closedshadow[linewidth=2cm]}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomOpenshadow() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\openshadow[linewidth=2cm]}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomMrestore() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\mrestore}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomMsave() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\msave}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomSwapaxes() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\swapaxes}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomRotate() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\rotate{10}}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomScale1() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\scale{10}}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomScale2() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\scale{10 20}}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomTranslate() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\translate(1,2cm)}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomFill() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\fill[linewidth=0.2cm]}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomStroke() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\stroke[linewidth=0.2cm]}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomGrestore() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\grestore}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomGsave() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\gsave}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomRcurveto() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"{\\rcurveto(3.1,4.1)(3.2,4.3)(3,4)}"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, PSTParser.errorLogs().size()); } @Test public void testPsCustomFreeHandClose() throws ParseException { IGroup group = parser.parsePSTCode("\\pscustom{\\moveto(0.0,2.64)\\lineto(0.19,2.82)\\curveto(0.285,2.91)(1.49,3.16)(2.6,3.32)"+ //$NON-NLS-1$ "\\curveto(3.71,3.48)(5.625,3.205)(6.43,2.77)\\curveto(7.235,2.335)(8.07,1.135)(8.1,0.37)"+ //$NON-NLS-1$ "\\curveto(8.13,-0.395)(7.64,-1.63)(7.12,-2.1)\\curveto(6.6,-2.57)(5.45,-3.18)(4.82,-3.32)\\closepath}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); IFreehand fh = (IFreehand)group.getShapeAt(0); assertEquals(7, fh.getNbPoints()); assertEquals(0., fh.getPtAt(0).getX(), 0.001); assertEquals(-2.64*IShape.PPC, fh.getPtAt(0).getY(), 0.001); assertEquals(0.19*IShape.PPC, fh.getPtAt(1).getX(), 0.001); assertEquals(-2.82*IShape.PPC, fh.getPtAt(1).getY(), 0.001); assertEquals(2.6*IShape.PPC, fh.getPtAt(2).getX(), 0.001); assertEquals(-3.32*IShape.PPC, fh.getPtAt(2).getY(), 0.001); assertEquals(6.43*IShape.PPC, fh.getPtAt(3).getX(), 0.001); assertEquals(-2.77*IShape.PPC, fh.getPtAt(3).getY(), 0.001); assertEquals(8.1*IShape.PPC, fh.getPtAt(4).getX(), 0.001); assertEquals(-0.37*IShape.PPC, fh.getPtAt(4).getY(), 0.001); assertEquals(IFreeHandProp.FreeHandType.CURVES, fh.getType()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomFreeHandOpen() throws ParseException { IGroup group = parser.parsePSTCode("\\pscustom{\\moveto(0.0,2.64)\\lineto(0.19,2.82)\\curveto(0.285,2.91)(1.49,3.16)(2.6,3.32)"+ //$NON-NLS-1$ "\\curveto(3.71,3.48)(5.625,3.205)(6.43,2.77)\\curveto(7.235,2.335)(8.07,1.135)(8.1,0.37)"+ //$NON-NLS-1$ "\\curveto(8.13,-0.395)(7.64,-1.63)(7.12,-2.1)\\curveto(6.6,-2.57)(5.45,-3.18)(4.82,-3.32)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); IFreehand fh = (IFreehand)group.getShapeAt(0); assertEquals(7, fh.getNbPoints()); assertEquals(0., fh.getPtAt(0).getX(), 0.001); assertEquals(-2.64*IShape.PPC, fh.getPtAt(0).getY(), 0.001); assertEquals(0.19*IShape.PPC, fh.getPtAt(1).getX(), 0.001); assertEquals(-2.82*IShape.PPC, fh.getPtAt(1).getY(), 0.001); assertEquals(2.6*IShape.PPC, fh.getPtAt(2).getX(), 0.001); assertEquals(-3.32*IShape.PPC, fh.getPtAt(2).getY(), 0.001); assertEquals(6.43*IShape.PPC, fh.getPtAt(3).getX(), 0.001); assertEquals(-2.77*IShape.PPC, fh.getPtAt(3).getY(), 0.001); assertEquals(8.1*IShape.PPC, fh.getPtAt(4).getX(), 0.001); assertEquals(-0.37*IShape.PPC, fh.getPtAt(4).getY(), 0.001); assertTrue(fh.isOpen()); assertEquals(IFreeHandProp.FreeHandType.CURVES, fh.getType()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomMovetoCurvetoLineTo() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"{%\n\\moveto(1,2)\\curveto(3.1,4.1)(3.2,4.3)(3,4)\\lineto(5,6)}").get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, group.size()); IFreehand fh = (IFreehand)group.getShapeAt(0); assertEquals(3, fh.getNbPoints()); assertEquals(1.*IShape.PPC, fh.getPtAt(0).getX(), 0.001); assertEquals(-2.*IShape.PPC, fh.getPtAt(0).getY(), 0.001); assertEquals(3.*IShape.PPC, fh.getPtAt(1).getX(), 0.001); assertEquals(-4.*IShape.PPC, fh.getPtAt(1).getY(), 0.001); assertEquals(5.*IShape.PPC, fh.getPtAt(2).getX(), 0.001); assertEquals(-6.*IShape.PPC, fh.getPtAt(2).getY(), 0.001); assertEquals(IFreeHandProp.FreeHandType.LINES, fh.getType()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomMovetoCurveto() throws ParseException { IFreehand fh = (IFreehand)parser.parsePSTCode("\\"+getCommandName()+"[linewidth=10cm]{%\n\\moveto(1,2)\\curveto(3.1,4.1)(3.2,4.3)(3,4)}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, fh.getNbPoints()); assertEquals(1.*IShape.PPC, fh.getPtAt(0).getX(), 0.001); assertEquals(-2.*IShape.PPC, fh.getPtAt(0).getY(), 0.001); assertEquals(3.*IShape.PPC, fh.getPtAt(1).getX(), 0.001); assertEquals(-4.*IShape.PPC, fh.getPtAt(1).getY(), 0.001); assertEquals(IFreeHandProp.FreeHandType.CURVES, fh.getType()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomMovetoLineto() throws ParseException { IFreehand fh = (IFreehand)parser.parsePSTCode("\\"+getCommandName()+"[linewidth=10cm]{%\n\\moveto(1,2)\\lineto(3,4)}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, fh.getNbPoints()); assertEquals(1.*IShape.PPC, fh.getPtAt(0).getX(), 0.001); assertEquals(-2.*IShape.PPC, fh.getPtAt(0).getY(), 0.001); assertEquals(3.*IShape.PPC, fh.getPtAt(1).getX(), 0.001); assertEquals(-4.*IShape.PPC, fh.getPtAt(1).getY(), 0.001); assertEquals(IFreeHandProp.FreeHandType.LINES, fh.getType()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomNothingWithNewpathCommand() throws ParseException { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"{\\newpath\n}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testPsCustomMustConsiderParametersCommand() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"[linewidth=10cm]{%\n\\psline(4,3)}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, line.getThickness(), 0.001); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomStarCommand() throws ParseException { IRectangle rec = (IRectangle) parser.parsePSTCode("\\"+getCommandName()+"*{%\n\\psframe(2,2)\n}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(rec.isFilled()); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomNotEmptyCommand() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"{%\n\\psdots(1,1)\n\\psframe(2,2)\n}").get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IDot); assertTrue(group.getShapeAt(1) instanceof IRectangle); assertEquals(0, PSTParser.errorLogs().size()); } @Test public void testPsCustomEmptyCommand() throws ParseException { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"{}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0, PSTParser.errorLogs().size()); } @Override public String getCommandName() { return "pscustom"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsdiamond.java000066400000000000000000000161301321075051700334260ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsdiamond extends TestParsingShape { @Override public String getCommandName() { return "psdiamond"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(1,2)"; //$NON-NLS-1$ } @Test public void testCoordinatesPt() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35pt,20pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, rh.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC/PSTricksConstants.CM_VAL_PT*-1., rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., rh.getWidth(), 0.001); assertEquals(20.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(350mm,200mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35in,20in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC/2.54, rh.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC/2.54*-1., rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/2.54*2., rh.getWidth(), 0.001); assertEquals(20.*IShape.PPC/2.54*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35cm,20cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(35,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesInt() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(10,20)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC-35.*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC+50.*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns2() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(-+.5,+-5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-.5*IShape.PPC-35.5*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(-5.*-IShape.PPC+50.5*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(-+-.5,+--.5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC+50.5*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(.5,.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC+50.5*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(10.5,20.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.5*IShape.PPC-35.5*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(20.5*-IShape.PPC+50.5*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoFirstMissing() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(,)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(IShape.PPC-35*IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(-IShape.PPC+50.*IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(50.*IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoLastMissing() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(,)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-IShape.PPC, rh.getPosition().getX(), 0.001); assertEquals(IShape.PPC, rh.getPosition().getY(), 0.001); assertEquals(IShape.PPC*2., rh.getWidth(), 0.001); assertEquals(IShape.PPC*2., rh.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2WidthHeight0() throws ParseException { IRhombus rh = (IRhombus)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(0,0)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(rh.getWidth()>0); assertTrue(rh.getHeight()>0); assertTrue(PSTParser.errorLogs().isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsdots.java000066400000000000000000000116061321075051700327670ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsdots extends TestParsingPSdot { @Override @Test public void testDotStyleo() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=o]"+getBasicCoordinates()).get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, group.size()); assertEquals(DotStyle.O, ((IDot)group.getShapeAt(0)).getDotStyle()); assertEquals(DotStyle.O, ((IDot)group.getShapeAt(1)).getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testDotStyleDot() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"[dotstyle=*]"+getBasicCoordinates()).get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, group.size()); assertEquals(DotStyle.DOT, ((IDot)group.getShapeAt(0)).getDotStyle()); assertEquals(DotStyle.DOT, ((IDot)group.getShapeAt(1)).getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testNoDotStyle() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertEquals(DotStyle.DOT, ((IDot)group.getShapeAt(0)).getDotStyle()); assertEquals(DotStyle.DOT, ((IDot)group.getShapeAt(1)).getDotStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testNoCoordinate() throws ParseException { try { parser.parsePSTCode("\\"+getCommandName()).get().isEmpty(); //$NON-NLS-1$ fail(); }catch(Exception e) { /* ok */ } } @Override @Test public void test1Coordinates() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"(5,10)").get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, group.size()); assertEquals(5.*IShape.PPC, group.getShapeAt(0).getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, group.getShapeAt(0).getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testFloatSigns() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5)(+-++35.5,---50.5)").get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, group.getShapeAt(0).getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, group.getShapeAt(0).getPtAt(0).getY(), 0.0001); assertEquals(-35.5*IShape.PPC, group.getShapeAt(1).getPtAt(0).getX(), 0.0001); assertEquals(50.5*IShape.PPC, group.getShapeAt(1).getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testStarFillingParametershaveNoEffect() throws ParseException { // } @Override @Test public void testStarLineColourIsFillingColour() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"*["+"linecolor=green, dotstyle=o]"+getBasicCoordinates()).get(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(Color.GREEN, group.getShapeAt(0).getFillingCol()); assertEquals(Color.GREEN, group.getShapeAt(0).getLineColour()); assertEquals(Color.GREEN, group.getShapeAt(1).getFillingCol()); assertEquals(Color.GREEN, group.getShapeAt(1).getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override @Test public void testCoordinatesFloat2() throws ParseException { IDot dot = (IDot)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, dot.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, dot.getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2Points() throws ParseException { IGroup group = parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)(2,2)").get(); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IDot); assertTrue(group.getShapeAt(1) instanceof IDot); assertEquals(35.5*IShape.PPC, group.getShapeAt(0).getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, group.getShapeAt(0).getPtAt(0).getY(), 0.0001); assertEquals(2.*IShape.PPC, group.getShapeAt(1).getPtAt(0).getX(), 0.0001); assertEquals(-2.*IShape.PPC, group.getShapeAt(1).getPtAt(0).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psdots"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(1,1)(2,2)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsellipse.java000066400000000000000000000172551321075051700334610ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsellipse extends TestParsingShape { @Override public String getCommandName() { return "psellipse"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(1,2)"; //$NON-NLS-1$ } @Test public void testUnit() throws ParseException { IEllipse sh = (IEllipse)parser.parsePSTCode("\\psset{unit=4}\\psellipse(2,3cm)(2cm,5cm)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(4.*2.*IShape.PPC-2.*IShape.PPC, sh.getX(), 0.0001); assertEquals(-3.*IShape.PPC+5.*IShape.PPC, sh.getY(), 0.0001); assertEquals(2.*2.*IShape.PPC, sh.getWidth(), 0.0001); assertEquals(2.*5.*IShape.PPC, sh.getHeight(), 0.0001); } @Test public void testCoordinatesPt() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35pt,20pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, ell.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC/PSTricksConstants.CM_VAL_PT*-1., ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., ell.getWidth(), 0.001); assertEquals(20.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(350mm,200mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35in,20in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC/2.54, ell.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC/2.54*-1., ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/2.54*2., ell.getWidth(), 0.001); assertEquals(20.*IShape.PPC/2.54*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35cm,20cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(35,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35.*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC*-1., ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(20.*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesInt() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(10,20)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC-35.*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC+50.*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns2() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(-+.5,+-5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-.5*IShape.PPC-35.5*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(-5.*-IShape.PPC+50.5*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(-+-.5,+--.5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC+50.5*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(.5,.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC+50.5*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(10.5,20.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.5*IShape.PPC-35.5*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(20.5*-IShape.PPC+50.5*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.5*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoFirstMissing() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(,)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(IShape.PPC-35*IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(-IShape.PPC+50.*IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(50.*IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoLastMissing() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(,)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-IShape.PPC, ell.getPosition().getX(), 0.001); assertEquals(IShape.PPC, ell.getPosition().getY(), 0.001); assertEquals(IShape.PPC*2., ell.getWidth(), 0.001); assertEquals(IShape.PPC*2., ell.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2WidthHeight0() throws ParseException { IEllipse ell = (IEllipse)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(0,0)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(ell.getWidth()>0); assertTrue(ell.getHeight()>0); assertTrue(PSTParser.errorLogs().isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsframe.java000066400000000000000000000310151321075051700331040ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsframe extends TestParsingShape { @Test public void test_psset_unit_yunit() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\psset{unit=2,yunit=3}\\"+getCommandName()+"(1,1)(5,5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*IShape.PPC, rec.getX(), 0.000001); assertEquals(-2.*3.*IShape.PPC, rec.getY(), 0.000001); assertEquals(2.*4.*IShape.PPC, rec.getWidth(), 0.000001); assertEquals(2.*4.*3.*IShape.PPC, rec.getHeight(), 0.000001); } @Test public void test_psset_unit_xunit() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\psset{unit=2,xunit=3}\\"+getCommandName()+"(1,1)(5,5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*3.*IShape.PPC, rec.getX(), 0.000001); assertEquals(-2.*IShape.PPC, rec.getY(), 0.000001); assertEquals(2.*4.*3.*IShape.PPC, rec.getWidth(), 0.000001); assertEquals(2.*4.*IShape.PPC, rec.getHeight(), 0.000001); } @Test public void test_psset_unit() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\psset{unit=2}\\"+getCommandName()+"(1,1)(5,5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*IShape.PPC, rec.getX(), 0.000001); assertEquals(-2.*IShape.PPC, rec.getY(), 0.000001); assertEquals(2.*4.*IShape.PPC, rec.getWidth(), 0.000001); assertEquals(2.*4.*IShape.PPC, rec.getHeight(), 0.000001); } @Override public String getCommandName() { return "psframe"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(35,20)"; //$NON-NLS-1$ } @Test public void testParamAddfillstyle() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[addfillstyle=hlines]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamBorder() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[border=2.1in]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamDotsep() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dotsep=2.1in]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamDashNumNum() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dash=2.1 +0.3]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamDashDimDim() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dash=2cm 0.3 pt]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamDashDimNum() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[dash=2cm 0.3]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamFramearc() throws ParseException { IRectangle sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=0]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., sh.getLineArc(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., sh.getLineArc(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=0.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.5, sh.getLineArc(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=0.2, framearc=0.3]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.3, sh.getLineArc(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=-1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); PSTParser.errorLogs().clear(); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=0.5cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); PSTParser.errorLogs().clear(); sh = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"[framearc=2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35pt,20pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, rec.getWidth(), 0.001); assertEquals(20.*IShape.PPC/PSTricksConstants.CM_VAL_PT, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(350mm,200mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(20.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35in,20in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/2.54, rec.getWidth(), 0.001); assertEquals(20.*IShape.PPC/2.54, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35cm,20cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(20.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(35,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(20.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesIntOppositeAll() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(35,50)(10,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(25.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(30.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesIntOppositeX() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(35,20)(10,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(25.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(30.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesIntOppositeY() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(10,50)(35,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(25.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(30.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesInt() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(10,20)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(25.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(30.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns2() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(-+.5,+-5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-.5*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(-5.*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(36.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(55.5*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(-+-.5,+--.5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(50.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(.5,.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(50.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(10.5,20.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.5*IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(20.5*-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(25.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(30.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoFirstMissing() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(,)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(IShape.PPC, rec.getPosition().getX(), 0.001); assertEquals(-IShape.PPC, rec.getPosition().getY(), 0.001); assertEquals(34.*IShape.PPC, rec.getWidth(), 0.001); assertEquals(49.*IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoLastMissing() throws ParseException { IRectangle rec = (IRectangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(,)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., rec.getPosition().getX(), 0.001); assertEquals(0., rec.getPosition().getY(), 0.001); assertEquals(IShape.PPC, rec.getWidth(), 0.001); assertEquals(IShape.PPC, rec.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsframebox.java000066400000000000000000000171651321075051700336270ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsframebox extends TestPSTParser { @Test public void testFrameboxWithSpecialColour() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\definecolor{color3b}{rgb}{0.7725490196078432,0.09803921568627451,0.09803921568627451}"+ //$NON-NLS-1$ "\\psframebox[linewidth=0.04,doubleline=true,doublesep=0.12,fillstyle=solid,fillcolor=color3b]{coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(txt.getText().contains("definecolor{color3b}{rgb}{")); //$NON-NLS-1$ } @Test public void testParse_pstribox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\pstribox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\pstribox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_pstribox() throws ParseException { IGroup group = parser.parsePSTCode("\\pstribox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\pstribox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psdiabox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\psdiabox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psdiabox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psdiabox() throws ParseException { IGroup group = parser.parsePSTCode("\\psdiabox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psdiabox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psovalbox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\psovalbox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psovalbox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psovalbox() throws ParseException { IGroup group = parser.parsePSTCode("\\psovalbox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psovalbox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_pscirclebox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\pscirclebox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\pscirclebox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_pscirclebox() throws ParseException { IGroup group = parser.parsePSTCode("\\pscirclebox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\pscirclebox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psshadowbox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\psshadowbox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psshadowbox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psshadowbox() throws ParseException { IGroup group = parser.parsePSTCode("\\psshadowbox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psshadowbox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBug911816() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/911816 IGroup group = parser.parsePSTCode("\\psframebox{$E=mc^2$}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psframebox{$E=mc^2$}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psframebox() throws ParseException { IGroup group = parser.parsePSTCode("\\psframebox[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psframebox[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psdblframebox() throws ParseException { IGroup group = parser.parsePSTCode("\\psdblframebox{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psdblframebox{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psframebox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\psframebox*[doubleline=true]{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psframebox*[doubleline=true]{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParse_psdblframebox_star() throws ParseException { IGroup group = parser.parsePSTCode("\\psdblframebox*{\\psframe(0,1)}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = ((IText)group.getShapeAt(0)); assertEquals("\\psdblframebox*{\\psframe(0,1)}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return ""; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsgrid.java000066400000000000000000000246041321075051700327450ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IGrid; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsgrid extends TestPSTParser { @Test public void testGridXUnit() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[xunit=20in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., grid.getUnit(), 0.00001); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[xunit=0.3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., grid.getUnit(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridYUnit() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[yunit=20in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., grid.getUnit(), 0.00001); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[yunit=0.3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., grid.getUnit(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridUnit() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[unit=20in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(20./PSTricksConstants.INCH_VAL_CM, grid.getUnit(), 0.00001); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[unit=0.3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.3, grid.getUnit(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridSubGridWidth() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgridwidth=20in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(20.*IShape.PPC/PSTricksConstants.INCH_VAL_CM, grid.getSubGridWidth(), 0.00001); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgridwidth=0.3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.3*IShape.PPC, grid.getSubGridWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridLabels() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridlabels=20in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals((int)(20.*IShape.PPC/PSTricksConstants.INCH_VAL_CM), grid.getLabelsSize()); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridlabels=0.3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals((int)(0.3*IShape.PPC), grid.getLabelsSize()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridSubGridDiv() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgriddiv=3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, grid.getSubGridDiv()); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgriddiv=0]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0, grid.getSubGridDiv()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testSubGridDots() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgriddots=3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, grid.getSubGridDots()); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgriddots=0]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0, grid.getSubGridDots()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridDots() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[griddots=3]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, grid.getGridDots()); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[griddots=0]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0, grid.getGridDots()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testSubGridLabelColor() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[subgridcolor=green]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.GREEN, grid.getSubGridColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridLabelColor() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridlabelcolor=green]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.GREEN, grid.getGridLabelsColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridColor() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridcolor=green]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.GREEN, grid.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testGridWidth() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridwidth=1.3cm]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1.3*IShape.PPC, grid.getGridWidth(), 0.001); grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"[gridwidth=.3in]" +getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.3*IShape.PPC/PSTricksConstants.INCH_VAL_CM, grid.getGridWidth(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test0CoordDoubleValue() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\begin{pspicture}(2.1,2.6)(5.6,5.5)\\"+getCommandName()+"\\end{pspicture}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(0., grid.getOriginY(), 0.0001); assertEquals(2., grid.getGridMinX(), 0.0001); assertEquals(3., grid.getGridMinY(), 0.0001); assertEquals(6., grid.getGridMaxX(), 0.0001); assertEquals(6., grid.getGridMaxY(), 0.0001); assertTrue(grid.isXLabelSouth()); assertTrue(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test0Coord() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\begin{pspicture}(2,2)(5,5)\\"+getCommandName()+"\\end{pspicture}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(0., grid.getOriginY(), 0.0001); assertEquals(2., grid.getGridMinX(), 0.0001); assertEquals(2., grid.getGridMinY(), 0.0001); assertEquals(5., grid.getGridMaxX(), 0.0001); assertEquals(5., grid.getGridMaxY(), 0.0001); assertTrue(grid.isXLabelSouth()); assertTrue(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coord() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"(1,2)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(0., grid.getOriginY(), 0.0001); assertEquals(0., grid.getGridMinX(), 0.0001); assertEquals(0., grid.getGridMinY(), 0.0001); assertEquals(1., grid.getGridMaxX(), 0.0001); assertEquals(2., grid.getGridMaxY(), 0.0001); assertTrue(grid.isXLabelSouth()); assertTrue(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordInverted() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"(3,4)(1,2)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3., grid.getOriginX(), 0.0001); assertEquals(4., grid.getOriginY(), 0.0001); assertEquals(1., grid.getGridMinX(), 0.0001); assertEquals(2., grid.getGridMinY(), 0.0001); assertEquals(3., grid.getGridMaxX(), 0.0001); assertEquals(4., grid.getGridMaxY(), 0.0001); assertFalse(grid.isXLabelSouth()); assertFalse(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2Coord() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"(1,2)(3,4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., grid.getOriginX(), 0.0001); assertEquals(2., grid.getOriginY(), 0.0001); assertEquals(1., grid.getGridMinX(), 0.0001); assertEquals(2., grid.getGridMinY(), 0.0001); assertEquals(3., grid.getGridMaxX(), 0.0001); assertEquals(4., grid.getGridMaxY(), 0.0001); assertTrue(grid.isXLabelSouth()); assertTrue(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test3CoordInverted() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"(0,-1)(3,4)(1,2)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(-1., grid.getOriginY(), 0.0001); assertEquals(1., grid.getGridStartX(), 0.0001); assertEquals(2., grid.getGridStartY(), 0.0001); assertEquals(3., grid.getGridEndX(), 0.0001); assertEquals(4., grid.getGridEndY(), 0.0001); assertFalse(grid.isXLabelSouth()); assertFalse(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test3Coord() throws ParseException { IGrid grid = (IGrid)parser.parsePSTCode("\\"+getCommandName()+"(0,-1)(1,2)(3,4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., grid.getOriginX(), 0.0001); assertEquals(-1., grid.getOriginY(), 0.0001); assertEquals(1., grid.getGridStartX(), 0.0001); assertEquals(2., grid.getGridStartY(), 0.0001); assertEquals(3., grid.getGridEndX(), 0.0001); assertEquals(4., grid.getGridEndY(), 0.0001); assertTrue(grid.isXLabelSouth()); assertTrue(grid.isYLabelWest()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Override public String getCommandName() { return "psgrid"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(0,0)(0,0)(1,1)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPsline.java000066400000000000000000000156641321075051700327550ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPsline extends TestParsingShape { @Test public void testBugTwoSameArrows() throws ParseException { IPolyline sh = (IPolyline)parser.parsePSTCode("\\psline{<-<}(-0.1,-0.2)(2,5)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(sh.getArrowAt(0).getArrowStyle(), IArrow.ArrowStyle.LEFT_ARROW); assertEquals(sh.getArrowAt(1).getArrowStyle(), IArrow.ArrowStyle.LEFT_ARROW); assertTrue(sh.getArrowAt(0)!=sh.getArrowAt(1)); } @Test public void testUnit() throws ParseException { IPolyline sh = (IPolyline)parser.parsePSTCode("\\psset{unit=2}\\psline[linewidth=0.3,linestyle=dashed](2,3)(1cm,2cm)").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(2.*2.*IShape.PPC, sh.getPtAt(0).getX(), 0.0001); assertEquals(-3.*2.*IShape.PPC, sh.getPtAt(0).getY(), 0.0001); assertEquals(IShape.PPC, sh.getPtAt(1).getX(), 0.0001); assertEquals(-2.*IShape.PPC, sh.getPtAt(1).getY(), 0.0001); } @Test public void testcornersizeParsed() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[cornersize=relative](5,10)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testLinearcParsed() throws ParseException { parser.parsePSTCode("\\"+getCommandName()+"[linearc=0.3cm](5,10)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testMoreThanTwoPointsCoordinates() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(5,10)(6, 7) (1, 2) % foo \n(3, \t4)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(4, line.getNbPoints()); assertEquals(5.*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-10.*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(6.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-7.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(-2.*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertEquals(3.*IShape.PPC, line.getPtAt(3).getX(), 0.0001); assertEquals(-4.*IShape.PPC, line.getPtAt(3).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(5,10)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, line.getNbPoints()); assertEquals(0., line.getPtAt(0).getX(), 0.0001); assertEquals(0., line.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-10.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt)(10pt,5pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, line.getNbPoints()); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(0).getY(), 0.0001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(1).getX(), 0.0001); assertEquals(-5.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(350mm,200mm)(10mm, 30.3mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, line.getNbPoints()); assertEquals(35.*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-3.03*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35in,20in)(1.2in,0.2in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/2.54, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/2.54, line.getPtAt(0).getY(), 0.0001); assertEquals(1.2*IShape.PPC/2.54, line.getPtAt(1).getX(), 0.0001); assertEquals(-0.2*IShape.PPC/2.54, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)(1.2cm,2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(1.2*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-2.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testFloatSigns() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5)(--+12, -1)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(12.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesFloat2() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)(12, 1)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(12.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-1.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testErrorOnNoPoint() { try { parser.parsePSTCode("\\"+getCommandName()+"").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Override public String getCommandName() { return "psline"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(10,10)(20,20)(30,30)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPspolygon.java000066400000000000000000000136571321075051700335150ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPspolygon extends TestParsingShape { @Test public void test2Coordinates() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(5,10)(15,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(0., line.getPtAt(0).getX(), 0.0001); assertEquals(0., line.getPtAt(0).getY(), 0.0001); assertEquals(5.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-10.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(15.*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(-20.*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt)(10pt,5pt)(-10pt,-5pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(0).getY(), 0.0001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(1).getX(), 0.0001); assertEquals(-5.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(1).getY(), 0.0001); assertEquals(-10.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(2).getX(), 0.0001); assertEquals(5.*IShape.PPC/PSTricksConstants.CM_VAL_PT, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(350mm,200mm)(10mm, 30.3mm)(-10mm, -30.3mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-3.03*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(-1.*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(3.03*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(35in,20in)(1.2in,0.2in)(-1.2in,-0.2in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.*IShape.PPC/2.54, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC/2.54, line.getPtAt(0).getY(), 0.0001); assertEquals(1.2*IShape.PPC/2.54, line.getPtAt(1).getX(), 0.0001); assertEquals(-0.2*IShape.PPC/2.54, line.getPtAt(1).getY(), 0.0001); assertEquals(-1.2*IShape.PPC/2.54, line.getPtAt(2).getX(), 0.0001); assertEquals(0.2*IShape.PPC/2.54, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)(1.2cm,2cm)(-1.2cm,-2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-20.*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(1.2*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-2.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(-1.2*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(2.*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testFloatSigns() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5)(--+12, -1)(---+12, ++1)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.5*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(12.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(-12.*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(-1.*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesFloat2() throws ParseException { IPolygon line = (IPolygon)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5)(12, 1)(-12, -1)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(3, line.getNbPoints()); assertEquals(35.5*IShape.PPC, line.getPtAt(0).getX(), 0.0001); assertEquals(-50.5*IShape.PPC, line.getPtAt(0).getY(), 0.0001); assertEquals(12.*IShape.PPC, line.getPtAt(1).getX(), 0.0001); assertEquals(-1.*IShape.PPC, line.getPtAt(1).getY(), 0.0001); assertEquals(-12.*IShape.PPC, line.getPtAt(2).getX(), 0.0001); assertEquals(1.*IShape.PPC, line.getPtAt(2).getY(), 0.0001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testErrorOnNoPoint() { try { parser.parsePSTCode("\\"+getCommandName()+"").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testErrorOnOnePoint() { try { parser.parsePSTCode("\\"+getCommandName()+"(1,1)").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Override public String getCommandName() { return "pspolygon"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(0,0)(1,1)(2,2)"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPstriangle.java000066400000000000000000000175101321075051700336230ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPstriangle extends TestParsingShape { @Override public String getCommandName() { return "pstriangle"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(1,2)"; //$NON-NLS-1$ } @Test public void testGangle() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"[gangle=180](2,2)(4,1)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0., tri.getPosition().getX(), 0.001); assertEquals(-1.*IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(4.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(1.*IShape.PPC, tri.getHeight(), 0.001); assertEquals(Math.toRadians(180.), tri.getRotationAngle(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testHeightNegative() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(35,-10)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC, tri.getHeight(), 0.001); assertEquals(Math.PI, tri.getRotationAngle(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35pt,20pt)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35./2.*IShape.PPC/PSTricksConstants.CM_VAL_PT, tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT, tri.getWidth(), 0.001); assertEquals(20.*IShape.PPC/PSTricksConstants.CM_VAL_PT, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(350mm,200mm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35./2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(20.*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35in,20in)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35./2.*IShape.PPC/2.54, tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC/2.54, tri.getWidth(), 0.001); assertEquals(20.*IShape.PPC/2.54, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(35cm,20cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35./2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(20.*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test1Coordinates() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(35,20)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-35./2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(20.*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesInt() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(10,20)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.*IShape.PPC-35./2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(20.*-IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns2() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(-+.5,+-5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-.5*IShape.PPC-35.5/2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(-5.*-IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.5*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloatSigns() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(-+-.5,+--.5)(+++35.5,--50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5/2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.5*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(.5,.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(.5*IShape.PPC-35.5/2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(.5*-IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.5*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(10.5,20.5)(35.5,50.5)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(10.5*IShape.PPC-35.5/2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(20.5*-IShape.PPC, tri.getPosition().getY(), 0.001); assertEquals(35.5*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.5*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoFirstMissing() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(,)(35,50)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(IShape.PPC-35./2.*IShape.PPC, tri.getPosition().getX(), 0.001); assertEquals(IShape.PPC*-1., tri.getPosition().getY(), 0.001); assertEquals(35.*IShape.PPC, tri.getWidth(), 0.001); assertEquals(50.*IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesTwoLastMissing() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(,)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-IShape.PPC/2., tri.getPosition().getX(), 0.001); assertEquals(0., tri.getPosition().getY(), 0.001); assertEquals(IShape.PPC, tri.getWidth(), 0.001); assertEquals(IShape.PPC, tri.getHeight(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2WidthHeight0() throws ParseException { ITriangle tri = (ITriangle)parser.parsePSTCode("\\"+getCommandName()+"(0,0)(0,0)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(tri.getWidth()>0); assertTrue(tri.getHeight()>0); assertTrue(PSTParser.errorLogs().isEmpty()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingPswedge.java000066400000000000000000000215341321075051700331120ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingPswedge extends TestParsingShape { @Test public void testAngle1Angle2() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{200}{100}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(200.), arc.getAngleStart(), 0.0000001); assertEquals(Math.toRadians(100.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{100}{200}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(100.), arc.getAngleStart(), 0.0000001); assertEquals(Math.toRadians(200.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testAngle2() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{11}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(20.), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{11}{-200.15}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-200.15), arc.getAngleEnd(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testAngle1() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(10.), arc.getAngleStart(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{-10.12}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-10.12), arc.getAngleStart(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBadAngle2() { try { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"{2}{10}{foo}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); }catch(Exception e) { /* ok */ } } @Test public void testBadAngle1() { try { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"{2}{foo}{20}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); }catch(Exception e) { /* ok */ } } @Test public void testBadRadius() { try { assertTrue(parser.parsePSTCode("\\"+getCommandName()+"{foo}{10}{20}").get().isEmpty()); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); }catch(Exception e) { /* ok */ } } @Test public void testMissingOrigin() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"{10}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(-10.*IShape.PPC, arc.getPosition().getX(), 0.0000001); assertEquals(-10.*IShape.PPC*-1., arc.getPosition().getY(), 0.0000001); assertEquals(10.*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(10.*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesPt() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt){10pt}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/PSTricksConstants.CM_VAL_PT-10.*IShape.PPC/PSTricksConstants.CM_VAL_PT, arc.getPosition().getX(), 0.0000001); assertEquals((20.*IShape.PPC/PSTricksConstants.CM_VAL_PT-10.*IShape.PPC/PSTricksConstants.CM_VAL_PT)*-1., arc.getPosition().getY(), 0.0000001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., arc.getWidth(), 0.0000001); assertEquals(10.*IShape.PPC/PSTricksConstants.CM_VAL_PT*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMm() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(350mm,200mm){10mm}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-1.*IShape.PPC, arc.getPosition().getX(), 0.0000001); assertEquals((20.*IShape.PPC-1.*IShape.PPC)*-1., arc.getPosition().getY(), 0.0000001); assertEquals(1.*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(1.*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesInch() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(35in,20in){1.2in}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC/2.54-1.2*IShape.PPC/2.54, arc.getPosition().getX(), 0.0000001); assertEquals((20.*IShape.PPC/2.54-1.2*IShape.PPC/2.54)*-1., arc.getPosition().getY(), 0.0000001); assertEquals(1.2*IShape.PPC/2.54*2., arc.getWidth(), 0.0000001); assertEquals(1.2*IShape.PPC/2.54*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesCm() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm){.5cm}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-.5*IShape.PPC, arc.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC-.5*IShape.PPC)*-1., arc.getPosition().getY(), 0.001); assertEquals(.5*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(.5*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesRadius() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(35,20){10}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-10.*IShape.PPC, arc.getPosition().getX(), 0.0000001); assertEquals((20.*IShape.PPC-10.*IShape.PPC)*-1., arc.getPosition().getY(), 0.0000001); assertEquals(10.*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(10.*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testFloatSigns() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(+++35.5,--50.5){--+12}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC-12.*IShape.PPC, arc.getPosition().getX(), 0.001); assertEquals((50.5*IShape.PPC-12.*IShape.PPC)*-1., arc.getPosition().getY(), 0.001); assertEquals(12.*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(12.*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNegativeRadius() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(0,0){-1}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(arc.getWidth()>0); assertTrue(arc.getHeight()>0); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void test2CoordinatesFloat2() throws ParseException { ICircleArc arc = (ICircleArc)parser.parsePSTCode("\\"+getCommandName()+"(35.5,50.5){1.25}{10}{20}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.5*IShape.PPC-1.25*IShape.PPC, arc.getPosition().getX(), 0.001); assertEquals((50.5*IShape.PPC-1.25*IShape.PPC)*-1., arc.getPosition().getY(), 0.001); assertEquals(1.25*IShape.PPC*2., arc.getWidth(), 0.0000001); assertEquals(1.25*IShape.PPC*2., arc.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testCoordinatesMissing() { try { parser.parsePSTCode("\\"+getCommandName()+"(,){1}").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testErrorOnNoAngle2() throws Exception { try { parser.parsePSTCode("\\"+getCommandName()+"(,){1}{30}{}").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testErrorOnNoAngle1() { try { parser.parsePSTCode("\\"+getCommandName()+"(,){1}{}{30}").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testErrorOnNoRadius() { try { parser.parsePSTCode("\\"+getCommandName()+"(,){}{10}{30}").get().isEmpty(); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Override public String getCommandName() { return "pswedge"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "{1}{10}{90}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingQdisk.java000066400000000000000000000071601321075051700325660ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingQdisk extends TestPSTParser { @Test public void testCoordinatesCm() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm){.5cm}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(35.*IShape.PPC-.5*IShape.PPC, cir.getPosition().getX(), 0.001); assertEquals((20.*IShape.PPC-.5*IShape.PPC)*-1., cir.getPosition().getY(), 0.001); assertEquals(.5*IShape.PPC*2., cir.getWidth(), 0.0000001); assertEquals(.5*IShape.PPC*2., cir.getHeight(), 0.0000001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testLineColourIsFillColour() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\psset{linecolor=green}\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.GREEN, cir.getFillingCol()); assertEquals(Color.GREEN, cir.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testLineStylePlain() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\psset{linestyle=dotted}\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(LineStyle.SOLID, cir.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoDbleBord() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\psset{doubleline=true}\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(cir.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoShadow() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\psset{shadow=true}\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(cir.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBorderMustBeInto() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\psset{dimen=middle}\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(BorderPos.INTO, cir.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testMustBeFilled() throws ParseException { ICircle cir = (ICircle)parser.parsePSTCode("\\"+getCommandName()+"(35pt,20pt){10pt}").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.PLAIN, cir.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testMustNotHaveParam() { try { parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testMustNotHaveCoordinate() { try { parser.parsePSTCode("\\"+getCommandName()+"{1}"); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Override public String getCommandName() { return "qdisk"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(,){1}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingQline.java000066400000000000000000000052011321075051700325550ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingQline extends TestPSTParser { @Test public void testCoordinatesCm() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)(11.12cm,-2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(2, line.getNbPoints()); assertEquals(35.*IShape.PPC, line.getPtAt(0).getX(), 0.001); assertEquals(20.*IShape.PPC*-1., line.getPtAt(0).getY(), 0.001); assertEquals(11.12*IShape.PPC, line.getPtAt(1).getX(), 0.001); assertEquals(-2.*IShape.PPC*-1., line.getPtAt(1).getY(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoDbleBord() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psset{doubleline=true}\\"+getCommandName()+"(35cm,20cm)(11.12cm,-2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(line.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testNoShadow() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\psset{shadow=true}\\"+getCommandName()+"(35cm,20cm)(11.12cm,-2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(line.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testMustNotBeFilled() throws ParseException { IPolyline line = (IPolyline)parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)(11.12cm,-2cm)").get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.NONE, line.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testMustNotHaveParam() { try { parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient]"+getBasicCoordinates()); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Test public void testMustHaveTwoCoordinate() { try { parser.parsePSTCode("\\"+getCommandName()+"(35cm,20cm)"); //$NON-NLS-1$ //$NON-NLS-2$ fail(); }catch(Exception e) { /* ok */ } } @Override public String getCommandName() { return "qline"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return "(,){1}"; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingRPut.java000066400000000000000000000324101321075051700324010ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public class TestParsingRPut extends TestPSTParser { @Test public void testRefPointCombo_t_br() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[t](0,0){\\rput[br](2,2){coucou}}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BOT_RIGHT, txt.getTextPosition()); } @Test public void testRefPoint_None() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput(10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.CENTER, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_B() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[B](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BASE, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_Br() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[Br](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BASE_RIGHT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_Bl() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[Bl](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BASE_LEFT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_r() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[r](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.RIGHT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_l() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[l](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.LEFT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_tr() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[tr](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.TOP_RIGHT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_b() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[b](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BOT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_t() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[t](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.TOP, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_tl() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[tl](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.TOP_LEFT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_bl() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[bl](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BOT_LEFT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRefPoint_br() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput[br](10,20){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(IText.TextPosition.BOT_RIGHT, txt.getTextPosition()); assertEquals(10.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-20.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testDoubleRputRotationMustNotRotateOtherShapes() throws ParseException { IGroup gp = parser.parsePSTCode("\\rput{10}(0,0){\\rput{80}(0,0){coucou}}\\psframe(10,10)").get(); //$NON-NLS-1$ IText txt = (IText)gp.getShapeAt(0); IRectangle rec = (IRectangle)gp.getShapeAt(1); assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(Math.toRadians(-90), txt.getRotationAngle(), 0.001); assertEquals(0., rec.getRotationAngle(), 0.001); } @Test public void testTripleRputRotationWithStar() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{10}(0,0){\\rput{*30}(0,0){\\rput{50}(0,0){coucou}}}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(-80., Math.toDegrees(txt.getRotationAngle()), 0.001); } @Test public void testDoubleRputRotation() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{10}(0,0){\\rput{80}(0,0){coucou}}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(Math.toRadians(-90), txt.getRotationAngle(), 0.001); } @Test public void testDoubleRputPosition() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput(1,2){\\rput(2,3){coucou}}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(3.*IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-5.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Test public void testRPutCoordStarFloatText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{*-90.8929}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(90.8929), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordStarSignedIntText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{*-++-90}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-90.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordStarIntText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{*90}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-90.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationRText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{R}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-270.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationDText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{D}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-180.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationLText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{L}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-90.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationUText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{U}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(0., txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationEText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{E}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-270.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationSText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{S}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-180.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationWText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{W}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(-90.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationNText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{N}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(0., txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordRotationDoubleText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput{-10.0}(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); assertEquals(Math.toRadians(10.), txt.getRotationAngle(), 0.001); } @Test public void testRPutCoordText() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\rput(1,2){coucou}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("coucou", txt.getText()); //$NON-NLS-1$ assertEquals(IShape.PPC, txt.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, txt.getPosition().getY(), 0.001); } @Override public String getCommandName() { return "rput"; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestParsingShape.java000066400000000000000000000752031321075051700325560ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.glib.views.pst.PSTricksConstants; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Test; public abstract class TestParsingShape extends TestPSTParser { @Test public void testParamGradlines() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradlines=100]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradlines=200]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradlines=300]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradlines=-100]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ PSTParser.errorLogs().clear(); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradlines=100.12]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamShadowangle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowangle=10]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isShadowable()) { assertEquals(Math.toRadians(10.), sh.getShadowAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowangle=20.]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(20.), sh.getShadowAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowangle=0.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(0.5), sh.getShadowAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowangle=+---123.1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-123.1), sh.getShadowAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowangle=10, shadowangle=-12]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-12.), sh.getShadowAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamGradangle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradangle=10]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(Math.toRadians(10.), sh.getGradAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradangle=20.]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(20.), sh.getGradAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradangle=0.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(0.5), sh.getGradAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradangle=+---123.1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-123.1), sh.getGradAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradangle=10, gradangle=-12]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-12.), sh.getGradAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamGradmidpoint() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=0]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(0., sh.getGradMidPt(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1., sh.getGradMidPt(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=0.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.5, sh.getGradMidPt(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=0.22]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.22, sh.getGradMidPt(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=-1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); PSTParser.errorLogs().clear(); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradmidpoint=2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamHatchangle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchangle=10]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(Math.toRadians(10.), sh.getHatchingsAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchangle=20.]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(20.), sh.getHatchingsAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchangle=0.5]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(0.5), sh.getHatchingsAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchangle=+---123.1]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-123.1), sh.getHatchingsAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchangle=10, hatchangle=-12]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Math.toRadians(-12.), sh.getHatchingsAngle(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamHatchsep() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchsep=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(0.2*IShape.PPC, sh.getHatchingsSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchsep=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getHatchingsSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchsep=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getHatchingsSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchsep=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getHatchingsSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchsep=2mm, hatchsep=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getHatchingsSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamHatchwidth() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getHatchingsWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getHatchingsWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchwidth=2mm, hatchwidth=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getHatchingsWidth(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamDoublesep() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublesep=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isDbleBorderable()) { assertEquals(0.2*IShape.PPC, sh.getDbleBordSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublesep=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getDbleBordSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublesep=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getDbleBordSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublesep=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getDbleBordSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublesep=2mm, doublesep=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getDbleBordSep(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamShadowsize() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowsize=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isShadowable()) { assertEquals(0.2*IShape.PPC, sh.getShadowSize(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowsize=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getShadowSize(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowsize=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getShadowSize(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowsize=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getShadowSize(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowsize=2mm, shadowsize=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getShadowSize(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamLinewidth() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[linewidth=0.2]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isThicknessable()) { assertEquals(0.2*IShape.PPC, sh.getThickness(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linewidth=0.2cm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getThickness(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linewidth=2mm]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.2*IShape.PPC, sh.getThickness(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linewidth=0.1in]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.INCH_VAL_CM, sh.getThickness(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linewidth=0.2, linewidth=0.1pt]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(0.1*IShape.PPC/PSTricksConstants.CM_VAL_PT, sh.getThickness(), 0.00001); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testStarFillsShape() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(sh.isFilled()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testStarBorderPosOuter() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"dimen=inner]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(sh.isBordersMovable()) { assertEquals(BorderPos.INTO, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testStarHasNoLineStyle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"linestyle=dashed]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(sh.isLineStylable()) { assertEquals(LineStyle.SOLID, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testStarHasNoDoubleBorder() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"doubleline=true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(sh.isDbleBorderable()) { assertFalse(sh.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testStarFillingParametershaveNoEffect() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"fillstyle=gradient]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(FillingStyle.PLAIN, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testStarLineColourIsFillingColour() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"linecolor=green]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(Color.GREEN, sh.getFillingCol()); assertEquals(Color.GREEN, sh.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testStarNoShadow() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"*["+"shadow=true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(sh.isShadowable()) { assertFalse(sh.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamDimen() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=inner]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isBordersMovable()) { assertEquals(BorderPos.OUT, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ assertEquals(BorderPos.INTO, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=outer]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(BorderPos.INTO, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=middle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(BorderPos.MID, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[dimen=outer,dimen=middle]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(BorderPos.MID, sh.getBordersPosition()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamLineStyle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dashed]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isLineStylable()) { assertEquals(LineStyle.DASHED, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ assertEquals(LineStyle.SOLID, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dotted]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(LineStyle.DOTTED, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=solid]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(LineStyle.SOLID, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linestyle=dashed,linestyle=dotted]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(LineStyle.DOTTED, sh.getLineStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamFillingStyle() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle =gradient]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isFillable()) { assertTrue(sh.hasGradient()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ assertFalse(sh.isFilled()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.CLINES, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.CLINES_PLAIN, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.HLINES_PLAIN, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.HLINES, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.VLINES_PLAIN, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.VLINES, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=none]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.NONE, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient,fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.CLINES, sh.getFillingStyle()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(FillingStyle.PLAIN, sh.getFillingStyle()); assertTrue(sh.isFilled()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamLinecolor() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.BLUE, sh.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[linecolor=\\psfillcolor,linecolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParamShadow() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow =true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isShadowable()) { assertTrue(sh.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow =false]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(sh.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true,shadow =false]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(sh.hasShadow()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamshadowcolor() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowcolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isShadowable()) { assertEquals(Color.BLUE, sh.getShadowCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowcolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getShadowCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[shadow=true, shadowcolor=\\psfillcolor,shadowcolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getShadowCol()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamDoublecolor() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublecolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isDbleBorderable()) { assertEquals(Color.BLUE, sh.getDbleBordCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublecolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getDbleBordCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline=true, doublecolor=\\psfillcolor,doublecolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getDbleBordCol()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamFillingcolor() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid, fillcolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isFillable()) { assertEquals(Color.BLUE, sh.getFillingCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid, fillcolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getFillingCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid, fillcolor=\\psfillcolor,fillcolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getFillingCol()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamGradbegin() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradbegin =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(Color.BLUE, sh.getGradColStart()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradbegin=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getGradColStart()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradbegin=\\psfillcolor,gradbegin=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getGradColStart()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamGradend() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradend =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(Color.BLUE, sh.getGradColEnd()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradend=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$//$NON-NLS-2$ assertEquals(Color.WHITE, sh.getGradColEnd()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient, gradend=\\psfillcolor,gradend=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getGradColEnd()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamHatchcolor() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchcolor =blue]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isInteriorStylable()) { assertEquals(Color.BLUE, sh.getHatchingsCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchcolor=\\psfillcolor]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.WHITE, sh.getHatchingsCol()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines, hatchcolor=\\psfillcolor,hatchcolor=red]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Color.RED, sh.getHatchingsCol()); assertTrue(PSTParser.errorLogs().isEmpty()); } } @Test public void testParamDoubleLine() throws ParseException { IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline = true]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ if(sh.isDbleBorderable()) { assertTrue(sh.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline =false]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(sh.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); sh = parser.parsePSTCode("\\"+getCommandName()+"[doubleline =true, doubleline=false]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(sh.hasDbleBord()); assertTrue(PSTParser.errorLogs().isEmpty()); } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/pst/TestTextParsing.java000066400000000000000000001332631321075051700324430ustar00rootroot00000000000000package test.parser.pst; import static org.junit.Assert.*; import java.awt.Color; import java.text.ParseException; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.models.interfaces.shape.IShape; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import net.sf.latexdraw.parsers.pst.parser.PSTParser; import org.junit.Ignore; import org.junit.Test; public class TestTextParsing extends TestPSTParser { @Test public void testBugParenthesis() throws ParseException { IText txt = (IText)parser.parsePSTCode("{( )}").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals("( )", txt.getText()); //$NON-NLS-1$ } @Test public void test_bf1() throws ParseException { IGroup group = parser.parsePSTCode("\\bf coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\bf coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_bf2() throws ParseException { IGroup group = parser.parsePSTCode("\\bf {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\bf coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\bf haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_sc1() throws ParseException { IGroup group = parser.parsePSTCode("\\sc coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sc coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_sc2() throws ParseException { IGroup group = parser.parsePSTCode("\\sc {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sc coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\sc haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_sl1() throws ParseException { IGroup group = parser.parsePSTCode("\\sl coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sl coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_sl2() throws ParseException { IGroup group = parser.parsePSTCode("\\sl {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sl coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\sl haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_it1() throws ParseException { IGroup group = parser.parsePSTCode("\\it coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\it coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_it2() throws ParseException { IGroup group = parser.parsePSTCode("\\it {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\it coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\it haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_scshape1() throws ParseException { IGroup group = parser.parsePSTCode("\\scshape coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\scshape coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_scshape2() throws ParseException { IGroup group = parser.parsePSTCode("\\scshape {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sc coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\sc haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_slshape1() throws ParseException { IGroup group = parser.parsePSTCode("\\slshape coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\slshape coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_slshape2() throws ParseException { IGroup group = parser.parsePSTCode("\\slshape {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sl coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\sl haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_itshape1() throws ParseException { IGroup group = parser.parsePSTCode("\\itshape coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\itshape coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_itshape2() throws ParseException { IGroup group = parser.parsePSTCode("\\itshape {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\it coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\it haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_upshape1() throws ParseException { IGroup group = parser.parsePSTCode("\\upshape coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\upshape coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_upshape2() throws ParseException { IGroup group = parser.parsePSTCode("\\upshape {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_bfseries1() throws ParseException { IGroup group = parser.parsePSTCode("\\bfseries coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\bfseries coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_bfseries2() throws ParseException { IGroup group = parser.parsePSTCode("\\bfseries {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\bf coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\bf haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_mdseries1() throws ParseException { IGroup group = parser.parsePSTCode("\\mdseries coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\mdseries coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_mdseries2() throws ParseException { IGroup group = parser.parsePSTCode("\\mdseries {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_ttfamily1() throws ParseException { IGroup group = parser.parsePSTCode("\\ttfamily coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\ttfamily coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_ttfamily2() throws ParseException { IGroup group = parser.parsePSTCode("\\ttfamily {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\ttfamily coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\ttfamily haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_sffamily1() throws ParseException { IGroup group = parser.parsePSTCode("\\sffamily coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sffamily coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_sffamily2() throws ParseException { IGroup group = parser.parsePSTCode("\\sffamily {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\sffamily coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("\\sffamily haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void test_rmfamily1() throws ParseException { IGroup group = parser.parsePSTCode("\\rmfamily coucou").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\rmfamily coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void test_rmfamily2() throws ParseException { IGroup group = parser.parsePSTCode("\\rmfamily {coucou} {haha}").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("coucou", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ assertTrue(group.getShapeAt(1) instanceof IText); assertEquals("haha", ((IText)group.getShapeAt(1)).getText()); //$NON-NLS-1$ } @Test public void testtextsf() throws ParseException { IGroup group = parser.parsePSTCode("\\textsf{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\textsf{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testtextsc() throws ParseException { IGroup group = parser.parsePSTCode("\\textsc{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\textsc{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testtextsl() throws ParseException { IGroup group = parser.parsePSTCode("\\textsl{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\textsl{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testunderline() throws ParseException { IGroup group = parser.parsePSTCode("\\underline{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\underline{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testtexttt() throws ParseException { IGroup group = parser.parsePSTCode("\\texttt{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\texttt{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testEmph() throws ParseException { IGroup group = parser.parsePSTCode("\\emph{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\emph{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testTextbf() throws ParseException { IGroup group = parser.parsePSTCode("\\textbf{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\textbf{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testTextit() throws ParseException { IGroup group = parser.parsePSTCode("\\textit{coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\textit{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test @Ignore public void testText_withDots() throws ParseException { IText txt = (IText)parser.parsePSTCode("0..n").get().getShapeAt(0); //$NON-NLS-1$ assertEquals("0..n", txt.getText()); //$NON-NLS-1$ } @Test @Ignore public void testText_withCommas() throws ParseException { IText txt = (IText)parser.parsePSTCode("0,fi,n,,a , b").get().getShapeAt(0); //$NON-NLS-1$ assertEquals("0,fi,n,,a , b", txt.getText()); //$NON-NLS-1$ } @Test public void testText_bugParsingSeveralRputCmds() throws ParseException { IGroup gp = parser.parsePSTCode("\\rput(0.9,0.6){aa}"+ //$NON-NLS-1$ "\\rput(7.4,0){bb}\\rput(1,0){cc}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(3, gp.getShapes().size()); assertEquals("aa", ((IText)gp.getShapeAt(0)).getText()); //$NON-NLS-1$ assertEquals("bb", ((IText)gp.getShapeAt(1)).getText()); //$NON-NLS-1$ assertEquals("cc", ((IText)gp.getShapeAt(2)).getText()); //$NON-NLS-1$ } @Test public void testText_when2usefontsTheLatestIsUsed1() throws ParseException { IGroup gp = parser.parsePSTCode("\\usefont{T1}{ptm}{m}{it}\\rput(0.9,0.6){aa}"+ //$NON-NLS-1$ "\\rput(7.4,0.92373){bb}\\usefont{T1}{ptm}{b}{sc}\\rput(1.1121212,0.1244){cc}").get(); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertEquals(3, gp.getShapes().size()); assertTrue(((IText)gp.getShapeAt(0)).getText().contains("\\it")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(0)).getText().contains("aa")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(1)).getText().contains("\\it")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(1)).getText().contains("bb")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(2)).getText().contains("\\sc")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(2)).getText().contains("\\bf")); //$NON-NLS-1$ assertTrue(((IText)gp.getShapeAt(2)).getText().contains("cc")); //$NON-NLS-1$ } @Test public void testText_when2usefontsTheLatestIsUsed2() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\usefont{T1}{ptm}{m}{n}\n aa"+ //$NON-NLS-1$ "\\usefont{T1}{ptm}{b}{it}\n bb").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertTrue(txt.getText().contains("usefont{T1}{ptm}{m}{n}")); //$NON-NLS-1$ assertTrue(txt.getText().contains("usefont{T1}{ptm}{b}{it}")); //$NON-NLS-1$ assertTrue(txt.getText().contains("aa")); //$NON-NLS-1$ assertTrue(txt.getText().contains("bb")); //$NON-NLS-1$ } @Test public void testTextWithSpecialColour() throws ParseException { IText txt = (IText)parser.parsePSTCode("\\definecolor{color0}{rgb}{0.5,0.5,0.5}\\color{color0}couocu").get().getShapeAt(0); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); assertNotNull(txt); assertEquals(new Color(0.5f,0.5f,0.5f), txt.getLineColour()); } @Test public void testBug722075_3() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/722075 IGroup group = parser.parsePSTCode("\\textcolor{blue}{xyz} foobar").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("foobar", text.getText()); //$NON-NLS-1$ assertEquals(Color.BLACK, text.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBug722075_2() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/722075 IGroup group = parser.parsePSTCode("\\textcolor{blue}{xyz}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("xyz", text.getText()); //$NON-NLS-1$ assertEquals(Color.BLUE, text.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBug722075_1() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/722075 IGroup group = parser.parsePSTCode("\\color{blue} xyz").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("xyz", text.getText()); //$NON-NLS-1$ assertEquals(Color.BLUE, text.getLineColour()); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testBug911816() throws ParseException { // https://bugs.launchpad.net/latexdraw/+bug/911816 IGroup group = parser.parsePSTCode("\\psframebox{$E=mc^2$}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\psframebox{$E=mc^2$}", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_footnote() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\footnotesize coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\footnotesize coucou", text.getText()); //$NON-NLS-1$ assertEquals(1.*IShape.PPC, text.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, text.getPosition().getY(), 0.001); assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_tiny() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\tiny coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\tiny coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_scriptsize() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\scriptsize coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\scriptsize coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_footnotesize() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\footnotesize coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\footnotesize coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_small() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\small coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\small coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_normalsize() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\normalsize coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\normalsize coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_large() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\large coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\large coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_Large() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\Large coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\Large coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_huge() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\huge coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\huge coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseText_Huge() throws ParseException { IGroup group = parser.parsePSTCode("\\rput(1,2){\\Huge coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\Huge coucou", text.getText()); //$NON-NLS-1$ assertTrue(PSTParser.errorLogs().isEmpty()); } @Test public void testParseTextLD2_bold_italic() throws ParseException { IGroup group = parser.parsePSTCode("\\usefont{T1}{ptm}{b}{it}\\rput(1,2){coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\it\\bf coucou", text.getText()); //$NON-NLS-1$ assertEquals(1.*IShape.PPC, text.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, text.getPosition().getY(), 0.001); } @Test public void testParseTextLD2_bold() throws ParseException { IGroup group = parser.parsePSTCode("\\usefont{T1}{ptm}{b}{n}\\rput(1,2){coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\bf coucou", text.getText()); //$NON-NLS-1$ assertEquals(1.*IShape.PPC, text.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, text.getPosition().getY(), 0.001); } @Test public void testParseTextLD2_italic() throws ParseException { IGroup group = parser.parsePSTCode("\\usefont{T1}{ptm}{m}{it}\\rput(1,2){coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("\\it coucou", text.getText()); //$NON-NLS-1$ assertEquals(1.*IShape.PPC, text.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, text.getPosition().getY(), 0.001); } @Test public void testParseTextLD2_basic() throws ParseException { IGroup group = parser.parsePSTCode("\\usefont{T1}{ptm}{m}{n}\\rput(1,2){coucou}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); IText text = (IText)group.getShapeAt(0); assertEquals("coucou", text.getText()); //$NON-NLS-1$ assertEquals(1.*IShape.PPC, text.getPosition().getX(), 0.001); assertEquals(-2.*IShape.PPC, text.getPosition().getY(), 0.001); } @Test public void testBackSlashBackSlashIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\\\").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\\\", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashSharpIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\#").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\#", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashPercentIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\%").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\%", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashUnderscoreIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\_").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\_", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashAmperstampIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\&").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\&", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashRightBracketIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashLeftBracketIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\{").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\{", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashHatIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\^").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\^", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashDollarIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\$").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashTildeIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\~").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\~", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashDoubleQuoteIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\\"").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\\"", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashQuoteIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\'").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\'", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashMultIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\*").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\*", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashCommaIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\,").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\,", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashSlashIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\/").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\/", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashDotIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\.").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\.", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashArobasIsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\@").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\@", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashQuote2IsACommand() throws ParseException { IGroup group = parser.parsePSTCode("\\`").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\`", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashDoubleQuoteLetter() throws ParseException { IGroup group = parser.parsePSTCode("\\\"e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\\" e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testUnknownCommandParsedAsText() throws ParseException { IGroup group = parser.parsePSTCode("\\thisisnotacommande").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\thisisnotacommande", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testBackSlashDoubleQuoteLetterBrackets() throws ParseException { IGroup group = parser.parsePSTCode("\\\"{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\\"{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentGraveBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\`{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\`{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentGrave() throws ParseException { IGroup group = parser.parsePSTCode("\\`e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\` e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentAcuteBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\'{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\'{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentAcute() throws ParseException { IGroup group = parser.parsePSTCode("\\'e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\' e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcircumflexBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\^{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\^{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcircumflex() throws ParseException { IGroup group = parser.parsePSTCode("\\^e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\^ e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentHumlautBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\H{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\H{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentHumlaut() throws ParseException { IGroup group = parser.parsePSTCode("\\H e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\H e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccenttildeBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\~{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\~{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccenttilde() throws ParseException { IGroup group = parser.parsePSTCode("\\~e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\~ e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcedillaBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\c{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\c{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcedilla() throws ParseException { IGroup group = parser.parsePSTCode("\\c e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\c e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentogonekBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\k{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\k{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentogonek() throws ParseException { IGroup group = parser.parsePSTCode("\\k e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\k e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentlBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\l").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\l", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentmacronBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\={ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\={ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentmacron() throws ParseException { IGroup group = parser.parsePSTCode("\\=e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\= e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentbarUnderBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\b{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\b{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentbarUnder() throws ParseException { IGroup group = parser.parsePSTCode("\\b e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\b e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentdotOverBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\.{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\.{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentdotOver() throws ParseException { IGroup group = parser.parsePSTCode("\\.e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\. e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentdotUnderBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\d{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\d{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentDotUnder() throws ParseException { IGroup group = parser.parsePSTCode("\\d e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\d e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentRingOverBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\r{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\r{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentRingOver() throws ParseException { IGroup group = parser.parsePSTCode("\\r e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\r e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentbreveBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\u{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\u{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentbreve() throws ParseException { IGroup group = parser.parsePSTCode("\\u e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\u e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcaronBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\v{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\v{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccentcaron() throws ParseException { IGroup group = parser.parsePSTCode("\\v e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\v e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccenttieBlock() throws ParseException { IGroup group = parser.parsePSTCode("\\t{ee}").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\t{ee}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testAccenttie() throws ParseException { IGroup group = parser.parsePSTCode("\\t e").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\t e", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testMathModeStd() throws ParseException { IGroup group = parser.parsePSTCode("$coucou$").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$coucou$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testMathModeNotClosed() throws ParseException { parser.parsePSTCode("$foo"); //$NON-NLS-1$ } @Test public void testMathModeWithSpecialCharacters() throws ParseException { IGroup group = parser.parsePSTCode("$foo_{test}$").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$foo_{test}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("$\\|$").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\|$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("$\\mathcal{M}$").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\mathcal{M}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testMathModeStdParenthesis() throws ParseException { IGroup group = parser.parsePSTCode("\\(coucou\\)").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$coucou$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testMathModeNotClosedParenthesis() throws ParseException { parser.parsePSTCode("\\(foo"); //$NON-NLS-1$ } @Test public void testMathModeWithSpecialCharactersParenthesis() throws ParseException { IGroup group = parser.parsePSTCode("\\(foo_{test}\\)").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$foo_{test}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("\\(\\|\\)").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\|$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("\\(\\mathcal{M}\\)").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\mathcal{M}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testMathModeStdBrackets() throws ParseException { IGroup group = parser.parsePSTCode("\\[coucou\\]").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$coucou$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test(expected=ParseException.class) public void testMathModeNotClosedBrackets() throws ParseException { parser.parsePSTCode("\\[foo"); //$NON-NLS-1$ } @Test public void testMathModeWithSpecialCharactersBrackets() throws ParseException { IGroup group = parser.parsePSTCode("\\[foo_{test}\\]").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$foo_{test}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("\\[\\|\\]").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\|$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ group = parser.parsePSTCode("\\[\\mathcal{M}\\]").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("$\\mathcal{M}$", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParse1WordBracketedInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("{ foo }").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("foo", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParse1WordInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("foo").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("foo", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParse2WordsInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("foo bar").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("foo bar", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParseMixedTextInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("foo \\bloodyCmd $math formula_{r}$ bar").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("foo \\bloodyCmd $math formula_{r}$ bar", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParseFloatNumbersInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("121.1248 -.1 ++1").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("121.1248 -.1 ++1", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParseNumberInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("121").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("121", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParseUnknownCmdInto1TextShape() throws ParseException { IGroup group = parser.parsePSTCode("\\bloodyCmd").get(); //$NON-NLS-1$ assertEquals(1, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertEquals("\\bloodyCmd", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Test public void testParseMixedTextAndShapeInto2TextShapesAnd1Shape() throws ParseException { IGroup group = parser.parsePSTCode("foo bar \\psdot(1,1) foo $math formula_{r}$ bar").get(); //$NON-NLS-1$ assertEquals(2, group.size()); assertTrue(group.getShapeAt(0) instanceof IText); assertTrue(group.getShapeAt(1) instanceof IDot); assertEquals("foo bar foo $math formula_{r}$ bar", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$ } @Override public String getCommandName() { return ""; //$NON-NLS-1$ } @Override public String getBasicCoordinates() { return ""; //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/000077500000000000000000000000001321075051700264515ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parsers/000077500000000000000000000000001321075051700301305ustar00rootroot00000000000000TestCSSStyleParser.java000066400000000000000000000060471321075051700344110ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parserspackage test.parser.svg.parsers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.CSSStyleHandler; import net.sf.latexdraw.parsers.svg.parsers.CSSStyleParser; import org.junit.Before; import org.junit.Test; import test.parser.TestCodeParser; public class TestCSSStyleParser extends TestCodeParser implements CSSStyleHandler { protected String name; protected String value; @Before public void setUp() { parser = new CSSStyleParser("", this); //$NON-NLS-1$ parser2 = new CSSStyleParser("", this); //$NON-NLS-1$ } @Test @Override public void testParse() throws ParseException { name = null; value = null; parser.setCode(""); //$NON-NLS-1$ parser.parse(); assertNull(name); assertNull(value); name = null; value = null; parser.setCode("\t \n/**/ \n\r \t /* fldijfsd */ \n"); //$NON-NLS-1$ parser.parse(); assertNull(name); assertNull(value); parser.setCode("stroke\t \n/**/ :\n\r \t red/* fldijfsd */ \n"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "red"); //$NON-NLS-1$ parser.setCode("stroke\t \n/**/ :\n\r \t red/* fldijfsd */ ;\nstroke-width : 2cm"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke-width"); //$NON-NLS-1$ assertEquals(value, "2cm"); //$NON-NLS-1$ } @Test @Override public void testSkipComment() throws ParseException { parser.setCode("fill:/*test*/green"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "fill"); //$NON-NLS-1$ assertEquals(value, "green"); //$NON-NLS-1$ parser.setCode(" /* fksduh fdssd \n \t fdsf d */ stroke : blue"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "blue"); //$NON-NLS-1$ parser.setCode("fill:green /* fkdhf fss */ "); //$NON-NLS-1$ parser.parse(); assertEquals(name, "fill"); //$NON-NLS-1$ assertEquals(value, "green"); //$NON-NLS-1$ parser.setCode("stroke: /**/ blue "); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "blue"); //$NON-NLS-1$ parser.setCode("stroke:/**/blue;"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "blue"); //$NON-NLS-1$ parser.setCode("fill:green /* fkdhf fss */;/*f*/stroke/*fds fsd*/:/**/blue/*fgdds */"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "blue"); //$NON-NLS-1$ } @Test @Override public void testSkipWSP() throws ParseException { parser.setCode("fill:green ;stroke:blue"); //$NON-NLS-1$ parser.parse(); assertEquals(name, "stroke"); //$NON-NLS-1$ assertEquals(value, "blue"); //$NON-NLS-1$ 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 "); //$NON-NLS-1$ parser.parse(); assertEquals(name, "fill"); //$NON-NLS-1$ assertEquals(value, "green"); //$NON-NLS-1$ } @Override public void onCSSStyle(String n, String v) { name = n; value = v; } } TestSVGLengthParser.java000077500000000000000000000167661321075051700345550ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parserspackage test.parser.svg.parsers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGLength; import net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser; import net.sf.latexdraw.parsers.svg.parsers.UnitProcessor; import org.junit.Test; public class TestSVGLengthParser { @SuppressWarnings("unused") @Test public void testParseLength() throws ParseException { SVGLengthParser p; SVGLength l; try { new SVGLengthParser(null); fail(); } catch(IllegalArgumentException e){ /* */ } try { p = new SVGLengthParser(""); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1m"); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("m"); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1p"); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1e1i"); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1ci"); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1 c "); //$NON-NLS-1$ l = p.parseLength(); fail(); } catch(ParseException e){ /* */ } p = new SVGLengthParser("1mm"); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "1"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1, SVGLength.LengthType.MM), l.getValue(), 0.001); p = new SVGLengthParser("0.65 cm"); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "0.65"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(0.65, SVGLength.LengthType.CM), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65 \t \n pc"); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "-10.65"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65, SVGLength.LengthType.PC), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65e2 \t \n px \t "); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "-10.65e2"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65e0pt \t "); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "-10.65e0"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue(), 0.001); p = new SVGLengthParser("\t -1.in \t "); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue(), 0.001); p = new SVGLengthParser("-1."); //$NON-NLS-1$ l = p.parseLength(); assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.NUMBER), l.getValue(), 0.001); } @Test public void testParseNumberOrPercent() throws ParseException { SVGLengthParser p; SVGLength l; p = new SVGLengthParser("1mm"); //$NON-NLS-1$ l = p.parseNumberOrPercent(); assertEquals(l.getValueAsString(), "1"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1, SVGLength.LengthType.NUMBER), l.getValue(), 0.001); p = new SVGLengthParser("0.876"); //$NON-NLS-1$ l = p.parseNumberOrPercent(); assertEquals(l.getValueAsString(), "0.876"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER); assertEquals(UnitProcessor.INSTANCE.toUserUnit(0.876, SVGLength.LengthType.NUMBER), l.getValue(), 0.001); } @Test public void testParseCoordinate() throws ParseException { SVGLengthParser p; SVGLength l; try { p = new SVGLengthParser(""); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1m"); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("m"); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1p"); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1e1i"); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1ci"); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } try { p = new SVGLengthParser("1 c "); //$NON-NLS-1$ l = p.parseCoordinate(); fail(); } catch(ParseException e){ /* */ } p = new SVGLengthParser("1mm"); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "1"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1, SVGLength.LengthType.MM), l.getValue(), 0.001); p = new SVGLengthParser("0.65 cm"); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "0.65"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(0.65, SVGLength.LengthType.CM), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65 \t \n pc"); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "-10.65"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65, SVGLength.LengthType.PC), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65e2 \t \n px \t "); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "-10.65e2"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue(), 0.001); p = new SVGLengthParser("\t -10.65e0pt \t "); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "-10.65e0"); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue(), 0.001); p = new SVGLengthParser("\t -1.in \t "); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue(), 0.001); p = new SVGLengthParser("-1."); //$NON-NLS-1$ l = p.parseCoordinate(); assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$ assertEquals(l.getLengthType(), SVGLength.LengthType.PX); assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.NUMBER), l.getValue(), 0.001); } } TestSVGPointsParser.java000066400000000000000000000126701321075051700345730ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parserspackage test.parser.svg.parsers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.awt.geom.Point2D; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPointsParser; import org.junit.Before; import org.junit.Test; import test.parser.TestCodeParser; public class TestSVGPointsParser extends TestCodeParser { @Before public void setUp() { parser = new SVGPointsParser(""); //$NON-NLS-1$ parser2 = new SVGPointsParser(""); //$NON-NLS-1$ } @Test @Override public void testParse() throws ParseException { parser.setCode(" 1, 2, \t 3\n 4 \r ,5 6 \n \t "); //$NON-NLS-1$ parser.parse(); assertNotNull(((SVGPointsParser)parser).getPoints()); assertEquals(((SVGPointsParser)parser).getPoints().get(0), new Point2D.Double(1., 2.)); assertEquals(((SVGPointsParser)parser).getPoints().get(1), new Point2D.Double(3., 4.)); assertEquals(((SVGPointsParser)parser).getPoints().get(((SVGPointsParser)parser).getPoints().size()-1), new Point2D.Double(5., 6.)); try { parser.setCode("dsf"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10 10 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10,, 10 10 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode(",10 10 10 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10 10 10,"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10 10 aa 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10 10 10e 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } try { parser.setCode("10 10E 10 10"); //$NON-NLS-1$ parser.parse(); }catch(ParseException e) { /* */ } } @Test @Override public void testSkipComment() { // No comment allowed. } @Test @Override public void testSkipWSP() { parser.setCode(" \r \t \n 10 10"); //$NON-NLS-1$ parser.skipWSP(); assertEquals(parser.getChar(), '1'); } @Test public void testIsWSP() { parser.setCode(" \r\t\na"); //$NON-NLS-1$ 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()); } @Test public void testSkipWSPComma() { parser.setCode(" \r , \t \n 10 10"); //$NON-NLS-1$ ((SVGPointsParser)parser).skipWSPComma(); assertEquals(parser.getChar(), '1'); parser.setCode(" \r , \t \n , 10 10"); //$NON-NLS-1$ ((SVGPointsParser)parser).skipWSPComma(); assertEquals(parser.getChar(), ','); } @Test public void testReadNumber() throws ParseException { SVGPointsParser p = (SVGPointsParser)parser; p.setCode("10"); //$NON-NLS-1$ assertEquals(p.readNumber(), 10., 0.0001); p.setCode("+10"); //$NON-NLS-1$ assertEquals(p.readNumber(), 10., 0.0001); p.setCode("-10"); //$NON-NLS-1$ assertEquals(p.readNumber(), -10., 0.0001); p.setCode("-10."); //$NON-NLS-1$ assertEquals(p.readNumber(), -10., 0.0001); p.setCode("-.1"); //$NON-NLS-1$ assertEquals(p.readNumber(), -.1, 0.0001); p.setCode("10e2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 1000., 0.0001); p.setCode("10e-2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0.1, 0.0001); p.setCode("10e+2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 1000., 0.0001); p.setCode("10E2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 1000., 0.0001); p.setCode("10E-2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0.1, 0.0001); p.setCode("10E+2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 1000., 0.0001); p.setCode("0.E+2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); try { p.setCode(".E+2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode(".Efd+2"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode(""); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode(" \t"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode("aa"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode("."); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode("--10"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} try { p.setCode("+-10"); //$NON-NLS-1$ assertEquals(p.readNumber(), 0., 0.0001); } catch(ParseException e) { /* */} } @Test public void testGetPoints() throws ParseException { parser.setCode(" 1, 2,3 4 5,6"); //$NON-NLS-1$ parser.parse(); assertNotNull(((SVGPointsParser)parser).getPoints()); assertEquals(((SVGPointsParser)parser).getPoints().get(0), new Point2D.Double(1., 2.)); assertEquals(((SVGPointsParser)parser).getPoints().get(1), new Point2D.Double(3., 4.)); assertEquals(((SVGPointsParser)parser).getPoints().get(((SVGPointsParser)parser).getPoints().size()-1), new Point2D.Double(5., 6.)); } } TestURIReferenceParser.java000077500000000000000000000027451321075051700352220ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parserspackage test.parser.svg.parsers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.parsers.URIReferenceParser; import org.junit.Test; public class TestURIReferenceParser { @SuppressWarnings("unused") @Test public void testConstructor() { try { new URIReferenceParser(null); fail(); } catch(IllegalArgumentException e) { /* */ } new URIReferenceParser("test"); //$NON-NLS-1$ } @Test public void testGetURI() { URIReferenceParser p = new URIReferenceParser("url(#id)"); //$NON-NLS-1$ assertEquals(p.getURI(), "id"); //$NON-NLS-1$ p.setCode(""); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url(#id"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url#id)"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url(id)"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode(null); assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("u"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("ur"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url("); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url()"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ p.setCode("url(#)"); //$NON-NLS-1$ assertEquals(p.getURI(), ""); //$NON-NLS-1$ } } TestUnitProcessor.java000077500000000000000000000016271321075051700344040ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/parser/svg/parserspackage test.parser.svg.parsers; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.parsers.SVGLength; import net.sf.latexdraw.parsers.svg.parsers.UnitProcessor; import org.junit.Test; public class TestUnitProcessor { @Test public void testToUserUnit() { try { UnitProcessor.INSTANCE.toUserUnit(1, null); fail(); } catch(IllegalArgumentException e){ /* */ } assertEquals(UnitProcessor.INSTANCE.toUserUnit(1., SVGLength.LengthType.CM), 35.43307, 0.001); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1., SVGLength.LengthType.MM), 3.543307, 0.001); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1., SVGLength.LengthType.PT), 1.25, 0.001); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1., SVGLength.LengthType.PC), 15., 0.001); assertEquals(UnitProcessor.INSTANCE.toUserUnit(1., SVGLength.LengthType.IN), 90., 0.001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/000077500000000000000000000000001321075051700251555ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/AbstractTestSVGElement.java000077500000000000000000000061231321075051700323220ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.CSSColors; import net.sf.latexdraw.parsers.svg.SVGAttr; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGNodeList; import org.junit.Before; import org.junit.Test; import org.w3c.dom.DOMException; public abstract class AbstractTestSVGElement{ protected SVGElement node; protected SVGDocument doc = new SVGDocument(); public abstract String getNameNode(); @Before public void setUp() { doc = new SVGDocument(); node = (SVGElement)doc.createElement(getNameNode()); } @Test public void testGetStroke() { node.removeAttribute(SVGAttributes.SVG_STROKE); assertEquals(node.getStroke(), null); node.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_ALICEBLUE_NAME); assertEquals(node.getStroke(), CSSColors.CSS_ALICEBLUE_RGB_VALUE); node.setAttribute(SVGAttributes.SVG_STROKE, "testtest"); //$NON-NLS-1$ assertEquals(node.getStroke(), null); } @Test public void testGetNodeName() { assertEquals(getNameNode(), node.getNodeName()); } @Test public void testSetNodeName() { node.setNodeName("test"); //$NON-NLS-1$ assertEquals("test", node.getNodeName()); //$NON-NLS-1$ node.setNodeName(getNameNode()); assertEquals(getNameNode(), node.getNodeName()); } @Test public void testSetParent() { SVGElement elt = (SVGElement)doc.createElement("elt"); //$NON-NLS-1$ 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("")); //$NON-NLS-1$ node.setAttribute("testAttr", "valAttr"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(node.getAttribute("testAttr"), "valAttr"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetAttributeNode() { assertNull(node.getAttributeNode(null)); assertNull(node.getAttributeNode("")); //$NON-NLS-1$ node.setAttribute("testAttr2", "valAttr2"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(node.getAttributeNode("testAttr2").getNodeValue(), "valAttr2"); //$NON-NLS-1$ //$NON-NLS-2$ } @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)); //$NON-NLS-1$ //$NON-NLS-2$ fail(); } catch(DOMException e) { /* ok */ } SVGElement elt = (SVGElement)doc.createElement("eltAppendChild"); //$NON-NLS-1$ assertEquals(node.appendChild(elt), elt); assertEquals(node.getChildren("eltAppendChild").getLength(), 1); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestCSSStyleList.java000077500000000000000000000033131321075051700311700ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import net.sf.latexdraw.parsers.svg.CSSStyleList; import org.junit.Test; public class TestCSSStyleList{ protected CSSStyleList list = new CSSStyleList(); @Test public void testAddCSSStyle() { list.clear(); list.addCSSStyle(null, null); assertEquals(0, list.size()); list.addCSSStyle("", null); //$NON-NLS-1$ assertEquals(0, list.size()); list.addCSSStyle(null, ""); //$NON-NLS-1$ assertEquals(0, list.size()); list.addCSSStyle("name", "value"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, list.size()); assertEquals("value", list.getCSSValue("name")); //$NON-NLS-1$ //$NON-NLS-2$ list.clear(); } @Test public void testGetCSSValue() { list.clear(); assertNull(list.getCSSValue(null)); assertNull(list.getCSSValue("")); //$NON-NLS-1$ assertNull(list.getCSSValue("test")); //$NON-NLS-1$ list.addCSSStyle("name", "value"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, list.size()); assertEquals("value", list.getCSSValue("name")); //$NON-NLS-1$ //$NON-NLS-2$ assertNull(list.getCSSValue(null)); assertNull(list.getCSSValue("")); //$NON-NLS-1$ assertNull(list.getCSSValue("test")); //$NON-NLS-1$ list.clear(); } @Test public void testOnCSSStyle() { list.clear(); list.addCSSStyle(null, null); assertEquals(0, list.size()); list.addCSSStyle("", null); //$NON-NLS-1$ assertEquals(0, list.size()); list.addCSSStyle(null, ""); //$NON-NLS-1$ assertEquals(0, list.size()); list.addCSSStyle("name", "value"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(1, list.size()); assertEquals("value", list.getCSSValue("name")); //$NON-NLS-1$ //$NON-NLS-2$ list.clear(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGAttr.java000077500000000000000000000147261321075051700301670ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.SVGAttr; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import org.junit.Before; import org.junit.Test; import org.w3c.dom.DOMException; import org.w3c.dom.Node; public class TestSVGAttr{ protected SVGElement node; @Before public void setUp() { SVGDocument doc = new SVGDocument(); node = (SVGElement)doc.createElement("tag1"); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testConstructor() { try { new SVGAttr(null, null, null); fail(); } catch(Exception e) { /* ok */ } try { new SVGAttr("", "", null); //$NON-NLS-1$ //$NON-NLS-2$ fail(); } catch(Exception e) { /* ok */ } try { new SVGAttr(null, "", node); //$NON-NLS-1$ fail(); } catch(Exception e) { /* ok */ } try { new SVGAttr("", null, node); //$NON-NLS-1$ fail(); } catch(Exception e) { /* ok */ } new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetName() { SVGAttr attr = new SVGAttr("attrName", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("attrName", attr.getName()); //$NON-NLS-1$ } @Test public void testGetElementOwner() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(node, attr.getOwnerElement()); } @Test public void testGetValue() { SVGAttr attr = new SVGAttr("", "attrValue", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("attrValue", attr.getValue()); //$NON-NLS-1$ } @Test public void testIsId() { SVGAttr attr = new SVGAttr("id", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(attr.isId()); attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(attr.isId()); } @Test public void testSetValue() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ try { attr.setValue(null); fail(); } catch(DOMException e) { /* Ok */ } attr.setValue("val"); //$NON-NLS-1$ assertEquals("val", attr.getValue()); //$NON-NLS-1$ } @Test public void testCloneNode() { SVGAttr attr = new SVGAttr("n", "v", node); //$NON-NLS-1$ //$NON-NLS-2$ 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); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("attrNodeName", attr.getNodeName()); //$NON-NLS-1$ } @Test public void testGetNodeType() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(Node.ATTRIBUTE_NODE, attr.getNodeType()); } @Test public void testGetNodeValue() { SVGAttr attr = new SVGAttr("", "attrValue", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("attrValue", attr.getNodeValue()); //$NON-NLS-1$ } @Test public void testGetParentNode() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(node, attr.getParentNode()); } @Test public void testHasAttribute() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(attr.hasAttributes()); } @Test public void testChildNodes() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(attr.hasChildNodes()); } @Test public void testIsEqualNode() { SVGAttr attr = new SVGAttr("n", "v", node); //$NON-NLS-1$ //$NON-NLS-2$ SVGAttr attr2 = (SVGAttr)attr.cloneNode(false); assertTrue(attr.isEqualNode(attr2)); attr2 = new SVGAttr("n", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(attr.isEqualNode(attr2)); attr2 = new SVGAttr("", "v", node); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse(attr.isEqualNode(attr2)); assertFalse(attr.isEqualNode(null)); } @Test public void testIsSameNode() { SVGAttr attr = new SVGAttr("n", "v", node); //$NON-NLS-1$ //$NON-NLS-2$ 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); //$NON-NLS-1$ //$NON-NLS-2$ try { attr.setNodeValue(null); fail(); } catch(DOMException e) { /* Ok */ } attr.setNodeValue("val"); //$NON-NLS-1$ assertEquals("val", attr.getValue()); //$NON-NLS-1$ assertEquals("val", attr.getNodeValue()); //$NON-NLS-1$ } @Test public void testGetPrefix() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertNull(attr.getPrefix()); attr = new SVGAttr("pref:", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("pref", attr.getPrefix()); //$NON-NLS-1$ attr = new SVGAttr(":", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("", attr.getPrefix()); //$NON-NLS-1$ } @Test public void testGetNamespaceURI() { SVGAttr attr = new SVGAttr("pref:n", "", node); //$NON-NLS-1$ //$NON-NLS-2$ SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2"); //$NON-NLS-1$ assertNull(attr.getNamespaceURI()); elt.setAttribute("xmlns:pref", "namespace"); //$NON-NLS-1$ //$NON-NLS-2$ elt.appendChild(node); assertEquals(attr.getNamespaceURI(), "namespace"); //$NON-NLS-1$ } @Test public void testLookupNamespaceURI() { SVGAttr attr = new SVGAttr("pref:n", "", node); //$NON-NLS-1$ //$NON-NLS-2$ SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2"); //$NON-NLS-1$ assertNull(attr.getNamespaceURI()); elt.setAttribute("xmlns:pref", "namespace"); //$NON-NLS-1$ //$NON-NLS-2$ elt.appendChild(node); assertEquals(attr.getNamespaceURI(), "namespace"); //$NON-NLS-1$ } @Test public void testGetLocalName() { SVGAttr attr = new SVGAttr("attrNodeName", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals("attrNodeName", attr.getLocalName()); //$NON-NLS-1$ } @Test public void testUselessMethods() { SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$ assertNull(attr.removeChild(null)); assertNull(attr.insertBefore(null, null)); assertNull(attr.getAttributes()); assertNull(attr.getFirstChild()); assertNull(attr.getLastChild()); assertNull(attr.appendChild(null)); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGCircleElement.java000077500000000000000000000075221321075051700317640ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGCircleElement; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.parsers.SVGLength; import net.sf.latexdraw.parsers.svg.parsers.UnitProcessor; import org.junit.Before; import org.junit.Test; public class TestSVGCircleElement extends AbstractTestSVGElement { @Override @Before public void setUp() { doc = new SVGDocument(); node = (SVGElement)doc.createElement(SVGElements.SVG_CIRCLE); } @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { 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){/**/} node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$ new SVGCircleElement(node, null); } @Test public void testGetCy() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$ SVGCircleElement e = new SVGCircleElement(node, null); assertEquals(e.getCy(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, "40"); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCy(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, "40px "); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCy(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, " 40 cm "); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCy(), UnitProcessor.INSTANCE.toUserUnit(40, SVGLength.LengthType.CM), 0.0001); } @Test public void testGetCx() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$ SVGCircleElement e = new SVGCircleElement(node, null); assertEquals(e.getCx(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_CX, "76.987"); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCx(), 76.987, 0.0001); node.setAttribute(SVGAttributes.SVG_CX, "40px "); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCx(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CX, " 30.5 mm "); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getCx(), UnitProcessor.INSTANCE.toUserUnit(30.5, SVGLength.LengthType.MM), 0.0001); } @Test public void testEnableRendering() throws MalformedSVGDocument { 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()); } @Test public void testGetR() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_R, "20"); //$NON-NLS-1$ SVGCircleElement e = new SVGCircleElement(node, null); assertEquals(e.getR(), 20., 0.0001); node.setAttribute(SVGAttributes.SVG_R, "20 pt"); //$NON-NLS-1$ e = new SVGCircleElement(node, null); assertEquals(e.getR(), UnitProcessor.INSTANCE.toUserUnit(20, SVGLength.LengthType.PT), 0.0001); } @Override public String getNameNode() { return SVGElements.SVG_CIRCLE; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGComment.java000077500000000000000000000011241321075051700306430ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.svg.SVGComment; import net.sf.latexdraw.parsers.svg.SVGDocument; import org.junit.Test; import org.w3c.dom.Node; public class TestSVGComment extends TestSVGText { @Override @Test public void testGetNodeType() { SVGComment cdata = createSVGText("test", doc); //$NON-NLS-1$ assertEquals(Node.COMMENT_NODE, cdata.getNodeType()); } @Override protected SVGComment createSVGText(String txt, SVGDocument document) throws IllegalArgumentException { return new SVGComment(txt, document); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGDefsElement.java000077500000000000000000000025061321075051700314410ustar00rootroot00000000000000package test.svg; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDefsElement; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGMarkerElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGDefsElement extends AbstractTestSVGElement { @Test public void testEnableRendering() throws MalformedSVGDocument { SVGDefsElement defs = new SVGDefsElement(node, null); assertFalse(defs.enableRendering()); } @Test public void testGetDef() throws MalformedSVGDocument { 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$ } @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { try { new SVGDefsElement(null, null); fail(); } catch(Exception e){/**/} new SVGDefsElement(node, null); } @Override public String getNameNode() { return SVGElements.SVG_DEFS; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGDocument.java000077500000000000000000000141561321075051700310300ustar00rootroot00000000000000package test.svg; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGComment; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGSVGElement; import net.sf.latexdraw.parsers.svg.SVGText; import org.junit.Before; import org.junit.Test; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; public class TestSVGDocument { protected SVGDocument doc1; protected SVGDocument doc2; @Before public void setUp() throws MalformedSVGDocument, URISyntaxException, IOException { doc1 = new SVGDocument(); doc2 = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$ } @SuppressWarnings("unused") @Test public void testSVGDocument() throws MalformedSVGDocument, URISyntaxException, IOException { try { new SVGDocument(null); fail(); } catch(IllegalArgumentException e){ /* ok */ } try { new SVGDocument(new URI("dfqsfg")); //$NON-NLS-1$ fail(); } catch(MalformedSVGDocument | FileNotFoundException e){ /* ok */ } SVGDocument doc = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$ assertNotNull(doc.getFirstChild()); assertNotNull(doc.getLastChild()); } @Test public void testSVGDocument2() { SVGDocument doc = new SVGDocument(); assertNotNull(doc.getFirstChild()); assertNotNull(doc.getLastChild()); assertNull(doc.getDocumentURI()); } @Test public void testAdoptNode() { SVGSVGElement elt = new SVGSVGElement(doc2); try { doc1.adoptNode(null); fail(); } catch(DOMException e){ /* ok */ } try { doc1.adoptNode(new SVGComment("", doc2)); //$NON-NLS-1$ 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"); //$NON-NLS-1$ assertEquals("coucou", doc1.getDocumentURI()); //$NON-NLS-1$ } @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"); //$NON-NLS-1$ assertEquals("coucou", doc1.getXmlVersion()); //$NON-NLS-1$ } @Test public void testUselessMethods() { assertNull(doc1.getAttributes()); assertNotNull(doc1.getChildNodes()); assertEquals(0, doc1.getChildNodes().getLength()); assertNull(doc1.getNextSibling()); assertNull(doc1.getPreviousSibling()); assertNull(doc2.getAttributes()); assertNotNull(doc2.getChildNodes()); assertEquals(0, doc2.getChildNodes().getLength()); 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()); //$NON-NLS-1$ assertEquals("#document", doc2.getNodeName()); //$NON-NLS-1$ } @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() throws MalformedSVGDocument, URISyntaxException, IOException { SVGDocument doc = new SVGDocument(); assertTrue(doc1.isEqualNode(doc)); assertFalse(doc1.isEqualNode(null)); assertFalse(doc1.isEqualNode(doc2)); doc = new SVGDocument(new URI("src/resources/test/res/test.svg")); //$NON-NLS-1$ assertTrue(doc2.isEqualNode(doc)); assertFalse(doc2.isEqualNode(null)); assertFalse(doc2.isEqualNode(doc1)); } @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"); //$NON-NLS-1$ assertEquals(elt.getNodeName(), "test"); //$NON-NLS-1$ assertEquals(doc1, elt.getOwnerDocument()); } @Test public void testCreateTextNode() { try { doc1.createTextNode(null); fail(); } catch(DOMException e) { /* ok */ } SVGText elt = (SVGText)doc1.createTextNode("test"); //$NON-NLS-1$ assertEquals(elt.getData(), "test"); //$NON-NLS-1$ assertEquals(doc1, elt.getOwnerDocument()); } @Test public void testCreateComment() { try { doc1.createComment(null); fail(); } catch(DOMException e) { /* ok */ } SVGComment elt = (SVGComment)doc1.createComment("test"); //$NON-NLS-1$ assertEquals(elt.getData(), "test"); //$NON-NLS-1$ assertEquals(doc1, elt.getOwnerDocument()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGEllipseElement.java000077500000000000000000000124151321075051700321550ustar00rootroot00000000000000package test.svg; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGEllipseElement; import net.sf.latexdraw.parsers.svg.parsers.SVGLength; import net.sf.latexdraw.parsers.svg.parsers.UnitProcessor; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGEllipseElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @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"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "dsd"); //$NON-NLS-1$ new SVGEllipseElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_RX, "1"); //$NON-NLS-1$ new SVGEllipseElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_RX, "-1"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "10"); //$NON-NLS-1$ new SVGEllipseElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "-1"); //$NON-NLS-1$ new SVGEllipseElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "20"); //$NON-NLS-1$ new SVGEllipseElement(node, null); } catch(MalformedSVGDocument e) { fail(); } } @Test public void testGetCy() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "20"); //$NON-NLS-1$ SVGEllipseElement e = new SVGEllipseElement(node, null); assertEquals(e.getCy(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, "40"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCy(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, "40px"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCy(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CY, "40 cm"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCy(), UnitProcessor.INSTANCE.toUserUnit(40, SVGLength.LengthType.CM), 0.0001); } @Test public void testGetCx() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "20"); //$NON-NLS-1$ SVGEllipseElement e = new SVGEllipseElement(node, null); assertEquals(e.getCx(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_CX, "30"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCx(), 30., 0.0001); node.setAttribute(SVGAttributes.SVG_CX, "40px"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCx(), 40., 0.0001); node.setAttribute(SVGAttributes.SVG_CX, "40 cm"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getCx(), UnitProcessor.INSTANCE.toUserUnit(40, SVGLength.LengthType.CM), 0.0001); } @Test public void testEnableRendering() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_RX, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "0"); //$NON-NLS-1$ SVGEllipseElement e = new SVGEllipseElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "0"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_RX, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "10"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "10"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertTrue(e.enableRendering()); } @Test public void testGetRy() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "20"); //$NON-NLS-1$ SVGEllipseElement e = new SVGEllipseElement(node, null); assertEquals(e.getRy(), 20., 0.0001); node.setAttribute(SVGAttributes.SVG_RY, "20 pt"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getRy(), UnitProcessor.INSTANCE.toUserUnit(20, SVGLength.LengthType.PT), 0.0001); } @Test public void testGetRx() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_RX, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_RY, "20"); //$NON-NLS-1$ SVGEllipseElement e = new SVGEllipseElement(node, null); assertEquals(e.getRx(), 10., 0.0001); node.setAttribute(SVGAttributes.SVG_RX, "10mm"); //$NON-NLS-1$ e = new SVGEllipseElement(node, null); assertEquals(e.getRx(), UnitProcessor.INSTANCE.toUserUnit(10, SVGLength.LengthType.MM), 0.0001); } @Override public String getNameNode() { return SVGElements.SVG_ELLIPSE; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGImageElement.java000077500000000000000000000112611321075051700316000ustar00rootroot00000000000000package test.svg; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGImageElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGImageElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { try { new SVGImageElement(null, ""); //$NON-NLS-1$ fail(); } catch(Exception e){/**/} try { new SVGImageElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "dsd"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "dsd"); //$NON-NLS-1$ new SVGImageElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "1"); //$NON-NLS-1$ new SVGImageElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "-1"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ new SVGImageElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "-1"); //$NON-NLS-1$ new SVGImageElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ new SVGImageElement(node, null); } @Test public void testGetHeight() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertEquals(e.getHeight(), 20., 0.0001); } @Test public void testGetWidth() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertEquals(e.getWidth(), 10., 0.0001); } @Test public void testGetURI() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertNull(e.getURI()); node.setAttribute("xlink:href", "/dir/file"); //$NON-NLS-1$ //$NON-NLS-2$ e = new SVGImageElement(node, null); assertEquals(e.getURI(), "/dir/file"); //$NON-NLS-1$ } @Test public void testEnableRendering() { try { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); node.setAttribute("xlink:href", "/rerzerojcsf/dsqdsdfgdre"); //$NON-NLS-1$ //$NON-NLS-2$ e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); node.setAttribute("xlink:href", "build.xml"); //$NON-NLS-1$ //$NON-NLS-2$ e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "20"); //$NON-NLS-1$ e = new SVGImageElement(node, null); assertFalse(e.enableRendering()); } catch(MalformedSVGDocument e) { fail(); } } @Test public void testGetY() { try { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertEquals(e.getY(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_Y, "1"); //$NON-NLS-1$ e = new SVGImageElement(node, null); assertEquals(1., e.getY(), 0.0001); } catch(MalformedSVGDocument e) { fail(); } } @Test public void testGetX() { try { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGImageElement e = new SVGImageElement(node, null); assertEquals(e.getX(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_X, "1"); //$NON-NLS-1$ e = new SVGImageElement(node, null); assertEquals(1., e.getX(), 0.0001); } catch(MalformedSVGDocument e) { fail(); } } @Override public String getNameNode() { return SVGElements.SVG_IMAGE; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGLength.java000077500000000000000000000014771321075051700304750ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.parsers.SVGLength; import net.sf.latexdraw.parsers.svg.parsers.SVGLength.LengthType; import org.junit.Test; public class TestSVGLength { @SuppressWarnings("unused") @Test public void testConsctrutor() { try { new SVGLength(1, null, "1"); //$NON-NLS-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"); //$NON-NLS-1$ assertEquals(l.getValue(), 1., 0.1); assertEquals(l.getLengthType(), LengthType.MM); assertEquals(l.getValueAsString(), "1"); //$NON-NLS-1$ } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGMatrix.java000077500000000000000000000073031321075051700305120ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.parsers.svg.SVGMatrix; import org.junit.Test; public class TestSVGMatrix{ @Test public void testConstructor() { SVGMatrix m = new SVGMatrix(); assertEquals(m.getA(), 1., 0.0001); assertEquals(m.getD(), 1., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testInitMatrix() { SVGMatrix m = new SVGMatrix(); m.initMatrix(); assertEquals(m.getA(), 1., 0.0001); assertEquals(m.getD(), 1., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testRotate() { SVGMatrix m = new SVGMatrix(); double angle = 0.14; m.rotate(angle); assertEquals(m.getA(), Math.cos(angle), 0.0001); assertEquals(m.getB(), Math.sin(angle), 0.0001); assertEquals(m.getC(), -Math.sin(angle), 0.0001); assertEquals(m.getD(), Math.cos(angle), 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testTranslate() { SVGMatrix m = new SVGMatrix(); double tx = 1.4, ty = -0.4; m.translate(tx, ty); assertEquals(m.getA(), 1., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getD(), 1., 0.0001); assertEquals(m.getE(), tx, 0.0001); assertEquals(m.getF(), ty, 0.0001); } @Test public void testScaleNonUniform() { SVGMatrix m = new SVGMatrix(); double sx = 5.877423, sy = -0.04; m.scaleNonUniform(sx, sy); assertEquals(m.getA(), sx, 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getD(), sy, 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testScale() { SVGMatrix m = new SVGMatrix(); double s = 5.877423; m.scale(s); assertEquals(m.getA(), s, 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getD(), s, 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testSkewX() { SVGMatrix m = new SVGMatrix(); double angle = 1.92837; m.skewX(angle); assertEquals(m.getA(), 1., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), Math.tan(angle), 0.0001); assertEquals(m.getD(), 1., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testSkewY() { SVGMatrix m = new SVGMatrix(); double angle = -7.7283; m.skewY(angle); assertEquals(m.getA(), 1., 0.0001); assertEquals(m.getB(), Math.tan(angle), 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getD(), 1., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } @Test public void testSetMatrix() { SVGMatrix m = new SVGMatrix(); m.setMatrix(2, 3, 4, 5, 6, 7); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 3., 0.0001); assertEquals(m.getC(), 4., 0.0001); assertEquals(m.getD(), 5., 0.0001); assertEquals(m.getE(), 6., 0.0001); assertEquals(m.getF(), 7., 0.0001); } @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., 0.0001); assertEquals(m3.getB(), 46., 0.0001); assertEquals(m3.getC(), 39., 0.0001); assertEquals(m3.getD(), 58., 0.0001); assertEquals(m3.getE(), 52., 0.0001); assertEquals(m3.getF(), 76., 0.0001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGNamedNodeMap.java000077500000000000000000000105551321075051700315410ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.SVGAttr; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGNamedNodeMap; import org.junit.Before; import org.junit.Test; import org.w3c.dom.DOMException; public class TestSVGNamedNodeMap{ protected SVGNamedNodeMap map; protected SVGDocument doc; @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"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertEquals(1, map.getLength()); map.getAttributes().clear(); } @Test public void testGetNamedItem() { map.getAttributes().clear(); assertNull(map.getNamedItem(null)); assertNull(map.getNamedItem("")); //$NON-NLS-1$ assertNull(map.getNamedItem("test")); //$NON-NLS-1$ map.getAttributes().add(new SVGAttr("test", "", doc.createElement("elt"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ assertNull(map.getNamedItem(null)); assertNull(map.getNamedItem("")); //$NON-NLS-1$ assertNotNull(map.getNamedItem("test")); //$NON-NLS-1$ map.getAttributes().clear(); } @Test public void testItem() { SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 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")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ map.getAttributes().clear(); try { map.removeNamedItem(null); fail(); } catch(DOMException e) { /* ok */ } try { map.removeNamedItem(""); //$NON-NLS-1$ fail(); } catch(DOMException e) { /* ok */ } try { map.removeNamedItem("test"); //$NON-NLS-1$ fail(); } catch(DOMException e) { /* ok */ } map.getAttributes().add(attr); assertEquals(attr, map.removeNamedItem("test")); //$NON-NLS-1$ try { map.removeNamedItem("test"); //$NON-NLS-1$ fail(); } catch(DOMException e) { /* ok */ } map.getAttributes().clear(); } @Test public void testSetNamedItem() { SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SVGAttr attr3 = new SVGAttr("test1", "v1b", doc.createElement("elt1b")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ map.getAttributes().clear(); assertNull(map.setNamedItem(null)); assertNull(map.setNamedItem(attr1)); assertEquals(attr1, map.getNamedItem("test1")); //$NON-NLS-1$ assertNull(map.setNamedItem(attr2)); assertEquals(attr1, map.getNamedItem("test1")); //$NON-NLS-1$ assertEquals(attr2, map.getNamedItem("test2")); //$NON-NLS-1$ assertEquals(attr1, map.setNamedItem(attr3)); assertEquals(attr3, map.getNamedItem("test1")); //$NON-NLS-1$ assertEquals(attr2, map.getNamedItem("test2")); //$NON-NLS-1$ map.getAttributes().clear(); } @Test public void testClone() { SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 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"))); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue(map.getNamedItem("test2").isEqualNode(map2.getNamedItem("test2"))); //$NON-NLS-1$ //$NON-NLS-2$ map.getAttributes().clear(); } @Test public void testGetAttributes() { assertNotNull(map.getAttributes()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGNodeList.java000077500000000000000000000023721321075051700307700ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import net.sf.latexdraw.parsers.svg.SVGNodeList; import org.junit.Before; import org.junit.Test; public class TestSVGNodeList{ protected SVGNodeList list; protected SVGDocument doc; @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")); //$NON-NLS-1$ assertEquals(1, list.getLength()); list.getNodes().clear(); } @Test public void testItem() { SVGElement elt = (SVGElement)doc.createElement("elt"); //$NON-NLS-1$ 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()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathElement.java000077500000000000000000000020661321075051700314550ustar00rootroot00000000000000package test.svg; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGPathElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGPathElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { try { new SVGPathElement(null, null); fail(); } catch(Exception e){/**/} try { new SVGPathElement(node, null); fail(); } catch(MalformedSVGDocument e){ /**/ } node.setAttribute(SVGAttributes.SVG_D, "test"); //$NON-NLS-1$ new SVGPathElement(node, null); } @Test public void testGetPathData() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_D, "M 0 0 L 10 10"); //$NON-NLS-1$ SVGPathElement e = new SVGPathElement(node, null); assertEquals(e.getPathData(), "M 0 0 L 10 10"); //$NON-NLS-1$ } @Override public String getNameNode() { return SVGElements.SVG_PATH; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathSegArc.java000077500000000000000000000040751321075051700312320ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegArc; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegArc 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., 0.0001); assertEquals(seg.getRX(), 3., 0.0001); assertEquals(seg.getRY(), 4., 0.0001); assertEquals(seg.getX(), 1., 0.0001); assertEquals(seg.getY(), 2., 0.0001); assertTrue(seg.isLargeArcFlag()); assertFalse(seg.isSweepFlag()); assertTrue(seg.isRelative()); assertFalse(seg2.isLargeArcFlag()); assertTrue(seg2.isSweepFlag()); assertFalse(seg2.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getRX(), seg2.getRX(), 0.0001); assertEquals(seg.getRY(), seg2.getRY(), 0.0001); assertEquals(seg.getX(), seg2.getX(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isLargeArcFlag(), seg2.isLargeArcFlag()); assertEquals(seg.isRelative(), seg2.isRelative()); assertEquals(seg.isSweepFlag(), seg2.isSweepFlag()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathSegCurvetoCubic.java000077500000000000000000000027051321075051700331200ustar00rootroot00000000000000package test.svg; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; import java.text.ParseException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class TestSVGPathSegCurvetoCubic 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., 0.0001); assertEquals(seg.getY(), -2., 0.0001); assertTrue(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } TestSVGPathSegCurvetoCubicSmooth.java000077500000000000000000000026671321075051700342420ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svgpackage test.svg; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoCubicSmooth; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; import java.text.ParseException; import static org.junit.Assert.*; public class TestSVGPathSegCurvetoCubicSmooth 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, 0.0001); assertEquals(seg.getY(), -2., 0.0001); assertFalse(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } TestSVGPathSegCurvetoQuadratic.java000077500000000000000000000032261321075051700337300ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svgpackage test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoQuadratic; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegCurvetoQuadratic 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, 0.0001); assertEquals(seg.getY1(), 6.5, 0.0001); assertEquals(seg.getX(), 3e1, 0.0001); assertEquals(seg.getY(), 4e-1, 0.0001); assertTrue(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getX1(), seg2.getX1(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.getY1(), seg2.getY1(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } TestSVGPathSegCurvetoQuadraticSmooth.java000077500000000000000000000030621321075051700351200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svgpackage test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegCurvetoQuadraticSmooth; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegCurvetoQuadraticSmooth 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, 0.0001); assertEquals(seg.getY(), 6.5, 0.0001); assertFalse(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathSegLineto.java000077500000000000000000000026061321075051700317550ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLineto; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegLineto implements SVGPathHandler { protected final SVGPathSegLineto seg = new SVGPathSegLineto(-1, -2, true); protected int cpt = 0; @Test public void testGetters() { assertEquals(seg.getX(), -1., 0.0001); assertEquals(seg.getY(), -2., 0.0001); assertTrue(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } TestSVGPathSegLinetoHorizontal.java000077500000000000000000000026341321075051700337510ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svgpackage test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLinetoHorizontal; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegLinetoHorizontal implements SVGPathHandler { protected final SVGPathSegLinetoHorizontal seg = new SVGPathSegLinetoHorizontal(-1, false); protected int cpt = 0; @Test public void testGetters() { assertEquals(seg.getX(), -1., 0.0001); assertFalse(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathSegLinetoVertical.java000077500000000000000000000026151321075051700334470ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegLinetoVertical; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegLinetoVertical implements SVGPathHandler { protected final SVGPathSegLinetoVertical seg = new SVGPathSegLinetoVertical(-1, false); protected int cpt = 0; @Test public void testGetters() { assertEquals(seg.getY(), -1., 0.0001); assertFalse(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false); SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this); //$NON-NLS-1$ parser.parse(); } @Override 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(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPathSegMoveto.java000077500000000000000000000022621321075051700317720ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.text.ParseException; import net.sf.latexdraw.parsers.svg.parsers.SVGPathParser; import net.sf.latexdraw.parsers.svg.path.SVGPathHandler; import net.sf.latexdraw.parsers.svg.path.SVGPathSeg; import net.sf.latexdraw.parsers.svg.path.SVGPathSegMoveto; import org.junit.Test; public class TestSVGPathSegMoveto implements SVGPathHandler { protected final SVGPathSegMoveto seg = new SVGPathSegMoveto(-1, -2, false); @Test public void testGetters() { assertEquals(seg.getX(), -1., 0.0001); assertEquals(seg.getY(), -2., 0.0001); assertFalse(seg.isRelative()); } @Test public void testToString() throws ParseException { SVGPathParser parser = new SVGPathParser(seg.toString(), this); parser.parse(); } @Override public void onPathSeg(SVGPathSeg pathSeg) { assertTrue(pathSeg instanceof SVGPathSegMoveto); SVGPathSegMoveto seg2 = (SVGPathSegMoveto)pathSeg; assertEquals(seg.getX(), seg2.getX(), 0.0001); assertEquals(seg.getY(), seg2.getY(), 0.0001); assertEquals(seg.isRelative(), seg2.isRelative()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPatternElement.java000077500000000000000000000102601321075051700321710ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGPatternElement; import org.junit.Test; public class TestSVGPatternElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { try { new SVGPatternElement(null, null); fail(); } catch(Exception e){/**/} new SVGPatternElement(node, null); } @Test public void testGetHeight() throws MalformedSVGDocument { SVGPatternElement e = new SVGPatternElement(node, null); assertEquals(e.getHeight(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertEquals(e.getHeight(), 20., 0.0001); } @Test public void testGetWidth() throws MalformedSVGDocument { SVGPatternElement e = new SVGPatternElement(node, null); assertEquals(e.getWidth(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_WIDTH, "30"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertEquals(e.getWidth(), 30., 0.0001); } @Test public void testGetPatternUnits() throws MalformedSVGDocument { 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); } @Test public void testGetPatternContentUnits() throws MalformedSVGDocument { 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); } @Test public void testEnableRendering() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ SVGPatternElement e = new SVGPatternElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertTrue(e.enableRendering()); } @Test public void testGetY() throws MalformedSVGDocument { SVGPatternElement e = new SVGPatternElement(node, null); assertEquals(e.getY(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_Y, "1"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertEquals(1., e.getY(), 0.0001); } @Test public void testGetX() throws MalformedSVGDocument { SVGPatternElement e = new SVGPatternElement(node, null); assertEquals(e.getX(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_X, "2"); //$NON-NLS-1$ e = new SVGPatternElement(node, null); assertEquals(2., e.getX(), 0.0001); } @Override public String getNameNode() { return SVGElements.SVG_PATTERN; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPolygonElement.java000077500000000000000000000064271321075051700322150ustar00rootroot00000000000000package test.svg; import java.awt.geom.Point2D; import java.text.ParseException; import java.util.List; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGPolygonElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGPolygonElement extends AbstractTestSVGElement { @Test public void testEnableRendering() throws MalformedSVGDocument, ParseException { node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ SVGPolygonElement pl = new SVGPolygonElement(node, null); assertTrue(pl.enableRendering()); } @Test public void testSetPoints() throws ParseException, MalformedSVGDocument { String path = "10,10 20,20"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ SVGPolygonElement pl = new SVGPolygonElement(node, null); assertEquals(pl.getPoints(), path); pl.setPoints("10,10 20,20"); //$NON-NLS-1$ assertEquals(2, pl.getPoints2D().size()); assertEquals(new Point2D.Double(10, 10), pl.getPoints2D().get(0)); assertEquals(new Point2D.Double(20, 20), pl.getPoints2D().get(pl.getPoints2D().size()-1)); try { pl.setPoints("10,,20fdsf"); //$NON-NLS-1$ fail(); } catch(ParseException e) { /* */ } } @Test public void testGetPoints() throws MalformedSVGDocument, ParseException { String path = "10,10 20,20"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ SVGPolygonElement pl = new SVGPolygonElement(node, null); assertEquals(pl.getPoints(), path); } @Test public void testGetPoints2D() throws MalformedSVGDocument, ParseException { String path = " 10\t ,\n 10 \t 20 \t\n\t\r, \n20 \r30,30 \n"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, path); SVGPolygonElement pl = new SVGPolygonElement(node, null); List pts; pts = pl.getPoints2D(); assertNotNull(pts); assertEquals(3, pts.size()); assertEquals(new Point2D.Double(10, 10), pts.get(0)); assertEquals(new Point2D.Double(20, 20), pts.get(1)); assertEquals(new Point2D.Double(30, 30), pts.get(pts.size()-1)); } @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument, ParseException { try { new SVGPolygonElement(null, null); fail(); } catch(Exception e){/**/} try { new SVGPolygonElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, ""); //$NON-NLS-1$ new SVGPolygonElement(node, null); try { node.setAttribute(SVGAttributes.SVG_POINTS, "dsqdgfd"); //$NON-NLS-1$ new SVGPolygonElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, "10,10"); //$NON-NLS-1$ new SVGPolygonElement(node, null); try { node.setAttribute(SVGAttributes.SVG_POINTS, ","); //$NON-NLS-1$ new SVGPolygonElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ new SVGPolygonElement(node, null); } @Override public String getNameNode() { return SVGElements.SVG_POLYGON; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGPolylineElement.java000077500000000000000000000064251321075051700323570ustar00rootroot00000000000000package test.svg; import java.awt.geom.Point2D; import java.text.ParseException; import java.util.List; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGPolyLineElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGPolylineElement extends AbstractTestSVGElement { @Test public void testGetPoints() throws MalformedSVGDocument, ParseException { String path = "10,10 20,20"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, path); SVGPolyLineElement pl = new SVGPolyLineElement(node, null); assertEquals(pl.getPoints(), path); } @Test public void testEnableRendering() throws MalformedSVGDocument, ParseException { node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ SVGPolyLineElement pl = new SVGPolyLineElement(node, null); assertTrue(pl.enableRendering()); } @Test public void testSetPoints() throws MalformedSVGDocument, ParseException { String path = "10,10 20,20"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ SVGPolyLineElement pl = new SVGPolyLineElement(node, null); assertEquals(pl.getPoints(), path); pl.setPoints("10,10 20,20"); //$NON-NLS-1$ assertEquals(2, pl.getPoints2D().size()); assertEquals(new Point2D.Double(10, 10), pl.getPoints2D().get(0)); assertEquals(new Point2D.Double(20, 20), pl.getPoints2D().get(pl.getPoints2D().size()-1)); try { pl.setPoints("10,,20fdsf"); //$NON-NLS-1$ fail(); } catch(ParseException e) { /* */ } } @Test public void testGetPoints2D() throws MalformedSVGDocument, ParseException { String path = " 10\t ,\n 10 \t 20 \t\n\t\r, \n20 \r30,30 \n"; //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_POINTS, path); SVGPolyLineElement pl = new SVGPolyLineElement(node, null); List pts; pts = pl.getPoints2D(); assertNotNull(pts); assertEquals(3, pts.size()); assertEquals(new Point2D.Double(10, 10), pts.get(0)); assertEquals(new Point2D.Double(20, 20), pts.get(1)); assertEquals(new Point2D.Double(30, 30), pts.get(pts.size()-1)); } @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument, ParseException { try { new SVGPolyLineElement(null, null); fail(); } catch(Exception e){/**/} try { new SVGPolyLineElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, ""); //$NON-NLS-1$ new SVGPolyLineElement(node, null); try { node.setAttribute(SVGAttributes.SVG_POINTS, "dsqdgfd"); //$NON-NLS-1$ new SVGPolyLineElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, "10,10"); //$NON-NLS-1$ new SVGPolyLineElement(node, null); try { node.setAttribute(SVGAttributes.SVG_POINTS, ","); //$NON-NLS-1$ new SVGPolyLineElement(node, null); fail(); } catch(MalformedSVGDocument | ParseException e){/**/} node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20"); //$NON-NLS-1$ new SVGPolyLineElement(node, null); } @Override public String getNameNode() { return SVGElements.SVG_POLY_LINE; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGRectElement.java000077500000000000000000000120001321075051700314430ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGRectElement; import org.junit.Test; public class TestSVGRectElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { 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"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "dsd"); //$NON-NLS-1$ new SVGRectElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "1"); //$NON-NLS-1$ new SVGRectElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "-1"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ new SVGRectElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} try { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "-1"); //$NON-NLS-1$ new SVGRectElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ new SVGRectElement(node, null); } @Test public void testEnableRendering() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ SVGRectElement e = new SVGRectElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ e = new SVGRectElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ e = new SVGRectElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ e = new SVGRectElement(node, null); assertTrue(e.enableRendering()); } @Test public void testGetHeight() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getHeight(), 20., 0.0001); } @Test public void testGetWidth() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getWidth(), 10., 0.0001); } @Test public void testGetRy() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getRy(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_RY, "1"); //$NON-NLS-1$ r = new SVGRectElement(node, null); assertEquals(1., r.getRy(), 0.0001); } @Test public void testGetRx() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getRx(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_RX, "1"); //$NON-NLS-1$ r = new SVGRectElement(node, null); assertEquals(1., r.getRx(), 0.0001); } @Test public void testGetY() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getY(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_Y, "1"); //$NON-NLS-1$ r = new SVGRectElement(node, null); assertEquals(1., r.getY(), 0.0001); } @Test public void testGetX() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$ SVGRectElement r = new SVGRectElement(node, null); assertEquals(r.getX(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_X, "1"); //$NON-NLS-1$ r = new SVGRectElement(node, null); assertEquals(1., r.getX(), 0.0001); } @Override public String getNameNode() { return SVGElements.SVG_RECT; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGSVGElement.java000077500000000000000000000101721321075051700312150ustar00rootroot00000000000000package test.svg; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGSVGElement; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Element; import static org.junit.Assert.*; public class TestSVGSVGElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { try { new SVGSVGElement(null); fail(); } catch(Exception e){/**/} new SVGSVGElement(node, null); } @Test public void testGetDefs() throws MalformedSVGDocument, ParserConfigurationException { 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); //$NON-NLS-1$ elt = document.createElement(SVGElements.SVG_DEFS); n.appendChild(elt); e = new SVGSVGElement(n, null); assertNotNull(e.getDefs()); } @Test public void testGetMeta() throws MalformedSVGDocument, ParserConfigurationException { 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); //$NON-NLS-1$ elt = document.createElement(SVGElements.SVG_METADATA); n.appendChild(elt); e = new SVGSVGElement(n, null); assertNotNull(e.getMeta()); } @Test public void testGetHeight() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_HEIGHT, "200"); //$NON-NLS-1$ SVGSVGElement e = new SVGSVGElement(node, null); assertEquals(e.getHeight(), 200., 0.0001); } @Test public void testEnableRendering() throws MalformedSVGDocument { SVGSVGElement e = new SVGSVGElement(node, null); assertTrue(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "0"); //$NON-NLS-1$ e = new SVGSVGElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "0"); //$NON-NLS-1$ e = new SVGSVGElement(node, null); assertFalse(e.enableRendering()); node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$ e = new SVGSVGElement(node, null); assertTrue(e.enableRendering()); } @Test public void testGetY() throws MalformedSVGDocument { SVGSVGElement e = new SVGSVGElement(node, null); assertEquals(e.getY(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_Y, "-10"); //$NON-NLS-1$ e = new SVGSVGElement(node, null); assertEquals(e.getY(), -10., 0.0001); } @Test public void testGetX() throws MalformedSVGDocument { SVGSVGElement e = new SVGSVGElement(node, null); assertEquals(e.getX(), 0., 0.0001); node.setAttribute(SVGAttributes.SVG_X, "10"); //$NON-NLS-1$ e = new SVGSVGElement(node, null); assertEquals(e.getX(), 10., 0.0001); } @Test public void testGetWidth() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_WIDTH, "100"); //$NON-NLS-1$ SVGSVGElement e = new SVGSVGElement(node, null); assertEquals(e.getWidth(), 100., 0.0001); } @Test public void testVersion() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_VERSION, "1.1"); //$NON-NLS-1$ SVGSVGElement e = new SVGSVGElement(node, null); assertEquals(e.getVersion(), "1.1"); //$NON-NLS-1$ } @Override public String getNameNode() { return SVGElements.SVG_SVG; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGStopElement.java000077500000000000000000000036321321075051700315060ustar00rootroot00000000000000package test.svg; import java.awt.Color; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGAttributes; import net.sf.latexdraw.parsers.svg.SVGElements; import net.sf.latexdraw.parsers.svg.SVGStopElement; import org.junit.Test; import static org.junit.Assert.*; public class TestSVGStopElement extends AbstractTestSVGElement { @SuppressWarnings("unused") @Test public void testContructor() throws MalformedSVGDocument { 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"); //$NON-NLS-1$ new SVGStopElement(node, null); fail(); } catch(MalformedSVGDocument e){/**/} node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$ new SVGStopElement(node, null); } @Test public void testGetStopColor() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$ SVGStopElement e = new SVGStopElement(node, null); assertEquals(e.getStopColor(), Color.BLACK); node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$ node.setAttribute(SVGAttributes.SVG_STOP_COLOR, "blue"); //$NON-NLS-1$ e = new SVGStopElement(node, null); assertEquals(e.getStopColor(), Color.BLUE); } @Test public void testGetOffset() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$ SVGStopElement e = new SVGStopElement(node, null); assertEquals(e.getOffset(), 0.5, 0.0001); } @Test public void testEnableRendering() throws MalformedSVGDocument { node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5"); //$NON-NLS-1$ SVGStopElement s = new SVGStopElement(node, null); assertTrue(s.enableRendering()); } @Override public String getNameNode() { return SVGElements.SVG_STOP; } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGText.java000077500000000000000000000052071321075051700301730ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGText; import org.junit.Before; import org.junit.Test; import org.w3c.dom.Node; public class TestSVGText{ protected SVGDocument doc; @Before public void setUp() { doc = new SVGDocument(); } @Test public void testConstructors() { SVGText txt; try { txt = createSVGText(null, null); fail(); } catch(Exception e) { /* ok */ } try { txt = createSVGText(null, doc); fail(); } catch(Exception e) { /* ok */ } txt = createSVGText("a", null); //$NON-NLS-1$ assertEquals("a", txt.getData()); //$NON-NLS-1$ assertNull(txt.getOwnerDocument()); txt = createSVGText("test", doc); //$NON-NLS-1$ assertEquals("test", txt.getData()); //$NON-NLS-1$ assertEquals(txt.getOwnerDocument(), doc); } @Test public void testGetNodeValue() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ assertEquals("test", txt.getNodeValue()); //$NON-NLS-1$ txt = createSVGText("", doc); //$NON-NLS-1$ assertEquals("", txt.getNodeValue()); //$NON-NLS-1$ } @Test public void testAppendData() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ txt.appendData(null); assertEquals("test", txt.getData()); //$NON-NLS-1$ txt.appendData("coucou"); //$NON-NLS-1$ assertEquals("testcoucou", txt.getData()); //$NON-NLS-1$ txt.appendData(""); //$NON-NLS-1$ assertEquals("testcoucou", txt.getData()); //$NON-NLS-1$ } @Test public void testGetData() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ assertEquals("test", txt.getData()); //$NON-NLS-1$ txt = createSVGText("", doc); //$NON-NLS-1$ assertEquals("", txt.getData()); //$NON-NLS-1$ } @Test public void testGetLength() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ assertEquals("text".length(), txt.getLength()); //$NON-NLS-1$ txt = createSVGText("", doc); //$NON-NLS-1$ assertEquals("".length(), txt.getLength()); //$NON-NLS-1$ } @Test public void testGetNodeType() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ assertEquals(Node.TEXT_NODE, txt.getNodeType()); } @Test public void testSetData() { SVGText txt = createSVGText("test", doc); //$NON-NLS-1$ txt.setData(""); //$NON-NLS-1$ assertEquals(txt.getData(), ""); //$NON-NLS-1$ txt.setData("coucou"); //$NON-NLS-1$ assertEquals(txt.getData(), "coucou"); //$NON-NLS-1$ } protected SVGText createSVGText(String txt, SVGDocument document) throws IllegalArgumentException { return new SVGText(txt, document); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGTransform.java000077500000000000000000000340351321075051700312230ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import net.sf.latexdraw.parsers.svg.SVGMatrix; import net.sf.latexdraw.parsers.svg.SVGTransform; import org.junit.Test; public class TestSVGTransform{ @SuppressWarnings("unused") @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(""); //$NON-NLS-1$ 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(""); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("iueozi"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t translate ( 2\n \n\t 4 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE); assertTrue(t.isTranslation()); assertEquals(t.getTX(), 2., 0.0001); assertEquals(t.getTY(), 4., 0.0001); t.setTransformation("\n \t translate ( 2\n \n\t , 4 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE); assertTrue(t.isTranslation()); assertEquals(t.getTX(), 2., 0.0001); assertEquals(t.getTY(), 4., 0.0001); t.setTransformation("\n \t translate ( 2\n \n\t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE); assertTrue(t.isTranslation()); assertEquals(t.getTX(), 2., 0.0001); assertEquals(t.getTY(), 2., 0.0001); try { t.setTransformation("\n \t translate"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate(2 ,"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate(2 , ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t translate(2 , 2"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t scale ( 2\n \n\t 4 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE); assertTrue(t.isScale()); assertEquals(t.getXScaleFactor(), 2., 0.0001); assertEquals(t.getYScaleFactor(), 4., 0.0001); t.setTransformation("\n \t scale ( 2\n \n\t , 4 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE); assertTrue(t.isScale()); assertEquals(t.getXScaleFactor(), 2., 0.0001); assertEquals(t.getYScaleFactor(), 4., 0.0001); t.setTransformation("\n \t scale ( 2\n \n\t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE); assertTrue(t.isScale()); assertEquals(t.getXScaleFactor(), 2., 0.0001); assertEquals(t.getYScaleFactor(), 2., 0.0001); try { t.setTransformation("\n \t scale"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale(2 ,"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale(2 , ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t scale(2 , 2"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t matrix ( 2\n \n\t 4 \t 5 \n 6 7 8 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_MATRIX); m = t.getMatrix(); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 4., 0.0001); assertEquals(m.getC(), 5., 0.0001); assertEquals(m.getD(), 6., 0.0001); assertEquals(m.getE(), 7., 0.0001); assertEquals(m.getF(), 8., 0.0001); t.setTransformation("\n \t matrix ( 2 ,\n \n\t 4 \t 5 ,\n 6 7 , 8 ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_MATRIX); m = t.getMatrix(); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 4., 0.0001); assertEquals(m.getC(), 5., 0.0001); assertEquals(m.getD(), 6., 0.0001); assertEquals(m.getE(), 7., 0.0001); assertEquals(m.getF(), 8., 0.0001); try { t.setTransformation("\n \t matrix"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 ,"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , 2"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , 2 3"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , 2 3 5"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , 2 3 , 5 7"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t matrix(2 , 2 3 5 7 9"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t skewX ( 2\n \n\t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SKEWX); assertTrue(t.isXSkew()); assertEquals(t.getXSkewAngle(), 2., 0.0001); try { t.setTransformation("\n \t skewX"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewX("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewX(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewX(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t skewY ( 3\n \n\t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SKEWY); assertTrue(t.isYSkew()); assertEquals(t.getYSkewAngle(), 3., 0.0001); try { t.setTransformation("\n \t skewY"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewY("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewY(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t skewY(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } t.setTransformation("\n \t rotate ( 3\n \n\t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_ROTATE); assertTrue(t.isRotation()); assertEquals(t.getRotationAngle(), 3., 0.0001); t.setTransformation("\n \t rotate ( 1\n \n\t , 4 \n 6 \n \t ) \n"); //$NON-NLS-1$ assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_ROTATE); assertTrue(t.isRotation()); assertEquals(t.getRotationAngle(), 1., 0.0001); m = t.getMatrix(); try { t.setTransformation("\n \t rotate"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t rotate("); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t rotate(ds"); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t rotate(2 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } try { t.setTransformation("\n \t rotate(2 4 "); //$NON-NLS-1$ fail(); } catch(IllegalArgumentException e){ /**/ } } @Test public void testSetTranslate() { SVGTransform t = new SVGTransform(); SVGMatrix m = t.getMatrix(); t.setTranslate(1, 2); assertEquals(m.getE(), 1., 0.0001); assertEquals(m.getF(), 2., 0.0001); assertTrue(t.isTranslation()); assertFalse(t.isYSkew()); assertFalse(t.isXSkew()); assertFalse(t.isRotation()); assertFalse(t.isScale()); assertEquals(1., t.getTX(), 0.0001); assertEquals(2., t.getTY(), 0.0001); assertEquals(Double.NaN, t.getXScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getXSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getYSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getRotationAngle(), 0.0001); 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., 0.0001); assertEquals(m.getD(), 4., 0.0001); assertTrue(t.isScale()); assertFalse(t.isYSkew()); assertFalse(t.isXSkew()); assertFalse(t.isRotation()); assertFalse(t.isTranslation()); assertEquals(Double.NaN, t.getTX(), 0.0001); assertEquals(Double.NaN, t.getTY(), 0.0001); assertEquals(3., t.getXScaleFactor(), 0.0001); assertEquals(4., t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getXSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getYSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getRotationAngle(), 0.0001); 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)), 0.0001); assertEquals(t.getXSkewAngle(), 30., 0.0001); assertTrue(t.isXSkew()); assertFalse(t.isScale()); assertFalse(t.isYSkew()); assertFalse(t.isRotation()); assertFalse(t.isTranslation()); assertEquals(Double.NaN, t.getTX(), 0.0001); assertEquals(Double.NaN, t.getTY(), 0.0001); assertEquals(Double.NaN, t.getXScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getRotationAngle(), 0.0001); 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)), 0.0001); assertEquals(t.getYSkewAngle(), 30., 0.0001); assertTrue(t.isYSkew()); assertFalse(t.isScale()); assertFalse(t.isXSkew()); assertFalse(t.isRotation()); assertFalse(t.isTranslation()); assertEquals(Double.NaN, t.getTX(), 0.0001); assertEquals(Double.NaN, t.getTY(), 0.0001); assertEquals(Double.NaN, t.getXScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getXSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getRotationAngle(), 0.0001); 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(), 0.0001); assertEquals(Double.NaN, t.getTY(), 0.0001); assertEquals(Double.NaN, t.getXScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getXSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getYSkewAngle(), 0.0001); assertEquals(SVGTransform.SVG_TRANSFORM_ROTATE, t.getType()); m = t.getMatrix(); assertEquals(t.getRotationAngle(), 2., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); t.setRotate(2, 3, 4); assertEquals(t.getRotationAngle(), 2., 0.0001); m = t.getMatrix(); assertEquals(m.getE(), 3., 0.0001); assertEquals(m.getF(), 4., 0.0001); } @Test public void testSetMatrix() { SVGTransform t = new SVGTransform(); SVGMatrix m = t.getMatrix(); t.setMatrix(2, 3, 4, 5, 6, 7); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 3., 0.0001); assertEquals(m.getC(), 4., 0.0001); assertEquals(m.getD(), 5., 0.0001); assertEquals(m.getE(), 6., 0.0001); assertEquals(m.getF(), 7., 0.0001); assertEquals(SVGTransform.SVG_TRANSFORM_MATRIX, t.getType()); assertEquals(Double.NaN, t.getTX(), 0.0001); assertEquals(Double.NaN, t.getTY(), 0.0001); assertEquals(Double.NaN, t.getXScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getYScaleFactor(), 0.0001); assertEquals(Double.NaN, t.getXSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getYSkewAngle(), 0.0001); assertEquals(Double.NaN, t.getRotationAngle(), 0.0001); assertFalse(t.isRotation()); assertFalse(t.isScale()); assertFalse(t.isXSkew()); assertFalse(t.isYSkew()); assertFalse(t.isTranslation()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/TestSVGTransformList.java000077500000000000000000000102711321075051700320530ustar00rootroot00000000000000package test.svg; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.awt.geom.Point2D; import net.sf.latexdraw.parsers.svg.SVGMatrix; import net.sf.latexdraw.parsers.svg.SVGTransformList; import org.junit.Test; public class TestSVGTransformList{ @Test public void testContructors() { SVGTransformList t = new SVGTransformList(); assertTrue(t.isEmpty()); t = new SVGTransformList(null); assertTrue(t.isEmpty()); t = new SVGTransformList(""); //$NON-NLS-1$ assertTrue(t.isEmpty()); t = new SVGTransformList("translate(2,2)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); } @Test public void testAddTransformations() { SVGTransformList t = new SVGTransformList(); t.addTransformations(null); assertTrue(t.isEmpty()); t.addTransformations(""); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("dsqdsq"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("translate"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("translate(,)"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("translate( )"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("scale( 3"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("rotate(a)"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("rotate(1)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("rotate(1 , 2 4)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("skewY( 1)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("skewX(1)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("scale(1 1)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("translate(1 ,1)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("translate(1 1) ,"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("matrix(1 2 3)"); //$NON-NLS-1$ assertTrue(t.isEmpty()); t.addTransformations("matrix(1 2 3 ,4 ,5 ,6)"); //$NON-NLS-1$ assertFalse(t.isEmpty()); t.clear(); t.addTransformations("matrix(1 2 3 ,4 ,5 ,6) translate(2 2)"); //$NON-NLS-1$ assertEquals(2, t.size()); t.clear(); t.addTransformations("rotate ( 2, 3 5), \n skewX( 2 \n)"); //$NON-NLS-1$ assertEquals(2, t.size()); t.clear(); t.addTransformations("rotate ( 2, 3 5)scale( 2)"); //$NON-NLS-1$ assertEquals(2, t.size()); t.clear(); t.addTransformations("rotate ( 2, 3 5), \n skewX( 2 \n)"); //$NON-NLS-1$ t.addTransformations("rotate ( 2, 3 5)scale( 2)"); //$NON-NLS-1$ 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)"); //$NON-NLS-1$ assertEquals(t.transformPoint(pt1), pt2); t.addTransformations("translate( -2 -3)"); //$NON-NLS-1$ t.addTransformations("rotate(90)"); //$NON-NLS-1$ pt2.setLocation(0, 1); pt1.setLocation(1, 0); pt3 = t.transformPoint(pt1); assertEquals(Math.rint(pt3.getX()), pt2.getX(), 0.0001); assertEquals(Math.rint(pt3.getY()), pt2.getY(), 0.0001); } @Test public void testGetGlobalTransformation() { SVGTransformList t = new SVGTransformList(); SVGMatrix m; m = t.getGlobalTransformationMatrix(); assertNull(m); t.addTransformations("scale( 2 3)"); //$NON-NLS-1$ m = t.getGlobalTransformationMatrix(); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 0., 0.0001); assertEquals(m.getD(), 3., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); t.addTransformations("skewX( 0.5 \n)"); //$NON-NLS-1$ m = t.getGlobalTransformationMatrix(); assertEquals(m.getA(), 2., 0.0001); assertEquals(m.getB(), 0., 0.0001); assertEquals(m.getC(), 2.*Math.tan(Math.toRadians(0.5)), 0.0001); assertEquals(m.getD(), 3., 0.0001); assertEquals(m.getE(), 0., 0.0001); assertEquals(m.getF(), 0., 0.0001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSVGFile/000077500000000000000000000000001321075051700272545ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSVGFile/TestLoadLineV2.java000066400000000000000000000044171321075051700326640ustar00rootroot00000000000000package test.svg.loadSVGFile; import static org.junit.Assert.*; import java.awt.Color; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import net.sf.latexdraw.glib.views.latex.DviPsColors; import org.junit.Test; public class TestLoadLineV2 extends TestLoadSVGFile { @Override public String getPathSVGFile() { return "src/resources/test/res/testLoad/testLine.svg"; //$NON-NLS-1$ } @Override public int getNbShapesExpected() { return 1; } public IPolyline getLine() { return (IPolyline)group.getShapeAt(0); } @Test public void testPoints() { final IPolyline line = getLine(); assertEquals(2, line.getNbPoints()); assertEquals(140.0, line.getPtAt(0).getX(), 0.001); assertEquals(260.0, line.getPtAt(0).getY(), 0.001); assertEquals(320.0, line.getPtAt(1).getX(), 0.001); assertEquals(40.0, line.getPtAt(1).getY(), 0.001); } @Test public void testLine() { final IPolyline line = getLine(); assertEquals(5, line.getThickness(), 0.01); assertEquals(new Color(209, 169, 169), line.getLineColour()); assertEquals(LineStyle.DASHED, line.getLineStyle()); } @Test public void testShadow() { final IPolyline line = getLine(); assertTrue(line.hasShadow()); assertEquals(DviPsColors.INSTANCE.convertHTML2rgb("#e9e937"), line.getShadowCol()); //$NON-NLS-1$ assertEquals(90.0, Math.toDegrees(line.getShadowAngle()), 0.00001); assertEquals(10.0, line.getShadowSize(), 0.0001); } @Test public void testArrows() { final IPolyline line = getLine(); assertEquals(IArrow.ArrowStyle.DISK_IN, line.getArrowStyle(0)); assertEquals(IArrow.ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1)); assertEquals(4.0, line.getDotSizeNum(), 0.0001); assertEquals(4.53, line.getDotSizeDim(), 0.0001); assertEquals(2.4, line.getArrowLength(), 0.0001); assertEquals(0.1, line.getArrowInset(), 0.0001); assertEquals(3.0, line.getArrowSizeNum(), 0.0001); assertEquals(2.65, line.getArrowSizeDim(), 0.01); } @Test public void testDbleBorder() { final IPolyline line = getLine(); assertTrue(line.hasDbleBord()); assertEquals(new Color(224, 197, 227), line.getDbleBordCol()); assertEquals(6, line.getDbleBordSep(), 0.001); } } TestLoadMultiLinesV2.java000066400000000000000000000056551321075051700340100ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSVGFilepackage test.svg.loadSVGFile; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.awt.Color; import net.sf.latexdraw.glib.models.interfaces.shape.IArrow; import net.sf.latexdraw.glib.models.interfaces.shape.IPolyline; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.LineStyle; import org.junit.Test; public class TestLoadMultiLinesV2 extends TestLoadSVGFile { @Override public String getPathSVGFile() { return "src/resources/test/res/testLoad/testMultiLines.svg"; //$NON-NLS-1$ } @Override public int getNbShapesExpected() { return 1; } public IPolyline getLine() { return (IPolyline)group.getShapeAt(0); } @Test public void testFilling() { final IPolyline line = getLine(); assertTrue(line.isFilled()); assertEquals(new Color(183, 44, 44), line.getFillingCol()); assertEquals(FillingStyle.PLAIN, line.getFillingStyle()); } @Test public void testPoints() { final IPolyline line = getLine(); assertEquals(6, line.getNbPoints()); assertEquals(260.0, line.getPtAt(0).getX(), 0.001); assertEquals(440.0, line.getPtAt(0).getY(), 0.001); assertEquals(260.0, line.getPtAt(1).getX(), 0.001); assertEquals(220.0, line.getPtAt(1).getY(), 0.001); assertEquals(520.0, line.getPtAt(2).getX(), 0.001); assertEquals(220.0, line.getPtAt(2).getY(), 0.001); assertEquals(640.0, line.getPtAt(3).getX(), 0.001); assertEquals(300.0, line.getPtAt(3).getY(), 0.001); assertEquals(760.0, line.getPtAt(4).getX(), 0.001); assertEquals(220.0, line.getPtAt(4).getY(), 0.001); assertEquals(760.0, line.getPtAt(5).getX(), 0.001); assertEquals(120.0, line.getPtAt(5).getY(), 0.001); } @Test public void testLine() { final IPolyline line = getLine(); assertEquals(10.0, line.getThickness(), 0.01); assertEquals(new Color(22, 131, 175), line.getLineColour()); assertEquals(LineStyle.DASHED, line.getLineStyle()); } @Test public void testShadow() { final IPolyline line = getLine(); assertTrue(line.hasShadow()); assertEquals(new Color(101, 224, 41), line.getShadowCol()); assertEquals(80.0, Math.toDegrees(line.getShadowAngle()), 0.00001); assertEquals(20.0, line.getShadowSize(), 0.0001); } @Test public void testArrows() { final IPolyline line = getLine(); assertEquals(IArrow.ArrowStyle.LEFT_SQUARE_BRACKET, line.getArrowStyle(0)); assertEquals(IArrow.ArrowStyle.CIRCLE_END, line.getArrowStyle(-1)); assertEquals(2.2, line.getDotSizeNum(), 0.0001); assertEquals(5.0, line.getDotSizeDim(), 0.0001); assertEquals(0.25, line.getBracketNum(), 0.0001); assertEquals(4.0, line.getTBarSizeDim(), 0.0001); assertEquals(10.0, line.getTBarSizeNum(), 0.0001); } @Test public void testDbleBorder() { final IPolyline line = getLine(); assertTrue(line.hasDbleBord()); assertEquals(new Color(213, 240, 66), line.getDbleBordCol()); assertEquals(4, line.getDbleBordSep(), 0.001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSVGFile/TestLoadSVGFile.java000066400000000000000000000032401321075051700330150ustar00rootroot00000000000000package test.svg.loadSVGFile; import static org.junit.Assert.assertEquals; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import net.sf.latexdraw.generators.svg.IShapeSVGFactory; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IGroup; import net.sf.latexdraw.glib.views.Java2D.impl.FlyweightThumbnail; import net.sf.latexdraw.parsers.svg.MalformedSVGDocument; import net.sf.latexdraw.parsers.svg.SVGDocument; import net.sf.latexdraw.parsers.svg.SVGElement; import org.junit.Before; import org.junit.Test; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public abstract class TestLoadSVGFile { protected IGroup group; @Before public void setUp() throws MalformedSVGDocument, URISyntaxException, IOException { FlyweightThumbnail.images().clear(); FlyweightThumbnail.setThread(false); final SVGDocument doc = new SVGDocument(new URI(getPathSVGFile())); group = toLatexdraw(doc); } public IGroup toLatexdraw(final SVGDocument doc) { final IGroup shapes = ShapeFactory.createGroup(); final NodeList elts = doc.getDocumentElement().getChildNodes(); Node node; for(int i=0, size=elts.getLength(); i{ protected T shape; static { View2DTK.setFactory(new LViewsFactory()); } public T saveLoadShape(T sh) { IDrawing drawing = ShapeFactory.createDrawing(); drawing.addShape(sh); SVGDocument doc = toSVG(drawing); return toLatexdraw(doc); } @SuppressWarnings("unchecked") protected T toLatexdraw(final SVGDocument doc) { if(doc==null) return null; final IGroup shapes = ShapeFactory.createGroup(); final NodeList elts = doc.getDocumentElement().getChildNodes(); Node node; for(int i=0, size=elts.getLength(); i shapes = drawing.getShapes(); final SVGDocument doc = new SVGDocument(); final SVGSVGElement root = doc.getFirstChild(); final SVGGElement g = new SVGGElement(doc); final SVGDefsElement defs = new SVGDefsElement(doc); SVGElement elt; root.appendChild(defs); root.appendChild(g); root.setAttribute("xmlns:"+LNamespace.LATEXDRAW_NAMESPACE, LNamespace.LATEXDRAW_NAMESPACE_URI);//$NON-NLS-1$ for(final IShape sh : shapes) if(sh!=null) { // For each shape an SVG element is created. elt = SVGShapesFactory.INSTANCE.createSVGElement(sh, doc); if(elt!=null) g.appendChild(elt); } // Setting SVG attributes to the created document. root.setAttribute(SVGAttributes.SVG_VERSION, "1.1");//$NON-NLS-1$ root.setAttribute(SVGAttributes.SVG_BASE_PROFILE, "full");//$NON-NLS-1$ return doc; } protected T generateShape() { final T sh = saveLoadShape(shape); assertNotNull(sh); assertEquals(sh.getClass(), shape.getClass()); return sh; } protected void compareShapes(final T sh2) { if(shape.isShowPtsable()) { assertEquals(shape.isShowPts(), sh2.isShowPts()); } if(shape.isThicknessable()) { assertEquals(shape.getThickness(), sh2.getThickness(), 0.0001); } if(shape.isLineStylable()) { assertEquals(shape.getLineStyle(), sh2.getLineStyle()); assertEquals(shape.getLineColour(), sh2.getLineColour()); switch(shape.getLineStyle()) { case DASHED: assertEquals(shape.getDashSepBlack(), sh2.getDashSepBlack(), 0.0001); assertEquals(shape.getDashSepWhite(), sh2.getDashSepWhite(), 0.0001); break; case DOTTED: assertEquals(shape.getDotSep(), sh2.getDotSep(), 0.0001); break; default: } } if(shape.isShadowable()) { assertEquals(shape.hasShadow(), sh2.hasShadow()); assertEquals(shape.getShadowAngle(), sh2.getShadowAngle(), 0.0001); assertEquals(shape.getShadowCol(), sh2.getShadowCol()); assertEquals(shape.getShadowSize(), sh2.getShadowSize(), 0.0001); } if(shape.isDbleBorderable()) { assertEquals(shape.hasDbleBord(), sh2.hasDbleBord()); assertEquals(shape.getDbleBordCol(), sh2.getDbleBordCol()); assertEquals(shape.getDbleBordSep(), sh2.getDbleBordSep(), 0.0001); } if(shape.isInteriorStylable()) { assertEquals(shape.getFillingStyle(), sh2.getFillingStyle()); assertEquals(shape.isFilled(), sh2.isFilled()); assertEquals(shape.getFillingCol(), sh2.getFillingCol()); if(shape.getFillingStyle().isHatchings()) { assertEquals(shape.getHatchingsAngle(), sh2.getHatchingsAngle(), 0.0001); assertEquals(shape.getHatchingsCol(), sh2.getHatchingsCol()); assertEquals(shape.getHatchingsSep(), sh2.getHatchingsSep(), 0.0001); assertEquals(shape.getHatchingsWidth(), sh2.getHatchingsWidth(), 0.0001); }else if(shape.getFillingStyle().isGradient()) { assertEquals(shape.getGradAngle(), sh2.getGradAngle(), 0.0001); assertEquals(shape.getGradMidPt(), sh2.getGradMidPt(), 0.0001); assertEquals(shape.getGradColEnd(), sh2.getGradColEnd()); assertEquals(shape.getGradColStart(), sh2.getGradColStart()); } } } @Test public void testShowPoints() { if(shape.isShowPtsable()) { setDefaultDimensions(); shape.setShowPts(true); compareShapes(generateShape()); } } @Test public void testShadow() { if(shape.isShadowable()) { setDefaultDimensions(); shape.setFillingStyle(FillingStyle.PLAIN);// Must fill the shape before. shape.setHasShadow(true); shape.setShadowAngle(-1); shape.setShadowCol(Color.RED); shape.setShadowSize(11.2); compareShapes(generateShape()); } } @Test public void testDoubleBorders() { if(shape.isDbleBorderable()) { setDefaultDimensions(); shape.setHasDbleBord(true); shape.setDbleBordCol(Color.GREEN); shape.setDbleBordSep(3.); compareShapes(generateShape()); } } @Test public void testDoubleBordersWithShadow() { if(shape.isShadowable() && shape.isDbleBorderable()) { setDefaultDimensions(); shape.setFillingStyle(FillingStyle.PLAIN);// Must fill the shape before. shape.setHasDbleBord(true); shape.setDbleBordCol(Color.GREEN); shape.setDbleBordSep(3.); shape.setHasShadow(true); shape.setShadowAngle(-1); shape.setShadowCol(Color.RED); shape.setShadowSize(11.2); compareShapes(generateShape()); } } @Test public void testBorderStyle() { if(shape.isLineStylable()) { shape.setLineStyle(LineStyle.DASHED); shape.setThickness(10); shape.setLineColour(Color.YELLOW); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsPLAIN() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.PLAIN); shape.setHatchingsCol(Color.GRAY); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsVLINESPLAIN() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.VLINES_PLAIN); shape.setHatchingsAngle(1.2); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsVLINES() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.VLINES); shape.setHatchingsAngle(1.2); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsHLINESPLAIN() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.HLINES_PLAIN); shape.setHatchingsAngle(1.2); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsHLINES() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.HLINES); shape.setHatchingsAngle(1.2); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsCLINESPLAIN() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.CLINES_PLAIN); shape.setHatchingsAngle(1.2); shape.setFillingCol(Color.LIGHT_GRAY); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingHatchingsCLINES() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.CLINES); shape.setHatchingsAngle(1.2); shape.setHatchingsCol(Color.GRAY); shape.setHatchingsSep(3.12); shape.setHatchingsWidth(123.3); setDefaultDimensions(); compareShapes(generateShape()); } } @Test public void testFillingGradient() { if(shape.isInteriorStylable()) { shape.setFillingStyle(FillingStyle.GRAD); shape.setGradAngle(0.2); shape.setGradColEnd(Color.BLUE); shape.setGradColStart(Color.CYAN); shape.setGradMidPt(0.1); setDefaultDimensions(); compareShapes(generateShape()); } } protected abstract void setDefaultDimensions(); } TestLoadSaveSVGCircle.java000066400000000000000000000005051321075051700335370ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircle; import org.junit.Before; public class TestLoadSaveSVGCircle extends TestLoadSaveSVGSquaredShape { @Before public void setUp() { shape = ShapeFactory.createCircle(); } } TestLoadSaveSVGCircleArc.java000066400000000000000000000027501321075051700341710ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ICircleArc; import org.junit.Before; import org.junit.Test; public class TestLoadSaveSVGCircleArc extends TestLoadSaveSVGSquaredShape { @Before public void setUp() { shape = ShapeFactory.createCircleArc(); } @Test public void testStartAngle0() { setDefaultDimensions(); shape.setAngleStart(0); compareShapes(generateShape()); } @Test public void testStartAngle90() { setDefaultDimensions(); shape.setAngleStart(Math.PI/2.); compareShapes(generateShape()); } @Test public void testStartAngle180() { setDefaultDimensions(); shape.setAngleStart(Math.PI); compareShapes(generateShape()); } @Test public void testStartAngle270EndAngle180() { setDefaultDimensions(); shape.setAngleEnd(-Math.PI); shape.setAngleStart(-Math.PI/2.); compareShapes(generateShape()); } @Test public void testEndAngle0() { setDefaultDimensions(); shape.setAngleStart(-Math.PI); shape.setAngleEnd(0); compareShapes(generateShape()); } @Test public void testEndAngle90() { setDefaultDimensions(); shape.setAngleEnd(Math.PI/2.); compareShapes(generateShape()); } @Test public void testEndAngle180() { setDefaultDimensions(); shape.setAngleEnd(Math.PI); compareShapes(generateShape()); } @Test public void testEndAngle270() { setDefaultDimensions(); shape.setAngleEnd(3*Math.PI/2.); compareShapes(generateShape()); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSave/TestLoadSaveSVGDot.java000066400000000000000000000071441321075051700331510ustar00rootroot00000000000000package test.svg.loadSave; import java.awt.Color; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.IDotProp.DotStyle; import net.sf.latexdraw.glib.models.interfaces.shape.IDot; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class TestLoadSaveSVGDot extends TestLoadSaveSVGPositionShape { @Before public void setUp() { shape = ShapeFactory.createDot(ShapeFactory.createPoint()); } private void setDot(final double x, final double y, final DotStyle style, final double size, final Color lineCol, final Color fillCol) { shape.setPosition(x, y); shape.setDotStyle(style); shape.setDiametre(size); shape.setLineColour(lineCol); if(fillCol!=null) shape.setFillingCol(fillCol); } @Override protected void setDefaultDimensions() { // } @Override protected void compareShapes(IDot d2) { assertEquals(shape.getDotStyle(), d2.getDotStyle()); assertEquals(shape.getPosition(), d2.getPosition()); assertEquals(shape.getDiametre(), d2.getDiametre(), 0.1); assertEquals(shape.getLineColour(), d2.getLineColour()); assertEquals(shape.isFillable(), shape.isFillable()); assertEquals(shape.isFilled(), shape.isFilled()); if(shape.isFilled()) assertEquals(shape.getFillingCol(), d2.getFillingCol()); } @Test public void testLoadSaveDotDOT() { setDot(11.3, 82, DotStyle.DOT, 33, Color.RED, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotO() { setDot(11.3, 82, DotStyle.O, 22, Color.DARK_GRAY, Color.YELLOW); compareShapes(generateShape()); } @Test public void testLoadSaveDotSQUARE() { setDot(11.3, 82, DotStyle.SQUARE, 22, Color.DARK_GRAY, Color.YELLOW); compareShapes(generateShape()); } @Test public void testLoadSaveDotFSQUARE() { setDot(11.3, 82, DotStyle.FSQUARE, 22, Color.DARK_GRAY, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotFPENTAGON() { setDot(11.3, 82, DotStyle.FPENTAGON, 33, Color.RED, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotPENTAGON() { setDot(11.3, 82, DotStyle.PENTAGON, 33, Color.RED, Color.BLUE); compareShapes(generateShape()); } @Test public void testLoadSaveDotX() { setDot(11.3, 82, DotStyle.X, 23, Color.RED, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotFDIAMOND() { setDot(11.3, 82, DotStyle.FDIAMOND, 123, Color.CYAN, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotDIAMOND() { setDot(11.3, 82, DotStyle.DIAMOND, 123, Color.CYAN, Color.DARK_GRAY); compareShapes(generateShape()); } @Test public void testLoadSaveDotFTRIANGLE() { setDot(1.3, 82, DotStyle.FTRIANGLE, 12, Color.CYAN, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotTRIANGLE() { setDot(1.3, 82, DotStyle.TRIANGLE, 12, Color.CYAN, Color.GREEN); compareShapes(generateShape()); } @Test public void testLoadSaveDotOTIMES() { setDot(1, 2, DotStyle.OTIMES, 54, Color.GREEN, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotPLUS() { setDot(145, 2, DotStyle.PLUS, 24, Color.MAGENTA, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotOPLUS() { setDot(111, 82.12, DotStyle.OPLUS, 2, Color.GRAY, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotASTERISK() { setDot(-20, 12.12, DotStyle.ASTERISK, 22, Color.BLUE, null); compareShapes(generateShape()); } @Test public void testLoadSaveDotBAR() { setDot(20, -12.12, DotStyle.BAR, 3, Color.CYAN, null); compareShapes(generateShape()); } } TestLoadSaveSVGEllipse.java000066400000000000000000000005151321075051700337340ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IEllipse; import org.junit.Before; public class TestLoadSaveSVGEllipse extends TestLoadSaveSVGRectangularShape { @Before public void setUp() { shape = ShapeFactory.createEllipse(); } } TestLoadSaveSVGModifiablePointsShape.java000066400000000000000000000016511321075051700365520ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IModifiablePointsShape; public abstract class TestLoadSaveSVGModifiablePointsShape extends TestLoadSaveSVG { @Override protected void compareShapes(final T r2) { super.compareShapes(r2); assertEquals(shape.getNbPoints(), r2.getNbPoints()); for(int i=0, size=shape.getNbPoints(); i { @Before public void setUp() { shape = ShapeFactory.createPlot(ShapeFactory.createPoint(), -338.0, 124.0, "2 x mul", true); shape.setNbPlottedPoints(331); } @Test public void testPropertiesDot() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); for(IDotProp.DotStyle style : IDotProp.DotStyle.values()) { shape.setDotStyle(style); assertEquals(style.isFillable(), shape.isFillable()); assertFalse(shape.isShadowable()); assertFalse(shape.isBordersMovable()); assertFalse(shape.isInteriorStylable()); assertFalse(shape.isLineStylable()); assertFalse(shape.isShowPtsable()); assertFalse(shape.isThicknessable()); } } @Test public void testPropertiesNotDot() { shape.setPlotStyle(IPlotProp.PlotStyle.CURVE); assertTrue(shape.isFillable()); assertTrue(shape.isShadowable()); assertFalse(shape.isBordersMovable()); assertTrue(shape.isInteriorStylable()); assertTrue(shape.isLineStylable()); assertFalse(shape.isShowPtsable()); assertTrue(shape.isThicknessable()); } @Test public void testPlotDotsFillable() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); shape.setDiametre(12.0); shape.setDotStyle(IDotProp.DotStyle.DIAMOND); shape.setFillingCol(Color.BLUE); compareShapes(generateShape()); } @Test public void testPlotDotsNotFillable() { shape.setPlotStyle(IPlotProp.PlotStyle.DOTS); shape.setDiametre(12.0); shape.setDotStyle(IDotProp.DotStyle.DOT); shape.setLineColour(Color.BLUE); compareShapes(generateShape()); } @Test public void testPlotCurves() { shape.setPlotStyle(IPlotProp.PlotStyle.CURVE); compareShapes(generateShape()); shape.setPlotStyle(IPlotProp.PlotStyle.CCURVE); compareShapes(generateShape()); shape.setPlotStyle(IPlotProp.PlotStyle.ECURVE); compareShapes(generateShape()); } @Test public void testPlotLines() { shape.setPlotStyle(IPlotProp.PlotStyle.LINE); compareShapes(generateShape()); shape.setPlotStyle(IPlotProp.PlotStyle.POLYGON); compareShapes(generateShape()); } @Override protected void compareShapes(final IPlot sh2) { super.compareShapes(sh2); assertEquals(shape.getPosition().getX(), sh2.getPosition().getX(), 0.0001); assertEquals(shape.getPosition().getY(), sh2.getPosition().getY(), 0.0001); assertEquals(shape.getPlotMaxX(), sh2.getPlotMaxX(), 0.0001); assertEquals(shape.getPlotMinX(), sh2.getPlotMinX(), 0.0001); assertEquals(shape.getPlotEquation(), sh2.getPlotEquation()); assertEquals(shape.getPlotStyle(), sh2.getPlotStyle()); assertEquals(shape.getPlottingStep(), sh2.getPlottingStep(), 0.0001); assertEquals(shape.getNbPlottedPoints(), sh2.getNbPlottedPoints()); assertEquals(shape.getDotStyle(), sh2.getDotStyle()); assertEquals(shape.getDiametre(), sh2.getDiametre(), 0.0001); if(shape.isFillable()) assertEquals(shape.getDotFillingCol(), sh2.getDotFillingCol()); } } TestLoadSaveSVGPolygon.java000066400000000000000000000005221321075051700337640ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import org.junit.Before; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IPolygon; public class TestLoadSaveSVGPolygon extends TestLoadSaveSVGModifiablePointsShape { @Before public void setUp() { shape = ShapeFactory.createPolygon(); } } TestLoadSaveSVGPolyline.java000066400000000000000000000004101321075051700341240ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import org.junit.Before; public class TestLoadSaveSVGPolyline extends TestLoadSaveSVGPolygon { @Before @Override public void setUp() { shape = ShapeFactory.createPolyline(); } } TestLoadSaveSVGPositionShape.java000066400000000000000000000011141321075051700351200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.interfaces.shape.IPositionShape; public abstract class TestLoadSaveSVGPositionShape extends TestLoadSaveSVG { @Override protected void compareShapes(final T sh2) { super.compareShapes(sh2); assertEquals(sh2.getPosition().getX(), shape.getPosition().getX(), 0.00001); assertEquals(sh2.getPosition().getY(), shape.getPosition().getY(), 0.00001); } @Override protected void setDefaultDimensions() { shape.setPosition(200.0, 300.0); } } TestLoadSaveSVGRectangle.java000066400000000000000000000010041321075051700342350ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangle; import org.junit.Before; import org.junit.Test; public class TestLoadSaveSVGRectangle extends TestLoadSaveSVGRectangularShape { @Before public void setUp() { shape = ShapeFactory.createRectangle(); } @Test public void testFrameArc() { shape.setThickness(10); shape.setLineArc(0.3); setDefaultDimensions(); compareShapes(generateShape()); } } TestLoadSaveSVGRectangularShape.java000066400000000000000000000051711321075051700355720ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.glib.models.interfaces.shape.IRectangularShape; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import org.junit.Test; public abstract class TestLoadSaveSVGRectangularShape extends TestLoadSaveSVGPositionShape { protected void setRectangle(final double x, final double y, final double w, final double h) { shape.setPosition(x, y+h); shape.setWidth(w); shape.setHeight(h); } @Override protected void setDefaultDimensions() { setRectangle(2, 30, 20, 12); } @Override protected void compareShapes(final T r2) { super.compareShapes(r2); assertEquals(shape.getPosition().getX(), r2.getPosition().getX(), 0.0001); assertEquals(shape.getPosition().getY(), r2.getPosition().getY(), 0.0001); assertEquals(shape.getWidth(), r2.getWidth(), 0.0001); assertEquals(shape.getHeight(), r2.getHeight(), 0.0001); } @Test public void testDimensionOkWith00Position() { setRectangle(0, 0, 10, 10); compareShapes(generateShape()); } @Test public void testDimensionOkWithPositivePosition() { setRectangle(5, 5, 10, 10); compareShapes(generateShape()); } @Test public void testDimensionOkWithNegPosition() { setRectangle(-21, -829, 923, 5); compareShapes(generateShape()); } @Test public void testDimensionOkWith00PositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setRectangle(0, 0, 10, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithPositivePositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setRectangle(5, 5, 10, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithNegPositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setRectangle(-21, -829, 923, 5); compareShapes(generateShape()); } } @Test public void testDimensionOkWith00PositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setRectangle(0, 0, 10, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithPositivePositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setRectangle(5, 5, 10, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithNegPositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setRectangle(-21, -829, 923, 5); compareShapes(generateShape()); } } } TestLoadSaveSVGRhombus.java000066400000000000000000000005151321075051700337560ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.IRhombus; import org.junit.Before; public class TestLoadSaveSVGRhombus extends TestLoadSaveSVGRectangularShape { @Before public void setUp() { shape = ShapeFactory.createRhombus(); } } TestLoadSaveSVGSquare.java000066400000000000000000000005051321075051700335760ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ISquare; import org.junit.Before; public class TestLoadSaveSVGSquare extends TestLoadSaveSVGSquaredShape { @Before public void setUp() { shape = ShapeFactory.createSquare(); } } TestLoadSaveSVGSquaredShape.java000066400000000000000000000050021321075051700347200ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import static org.junit.Assert.assertEquals; import org.junit.Test; import net.sf.latexdraw.glib.models.interfaces.shape.IShape.BorderPos; import net.sf.latexdraw.glib.models.interfaces.shape.ISquaredShape; public abstract class TestLoadSaveSVGSquaredShape extends TestLoadSaveSVGPositionShape { protected void setSquare(final double x, final double y, final double w) { shape.setPosition(x, y+w); shape.setWidth(w); } @Override protected void setDefaultDimensions() { setSquare(2, 30, 20); } @Override protected void compareShapes(final T r2) { super.compareShapes(r2); assertEquals(shape.getPosition().getX(), r2.getPosition().getX(), 0.0001); assertEquals(shape.getPosition().getY(), r2.getPosition().getY(), 0.0001); assertEquals(shape.getWidth(), r2.getWidth(), 0.0001); assertEquals(shape.getHeight(), r2.getHeight(), 0.0001); } @Test public void testDimensionOkWith00Position() { setSquare(0, 0, 10); compareShapes(generateShape()); } @Test public void testDimensionOkWithPositivePosition() { setSquare(5, 5, 10); compareShapes(generateShape()); } @Test public void testDimensionOkWithNegPosition() { setSquare(-21, -829, 923); compareShapes(generateShape()); } @Test public void testDimensionOkWith00PositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setSquare(0, 0, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithPositivePositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setSquare(5, 5, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithNegPositionAndMiddleBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.MID); setSquare(-21, -829, 923); compareShapes(generateShape()); } } @Test public void testDimensionOkWith00PositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setSquare(0, 0, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithPositivePositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setSquare(5, 5, 10); compareShapes(generateShape()); } } @Test public void testDimensionOkWithNegPositionAndOutBord() { if(shape.isBordersMovable()) { shape.setBordersPosition(BorderPos.OUT); setSquare(-21, -829, 923); compareShapes(generateShape()); } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSave/TestLoadSaveSVGText.java000066400000000000000000000047451321075051700333530ustar00rootroot00000000000000package test.svg.loadSave; import static org.junit.Assert.assertEquals; import java.awt.Color; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.prop.ITextProp.TextPosition; import net.sf.latexdraw.glib.models.interfaces.shape.IText; import org.junit.Before; import org.junit.Test; public class TestLoadSaveSVGText extends TestLoadSaveSVGPositionShape { @Before public void setUp() { shape = ShapeFactory.createText(); } @Override protected void setDefaultDimensions() { // } @Override protected void compareShapes(final IText sh2) { assertEquals(shape.getPosition().getX(), sh2.getPosition().getX(), 0.0001); assertEquals(shape.getPosition().getY(), sh2.getPosition().getY(), 0.0001); } @Test public void testTextPositionTOP() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(11., 12.); shape.setTextPosition(TextPosition.TOP); compareShapes(generateShape()); } @Test public void testTextPositionBOT() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(-11., -12.); shape.setTextPosition(TextPosition.BOT); compareShapes(generateShape()); } @Test public void testTextPositionTOP_LEFT() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(101., 1.); shape.setTextPosition(TextPosition.TOP_LEFT); compareShapes(generateShape()); } @Test public void testTextPositionTOP_RIGHT() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(11., 12.); shape.setTextPosition(TextPosition.TOP_RIGHT); compareShapes(generateShape()); } @Test public void testTextPositionBOT_RIGHT() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(1., 0.); shape.setTextPosition(TextPosition.BOT_RIGHT); compareShapes(generateShape()); } @Test public void testTextPositionBOT_LEFT() { shape.setText("coucou"); //$NON-NLS-1$ shape.setPosition(111., 123.); shape.setTextPosition(TextPosition.BOT_LEFT); compareShapes(generateShape()); } @Test public void testStandardText() { shape.setText("coucou"); //$NON-NLS-1$ shape.setLineColour(Color.RED); compareShapes(generateShape()); } @Test public void testMathLaTeXText() { shape.setText("$fd_{er}$"); //$NON-NLS-1$ compareShapes(generateShape()); } @Test public void testInvalidLaTeXText() { shape.setText("$fd_{er"); //$NON-NLS-1$ compareShapes(generateShape()); } @Test public void testMultilineText() { shape.setText("$fd_{er}$\n\n\\emph{coucou}"); //$NON-NLS-1$ compareShapes(generateShape()); } } TestLoadSaveSVGTriangle.java000066400000000000000000000005211321075051700341010ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/svg/loadSavepackage test.svg.loadSave; import net.sf.latexdraw.glib.models.ShapeFactory; import net.sf.latexdraw.glib.models.interfaces.shape.ITriangle; import org.junit.Before; public class TestLoadSaveSVGTriangle extends TestLoadSaveSVGRectangularShape { @Before public void setUp() { shape = ShapeFactory.createTriangle(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/util/000077500000000000000000000000001321075051700253335ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/util/TestLLang.java000077500000000000000000000047311321075051700300430ustar00rootroot00000000000000package test.util; import static net.sf.latexdraw.lang.LangTool.INSTANCE; import static org.junit.Assert.assertEquals; import net.sf.latexdraw.lang.LangTool; import org.junit.Test; public class TestLLang{ @Test public void testGetOthersString() { assertEquals(INSTANCE.getStringOthers(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getStringOthers("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getStringOthers(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetStringLaTeXDrawFrame() { assertEquals(INSTANCE.getStringLaTeXDrawFrame(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getStringLaTeXDrawFrame("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getStringLaTeXDrawFrame(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetString1_6() { assertEquals(INSTANCE.getString16(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getString16("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getString16(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetString1_7() { assertEquals(INSTANCE.getString17(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getString17("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getString17(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetString1_8() { assertEquals(INSTANCE.getString18(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getString18("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getString18(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetString1_9() { assertEquals(INSTANCE.getString19(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getString19("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getString19(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testGetDialogFrameString() { assertEquals(INSTANCE.getStringDialogFrame(null), LangTool.MISSING_KEY); assertEquals(INSTANCE.getStringDialogFrame("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals(INSTANCE.getStringDialogFrame(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$ } @Test public void testLang() { INSTANCE.readLang(); LangTool.getCurrentLanguage(); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/util/TestLNumber.java000066400000000000000000000044711321075051700304100ustar00rootroot00000000000000package test.util; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import net.sf.latexdraw.util.LNumber; import org.junit.Test; public class TestLNumber{ @Test public void testEqualsEqual() { assertTrue(LNumber.equalsDouble(10, 0, 10)); assertTrue(LNumber.equalsDouble(-10, 0, 10)); } @Test public void testEquals1() { double a = 1./3.; double b = 0.333333333333333; assertTrue(LNumber.equalsDouble(a, b)); b = 0.3299; assertFalse(LNumber.equalsDouble(a, b)); a = -1./3.; b = -0.333333333333333; assertTrue(LNumber.equalsDouble(a, b)); b = -0.3299; assertFalse(LNumber.equalsDouble(a, b)); } @Test public void testEquals2() { double a = 1./3.; double b = 0.333333333333333; assertTrue(LNumber.equalsDouble(a, b, 0.00001)); b = 0.3299; assertFalse(LNumber.equalsDouble(a, b, 0.00000001)); assertTrue(LNumber.equalsDouble(a, b, 0.01)); a = -1./3.; b = -0.333333333333333; assertTrue(LNumber.equalsDouble(a, b, 0.00001)); b = -0.3299; assertFalse(LNumber.equalsDouble(a, b, 0.00000001)); assertFalse(LNumber.equalsDouble(a, b, -0.00000001)); assertFalse(LNumber.equalsDouble(a, b, 0.)); assertTrue(LNumber.equalsDouble(a, b, 0.01)); } @Test public void testGetCutNumber1() { double v = 0.333333333333333; assertEquals(v, LNumber.getCutNumber(v, 0.1), 0.0001); assertEquals(v, LNumber.getCutNumber(v, 0.2), 0.0001); assertEquals(v, LNumber.getCutNumber(v, 0.3), 0.0001); assertEquals(0., LNumber.getCutNumber(v, 0.34), 0.0001); v = 0.000001; assertEquals(v, LNumber.getCutNumber(v, 0.00000001), 0.0001); assertEquals(0., LNumber.getCutNumber(v, 0.00001), 0.0001); v = 1E-10; assertEquals(0., LNumber.getCutNumber(v, 0.00000001), 0.0001); } @Test public void testGetCutNumber2() { float v = 0.333333333333333f; assertEquals(v, LNumber.getCutNumber(v, 0.1), 0.0001); assertEquals(v, LNumber.getCutNumber(v, 0.2), 0.0001); assertEquals(v, LNumber.getCutNumber(v, 0.3), 0.0001); assertEquals(0f, LNumber.getCutNumber(v, 0.34), 0.0001); v = 0.000001f; assertEquals(v, LNumber.getCutNumber(v, 0.00000001), 0.0001); assertEquals(0f, LNumber.getCutNumber(v, 0.00001), 0.0001); v = 1E-10f; assertEquals(0f, LNumber.getCutNumber(v, 0.00000001), 0.0001); } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/src/test/test/util/TestResources.java000077500000000000000000000217041321075051700310170ustar00rootroot00000000000000package test.util; import static org.junit.Assert.assertNotNull; import java.net.URL; import javax.swing.ImageIcon; import org.junit.Test; public class TestResources{ @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.into.png"));//$NON-NLS-1$ assertNotNull(loadImageIcon("/res/doubleBoundary/double.boundary.out.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/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/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/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/join.png"));//$NON-NLS-1$ assertNotNull(loadImageIcon("/res/separate.png"));//$NON-NLS-1$ assertNotNull(loadImageIcon("/res/bezierCurve.png"));//$NON-NLS-1$ assertNotNull(loadImageIcon("/res/chord.png")); //$NON-NLS-1$ assertNotNull(loadImageIcon("/res/joinedLines.png")); //$NON-NLS-1$ assertNotNull(loadImageIcon("/res/emblem-unreadable.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/freehand/curve.png")); //$NON-NLS-1$ assertNotNull(loadImageIcon("/res/freehand/line.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; } } } latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/000077500000000000000000000000001321075051700236275ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/000077500000000000000000000000001321075051700247505ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/Classic grid.ldt.jpg000066400000000000000000000014401321075051700305220ustar00rootroot00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ᡇ?gÿF·9„žO_»ÉùzÿF±£9û‡ Ï¿½V6C"¹¹{¹’ |´QEo… ŸÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/Condenser.ldt.jpg000066400000000000000000000014021321075051700301510ustar00rootroot00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?÷úÏÓ5¾2¹†\ªÍŠD`avo.A‚NÖ ÔðH8éQêZUåõÂËoâ KO@LV±Û²““ó2'9çqÀã®y?øO[·û›¨ßiO‡ôë)>Éöi7ͽNô“îï^FÜy8àÐ(¨à¡·Š'šIÝ+K PÎ@ûÇh'¯@(  (¢Š(¢ŠÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/embrace.ldt.jpg000066400000000000000000000013371321075051700276360ustar00rootroot00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?õóàÍ#ÍšHßU‡Î•ætƒX»‰7»be 2ÌOu£þûâKýqÕx¶n—bõÆV@[’N\³sŒí £ ¢€)éº]¦“nÐÚ$€;—‘å•å’FÀwrYŽ’p€ *åQEQEÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/man.ldt.jpg000066400000000000000000000015301321075051700270060ustar00rootroot00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?íüsyo§ø˜Mu{cËio•ÓÎLÚD¦Y] vÂÛ£Fl…vTþF,¾cg©ÙÇyawݬ™Ù4 °H8aÁÁ~ÃüIÒRî].êÖçU‹SŠU˜A¦m-q &c$eO™³iäÌ€ýúë<9§Xé~³µÓndº´ØeK™'óšà¹.Ò—þ"ìŲ8ù¸À  J(¢€8ß\h¾!mfÞO2KO jsEª aã{fÏcžùº(ÆIê4=%4ËIŠæ{ˆlâXc’}»ö/ ÕQÀÀéÛœœš(  (¢€?ÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/.cache/question.ldt.jpg000066400000000000000000000014701321075051700301050ustar00rootroot00000000000000ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ô¿‰j_Ø/qeqwQÛÜ+}šå­Œ3Ɇv‘XŠë´©;1.÷À5'ëÛ;Íñt©·èö×bÞÂ3r'h#XbÝ`ÌNÙ<ÜeˆÛ´©(P×a^áK{߉ž,ñ 7>%i¶)0 ‘#¸|‚Ñ™ ‘TÑ6ÖpÀEPsÆÓ[ËM$èUeŒ)d$}ḑ×G¨5çþ®_AešH—…ôæeˆ(BU”m— ’Ä cKÉÉ EP¢QEÿÙlatexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/000077500000000000000000000000001321075051700256255ustar00rootroot00000000000000latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/Classic grid.svg000066400000000000000000013406771321075051700306570ustar00rootroot00000000000000 0 1 2 3 4 5 5 4 3 2 1 0 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/Condenser.svg000066400000000000000000000022241321075051700302660ustar00rootroot00000000000000 C latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/embrace.svg000066400000000000000000000014541321075051700277500ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/man.svg000066400000000000000000000054261321075051700271300ustar00rootroot00000000000000 latexdraw-3.3.8/latexdraw-core/net.sf.latexdraw/templates/templates/question.svg000066400000000000000000000053651321075051700302260ustar00rootroot00000000000000